SA-MP Forums Archive
Help with anti speed - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with anti speed (/showthread.php?tid=381174)



Help with anti speed - SkyWings - 28.09.2012

I have anti-speed FS, if i press NOS button i get kicked. How i can fix it?

Код:
#define FILTERSCRIPT

#include <a_samp>
//============Define=========//
#define COR_VERDE 0x00FF00AA //
#define COR_ERRO 0xFF7777AA//
//===========================//

//========new=====//
new string[128];  //
//================//

//===forward====//
forward Hack(); //
//==============//
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("     Carregando Anti-Speed Hack... ");
    print("--------------------------------------\n");
    SetTimer("Hack", 200, true);
    return 1;
}

public OnFilterScriptExit()
{
    print("\n--------------------------------------");
    print("     Desligando Anti-Speed Hack... ");
    print("--------------------------------------\n");
    return 1;
}

public Hack()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        new playerid;
        new keys, updown, leftright;
        GetPlayerKeys(i, keys, updown, leftright);
        new Nome[MAX_PLAYER_NAME]; GetPlayerName(i, Nome, sizeof(Nome));
        new Float:Pos[4]; Pos[3] = GetPlayerDistanceFromPoint(i, Pos[0], Pos[1], Pos[2]); GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
        if((keys & KEY_ACTION || keys & KEY_FIRE) && (floatround(floatmul(Pos[3], 10.0)) > 200) && (IsPlayerInAnyVehicle(i)))
        {
            format(string, 128, "Server security:%s(%d) was kicked | Reason: Speed Hack", Nome,i);
            SendClientMessageToAll(COR_ERRO, string);
            Kick(playerid);
        }
    }
}



Re: Help with anti speed - Squirrel - 28.09.2012

Change this
PHP код:
if((keys KEY_ACTION || keys KEY_FIRE
Into some other keys