Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ANTI AIMBOT by Scriptery v0.1
- // if you find a bug, contact me in PM.
- // Next update: Detect renko, and stabilization anticheat for kick player
- #include <a_samp>
- new SilentAimCount[MAX_PLAYERS],ProAimCount[MAX_PLAYERS];
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- {
- new string[200];
- if(weaponid != 38 && weaponid > 18 && weaponid < 34 && hittype == 1)
- {
- new Float:cood[6],Float:DistantaAim,armaaim[128];
- GetPlayerPos(hitid,cood[0],cood[1],cood[2]);
- DistantaAim = GetPlayerDistanceFromPoint(playerid,cood[0],cood[1],cood[2]);
- GetWeaponName(weaponid,armaaim,sizeof(armaaim));
- if(GetPlayerTargetPlayer(playerid) == INVALID_PLAYER_ID && DistantaAim > 1 && DistantaAim < 31)
- {
- SilentAimCount[playerid]++;
- if(SilentAimCount[playerid] >= 10)
- {
- SilentAimCount[playerid] = 0;
- format(string, sizeof(string), "Warning: %s(%d) possible use Silent Aim cheat with %s (Distance: %f meters)", GetName(playerid),playerid, armaaim, DistantaAim);
- SendToAdmins(string);
- }
- return 1;
- }
- GetPlayerLastShotVectors(playerid, cood[0],cood[1],cood[2], cood[3],cood[4],cood[5]);
- if(!IsPlayerInRangeOfPoint(hitid, 3.0, cood[3],cood[4],cood[5]))
- {
- ProAimCount[playerid]++;
- if(ProAimCount[playerid] >= 5)
- {
- ProAimCount[playerid] = 0;
- format(string, sizeof(string), "Warning: %s(%d) possible use ProAim cheat with: %s (Distance: %f meters)", GetName(playerid),playerid,armaaim, DistantaAim);
- SendToAdmins(string);
- }
- }
- }
- return 1;
- }
- public OnFilterScriptInit()
- {
- print("Anti aimbot by Scriptery loaded !");
- return 1;
- }
- stock SendToAdmins(string2[])
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && IsPlayerAdmin(i))
- {
- SendClientMessage(i,0xE60000FF,string2);
- }
- }
- }
- stock GetName(playerid)
- {
- new Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, sizeof(Name));
- return Name;
- }
- /*
- public OnPlayerSpawn(playerid)
- {
- SetPlayerPos(playerid,0,0,3);
- GivePlayerWeapon(playerid,24,999);
- GivePlayerWeapon(playerid,30,999);
- return 1;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement