SA-MP Forums Archive
Damage question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Damage question (/showthread.php?tid=546284)



Damage question - Supermaxultraswag - 14.11.2014

Hey, where can i get every gta weapon orginal damage?

Also

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
new Float:HP;
GetPlayerHealth(playerid, HP);
if(weaponid == 31) SetPlayerHealth(playerid, HP-25);
return 1;
}

will this script increase the original m4 damage by 25 hp(for example damage was 15, and with this script it became 40) or replace m4 damage(for example it was 15, and with this script it became 25)?

Sorry for bad english, hope you understand what im trying to say ;/


Re: Damage question - Supermaxultraswag - 14.11.2014

Please, i really need help.


Re: Damage question - DavidBilla - 14.11.2014

Not sure about the original gta sa damage, but it will increase the damage by 25, but the default damage value keeps varying everytime, so this script will sometimes reduce 40 hp sometimes 50, sometimes 35 or so on


Re: Damage question - Vince - 14.11.2014

Weapon data can be retrieved from weapon.dat in the GTA SA data folder. The file can be simply read using Notepad.