Skip to content
View in the app

A better way to browse. Learn more.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[HELP] Business system

Hey everybody,

Sorry, I'll speak in English cause I don't know your language..

I'd like to ask your help, converting my house system, to business system..

I've made AddBiz function, but I couldn't complete the script cause I'm stuck...

Here's what I've done (some parts are still left from house system):

http://pastebin.com/m368d42fb

So what is still needed: When player is on pickup, show him GameTextForPlayer("Business [name] owner: [name] status: [locked/unlocked]")

And commands: /buybiz /sellbiz /setprice (for production price (production depends on business type))

Thank you :)

Edited by SiJ

Featured Replies

It's a pretty sofisticated script, but I think you need to look in this direction:

public OnPlayerPickUpPickup(playerid, pickupid)
{
   for(new b = 0; b < MAX_BIZ; b++)
   {
       if(IsPlayerInRangeOfPoint(playerid, 2.0, IconX[b], IconY[b], IconZ[b]))
       {
           GetBizStats(playerid, b);
           return 1;
       }
   }
   return 1;
}

You can pretty much use the same code to check if the player is near a business when he's using /buybiz or /sellbiz, for example.

  • Author

It's a pretty sofisticated script, but I think you need to look in this direction:

public OnPlayerPickUpPickup(playerid, pickupid)
{
   for(new b = 0; b < MAX_BIZ; b++)
   {
       if(IsPlayerInRangeOfPoint(playerid, 2.0, IconX[b], IconY[b], IconZ[b]))
       {
           GetBizStats(playerid, b);
           return 1;
       }
   }
   return 1;
}

You can pretty much use the same code to check if the player is near a business when he's using /buybiz or /sellbiz, for example.

I don't think IsPlayerInRangeOfPoint is needed to be checked OnPlayerPickupPickUp callback.. I think if(pickupid == SomePickup) would be ok.. but anyway I think I'll know how can I make it..

Thanks for reply :)

Why you dont use enum?

EDIT:

OnPlayerPickupPickup:

for(new i;i<MAX_BIZ;i++)
{
   if(hPickup[i] == pickup)
   {
       //...
   }
}

Edited by GTAguillaume

Why you asking on a dutch forum?, and not on forum.sa-mp.com ?

  • Author

Sandra from this forum has created something a time ago, maybe you can use it:

Look here.

Good luck :*D !

Thanks.. But I've decided to make my own stuff :puh:

Why you dont use enum?

EDIT:

OnPlayerPickupPickup:

for(new i;i<MAX_BIZ;i++)
{
   if(hPickup[i] == pickup)
   {
       //...
   }
}

Because I don't know how to use enum.. :O

But I think I can make it without it.. Thanks.. :)

Why you asking on a dutch forum?, and not on forum.sa-mp.com ?

Because you can get help on sa-mp forums only in 3-5 days..

Thanks, I know how to make my own biz system now.. :)

Topic may be locked.. :)

Thanks.

Because you can get help on sa-mp forums only in 3-5 days..

Thanks, I know how to make my own biz system now.. :)

Topic may be locked.. :)

Thanks.

Thats true,

Lol you don't see any newbie scripter that posting here :puh:

Edit: lol, kromme zin xD

Edited by Crusher!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.