02.08.2014, 06:19
hey guys, on my script I have made it so that when someone gets killed by another player, it comes up in the chat saying, for example: "John(5) Died. Killed by Smith(6) - Sawn Off's.".
when a player dies from suicide, I want it just to say: "John(5) Died."
but the thing is, it instead says: "John(5) Died. Killed by (5) - ."
how do i go about doing this? here is my script.
when a player dies from suicide, I want it just to say: "John(5) Died."
but the thing is, it instead says: "John(5) Died. Killed by (5) - ."
how do i go about doing this? here is my script.
Код:
public OnPlayerDeath(playerid, killerid, reason) { new name[MAX_PLAYER_NAME]; new killer[MAX_PLAYER_NAME]; new weapname[50]; new string[50]; GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(killerid, killer, sizeof(killer)); GetWeaponName(GetPlayerWeapon(killerid), weapname, sizeof(weapname)); format(string,128,"%s(%d) Died. Killed by %s(%d) - %s.",name,playerid,killer,playerid,weapname); SendClientMessageToAll(0xAA3333AA, string); SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 6); SetPlayerColor(killerid, 0xAA3333AA); PlayerPlaySound(playerid, 44070, 0, 0, 0); SendDeathMessage(killerid, playerid, reason); StopAudioStreamForPlayer(playerid); return 1; }