Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------- Laser Pointer ( Client sided ) -----------------
- // Requires http://pastebin.com/8mjesvm0
- //
- // Just enable the LaserPointer bool
- //
- // You can change the color using the Color Array
- // Color[1] = Red
- // Color[2] = Green
- // Color[3] = Blue
- // Color[4] = Alpha
- //---------------------------------------------------------------------
- int Color[4] = { 255, 0, 0 ,70 };
- float Range = 500; // set the range for the laser pointer ( how far it goes )
- if ((LaserPointer == true)&&(CONTROLS::IS_CONTROL_PRESSED(2,198))
- {
- Vector3 FromCoord = PED::GET_PED_BONE_COORDS(PLAYER::PLAYER_PED_ID(),57005,0,0,0);
- Vector3 ToCoord = GetCoordsInfrontOfCam(Range);
- GRAPHICS::DRAW_LINE(FromCoord,ToCoord,Color[1],Color[2],Color[3],Color[4]);
- int max = int(Range + 0.5);
- for (int i = 0; i >= max ; ++i);
- {
- float CurDistance = i;
- Vector3 Coord = GetCoordsInfrontOfCam(CurDistance);
- GRAPHICS::DRAW_LIGHT_WITH_RANGE(Coord,Color[1],Color[2],Color[3],1,3);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement