Anti speed hack problem
#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


Messages In This Thread
Anti speed hack problem - by oOoBl4cKoOo - 11.05.2018, 12:00
Re: Anti speed hack problem - by Lokii - 11.05.2018, 12:42

Forum Jump:


Users browsing this thread: 1 Guest(s)