24.12.2016, 14:30
Quote:
Ex:
Код:
new pickupvida[2]; // esse й o new do pickup new verificavida[2]; public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == pickupvida[0]) { if(verificarvida[0] == 1) return SendClientMessage(...); else if(verificarvida[0] == 0) { SetPlayerHealth(...); verificarvida[0] = 1; } } return 1; } public OnPlayerDeath(playerid, killerid, reason) { verificarvida[0] = 0; verificarvida[1] = 0; } ou public OnPlayerDeath(playerid, killerid, reason) { for(new i=0; i<2; i++) verificarvida[i] = 0; } |