14.08.2010, 23:05
Hello, i tried the suicide script but i don't get the ClientMessage,
i didn't try the if someone else kills me but what did i do wrong?
i didn't try the if someone else kills me but what did i do wrong?
Quote:
public OnPlayerDeath(playerid, killerid, reason) { PlayerInfo[playerid][pDeaths] += 1; if(killerid != INVALID_PLAYER_ID) { new str[256]; new name1[256]; new name2[256]; GetPlayerName(playerid, name1, sizeof(name1)); GetPlayerName(killerid, name2, sizeof(name2)); format(str, sizeof(str), "» You hunted %s(%i) down, gained: $10000 | Killer: %s(%i)", name1, playerid, name2, killerid); GivePlayerMoney(killerid, 10000); PlayerInfo[killerid][pKills] += 1; SendDeathMessage(killerid, playerid, reason); SendClientMessage(killerid, COLOR_LIGHTBLUE, "[=================| BOOM |=================]"); SendClientMessage(killerid, COLOR_GRAD1, str); SendClientMessage(killerid, COLOR_LIGHTBLUE, "[=================| BOOM |=================]"); return 1; } else { SendClientMessage(killerid, COLOR_LIGHTBLUE, "[=================| BOOM |=================]"); SendClientMessage(killerid, COLOR_GRAD1, "You have commited suicide."); SendClientMessage(killerid, COLOR_LIGHTBLUE, "[=================| BOOM |=================]"); return 1; } } |