Fixed AntiJetPack.inc for SA-MP 0.3.7 R3 server

Pianist

Active member
Joined
Sep 18, 2020
Messages
37
Reaction score
3
Location
Neverland
Code:
#include <a_samp>

#if defined _rAntiJC_Included
    #endinput
#endif

#define _rAntiJC_Included

#if !defined FILTERSCRIPT

#if defined OnPlayerJetpackCheat
    forward OnPlayerJetpackCheat(playerid);
#endif

forward AJC_SetPlayerSpecialAction(playerid, actionid);

static bool:AJC_Protection[MAX_PLAYERS char];

#if defined AJC_OnPlayerUpdate
    forward AJC_OnPlayerUpdate(playerid);
#endif

#if defined AJC_OnPlayerDisconnect
    forward AJC_OnPlayerDisconnect(playerid, reason);
#endif

#if defined AJC_OnPlayerSpawn
    forward AJC_OnPlayerSpawn(playerid);
#endif

public AJC_SetPlayerSpecialAction(playerid, actionid)
{
    if(playerid > MAX_PLAYERS || playerid < 0) return 0;
    if(actionid == 2) AJC_Protection{playerid} = true;
    return SetPlayerSpecialAction(playerid, actionid);
}

public OnPlayerDisconnect(playerid, reason)
{
    AJC_Protection{playerid} = false;
    #if defined AJC_OnPlayerDisconnect
        return AJC_OnPlayerDisconnect(playerid, reason);
    #else
        return 1;
    #endif
}

public OnPlayerUpdate(playerid)
{
    if(GetPlayerSpecialAction(playerid) == 2 && !AJC_Protection{playerid})
    {
        AJC_Protection{playerid} = true;
        SetPlayerHealth(playerid, 0.0);
        #if defined OnPlayerJetpackCheat
            OnPlayerJetpackCheat(playerid);
        #endif
    }

    #if defined AJC_OnPlayerUpdate
        return AJC_OnPlayerUpdate(playerid);
    #else
        return 1;
    #endif
}

public OnPlayerSpawn(playerid)
{
    AJC_Protection{playerid} = false;
    #if defined AJC_OnPlayerSpawn
        return AJC_OnPlayerSpawn(playerid);
    #else
        return 1;
    #endif
}

#if defined _ALS_OnPlayerUpdate
  #undef OnPlayerUpdate
#else
    #define _ALS_OnPlayerUpdate
#endif

#define OnPlayerUpdate AJC_OnPlayerUpdate

#if defined _ALS_OnPlayerSpawn
  #undef OnPlayerSpawn
#else
    #define _ALS_OnPlayerSpawn
#endif

#define OnPlayerSpawn AJC_OnPlayerSpawn

#if defined _ALS_OnPlayerDisconnect
  #undef OnPlayerDisconnect
#else
    #define _ALS_OnPlayerDisconnect
#endif

#define OnPlayerDisconnect AJC_OnPlayerDisconnect

#if defined _ALS_SetPlayerSpecialAction
  #undef SetPlayerSpecialAction
#else
    #define _ALS_SetPlayerSpecialAction
#endif

#define SetPlayerSpecialAction AJC_SetPlayerSpecialAction

#else

stock AJC_FSetPlayerSpecialAction(playerid, actionid)
    return CallRemoteFunction("AJC_SetPlayerSpecialAction", "ii", playerid, actionid);

#if defined _ALS_SetPlayerSpecialAction
  #undef SetPlayerSpecialAction
#else
    #define _ALS_SetPlayerSpecialAction
#endif

#define SetPlayerSpecialAction AJC_FSetPlayerSpecialAction

#endif
 
Last edited:

Fr0z3n

Well-known member
Joined
Nov 20, 2019
Messages
301
Reaction score
36
Location
Srbija
AHAHHAHAHAHAHAHAHHAHAHAHAHA Why just dont check special action and thats it.... Without include...???
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
297
Reaction score
103
Location
UGBASE
AHAHHAHAHAHAHAHAHHAHAHAHAHA Why just dont check special action and thats it.... Without include...???
What's so funny? You know there are ways to make a jetpack cheat undetected if you only check special action? First inform yourself and then talk.
 

Fr0z3n

Well-known member
Joined
Nov 20, 2019
Messages
301
Reaction score
36
Location
Srbija
Its impossible how do you think to get jetpack without animation???
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
297
Reaction score
103
Location
UGBASE
It is possible and quiet easy to do. Learn about packets and you'll find out very fast.
 

erwfewfewfw

Member
Joined
Jan 4, 2020
Messages
6
Reaction score
1
Location
Hacker City
I think its possible by rewriting outcoming packet ONFOOT SYNC
just when u sent onfoot sync set special action to default.. ez hehe

this will let you use jetpack for urself but u will be normal onfoot for other players..
but iam not sure about this :d
 

_Safa

Well-known member
Joined
Sep 22, 2019
Messages
297
Reaction score
103
Location
UGBASE
That's correct. You can fly around with jetpack if the server does a simple for special action jetpack but nothing else.

You just hook the outgoing on foot sync and ignore the bits until special action is being sent. You set that value to 0 all the time which won't detect you as flying with jetpack. I wanted to release it a year ago but I was lazy to clean it up for a proper release.
 
Top