Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* anti pro-aim
- get shotted pos
- get bullet pos
- if bullet pos HITS shotted
- get shotted pos
- if shotted pos != bullet pos */
- #include <a_samp>
- #include <izcmd>
- #define HOLDING(%0) \
- ((newkeys & (%0)) == (%0))
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- {
- if(hitid != INVALID_PLAYER_ID && IsPlayerConnected(hitid))
- {
- print("hitid != INVALID_PLAYER_ID");
- new Float:hitid_X, Float:hitid_Y, Float:hitid_Z;
- GetPlayerPos(playerid, Float:hitid_X, Float:hitid_Y, Float:hitid_Z);
- new Float:fOriginX, Float:fOriginY, Float:fOriginZ, Float:fHitPosX, Float:fHitPosY, Float:fHitPosZ;
- GetPlayerLastShotVectors(playerid, Float:fOriginX, Float:fOriginY, Float:fOriginZ, Float:fHitPosX, Float:fHitPosY, Float:fHitPosZ);
- static msg[128];
- static msg2[128];
- format(msg, sizeof(msg), "hitid pos: %f %f %f", Float:hitid_X, Float:hitid_Y, Float:hitid_Z);
- format(msg2, sizeof(msg2), "vector pos: %f %f %f %f %f %f", Float:fOriginX, Float:fOriginY, Float:fOriginZ, Float:fHitPosX, Float:fHitPosY, Float:fHitPosZ);
- SendClientMessage(playerid, -1, msg);
- SendClientMessage(playerid, -1, msg2);
- if(!IsPlayerInRangeOfPoint(hitid, Float:3.0, Float:fHitPosX, Float:fHitPosY, Float:fHitPosZ))
- {
- SendClientMessage(playerid, -1, "aimbot detected");
- SendClientMessageToAll(-1, "a player is aimbotting, pro aim");
- }
- static msg3[128];
- new Float:cood[6],Float:DistantaAim;
- GetPlayerPos(hitid,cood[0],cood[1],cood[2]);
- DistantaAim = GetPlayerDistanceFromPoint(playerid,cood[0],cood[1],cood[2]);
- if(GetPlayerTargetPlayer(playerid) == INVALID_PLAYER_ID && DistantaAim > 1.00 && DistantaAim < 50.00)
- {
- {
- SendClientMessageToAll(-1, "a player is aimbotting, silent aim");
- }
- }
- format(msg3, sizeof(msg3), "distance: %f", DistantaAim);
- SendClientMessage(playerid, -1, msg3);
- }
- }
- public OnPlayerSpawn(playerid)
- {
- SetSpawnInfo(playerid, 1, 1, Float:53, Float:10, Float:52, Float:1, 1, 1, 1, 1, 1, 1);
- SetPlayerPos(playerid, 23, 30, 43);
- AddStaticVehicle(451, 25, 30, 45, 1, 1, 1);
- AddStaticVehicle(451, 25, 35, 45, 1, 1, 1);
- GivePlayerWeapon(playerid, 24, 9999);
- GivePlayerWeapon(playerid, 25, 9999);
- GivePlayerWeapon(playerid, WEAPON_M4, 9999);
- SetPlayerHealth(playerid, 999999);
- return 1;
- }
- CMD:m4(playerid, params[])
- {
- GivePlayerWeapon(playerid, WEAPON_M4, 9999);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement