SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/03/2016, 02:23 PM   #1
skiplovebra
Huge Clucker
 
Join Date: Sep 2015
Posts: 282
Reputation: 0
Default Need help anti troll car

I need help code combat this anti hack remove it using ctrl + 1 + 2 + 3 + 4 have the car can do all it can fly up to the sky as a server collapse I am grateful if someone help me , sorry bad English
https://www.youtube.com/watch?v=jRFdTtsbliY
skiplovebra is offline   Reply With Quote
Old 16/03/2016, 02:28 PM   #2
Godly
Guest
 
Posts: n/a
Default Re: Need help anti troll car

You want an anti cheat for that hack?
  Reply With Quote
Old 16/03/2016, 02:35 PM   #3
skiplovebra
Huge Clucker
 
Join Date: Sep 2015
Posts: 282
Reputation: 0
Default Re: Need help anti troll car

Quote:
Originally Posted by Godly View Post
You want an anti cheat for that hack?
I need one for this type of anti-hacking code on the can see in this video
https://www.youtube.com/watch?v=jRFdTtsbliY
Its using ctrl + 1 and ctrl + 2, ctrl +3
skiplovebra is offline   Reply With Quote
Old 16/03/2016, 03:13 PM   #4
Godly
Guest
 
Posts: n/a
Default Re: Need help anti troll car

There is no specific anti cheat for that
  Reply With Quote
Old 16/03/2016, 03:14 PM   #5
SyS
High-roller
 
SyS's Avatar
 
Join Date: Oct 2015
Posts: 1,950
Reputation: 500
Default Re: Need help anti troll car

Wrong section you cant ask someone to script for you in this section post in it here
SyS is offline   Reply With Quote
Old 07/02/2019, 04:47 AM   #6
thanh7305
Little Clucker
 
Join Date: Dec 2018
Posts: 6
Reputation: 0
Default Re: Need help anti troll car

i need anti trollcar
thanh7305 is offline   Reply With Quote
Old 07/02/2019, 09:25 AM   #7
Bingo
High-roller
 
Bingo's Avatar
 
Join Date: Jul 2012
Location: United Arab Emirates.
Posts: 1,695
Reputation: 235
Default Re: Need help anti troll car

Quote:
Originally Posted by thanh7305 View Post
i need anti trollcar
Use anti-teleport cheat.

OT: You really bumped a 3 years old topic, It's against the rules though.
Bingo is offline   Reply With Quote
Old 07/02/2019, 04:26 PM   #8
Robertsamp
Little Clucker
 
Robertsamp's Avatar
 
Join Date: Feb 2017
Location: Pitesti, Romania
Posts: 7
Reputation: 0
Default Re: Need help anti troll car

Hi! Here you have an include that may help you somehow.
HTML Code:
#if defined _AntiCarTroll_included
    #endinput
#endif
 
#define _AntiCarTroll_included
 
#include <a_samp>
 
#if !defined FILTERSCRIPT
 
new SafeTimer;
 
enum ActPData
{
    bool:ActAntiSpam,
    bool:AntiJackBug,
    bool:IsDPaused,
    bool:ActProtectFalse,
 
    Float:ActPX,
    Float:ActPY,
    Float:ActPZ,

    ActTimer,
    ActOVeh,
    ResetTAct,
    pVehicleID,
    pPauseTick
};
 
enum ActVData
{
    VehicleTempOwner,
    bool:VehicleTaken
};
 
new
    ActPlayer[MAX_PLAYERS][ActPData],
    ActVehicle[MAX_VEHICLES][ActVData];
 
#if !defined IsValidVehicle
native IsValidVehicle(vehicleid); 
#endif

forward ActPutPlayerInVehicle(playerid, vehicleid, seatid);

forward ActResetPos(playerid);
forward ActRelease(playerid);
forward ActResetSpam(playerid);
forward ActFixPPIV(playerid, vehicleid, seatid);
forward SafeReset();
forward AntiCarTroll(playerid);
forward ActReset(playerid);
forward sActReset(playerid);
forward ActDelay(playerid);
 
#if defined OnPlayerEnterVehicleACT
forward OnPlayerEnterVehicleACT(playerid, vehicleid, ispassenger);
#endif
 
#if defined OnPlayerUpdateACT
    forward OnPlayerUpdateACT(playerid);
#endif


#if defined OnPlayerConnectACT
forward OnPlayerConnectACT(playerid);
#endif
 
#if defined OnPlayerDisconnectACT
forward OnPlayerDisconnectACT(playerid, reason);
#endif
 
#if defined OnPlayerExitVehicleACT
forward OnPlayerExitVehicleACT(playerid, vehicleid);
#endif

#if defined OnPlayerDeathACT
forward OnPlayerDeathACT(playerid, killerid, reason);
#endif
 
#if defined OnPlayerStateChangeACT
forward OnPlayerStateChangeACT(playerid,newstate,oldstate);
#endif
 
#if defined OnGameModeInitACT
forward OnGameModeInitACT();
#endif
 
#if defined OnGameModeExitACT
forward OnGameModeExitACT();
#endif

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

public OnGameModeInit()
{
        print("     [[--|| Anti car troll by Adelin has been loaded ||--]]      ");
        SafeTimer = SetTimer("SafeReset",5000,true);
        #if defined OnGameModeInitACT
        return OnGameModeInitACT();
        #else
        return 1;
            #endif
}
 
public OnGameModeExit()
{
    KillTimer(SafeTimer);

    #if defined OnGameModeExitACT
        return OnGameModeExitACT();
        #else
        return 1;
            #endif
}
 
stock IsPEnExCar(playerid)
{
    new playeranim = GetPlayerAnimationIndex(playerid);
 
    if (((playeranim == 1041) || (playeranim == 1012)) || (playeranim == 1025) || (playeranim == 1044) || (playeranim == 1045) ||
    (playeranim == 1010) || (playeranim == 1011) || (playeranim == 1024 || (playeranim == 1043) || (playeranim == 1009))) return 1;
    else return 0;
}

stock ActPlayerDown(playerid)
{
    new playeranim = GetPlayerAnimationIndex(playerid);

    if (((playeranim == 1208) ||(playeranim == 1155) || (playeranim == 1156) || (playeranim == 1209))) return 1;
    else return 0;
}

stock ActCarEmpty(vehicleid)
{
    for(new i, j = GetPlayerPoolSize(); i <= j; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(i) == vehicleid) return 0;
        }
    return 1;
}

public ActResetPos(playerid) return GetPlayerPos(playerid, ActPlayer[playerid][ActPX], ActPlayer[playerid][ActPY], ActPlayer[playerid][ActPZ]);

public SafeReset()
{
    new AllVehicles[MAX_VEHICLES];
    for(new i, j = GetPlayerPoolSize(); i <= j; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        new gpVehicleID[MAX_PLAYERS];
        gpVehicleID[i] = GetPlayerVehicleID(i);
        if(GetPlayerState(i)== PLAYER_STATE_DRIVER && AllVehicles[gpVehicleID[i]] != i )
        {
            AllVehicles[gpVehicleID[i]]= i;
            ActVehicle[GetPlayerVehicleID(i)][VehicleTaken]= true;
            }
        }
    for(new x; x<MAX_VEHICLES; x++)
    {
        if(!IsValidVehicle(x)) continue;
        if(AllVehicles[x] != -1)
        {
            if(GetPlayerState(AllVehicles[x]) != PLAYER_STATE_DRIVER) AllVehicles[x] = -1;
            }
        if(AllVehicles[x] == -1 && ActVehicle[x][VehicleTaken]) ActVehicle[x][VehicleTaken]= false;
        }
    return 1;
}
 
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(!ispassenger) ActPlayer[playerid][ActOVeh] = vehicleid;
    if(!ActPlayer[playerid][ActProtectFalse]) ActPlayer[playerid][ActProtectFalse] = true;
    for(new i, j = GetPlayerPoolSize(); i <= j; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(!ispassenger && !ActPlayer[playerid][AntiJackBug] && i != playerid && GetPlayerVehicleID(i) == vehicleid && GetPlayerState(i) == PLAYER_STATE_DRIVER)
        {
            ActPlayer[playerid][AntiJackBug]=true;
            SetTimerEx("sActReset",6000,false,"d",playerid);
            ActPlayer[i][AntiJackBug]=true;
            SetTimerEx("sActReset",6000,false,"d",i);
            }
        }
        #if defined OnPlayerEnterVehicleACT
        return OnPlayerEnterVehicleACT(playerid, vehicleid, ispassenger);
        #else
        return 1;
            #endif
}
 
public OnPlayerConnect(playerid)
{
    ActPlayer[playerid][ActAntiSpam]=false;
    ActPlayer[playerid][AntiJackBug]=false;

    ActPlayer[playerid][ActTimer] = SetTimerEx("ActResetPos", 1000, true, "d", playerid);

    ActPlayer[playerid][ActPX] = 0;
    ActPlayer[playerid][ActPY] = 0;
    ActPlayer[playerid][ActPZ] = 0;


        #if defined OnPlayerConnectACT
        return OnPlayerConnectACT(playerid);
        #else
        return 1;
            #endif
}
 
public AntiCarTroll(playerid)
{
    if(GetPlayerState(playerid) == 2 || GetPlayerState(playerid) == 3)
    {
        new ActVeh = GetPlayerVehicleID(playerid);
        if(ActVeh != ActPlayer[playerid][ActOVeh] && !ActPlayer[playerid][ActProtectFalse] && !ActPlayer[playerid][ActAntiSpam])
        {            
            ActPlayer[playerid][ActAntiSpam]=true;
            SetTimerEx("ActResetSpam",2500,false,"d",playerid);
            #if !defined ManualUse
            new pName[MAX_PLAYER_NAME],actmsg[80];
            GetPlayerName(playerid,pName,sizeof(pName));
            #endif
            #if defined Extreme_Safe
            SetPlayerHealth(playerid,0);
            format(actmsg,sizeof(actmsg), "[AntiCheat]: %s[%d] is posibble ussing troll cheats",pName, playerid);
            SendClientMessageToAll(0xAA3333AA,actmsg);
            return 1;
            #endif
            #if defined ManualUse
            #if defined OnPlayerCarTroll
            OnPlayerCarTroll(playerid, ActVeh, INVALID_PLAYER_ID, 1);
            #endif
            #else
            #if defined BanVersion
            format(actmsg,sizeof(actmsg), "[AntiCheat]: %s[%d] is posibble ussing troll cheats",pName, playerid);
            #else
            format(actmsg,sizeof(actmsg),"Kick: %s[%d] has been kicked by AdmBot, reason: cheats(TrollHack)",pName, playerid);
            #endif   
            #endif         
            #if !defined ManualUse
            SendClientMessageToAll(0xFF0000A,actmsg);
            SetTimerEx("ActDelay",250,false,"d",playerid);
            #endif
            SetVehicleToRespawn(ActVeh);
            ActPlayer[playerid][ActOVeh] = ActVeh;
            }
        }

    if(GetTickCount() > (ActPlayer[playerid][pPauseTick]+4000) && !ActPlayer[playerid][IsDPaused]) ActPlayer[playerid][IsDPaused] = true;
    else if(ActPlayer[playerid][IsDPaused]) ActPlayer[playerid][IsDPaused] = false;

    for(new i = 0; i < MAX_VEHICLES; i++)
    {
    if(!IsValidVehicle(i)) continue;
    if(ActVehicle[i][VehicleTaken] && GetPlayerVehicleID(playerid) == i && playerid != ActVehicle[i][VehicleTempOwner] 
    && !ActPlayer[playerid][AntiJackBug] && !ActPlayer[ActVehicle[i][VehicleTempOwner]][AntiJackBug] 
    && GetPlayerState(playerid) == PLAYER_STATE_DRIVER  && !IsPEnExCar(playerid) 
    && !ActPlayer[ActVehicle[i][VehicleTempOwner]][IsDPaused] && !ActPlayer[playerid][ActAntiSpam])
    {
        ActPlayer[playerid][ActAntiSpam]=true; 
        SetTimerEx("ActResetSpam",2500,false,"d",playerid);
        #if !defined ManualUse
        new pName[MAX_PLAYER_NAME],actmsg[80];
        GetPlayerName(playerid,pName,sizeof(pName));
        #endif
        #if defined Extreme_Safe
        SetPlayerHealth(playerid,0);
        format(actmsg,sizeof(actmsg), "[AntiCheat]: %s[%d] is posibble ussing troll cheats",pName, i);
        SendClientMessageToAll(0xAA3333AA,actmsg);
        return 1;
        #endif
        #if defined ManualUse
        #if defined OnPlayerCarTroll
        return OnPlayerCarTroll(playerid,i, ActVehicle[i][VehicleTempOwner], 2);
        #endif
        #else
        #if defined BanVersion
        format(actmsg,sizeof(actmsg), "[AntiCheat]: %s[%d] is posibble ussing troll cheats",pName, playerid);
        #else
        format(actmsg,sizeof(actmsg),"Kick: %s[%d] has been kicked by AdmBot, reason: cheats(TrollHack)",pName, playerid);
        #endif
        SendClientMessageToAll(0xFF0000A,actmsg);
        SetTimerEx("ActDelay",250,false,"d",playerid);
        #endif
        }
    }
    return 1;
}
 
#if defined ManualUse
    #if defined OnPlayerCarTroll
 
    forward OnPlayerCarTroll(playerid,vehicleid, trolledid, trolltype);

    #endif
 
#else
 
public ActDelay(playerid)
{
    #if defined BanVersion
    Ban(playerid);
    #else
    Kick(playerid);
    #endif
    return 1;
}
 
#endif
 
public ActReset(playerid)
{
    ActVehicle[ActPlayer[playerid][pVehicleID]][VehicleTaken] = false;
    ActVehicle[ActPlayer[playerid][pVehicleID]][VehicleTempOwner] = -1;
    return 1;
}
 
public sActReset(playerid)
{
    ActPlayer[playerid][AntiJackBug]=false;
    return 1;
}

public ActRelease(playerid) return TogglePlayerControllable(playerid, 1);

public OnPlayerUpdate(playerid)
{
    if(!IsPlayerInRangeOfPoint(playerid, 10.0, ActPlayer[playerid][ActPX], ActPlayer[playerid][ActPY], ActPlayer[playerid][ActPZ]) && ActPlayer[playerid][ActPX] != 0 && ActPlayer[playerid][ActPY] != 0 && ActPlayer[playerid][ActPZ] != 0)
    {
        for(new i, j = GetPlayerPoolSize(); i <= j; i++)
        {
            if(!IsPlayerConnected(i)) continue;
            new Float:ActTempX, Float:ActTempY, Float:ActTempZ;
            GetPlayerPos(i, ActTempX, ActTempY, ActTempZ);
            if(IsPlayerInRangeOfPoint(playerid, 3.0, ActTempX, ActTempY, ActTempZ) && !ActPlayer[i][ActAntiSpam] && GetPlayerState(i) == PLAYER_STATE_DRIVER && i != playerid && GetPlayerState(playerid) == 1 && GetPlayerSurfingVehicleID(playerid) == INVALID_VEHICLE_ID && !ActPlayerDown(playerid))
            {
                ActPlayer[i][ActAntiSpam]=true; 
                SetVehicleToRespawn(GetPlayerVehicleID(i));
                TogglePlayerControllable(i, 0);
                SetPlayerPos(i, ActTempX, ActTempY, ActTempZ);
                SetPlayerHealth(playerid, 0.0);
                SetTimerEx("ActRelease", 1500, false, "d", i);
                SetTimerEx("ActResetSpam",1500,false,"d",i);
                #if !defined ManualUse
                new pName[MAX_PLAYER_NAME],actmsg[80];
                GetPlayerName(playerid,pName,sizeof(pName));
                #endif
                #if defined Extreme_Safe
                SetPlayerHealth(playerid,0);
                format(actmsg,sizeof(actmsg), "[AntiCheat]: %s[%d] is posibble ussing troll cheats",pName, i);
                SendClientMessageToAll(0xAA3333AA,actmsg);
                return 1;
                #endif
                #if defined ManualUse
                #if defined OnPlayerCarTroll
                return OnPlayerCarTroll(playerid, GetPlayerVehicleID(i), i, 3);
                #endif
                #else
                #if defined BanVersion
                format(actmsg,sizeof(actmsg), "[AntiCheat]: %s[%d] is posibble ussing troll cheats",pName, playerid);
                #else
                format(actmsg,sizeof(actmsg),"Kick: %s[%d] has been kicked by AdmBot, reason: cheats(TrollHack)",pName, playerid);
                #endif
                SendClientMessageToAll(0xFF0000A,actmsg);
                SetTimerEx("ActDelay",250,false,"d",playerid);
                #endif
                }
            }
        }

    AntiCarTroll(playerid);

    ActPlayer[playerid][pPauseTick] = GetTickCount();
    new Float:ActX, Float:ActY, Float:ActZ;
    new ActCar = GetPlayerVehicleID(playerid);

    for(new x = 0; x < MAX_VEHICLES; x++)
    {
        if(!IsValidVehicle(x) || !IsVehicleStreamedIn(x, playerid) || !ActCarEmpty(x) || x == ActCar) continue;
        GetVehiclePos(x, ActX, ActY, ActZ);
        if(IsPlayerInRangeOfPoint(playerid, 2.0, ActX, ActY, ActZ) && GetPlayerState(playerid) == 2 && ActPlayer[playerid][ActAntiSpam])
        {
            SetVehicleToRespawn(x);
            }
        }

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

public OnPlayerSpawn(playerid)
{
    GetPlayerPos(playerid, ActPlayer[playerid][ActPX], ActPlayer[playerid][ActPY], ActPlayer[playerid][ActPZ]);

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

public OnPlayerStateChange(playerid,newstate,oldstate)
{
    switch(newstate)
    {
        case 1:
        {
            if(oldstate == 2) ActPlayer[playerid][ResetTAct] = SetTimerEx("ActReset",500,false,"d",playerid);
            else if(oldstate ==2 || oldstate == 3) ActPlayer[playerid][ActProtectFalse] = false;
            }
 
        case 2:
        {
            ActPlayer[playerid][pVehicleID] = GetPlayerVehicleID(playerid);
            ActPlayer[playerid][ActOVeh] = ActPlayer[playerid][pVehicleID];
            for(new i, j = GetPlayerPoolSize(); i <= j; i++)
            {
                if(i != playerid && GetPlayerVehicleID(i) == ActPlayer[playerid][pVehicleID] && GetPlayerState(i) == 2 && ActPlayer[i][pPauseTick])
                {
                    new Float:ActPosX, Float:ActPosY, Float:ActPosZ;
                    GetPlayerPos(i, ActPosX, ActPosY, ActPosZ);
                    SetPlayerPos(i, ActPosX, ActPosY, ActPosZ+2);
                    }
                }
 
            if(!ActPlayer[playerid][ActProtectFalse] && GetPlayerState(playerid) != 9 && !ActPlayer[playerid][ActAntiSpam])
            {                
                ActPlayer[playerid][ActAntiSpam]=true;
                SetTimerEx("ActResetSpam",2500,false,"d",playerid);
                #if !defined ManualUse
                new pName[MAX_PLAYER_NAME],actmsg[80];
                GetPlayerName(playerid,pName,sizeof(pName));
                #endif
                #if defined Extreme_Safe
                SetPlayerHealth(playerid,0);
                format(actmsg,sizeof(actmsg), "[AntiCheat]: %s[%d] is posibble ussing troll cheats",pName, i);
                SendClientMessageToAll(0xAA3333AA,actmsg);
                #endif
                #if defined ManualUse
                #if defined OnPlayerCarTroll
                OnPlayerCarTroll(playerid, GetPlayerVehicleID(playerid), INVALID_PLAYER_ID, 4);
                #endif
                #else
                #if defined BanVersion
                format(actmsg,sizeof(actmsg), "[AntiCheat]: %s[%d] is posibble ussing troll cheats",pName, playerid);
                #else
                format(actmsg,sizeof(actmsg),"Kick: %s[%d] has been kicked by AdmBot, reason: cheats(TrollHack)",pName, playerid);
                #endif
                #endif
                #if !defined ManualUse
                SendClientMessageToAll(0xFF0000A,actmsg);
                SetTimerEx("ActDelay",250,false,"d",playerid);
                #endif
                }

            else if(ActPlayer[playerid][ActProtectFalse]) ActPlayer[playerid][ActProtectFalse] = false;

            if(!ActVehicle[ActPlayer[playerid][pVehicleID]][VehicleTaken])
            {
                KillTimer(ActPlayer[playerid][ResetTAct]);
                ActVehicle[ActPlayer[playerid][pVehicleID]][VehicleTaken] = true;
                ActVehicle[ActPlayer[playerid][pVehicleID]][VehicleTempOwner] = playerid;
            }
        }

    case 3:
    {
        if(!ActPlayer[playerid][ActProtectFalse] && GetPlayerState(playerid) != 9 && !ActPlayer[playerid][ActAntiSpam])
        {            
            ActPlayer[playerid][ActAntiSpam]=true;
            SetTimerEx("ActResetSpam",2500,false,"d",playerid);
            #if !defined ManualUse
            new pName[MAX_PLAYER_NAME],actmsg[80];
            GetPlayerName(playerid,pName,sizeof(pName));
            #endif
            #if defined Extreme_Safe
            SetPlayerHealth(playerid,0);
            format(actmsg,sizeof(actmsg), "[AntiCheat]: %s[%d] is posibble ussing troll cheats",pName, i);
            SendClientMessageToAll(0xAA3333AA,actmsg);
            #endif
            #if defined ManualUse
            #if defined OnPlayerCarTroll
            OnPlayerCarTroll(playerid,GetPlayerVehicleID(playerid), INVALID_PLAYER_ID, 4);
            #endif
            #else
            #if defined BanVersion
            format(actmsg,sizeof(actmsg), "[AntiCheat]: %s[%d] is posibble ussing troll cheats",pName, playerid);
            #else
            format(actmsg,sizeof(actmsg),"Kick: %s[%d] has been kicked by AdmBot, reason: cheats(TrollHack)",pName, playerid);
            #endif
            #endif
            #if !defined ManualUse
            SendClientMessageToAll(0xFF0000A,actmsg);
            SetTimerEx("ActDelay",250,false,"d",playerid);
            #endif
            }
        else if(ActPlayer[playerid][ActProtectFalse]) ActPlayer[playerid][ActProtectFalse] = false;
        ActPlayer[playerid][ActOVeh] = GetPlayerVehicleID(playerid);
        }
    }

        #if defined OnPlayerStateChangeACT
    return OnPlayerStateChangeACT(playerid,newstate,oldstate);
        #else
    return 1;
        #endif
}
 
public OnPlayerDeath(playerid, killerid, reason)
{
    ActPlayer[playerid][ActAntiSpam]=false;

    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        ActPlayer[playerid][ResetTAct] = SetTimerEx("ActReset",500,false,"d",playerid);
        }

        #if defined OnPlayerDeathACT
        return OnPlayerDeathACT(playerid, killerid, reason);
        #else
        return 1;
            #endif
}
 
public OnPlayerExitVehicle(playerid,vehicleid)
{
    ActPlayer[playerid][ResetTAct] = SetTimerEx("ActReset",500,false,"d",playerid);

    #if defined OnPlayerExitVehicleACT
        return OnPlayerExitVehicleACT(playerid, vehicleid);
        #else
        return 1;
            #endif
}
 
public OnPlayerDisconnect(playerid, reason)
{
    KillTimer(ActPlayer[playerid][ActTimer]);

    new gpVehicleID;
    gpVehicleID = GetPlayerVehicleID(playerid);
 
    ActPlayer[playerid][IsDPaused] = false;
    ActPlayer[playerid][ActProtectFalse] = false;
 
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        ActVehicle[gpVehicleID][VehicleTaken] =false;
        ActVehicle[gpVehicleID][VehicleTempOwner] = -1;
        }

        #if defined OnPlayerDisconnectACT
        return OnPlayerDisconnectACT(playerid, reason);
        #else
        return 1;
            #endif
}
 
