26/04/2022 09:46
Código PHP:
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;
}
![[Imagem: tGRMsb3.png]](https://i.imgur.com/tGRMsb3.png)