Quote:
Originally Posted by Claude
Sascha @ That way is WAY to complicated, it can be done with a few lines:
pawn Код:
new weap[20], string[128], killer, player; GetWeaponName(reason, weap, sizeof weap); GetPlayerName(playerid, player, sizeof player); GetPlayerName(killerid, killer, sizeof killer); if(killerid != INVALID_PLAYER_ID) { format(string, sizeof string, "%s(%d) has killed %s(%d) %s", killer, killerid, player, playerid, weap); AdminMsg(string); } else { format(string, sizeof string, "%s(%d) died", player, playerid); AdminMsg(string); }
Change "AdminMsg" to the function where it sends a message to admins, the rest you have to do, bugs are easy to fix
|
Well I just didn't know aabout the "GetWeaponName", but nice to see this exists

...
Well sure in this case your methods is ways easier...
@SworDDick:
Код:
forward AdminMsg(text[]);
public AdminMsg(text[])
{
for(new i=0; i<MAX_PLAYERS; i++)
if(IsPlayerConnected(i)){
if(YOURADMINCODE >= THE MIN. LEVEL OF THE PLAYER TO SEE THE MSG){
SendClientMessage(i, YOURCOLORCODE, text[]);
}
}
return 1;
}
and then just that what claude wrote