11.05.2018, 12:42
(
Последний раз редактировалось Lokii; 11.05.2018 в 15:20.
)
use cooldown
on top add
on your speedboost add :
-------------------------------------------------------------------------------------
on top add
PHP код:
static stimer[MAX_PLAYERS];
PHP код:
KillTimer(stimer[playerid]);
SetPVarInt(playerid, "SPDCOOL", 1);
stimer[playerid] = SetTimerEx("SPDC", 15000, false, "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(i, plname, sizeof(plname));
if(GetPlayerState(i) == PLAYER_STATE_DRIVER) {
format(string, 256, "[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);
}
}
}