Advertisement
KiLLerBoy_001

GTA 5: Rapid Fire Function

Nov 11th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.99 KB | None | 0 0
  1. //-----------------  Rapid Fire  -----------------
  2. // Requires  http://pastebin.com/8mjesvm0
  3. //
  4. // RapidfireActive Bool used for activation
  5. // RFBetweenRounds can be changed through menu to change time between rounds
  6. //
  7. //------------------------------------------------
  8.  
  9. #include <math.h>
  10.  
  11. int RFTimeout;
  12. int RFBetweenRounds = 50;
  13.  
  14. RapidFireLoop()
  15. {
  16.    hash WeaponID;
  17.    if ( (RapidfireActive == true) && (PED::IS_PED_ON_FOOT(PLAYER::PLAYER_PED_ID()) && (PED::IS_PED_SHOOTING(PlayerPed)) && (GAMEPLAY::GET_GAME_TIMER()>=RFTimeout) )
  18.    {
  19.       Vector3 FromCoord = PED::GET_PED_BONE_COORDS(PLAYER::PLAYER_PED_ID(),57005,0,0,0);
  20.       Vector3 ToCoord = GetCoordsInfrontOfCam(75);
  21.       WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(),&WeaponID,0);
  22.       GAMEPLAY::SHOOT_SINGLE_BULLET_BETWEEN_COORDS(FromCoord.x,FromCoord.y,FromCoord.z,ToCoord.x,ToCoord.y,ToCoord.z,250,0,WeaponID,PLAYER::PLAYER_PED_ID(),1,0,1);
  23.       int RFTimeout = GAMEPLAY::GET_GAME_TIMER() + RFBetweenRounds;
  24.    }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement