Two death message [HELP] +REP
#2

Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    new gunname[32],string[145],fName[MAX_PLAYER_NAME],sName[MAX_PLAYER_NAME];
    GetWeaponName(reason,gunname,sizeof gunname);
    GetPlayerName(playerid,fName,MAX_PLAYER_NAME);
    GetPlayerName(killerid,sName,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s has been killed by %s with %s",fName,sName,gunname);
    SendClientMessageToAll(COLOR_RED,string);
    GameTextForPlayer(playerid, "~r~Wasted", 5000, 6);
    SendDeathMessage(killerid, playerid, reason);

    new msg[128]
    if (killerid != INVALID_PLAYER_ID)
    {
        switch (reason)
        {
            case 1: format(msg, sizeof(msg), "Player %s died. (Drowned)", playerName);
            case 2: format(msg, sizeof(msg), "Player %s died. (Collision)", playerName);
            default: format(msg, sizeof(msg), "Player %s died.", playerName);
        }
        SendClientMessageToAll(-1, msg);
    }
    return 1;
}
Reply


Messages In This Thread
Two death message [HELP] +REP - by Chausar - 12.04.2015, 22:59
Re: Two death message [HELP] +REP - by Hybris - 12.04.2015, 23:05
Re: Two death message [HELP] +REP - by Azula - 12.04.2015, 23:12
Re: Two death message [HELP] +REP - by Chausar - 13.04.2015, 07:28
Re: Two death message [HELP] +REP - by CalvinC - 13.04.2015, 07:32
Re: Two death message [HELP] +REP - by Chausar - 13.04.2015, 08:10
Re: Two death message [HELP] +REP - by mamorunl - 13.04.2015, 09:40

Forum Jump:


Users browsing this thread: 1 Guest(s)