Request (!)
#1

Helllo guys can anyone tell me how to make this like if player die ( send client message to all )
%(playername) +(id) have Died (Reason : % )

please if anyone know how to THank you ;p
Reply
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(playerid != INVALID_PLAYER_ID)
    {
        new deathmsg[100], pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, sizeof(pname));
        format(deathmsg, sizeof(deathmsg), "%s[%d] has died!", pname, playerid);
        SendClientMessageToAll(0xFFFFFFFF, deathmsg);
    }
    return 1;
}
This should work.

Good Luck
Reply
#3

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new
        string[64],
        pname[24];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s (ID: %d) has died (reason: %d).", pname, playerid, reason);
    return SendClientMessageToAll(0xFFFF00FF, string); // yellow
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)