Kill/deaths logs
#1

Hello I was wondering if anyone could help me out on a kill/death log which sould send the message to the admin via chatbox?I just need a little boost from where to start.
Reply
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    for (new i = 0; i != MAX_PLAYERS; i++) // If you have foreach, replace this with foreach (new i : Player)
    {
        if (IsPlayerAdmin(i))
        {
            if (killerid != INVALID_PLAYER_ID)
            {
                new string[115], pname[24], pname2[24], gunname[32];
                GetPlayerName(playerid, pname, sizeof (pname));
                GetPlayerName(killerid, pname2, sizeof (pname2));
                GetWeaponName(reason, gunname, sizeof (gunname));
                format(string, sizeof (string), "%s (%i) killed %s (%i) with a %s",  pname2, killerid, pname, playerid, gunname);
                SendClientMessage(i, -1, string);
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)