public ActResetSpam(playerid) return ActPlayer[playerid][ActAntiSpam]=false;

public ActFixPPIV(playerid, vehicleid, seatid) return ActPlayer[playerid][ActProtectFalse] = true, PutPlayerInVehicle(playerid, vehicleid, seatid);
 
public ActPutPlayerInVehicle(playerid, vehicleid, seatid)
{
    if(!ActPlayer[playerid][ActProtectFalse]) ActPlayer[playerid][ActProtectFalse] = true;
    if(GetPlayerState(playerid) == 2 || GetPlayerState(playerid) == 3)
    {
        new Float:PX,Float:PY,Float:PZ;
        GetPlayerPos(playerid, PX,PY,PZ);
        SetPlayerPos(playerid, PX,PY,PZ+2);
        SetTimerEx("ActFixPPIV",500,false,"iii",playerid, vehicleid, seatid);
        }
    else PutPlayerInVehicle(playerid, vehicleid, seatid);
    return 1;
}
 
#if defined _ALS_OnPlayerStateChange
  #undef OnPlayerStateChange
#else
    #define _ALS_OnPlayerStateChange
#endif
 
#define OnPlayerStateChange OnPlayerStateChangeACT
 
#if defined _ALS_OnPlayerConnect
  #undef OnPlayerConnect
#else
    #define _ALS_OnPlayerConnect
#endif
 
#define OnPlayerConnect OnPlayerConnectACT

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

#if defined _ALS_OnPlayerDisconnect
  #undef OnPlayerDisconnect
#else
    #define _ALS_OnPlayerDisconnect
#endif
 
#define OnPlayerDisconnect OnPlayerDisconnectACT
 
#if defined _ALS_OnPlayerExitVehicle
  #undef OnPlayerExitVehicle
#else
    #define _ALS_OnPlayerExitVehicle
#endif
 
#define OnPlayerExitVehicle OnPlayerExitVehicleACT
 
#if defined _ALS_OnPlayerDeath
  #undef OnPlayerDeath
#else
    #define _ALS_OnPlayerDeath
#endif
 
#define OnPlayerDeath OnPlayerDeathACT
 
#if defined _ALS_OnGameModeInit
  #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
 
#define OnGameModeInit OnGameModeInitACT
 
#if defined _ALS_OnGameModeExit
  #undef OnGameModeExit
#else
    #define _ALS_OnGameModeExit
#endif
 
#define OnGameModeExit OnGameModeExitACT
 
#if defined _ALS_OnPlayerEnterVehicle
  #undef OnPlayerEnterVehicle
#else
    #define _ALS_OnPlayerEnterVehicle
