30.05.2011, 15:52
I guess this is what you wanted to do:
Try it out.
Jeffry
pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
for(new i<0; i<sizeof(Variable); i++) //Loop through the Variable index
{
if(pickupid == Variable[i]) //If it is same as the number which is stored in Variable[index]
{
switch(i) //switching the index number.
{
case 0: return 1;
case 1: return 1;
case 2: return 1;
case 3: return 1;
case 4: return 1;
}
}
}
return 1;
}
Jeffry