SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 25/07/2019, 06:55 AM   #1
soobya
Little Clucker
 
Join Date: Mar 2017
Posts: 28
Reputation: 0
Default i need anti troll

please i need a good anti troll hack
becuase someone coming in my server and trolling players and cars
and making server lag And Thanks.
soobya is offline   Reply With Quote
Old 25/07/2019, 06:57 AM   #2
N0FeaR
High-roller
 
N0FeaR's Avatar
 
Join Date: Nov 2011
Location: Sweden
Posts: 2,314
Reputation: 167
Default Re: i need anti troll

Try this https://forum.sa-mp.com/showthread.php?t=579963
__________________
Here is my discord server https://discord.gg/ucVpDkJ
N0FeaR is offline   Reply With Quote
Old 25/07/2019, 08:05 AM   #3
soobya
Little Clucker
 
Join Date: Mar 2017
Posts: 28
Reputation: 0
Default Re: i need anti troll

not working i tested it
soobya is offline   Reply With Quote
Old 25/07/2019, 08:45 AM   #4
kukboy
Big Clucker
 
kukboy's Avatar
 
Join Date: Nov 2018
Posts: 61
Reputation: 3
Default Re: i need anti troll

There is no such thing Anti Troll but there is Anti Cheat. If someone is making your server lag he is probably sending DDoS attacks.
__________________
Paradise City Roleplay

IP: samp.paradisecityroleplay:7777
Discord: https://discord.gg/fC8srfw[/



-----------------------------------
kukboy is offline   Reply With Quote
Old 25/07/2019, 11:03 AM   #5
Mugala
High-roller
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: Georgia, Tbilisi
Posts: 1,064
Reputation: 50
Default Re: i need anti troll

what kind of anti cheat you want? hacker is sending vehicles in another position or what?
__________________
Coding in 8 languages including Pawn, C#, C++ and SQL.
Available for hiring.

If you have a coding question or need an assistance in a code, just PM me.
If you want me to create something for you, here is a Discord Mugala#5651

Currently helping Community members in a coding.
Mugala is offline   Reply With Quote
Old 25/07/2019, 03:25 PM   #6
soobya
Little Clucker
 
Join Date: Mar 2017
Posts: 28
Reputation: 0
Default Re: i need anti troll

i`m mean anti troll cars and jack cars
and making my server lag
soobya is offline   Reply With Quote
Old 25/07/2019, 04:23 PM   #7
soobya
Little Clucker
 
Join Date: Mar 2017
Posts: 28
Reputation: 0
Default Re: i need anti troll

please help!
soobya is offline   Reply With Quote
Old 25/07/2019, 05:49 PM   #8
nbx2000
Big Clucker
 
Join Date: Dec 2016
Posts: 150
Reputation: 5
Default Re: i need anti troll

to see this .- if it helps give me reply
Code:
#define ckicked 0xFA8072AA

new p_CarWarpTime[ MAX_PLAYERS ];
new p_CarWarpVehicleID[ MAX_PLAYERS ];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if( newstate == PLAYER_STATE_DRIVER  )
    {
        if( GetPlayerVehicleID( playerid ) != p_CarWarpVehicleID[ playerid ] )
        {
            if( p_CarWarpTime[ playerid ] > gettime( ) )
            {
		new string[128];
		format(string,sizeof(string),"*** %s has been Banned for car troll", GetName(playerid));
		SendClientMessageToAll(ckicked,string); print(string);
                BanEx( playerid, "Car Troll" );
                return 1;
            }
            p_CarWarpTime[ playerid ] = gettime( ) + 1;
            p_CarWarpVehicleID[ playerid ] = GetPlayerVehicleID( playerid );
        }
    }
    return 1;
}
nbx2000 is offline   Reply With Quote
Old 25/07/2019, 06:52 PM   #9
soobya
Little Clucker
 
Join Date: Mar 2017
Posts: 28
Reputation: 0
Default Re: i need anti troll

check your pm please it`s not working
soobya is offline   Reply With Quote
Old 26/07/2019, 06:33 AM   #10
Mugala
High-roller
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: Georgia, Tbilisi
Posts: 1,064
Reputation: 50
Default Re: i need anti troll

I hope it will help.
PHP Code:
//at the top of code
new PlayerVehicle[MAX_VEHICLES];

//OnPlayerEnterVehicle
PlayerVehicle[playerid] = vehicleid;

//OnPlayerStateChange
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
    if(
GetPlayerVehicleID(playerid) != PlayerVehicle[playerid]) BanEx(playerid,"Vehicle Hack");

urgent, create custom PutPlayerInVehicle function and use this, otherwise players will be banned.
PHP Code:
stock PutPlayerInVehicleEx(playeridvehicleidseatid)
{
    
PlayerVehicle[playerid] = vehicleid;
    
PutPlayerInVehicle(playeridvehicleidseatid);

EDITED: PLAYER_STATE_VEHICLE to PLAYER_STATE_PASSENGER (PLAYER_STATE_VEHICLE is totally wrong)
__________________
Coding in 8 languages including Pawn, C#, C++ and SQL.
Available for hiring.

If you have a coding question or need an assistance in a code, just PM me.
If you want me to create something for you, here is a Discord Mugala#5651

Currently helping Community members in a coding.

Last edited by Mugala; 29/07/2019 at 07:35 AM.
Mugala 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
Need help anti troll car skiplovebra Scripting Help 8 07/02/2019 05:00 PM
I Need Anti Troll Car ducmcmca1 Scripting Help 5 01/01/2018 03:21 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 04:50 AM.


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