Advertisement
KiLLerBoy_001

GTA 5: Client Laser Pointer

Nov 19th, 2015
895
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.03 KB | None | 0 0
  1. //-----------------  Laser Pointer ( Client sided )  -----------------
  2. // Requires  http://pastebin.com/8mjesvm0
  3. //
  4. // Just enable the LaserPointer bool
  5. //
  6. // You can change the color using the Color Array
  7. // Color[1] = Red
  8. // Color[2] = Green
  9. // Color[3] = Blue
  10. // Color[4] = Alpha
  11. //---------------------------------------------------------------------
  12.  
  13. int Color[4] = { 255, 0, 0 ,70 };
  14. float Range = 500;  // set the range for the laser pointer ( how far it goes )
  15.  
  16. if ((LaserPointer == true)&&(CONTROLS::IS_CONTROL_PRESSED(2,198))
  17. {
  18.       Vector3 FromCoord = PED::GET_PED_BONE_COORDS(PLAYER::PLAYER_PED_ID(),57005,0,0,0);
  19.       Vector3 ToCoord = GetCoordsInfrontOfCam(Range);
  20.       GRAPHICS::DRAW_LINE(FromCoord,ToCoord,Color[1],Color[2],Color[3],Color[4]);
  21.  
  22.       int max = int(Range + 0.5);
  23.       for (int i = 0; i >= max ; ++i);
  24.       {
  25.          float CurDistance = i;
  26.          Vector3 Coord = GetCoordsInfrontOfCam(CurDistance);
  27.          GRAPHICS::DRAW_LIGHT_WITH_RANGE(Coord,Color[1],Color[2],Color[3],1,3);
  28.       }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement