Harry11223344 Posted May 6, 2015 Share Posted May 6, 2015 How would I increase my weapon damage? I found the function SET_PLAYER_WEAPON_DAMAGE_MODIFIER I'm using it like this, but it isn't working. if (UltraDamageEnabled) { if (bPlayerExists) PLAYER::SET_PLAYER_WEAPON_DAMAGE_MODIFIER(player, 99999); } Though if I use the same for explosive bullets it works. if (ExplosiveBulletsEnabled) { if (bPlayerExists) GAMEPLAY::SET_EXPLOSIVE_AMMO_THIS_FRAME(player); } Any idea how I would make the weapon damage work? Link to comment Share on other sites More sharing options...
klayderpus Posted May 6, 2015 Share Posted May 6, 2015 (edited) Example usage from game scripts is as follows: PLAYER::SET_PLAYER_WEAPON_DAMAGE_MODIFIER(PLAYER::PLAYER_ID(), 1f); ...so using PLAYER::PLAYER_ID() as a value for player if you aren't already. PLAYER::GET_PLAYER_INDEX() is also used. Edited May 6, 2015 by klayderpus Link to comment Share on other sites More sharing options...
Harry11223344 Posted May 6, 2015 Author Share Posted May 6, 2015 Example usage from game scripts is as follows: PLAYER::SET_PLAYER_WEAPON_DAMAGE_MODIFIER(PLAYER::PLAYER_ID(), 1f); ...so using PLAYER::PLAYER_ID() as a value for player if you aren't already. PLAYER::GET_PLAYER_INDEX() is also used. That is weird I'm already using Player player = PLAYER::PLAYER_ID(); Like I said the explosive bullets is also working and is using the player variable aswell. I have no idea whats wrong here. Link to comment Share on other sites More sharing options...
klayderpus Posted May 6, 2015 Share Posted May 6, 2015 Just tried it myself and it works fine. Are you calling the function on every tick? Link to comment Share on other sites More sharing options...
Harry11223344 Posted May 6, 2015 Author Share Posted May 6, 2015 Just tried it myself and it works fine. Are you calling the function on every tick? Yeh I put it in void update_features(). Link to comment Share on other sites More sharing options...
klayderpus Posted May 6, 2015 Share Posted May 6, 2015 Just tried it myself and it works fine. Are you calling the function on every tick? Yeh I put it in void update_features(). Triple check your code to make sure it's being toggled and effectively set. Also bear in mind the damage buff doesn't have any effect on vehicles or anything - just peds. I have mine set to 1,000 and the pistol is a one hit kill to the foot. Link to comment Share on other sites More sharing options...
Harry11223344 Posted May 6, 2015 Author Share Posted May 6, 2015 Just tried it myself and it works fine. Are you calling the function on every tick? Yeh I put it in void update_features(). Triple check your code to make sure it's being toggled and effectively set. Also bear in mind the damage buff doesn't have any effect on vehicles or anything - just peds. I have mine set to 1,000 and the pistol is a one hit kill to the foot. This is what I have Features: bool UltraDamageEnabled = false;bool ExplosiveBulletsEnabled = false; void update_features(): // Ultra Damage if (UltraDamageEnabled) { if (bPlayerExists) PLAYER::SET_PLAYER_WEAPON_DAMAGE_MODIFIER(player, 1000); } // Explosive Bullets if (ExplosiveBulletsEnabled) { if (bPlayerExists) GAMEPLAY::SET_EXPLOSIVE_AMMO_THIS_FRAME(player); } Menu: static struct { LPCSTR text; bool *pState; bool *pUpdated; } lines[lineCount] = { { "Ultra Damage", &UltraDamageEnabled, NULL }, { "Explosive Bullets", &ExplosiveBulletsEnabled, NULL } }; Both explosive bullets and Ultra damage use the ON/OFF toggle from AB. Though only the explosive bullets is working. P.S If you shoot a cop in the leg do you also get the red X mark indicating he died? Link to comment Share on other sites More sharing options...
julionib Posted May 6, 2015 Share Posted May 6, 2015 (edited) use Float insted of integer: PLAYER::SET_PLAYER_WEAPON_DAMAGE_MODIFIER(player, 1000.0); but i believe you dony will get "that" damage increase, game applies some limits Edited May 6, 2015 by julionib Link to comment Share on other sites More sharing options...
NRGMAN1973 Posted May 18, 2016 Share Posted May 18, 2016 would this be something that could be transfered to next gen? Link to comment Share on other sites More sharing options...
alloc8or Posted May 18, 2016 Share Posted May 18, 2016 would this be something that could be transfered to next gen? lmao, no... jedijosh920 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now