08.08.2010, 04:54
I have a problem with pickups.
I don't know why but it mess up all the pickups i have ingame. I mean if i get an health pickup instead of being healed i get 10000 dollars, if i get a weapon pickup i get the message and if i get one of the pickups i rarely get the right action. I don't know why, the script looks ok to me. I can't find anything wrong in it.
Код:
public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == Choice) { DestroyPickup(Choice); First = CreatePickup(1254, 1, 110.9502, 30.3779,7.0245); Second = CreatePickup(1254, 1, 115.9108,30.2905,7.7594); SendClientMessage(playerid, 0xFFFF00AA, "Now choose the right thing"); } if(pickupid == First) { GivePlayerMoney(playerid, 10000); DestroyPickup(First); DestroyPickup(Second); SetTimer("Restart", 250000, 0); } if(pickupid == Second) { GivePlayerMoney(playerid, -10000); DestroyPickup(First); DestroyPickup(Second); SetTimer("Restart", 250000, 0); } return 1; } forward Restart(); public Restart() { Choice = CreatePickup(139, 1, 113.0321,30.3364,7.6311); return 1; }