Jump to content

[HELP] Business system


Recommended Posts

Geplaatst: (bewerkt)

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

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:

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

Why you dont use enum?

EDIT:

OnPlayerPickupPickup:

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

Bewerkt: door GTAguillaume
Geplaatst:

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

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...

×   Je hebt text geplaatst met opmaak.   Opmaak verwijderen

  Only 75 emoji are allowed.

×   Je link is automatisch ingevoegd.   In plaats daarvan weergeven als link

×   Je vorige bewerkingen zijn hersteld.   Alles verwijderen

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent actief   0 leden

    • Er zijn hier geen geregistreerde gebruikers aanwezig.
×
×
  • Create New...