What is the difference? - 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)
+--- Thread: What is the difference? (
/showthread.php?tid=575877)
What is the difference? -
Blackazur - 30.05.2015
What is the difference?
Код:
new Pickups[MAX_PLAYERS];
Re: What is the difference? -
SickAttack - 30.05.2015
The first one is a per-player variable or a variable with the amount of slots the definition "MAX_PLAYERS" has. The second one is a global stand-alone variable.
Re: What is the difference? -
amirm3hdi - 30.05.2015
Well, Pickupsp[MAX_PLAYERS] is an array, you can use it for each player ids.
but Pickups is a simple variable.
ex:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
DestroyPickup(Pickups[playerid]);
Pickups[playerid] = CreatePickup(323, 19, X, Y, Z, 0); // Get the XYZ by player pos
}
Now every player who dies, a pickup where he died is made.