OnPlayerDeath help
#1

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.

Код:
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;
}
Reply


Messages In This Thread
OnPlayerDeath help - by tommzy09 - 02.08.2014, 06:19
Re: OnPlayerDeath help - by Stinged - 02.08.2014, 06:25
Re: OnPlayerDeath help - by tommzy09 - 02.08.2014, 06:36

Forum Jump:


Users browsing this thread: 2 Guest(s)