What is the difference?
#1

What is the difference?

Код:
new Pickups[MAX_PLAYERS];
Код:
new Pickups;
Reply
#2

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.
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)