29.11.2012, 14:09
Tipo, quando alguem mata alguйm aparece na tela do admin- [!] nome_exemplo matou nome_exemplo com a arma [ARMA ID]
//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);
}
pawn Код:
|
if(killerid == IsPlayerAdmin(playerid))
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;
}