12-05-2016, 09:33 AM
(12-05-2016, 06:16 AM)Overdosed Wrote: Any idea how much work it is to create said "Anti-Cheat"?Try This this may work
If you know how to code, please share!
Code:
#include <a_samp>
new shotTime[MAX_PLAYERS];
new shot[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Anti Rapid Fire");
print("--------------------------------------\n");
return 1;
}
public OnPlayerConnect(playerid)
{
shotTime[playerid] = 0;
shot[playerid] = 0;
return 1;
}
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(weaponid != 38)
{
if((gettime() - shotTime[playerid]) < 1)
{
shot[playerid]+=1;
}
else
{
shot[playerid]=0;
}
if(shot[playerid] > 10)
{
Kick(playerid);
}
shotTime[playerid] = gettime();
}
return 1;
}

![[Image: lAOsdFK.png]](http://i.imgur.com/lAOsdFK.png)