KayLaJay15 Posted November 13, 2017 Share Posted November 13, 2017 So i'm trying to change the damage for grenades in SA using "SA Ammunation Tool" but then I found out that you can't change a projectile weapons damage, I was just wondering if there is anyway way at all to change the damage of grenades? Link to comment Share on other sites More sharing options...
Jack Posted November 13, 2017 Share Posted November 13, 2017 // The part of CExplosion::AddExplosion();#include "plugin.h"using namespace plugin;float DamagePercentage = 1.0;int INT_DamagePercentage = (int)DamagePercentage;class ExplosionDamage {public: ExplosionDamage() { plugin::patch::SetUInt(0x736AEF, INT_DamagePercentage); // explo->m_fDamagePercentage = 1.0; explo->m_fRadius = 1.0 }} ed; But this can only affect vehicles (not peds). Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
KayLaJay15 Posted November 13, 2017 Author Share Posted November 13, 2017 // The part of CExplosion::AddExplosion();#include "plugin.h"using namespace plugin;float DamagePercentage = 1.0;int INT_DamagePercentage = (int)DamagePercentage;class ExplosionDamage {public: ExplosionDamage() { plugin::patch::SetUInt(0x736AEF, INT_DamagePercentage); // explo->m_fDamagePercentage = 1.0; explo->m_fRadius = 1.0 }} ed; But this can only affect vehicles (not peds). This is EXACTLY what I need thank you sooo much Link to comment Share on other sites More sharing options...
KayLaJay15 Posted November 13, 2017 Author Share Posted November 13, 2017 One question though how do I put this code in the game? Link to comment Share on other sites More sharing options...
Jack Posted November 13, 2017 Share Posted November 13, 2017 Do you have any experience with the scm language? Have you ever build up a simple CLEO code? Btw the above code is ASI (c++). Most of the beginers start with scm. Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
KayLaJay15 Posted November 13, 2017 Author Share Posted November 13, 2017 Oh ok I see and no unfortunately I have no experience with (c++) or the scm language. Link to comment Share on other sites More sharing options...
boludoz Posted November 13, 2017 Share Posted November 13, 2017 https://drive.google.com/file/d/1kuFaV2QSoqnMEpHQPyWEgET5bB5eCshC/view?usp=sharing Link to comment Share on other sites More sharing options...
KayLaJay15 Posted November 13, 2017 Author Share Posted November 13, 2017 https://drive.google.com/file/d/1kuFaV2QSoqnMEpHQPyWEgET5bB5eCshC/view?usp=sharing Sorry to ask but what is this? Link to comment Share on other sites More sharing options...
GuruGuru Posted November 14, 2017 Share Posted November 14, 2017 The code above,but compiled. And probably with the damage multiplier unchanged lmao. Link to comment Share on other sites More sharing options...
DK22Pac Posted November 14, 2017 Share Posted November 14, 2017 (edited) This won't work, because value @0x736AEF is a float You should use patch::SetFloat for this case: #include "plugin.h"class ExplosionDamage {public: ExplosionDamage() { plugin::patch::SetFloat(0x736AEF, 1.0f); }} ed; Edited November 14, 2017 by DK22Pac Jack 1 Link to comment Share on other sites More sharing options...
Jack Posted November 14, 2017 Share Posted November 14, 2017 (edited) This won't work, because value @0x736AEF is a float It doesn't really matter right now but my code works. I converted float to int before I wrote the value: float DamagePercentage = 1.0;int INT_DamagePercentage = (int)DamagePercentage; Edited November 14, 2017 by Jack Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
KayLaJay15 Posted November 14, 2017 Author Share Posted November 14, 2017 Thank you everyone, so what do I do with the code? Link to comment Share on other sites More sharing options...
Wesser Posted November 14, 2017 Share Posted November 14, 2017 @Jack, you were meant to type-pun a float to an unsigned int without changing the underlying bits, not to type-cast which implies a conversion. Jack 1 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
Jack Posted November 14, 2017 Share Posted November 14, 2017 Sh*t you're both right. The code doesn't work. I'm sorry. (Jack cries). Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
KayLaJay15 Posted November 14, 2017 Author Share Posted November 14, 2017 Sh*t you're both right. The code doesn't work. I'm sorry. (Jack cries). It's ok Link to comment Share on other sites More sharing options...
boludoz Posted November 18, 2017 Share Posted November 18, 2017 Sh*t you're both right. The code doesn't work. I'm sorry. (Jack cries). works only for vehicles Link to comment Share on other sites More sharing options...
boludoz Posted November 18, 2017 Share Posted November 18, 2017 (edited) This won't work, because value @0x736AEF is a float You should use patch::SetFloat for this case: #include "plugin.h"class ExplosionDamage {public: ExplosionDamage() { plugin::patch::SetFloat(0x736AEF, 1.0f); }} ed; now I compile it with the sdk, despite the fact that the previous code was tested with 0 and worked correctly, but only on vehicles. https://drive.google.com/file/d/1kuFaV2QSoqnMEpHQPyWEgET5bB5eCshC/view?usp=sharing I took the courage to leave the value in 9.0f, it works only with grenades and in vehicles, an explosion is generated that ignites the vehicle in flames, and then it detonates, (as in the normal game), It seems that 0x736AEF is related to what I was testing, not with the damage, but with the necessary radius to affect the vehicle. Edited November 18, 2017 by boludoz Link to comment Share on other sites More sharing options...
KayLaJay15 Posted November 18, 2017 Author Share Posted November 18, 2017 This won't work, because value @0x736AEF is a float You should use patch::SetFloat for this case: #include "plugin.h"class ExplosionDamage {public: ExplosionDamage() { plugin::patch::SetFloat(0x736AEF, 1.0f); }} ed; now I compile it with the sdk, despite the fact that the previous code was tested with 0 and worked correctly, but only on vehicles. https://drive.google.com/file/d/1kuFaV2QSoqnMEpHQPyWEgET5bB5eCshC/view?usp=sharing I took the courage to leave the value in 9.0f, it works only with grenades and in vehicles, an explosion is generated that ignites the vehicle in flames, and then it detonates, (as in the normal game), It seems that 0x736AEF is related to what I was testing, not with the damage, but with the necessary radius to affect the vehicle. Thank you very much, but how do I open the file? 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