#endif
 
#define OnPlayerEnterVehicle OnPlayerEnterVehicleACT
 
#if defined _ALS_OnPlayerUpdate
  #undef OnPlayerUpdate
#else
    #define _ALS_OnPlayerUpdate
#endif
 
#define OnPlayerUpdate OnPlayerUpdateACT
 
#if defined _ALS_PutPlayerInVehicle
  #undef PutPlayerInVehicle
#else
    #define _ALS_PutPlayerInVehicle
#endif
 
#define PutPlayerInVehicle ActPutPlayerInVehicle
 
#else
 
#if defined _ALS_PutPlayerInVehicle
  #undef PutPlayerInVehicle
#else
    #define _ALS_PutPlayerInVehicle
#endif
 
#define PutPlayerInVehicle ActFPutPlayerInVehicle
 
stock ActFPutPlayerInVehicle(playerid, vehicleid, seatid)

    return CallRemoteFunction("ActPutPlayerInVehicle","iii",playerid, vehicleid, seatid);
 
#endif
I recommand you to create a new file and include it in the gamemode.
Good luck!
Robertsamp is offline   Reply With Quote
Old 07/02/2019, 05:00 PM   #9
TheToretto
Gangsta
 
TheToretto's Avatar
 
Join Date: Jul 2015
Posts: 600
Reputation: 66
Default Re: Need help anti troll car

Don't forget the credits, respect the owner's work.
__________________






Toretto#9902

Rest in peace grandpa, 03 November 2018
TheToretto is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for anti Troll Car , aimbot jesdynguyen Scripting Help 4 04/03/2019 08:04 AM
Anti-troll hacking Banditukas Scripting Help 7 17/10/2015 05:57 PM
Looking for anti Troll car VenomMancer Scripting Help 4 30/06/2015 06:00 PM
Anti car troll TheWay Scripting Help 4 24/01/2015 06:38 AM


All times are GMT. The time now is 03:17 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.