Jump to content
Geplaatst:
comment_1578639

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 :)

Bewerkt: door SiJ

Featured Replies

Geplaatst:
comment_1578654

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.

Geplaatst:
  • Auteur
comment_1578694

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 :)

Geplaatst:
  • Auteur
comment_1579554

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.

Geplaatst:
comment_1579651

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

Bewerkt: door Crusher!!

Een reactie plaatsen

Je kan nu een reactie plaatsen en pas achteraf registreren. Als je al lid bent, log eerst in om met je eigen account een reactie te plaatsen.

Gast
Op dit onderwerp reageren...

Recent actief 0

  • Er zijn hier geen geregistreerde gebruikers aanwezig.