10.10.2010, 02:16
You can either loop through the array checking each one
or you can create an entry in an array positioned according to the pickupid, and simply check the pickupid's data that way
pawn Код:
for(new i = 0; i < sizeof(test);i++)\
{
if(test[i] == pickupid)
{
...
}
}
pawn Код:
#define MAX_ARRAY_PICK 600
...
new test[MAX_ARRAY_PICKUP];
...
//pickup creation script
test[CreatePickup(1232,23,123 /* whatever */ )] = 1;
...
public OnPlayerPickupPickup(playerid,pickupid)
{
if(pickupid < MAX_ARRAY_PICKUP)
{
if(test[pickupid] == 1)
{
...
}
}
return 1;
}