how to make my admin immune to antihack system
#1

how to make it so Rcon-admin are immune to the commands.

and certain skins immune to the weapons.

pawn Код:
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>
#include <sscanf>
forward ResetCount(playerid);
new bool:IsPlayerInModShop[MAX_PLAYERS];
forward ResetCommandCount(playerid);

#define SpamLimit (3000)

#define red 0xFF0000

#define version "1.0"


#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Virtual Homer ");
    print(" version 1.0");
    print("--------------------------------------\n");
    return 1;
   
}


public OnFilterScriptExit()
{
    print("[*] Virtual Homers Anti-Spam Unloaded.");
    return 1;
}

#endif
public OnPlayerText(playerid, text[])
{
        new TCount, KMessage[128];

        TCount = GetPVarInt(playerid, "TextSpamCount");

        TCount++;

        SetPVarInt(playerid, "TextSpamCount", TCount);

        if(TCount == 2) {
            SendClientMessage(playerid, 0xFFFFFF, "{ff0000}[Virtual Homer Spam Warning You Will be Kicked for Spamming");
        }
        else if(TCount == 3) {
            GetPlayerName(playerid, KMessage, sizeof(KMessage));
            format(KMessage, sizeof(KMessage), " {00ff00}Virtual Homer Has kicked: {ff0000}%s {00ff00}For Spamming", KMessage);
            SendClientMessageToAll(0xFFFFFF, KMessage);
            print(KMessage);
            Kick(playerid);
        }

        SetTimerEx("ResetCount", SpamLimit, false, "i", playerid);

        return 1;
}

public ResetCount(playerid)
{
        SetPVarInt(playerid, "TextSpamCount", 0);
}
public ResetCommandCount(playerid)
{
        SetPVarInt(playerid, "CommandSpamCount", 0);
}

public OnEnterExitModShop(playerid, enterexit, interiorid)
{
    if(!enterexit) IsPlayerInModShop[playerid] = false;
    else IsPlayerInModShop[playerid] = true;
    return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
    if(!IsPlayerInModShop[playerid])
    {
        new sendername[MAX_PLAYER_NAME];
        new string[128];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, 128, "{ff0000}%s {00ff00}Has Been Banned by {ff0000}Virtual Homer {00ff00}for {ff0000}Tune Hack", sendername);
        SendClientMessageToAll(red, string);
        format( string, sizeof(string), "VIRTUAL HOMER ");
        GameTextForAll( string, 5000, 3 );
        BanEx(playerid, "Tune Hack");
    }
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    if(!IsPlayerInModShop[playerid])
    {
        new sendername[MAX_PLAYER_NAME];
        new string[128];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, 128, "{ff0000}%s {00ff00}Has Been Banned by {ff0000}Virtual Homer {00ff00}for {ff0000}Tune Hack", sendername);
        SendClientMessageToAll(red, string);
        format( string, sizeof(string), "VIRTUAL HOMER ");
        GameTextForAll( string, 5000, 3 );
        BanEx(playerid, "Tune Hack");
    }
}




public OnPlayerSpawn(playerid)
{
    SetPlayerArmour(playerid, 0.0);
    return 1;
}
public OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN || GetPlayerWeapon(playerid) == 16 || GetPlayerWeapon(playerid) == 17 || GetPlayerWeapon(playerid) == 18 || GetPlayerWeapon(playerid) == WEAPON_SATCHEL || GetPlayerWeapon(playerid) == WEAPON_ROCKETLAUNCHER)
    {
        new sendername[MAX_PLAYER_NAME];
        new string[128];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, 128, "{ff0000}%s {00ff00}Has Been Banned by {ff0000}Virtual Homer {00ff00}for {ff0000}Weapon Hack", sendername);
        SendClientMessageToAll(red, string);
        format( string, sizeof(string), "VIRTUAL HOMER ");
        GameTextForAll( string, 5000, 3 );
        for ( new i = 0; i != MAX_PLAYERS; ++i ) PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
        TogglePlayerControllable(playerid, 0);
        BanEx(playerid, "Weapon Hack");
        return 1;
    }
    new Float:health;
    if(GetPlayerHealth(playerid, health) > 999999)
    {
        new sendername[MAX_PLAYER_NAME];
        new string[128];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, 128, "{ff0000}%s {00ff00}Has Been Banned by {ff0000}Virtual Homer {00ff00}for {ff0000}Health Hack", sendername);
        SendClientMessageToAll(red, string);
        format( string, sizeof(string), "VIRTUAL HOMER ");
        GameTextForAll( string, 5000, 3 );
        TogglePlayerControllable(playerid, 0);
        BanEx(playerid, "Health Hack");
        return 1;
    }
    new Float:armor;
    if(GetPlayerArmour(playerid, armor) == 100)
    {
        new sendername[MAX_PLAYER_NAME];
        new string[128];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, 128, "{ff0000}%s {00ff00}Has Been Banned by {ff0000}Virtual Homer {00ff00}for {ff0000}Armour Hack", sendername);
        SendClientMessageToAll(red, string);
        format( string, sizeof(string), "VIRTUAL HOMER ");
        GameTextForAll( string, 5000, 3 );
        TogglePlayerControllable(playerid, 0);
        BanEx(playerid, "Armor Hack");
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)