[FilterScript] Minigun detection for rcon admins
#10

No HY, He probably tested it like:
* He logs in as RCON administrator.
> The other player kills him with a minigun
= He gets the message (%s was automatically reported ...)

If you need to send the message to all the online RCON administrators, you just need to do this:
The callback would be like:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerWeapon(killerid) == 38)
    {
        for(new i = 0; i < MAX_PLAYERS; i ++)
        {
            if(IsPlayerConnected(i))
            {
                if(IsPlayerAdmin(i))
                {  
                    new hackername[MAX_PLAYER_NAME], str[128];     //
                        GetPlayerName(playerid, hackername, sizeof(hackername));    // you get the name of the person who GOT killed  (not the killer).
                        format(str, sizeof(str), "{FF0000}ATTENTION: %s has been automaticlly reported by the server for using hacks [REASON: Minigun]", killerid);  // The player who died is called a 'hacker'.
                        SendClientMessage(playerid, -1, str);  // only if the player is rcon-admin he will get the (Wrong)message.
                    SendClientMessage(i, -1, str);
                }
            }
        }
    }
    return 1;
}
Also HY, If you're doing a for loop with players, you MUST check if the player is connected to the server (IsPlayerConnected)
Reply


Messages In This Thread
Minigun detection for rcon admins - by Glossy42O - 01.01.2015, 15:00
Re: Minigun detection for rcon admins - by Younes44 - 01.01.2015, 15:07
Re: Minigun detection for rcon admins - by biker122 - 01.01.2015, 15:32
Re: Minigun detection for rcon admins - by HY - 01.01.2015, 15:37
Re: Minigun detection for rcon admins - by Glossy42O - 01.01.2015, 15:40
Re: Minigun detection for rcon admins - by HY - 01.01.2015, 15:41
Re: Minigun detection for rcon admins - by Glossy42O - 01.01.2015, 15:43
Re: Minigun detection for rcon admins - by Schneider - 01.01.2015, 16:22
Re: Minigun detection for rcon admins - by Glossy42O - 01.01.2015, 16:34
Re: Minigun detection for rcon admins - by biker122 - 01.01.2015, 16:50

Forum Jump:


Users browsing this thread: 1 Guest(s)