How to stop troll car , i need some anti code please
#8

thanks guy , i found the temporary resolve . its anti car spam , i share this for someone need help same me

Quote:

// This is a comment
#include <a_samp>

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Anti-Car-Spam by kaisersouse ©2013");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnGameModeExit()
{
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(string12,"[hack][carspam] Kicked [%i]%s for CAR SPAM hacks",playerid,name);
SendClientMessageToAll(0xFFFF00AA,string12;
printf(string12;
#if defined IRC_ECHO
IRC_GroupSay(groupID, IRC_CHANNEL, string12;
#endif
return Kick(playerid);
}
}
SetPVarInt(playerid, "cartime", GetTickCount());
}
return 1;
}

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)