Anti speed hack problem
#1

hey guys
I'm using "Speed Booster" for my server and i have problems with anti cheat
when player is using server speed booster server will send warning's

PHP код:
if(final_speed_int 240 && Cheating2[i] != 1)
                        {
                            if(!
IsAPlane(tmpcar))
                            {
                                new 
playerveh GetPlayerVehicleID(i);
                                new 
vehicles GetVehicleModel(playerveh) - 400;
                                
GetPlayerName(iplnamesizeof(plname));
                                if(
GetPlayerState(i) == PLAYER_STATE_DRIVER) {
                                
format(string256"[Anti-Cheat]: {FFFFFF}Server detected an speed hack on {FF0000}%s(%i){FFFFFF} (%i km/h) with vehicleid %i(%s).",plname,i,final_speed_int,playerveh,aVehicleNames[vehicles]);
                                
ABroadCast(COLOR_GG,string,1); }
                                
Cheating2[i] = 1;
                                
SetTimerEx("UnSentCheating",5000,0,"i",i);
                            }
                        }
    } 
and speed boost is with click left or Alt
Reply
#2

use cooldown

on top add
PHP код:
static stimer[MAX_PLAYERS]; 
on your speedboost add :

PHP код:
KillTimer(stimer[playerid]);
SetPVarInt(playerid"SPDCOOL"1);
stimer[playerid] = SetTimerEx("SPDC"15000false"i"playerid); 
-------------------------------------------------------------------------------------

PHP код:
forward SPDC(playerid);
public 
SPDC(playerid)
{
    
SetPVarInt(playerid"SPDCOOL"0);
    return 
1;

PHP код:
if(final_speed_int 240 && Cheating2[i] != 1)
                        {
                            if(!
IsAPlane(tmpcar) && GetPVarInt(playerid"SPDCOOL") == 0)
                            {
                                new 
playerveh GetPlayerVehicleID(i);
                                new 
vehicles GetVehicleModel(playerveh) - 400;
                                
GetPlayerName(iplnamesizeof(plname));
                                if(
GetPlayerState(i) == PLAYER_STATE_DRIVER) {
                                
format(string256"[Anti-Cheat]: {FFFFFF}Server detected an speed hack on {FF0000}%s(%i){FFFFFF} (%i km/h) with vehicleid %i(%s).",plname,i,final_speed_int,playerveh,aVehicleNames[vehicles]);
                                
ABroadCast(COLOR_GG,string,1); }
                                
Cheating2[i] = 1;
                                
SetTimerEx("UnSentCheating",5000,0,"i",i);
                            }
                        }
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)