SA-MP Forums Archive
Allowing 1 car per person? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Allowing 1 car per person? (/showthread.php?tid=147308)



Allowing 1 car per person? - lewisno7 - 11.05.2010

Edited to pastebin:

http://pastebin.com/7dg6KNL3


Re: Allowing 1 car per person? - lewisno7 - 11.05.2010

Edited to pastebinnn

http://pastebin.com/7dg6KNL3


Re: Allowing 1 car per person? - ViruZZzZ_ChiLLL - 11.05.2010

lol, man edit your post and use or paste it in http://pastebin.com because
its very hard to read

EDIT : Okay, paste it in http://pastebin.com
because its a long code :O


Re: Allowing 1 car per person? - lewisno7 - 11.05.2010

Muahaha, forgot about pastebin! :P

http://pastebin.com/7dg6KNL3


Re: Allowing 1 car per person? - ViruZZzZ_ChiLLL - 11.05.2010

Quote:
Originally Posted by lewisno7
Muahaha, forgot about pastebin! :P

http://pastebin.com/7dg6KNL3
LOL :P
anyways, what do you mean by a 1 car per person only?


Re: Allowing 1 car per person? - lewisno7 - 11.05.2010

Like, only 1 car per person / character.



Re: Allowing 1 car per person? - Zh3r0 - 11.05.2010

Use variables...

like
On top.
pawn Код:
new OnCarPerPlayer[MAX_PLAYERS];
This is for your code.
pawn Код:
If(OneCarPerPlayer[playerid] == 1)
{
SendClientMessage(playerid, color, " One car per player!!!");
}
else
{
//Code to spawn the car
OneCarPerPlayer[playerid] = 1;//(To make it 1, and when he types again the command he will receive the message above)
}

Mayko, not global...use [MAX_PLAYERS] for one player only, not for everyone...


Re: Allowing 1 car per person? - lewisno7 - 11.05.2010

Where abouts in the code do i put this, end or start?


Re: Allowing 1 car per person? - lewisno7 - 11.05.2010

BUMP


Re: Allowing 1 car per person? - lewisno7 - 11.05.2010

bump -.-