Whitetigerswt

Camhack

Jan 31st, 2012
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.26 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new wait[MAX_PLAYERS];
  4.  
  5. public OnFilterScriptInit()
  6. {
  7.     print("\n--------------------------------------");
  8.     print(" Blank Filterscript by your name here");
  9.     print("--------------------------------------\n");
  10.     return 1;
  11. }
  12.  
  13. public OnFilterScriptExit()
  14. {
  15.     return 1;
  16. }
  17.  
  18. public OnPlayerSpawn(playerid)
  19. {
  20.     wait[playerid] = 0;
  21.     return 1;
  22. }
  23.  
  24. new Float:Pos[MAX_PLAYERS][3];
  25.  
  26. public OnPlayerUpdate(playerid)
  27. {
  28.     new idx = GetPlayerAnimationIndex(playerid);
  29.     if(!IsPlayerInRangeOfPoint(playerid, 20, Pos[playerid][0], Pos[playerid][1], Pos[playerid][2])) {
  30.         // player has teleported? possibley by the script or by hacks, unable to tell, lets just tell the anticheat not to detect cam hacks for a few seconds.
  31.         wait[playerid] = 0;
  32.     }
  33.     GetPlayerPos(playerid, Pos[playerid][0], Pos[playerid][1], Pos[playerid][2]);
  34.    
  35.     if(wait[playerid] > 150 && GetPlayerCameraMode( playerid ) != 56) {
  36.         switch(idx) {
  37.             case 1167, 1160..1162, 1331..1332, 1069..1070: {
  38.                 new Float:X,  Float:Y, Float:Z;
  39.                 GetPlayerCameraPos(playerid, X, Y, Z);
  40.                 if(!IsPlayerInRangeOfPoint(playerid, 20, X, Y, Z) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
  41.                     Kick(playerid);
  42.                 }
  43.             }
  44.         }
  45.     }
  46.     wait[playerid]++;
  47.     return 1;
  48. }
Add Comment
Please, Sign In to add comment