05.08.2016, 22:34
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 :/
No one of these anti car warp detects the cheater. The cheater is exploding all near vehicles :/
Код:
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; }