C_far

/aimbot

Nov 25th, 2016
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.55 KB | None | 0 0
  1. new
  2.     actorid_aimbot;
  3.  
  4. GameMode::Init()
  5. {
  6.     actorid_aimbot = CreateActor(264, 1848.6160, 1352.1880, 16.9223, 0.0);
  7.  
  8.     return true;
  9. }
  10.  
  11. YCMD:aimbot(playerid, params[], help)
  12. {
  13.     new
  14.         id;
  15.  
  16.     if(sscanf(params, "u", id)) return Scu(playerid, "/aimbot [ID/Pseudo du Joueur]");
  17.     if(!IsPlayerConnected(id)) return Sce(playerid, "Ce joueur n'est pas connecté.");
  18.    
  19.     new
  20.         Float:x,
  21.         Float:y,
  22.         Float:z,
  23.         Float:angle;
  24.        
  25.     GetPlayerPos(id, x, y, z);
  26.     GetPlayerFacingAngle(id, angle);
  27.  
  28.     new
  29.         Float:x_actor = x + (2.5 * floatsin(-angle, degrees)),
  30.         Float:y_actor = y + (2.5 * floatcos(-angle, degrees));
  31.    
  32.     SetActorPos(actorid_aimbot, x_actor, y_actor, z);
  33.    
  34.     SetTimerEx("Aimbot_Detection", 750, false, "ddfdd", playerid, id, angle + 3.6, 0, 0);
  35.    
  36.     return true;
  37. }
  38.  
  39. forward Aimbot_Detection(playerid, aimbotid, Float:angle, test, detect);
  40. public Aimbot_Detection(playerid, aimbotid, Float:angle, test, detect)
  41. {
  42.     new
  43.         Float:x,
  44.         Float:y,
  45.         Float:z;
  46.        
  47.     GetPlayerPos(aimbotid, x, y, z);
  48.  
  49.     new
  50.         Float:x_actor = x + (1.5 * floatsin(-angle, degrees)),
  51.         Float:y_actor = y + (1.5 * floatcos(-angle, degrees));
  52.  
  53.     SetActorPos(actorid_aimbot, x_actor, y_actor, z + 1.0);
  54.    
  55.     if(GetPlayerTargetActor(aimbotid) == actorid_aimbot) detect++;
  56.    
  57.     if(++test == 200)
  58.     {
  59.         Scm(playerid, -1, "[Aimbot] %d détections sur 200 pour l'ID %d", detect, aimbotid);
  60.        
  61.         SetActorPos(actorid_aimbot, 1848.6160, 1352.1880, 16.9223);
  62.        
  63.         return true;
  64.     }
  65.    
  66.     return SetTimerEx("Aimbot_Detection", 25, false, "ddfdd", playerid, aimbotid, angle + 3.6, test, detect);
  67. }
Advertisement