[Pedido] ChatKill pra admin
#1

Tipo, quando alguem mata alguйm aparece na tela do admin- [!] nome_exemplo matou nome_exemplo com a arma [ARMA ID]
Reply
#2

Usando SendDeathMessage nгo tem como
Reply
#3

pawn Код:
//OnPlayerDeath

if(killerid == IsPlayerAdmin(playerid))
{
    new string[80];
    new aname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
    GetPlayerName(killerid, aname, sizeof(aname));
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, 80, "O Admin %s matou o jogador %s", aname, pname);
    SendClientMessageToAll(-1, string);

}
Pega como exemplo e edita de acordo com suas variaveis

PS: Acho que й funcional, testa ae.
Reply
#4

Quote:
Originally Posted by Murilo_sousa
Посмотреть сообщение
pawn Код:
//OnPlayerDeath

if(killerid == IsPlayerAdmin(playerid))
{
    new string[80];
    new aname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
    GetPlayerName(killerid, aname, sizeof(aname));
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, 80, "O Admin %s matou o jogador %s", aname, pname);
    SendClientMessageToAll(-1, string);

}
Pega como exemplo e edita de acordo com suas variaveis
pawn Код:
if(killerid == IsPlayerAdmin(playerid))


Entгo sу funciona se o killerid for o ID 1 ou 0?


Use:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason) {

    if(killerid != 65535) {
   
        static i, string[128], name1[24], name2[24];

        GetPlayerName(playerid, name1, 24);
        GetPlayerName(killerid, name2, 24);

        format(string, sizeof(string), "O jogador %s matou %s com a arma %d.", name2, name1, reason);
        for(i = GetMaxPlayers(); i > -1; --i) {

            if(IsPlayerConnected(i)) {

                if(IsPlayerAdmin(i)) {
               
                    SendClientMessage(i, -1, string);
                }
            }
        }
    }
    return 1;
}
Reply
#5

Alguem?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)