Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //AntiRapid from "xOFxK1LLER" bugfixed by Silver_Dragon.
- new MyShot[MAX_PLAYERS];
- new MyShotTimer[MAX_PLAYERS];
- public OnPlayerConnect(playerid) //resets on conneting
- {
- //AntiRapid
- MyShotTimer[playerid] = 0;
- MyShot[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid) //if player leaves server id gets resetet
- {
- MyShotTimer[playerid] = 0;
- MyShot[playerid] = 0;
- return 1;
- }
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- {
- if(weaponid == 32 || weaponid == 28 || weaponid == 38)//Guns they shot to fast like uzi or minigun
- {
- return 1;
- }
- else if(weaponid != 32 || weaponid != 28 || weaponid != 38)
- {
- if((gettime() - MyShotTimer[playerid]) < 1)//If U shot One Bullet per Second or less
- {
- MyShot[playerid]+=1;
- }
- else
- {
- MyShot[playerid]=0;
- }
- }
- if(MyShot[playerid] >= 15)// If Player Shots 15 Times in A Second.
- {
- new kickstring[128], hackersname[MAX_PLAYER_NAME];
- GetPlayerName(playerid,hackersname,sizeof(hackersname));
- format(kickstring,sizeof(kickstring),"{FF8200}[Anti-Cheat]:{DCDCDC} %s was Kicked from the Server for Rapid Fire Hacks.",hackersname);
- Kick(playerid);
- SendClientMessageToAll(0xFFFFFFF,kickstring);
- }
- MyShotTimer[playerid] = gettime(); //Times Ur Shot.
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement