SA-MP Forums Archive
new variable - 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: new variable (/showthread.php?tid=104382)



new variable - thuron - 24.10.2009

i have a variable in the server made like this:
Код:
new inshop = 0;
this code is for the whole server. if 1 player goes into the shop, the variable is 1 for everyone. how to make it so that the variable can be diffrent for each player?


Re: new variable - Infamous - 24.10.2009

Код:
new inshop[MAX_PLAYERS];
Then set this when your players enter the shop:

Код:
inshop[playerid] =1;



Re: new variable - thuron - 24.10.2009

ty!!


Re: new variable - Mikep. - 24.10.2009

No nede to put new var = 0;, it's 0 by default.