Need an efficient anti car warp / spam / explode - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need an efficient anti car warp / spam / explode (
/showthread.php?tid=614220)
Need an efficient anti car warp / spam / explode -
LoLeRo - 05.08.2016
I have been searching a lot of anti car warp scripts but no one can detect a cheater that is car warping in my server. I have tryied these types of anti car warp scripts and no one detects him :/
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(IsPlayerInAnyVehicle(playerid) || newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
pVehicles[playerid]++;
SetTimerEx("VehicleEnterReset", 3000, 0, "i", playerid);
if(pVehicles[playerid] >= MAX_ENTER_VEHICLES && GetPlayerVirtualWorld(playerid) != 1718)
{
SendClientMessage(playerid, -1, "ANTI-CHEAT: [VEHICLE HACKS] - You have been kicked for vehicle hacks.");
SetTimerEx("UnsetKick", 500, 0, "i", playerid);
}
}
return 1;
}
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if((GetTickCount()-GetPVarInt(playerid, "cartime")) < 1000) // enters veh as driver faster than 1 once
{
SetPVarInt(playerid, "carspam", GetPVarInt(playerid, "carspam")+1);
if(GetPVarInt(playerid, "carspam") >= 5) // allows 5 seconds leeway to compensate for glitching, then kicks
{
new name[24];
new string128[128];
GetPlayerName(playerid,name,24);
format(string128,sizeof(string128),"[hack][carspam] Kicked [%i]%s for CAR SPAM hacks",playerid,name);
SendClientMessageToAll(0xFFFF00AA,string128);
printf(string128);
return Kick(playerid);
}
}
SetPVarInt(playerid, "cartime", GetTickCount());
}
return 1;
}
No one of these anti car warp detects the cheater. The cheater is exploding all near vehicles :/
Re: Need an efficient anti car warp / spam / explode -
Shinja - 05.08.2016
Check this anti cheat
https://sampforum.blast.hk/showthread.php?tid=579963
P.S: I never tested it, just check your chance
Respuesta: Need an efficient anti car warp / spam / explode -
LoLeRo - 05.08.2016
Ok i'll try it, thanks!