13.06.2011, 21:33
When my character gets killed theirs a loop that makes him die and die again. How can I make him spawn with full health again?
public OnPlayerDeath(playerid, killerid, reason) { new string[64]; GivePlayerMoney(playerid, -1000); GivePlayerMoney(playerid, 1000); format(string, sizeof(string), "KILL: You were killed by %s.", killerid); SendClientMessage(playerid, COLOR_RED, string); format(string, sizeof(string), "KILL: %s was killed by %s.",playerid,killerid); SendClientMessageToAll(COLOR_RED, string); if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); if(playerid != INVALID_PLAYER_ID) SetPlayerScore(playerid, GetPlayerScore(killerid) - 1); return 1; }
GivePlayerMoney(playerid, -1000); GivePlayerMoney(playerid, 1000); |