Default MAX Weapon Damage Values - 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: Default MAX Weapon Damage Values (
/showthread.php?tid=397811)
Default MAX Weapon Damage Values -
steki. - 06.12.2012
Well, I'm scripting a custom damage system and I came across a little problem. As you may know, the default weapon damage set may vary around the distance from the shooter to the target.
It'd be very great if someone had a list with max damage from all weapons to calculate with cross fraction :3
Any help?
Re: Default MAX Weapon Damage Values -
Ballu Miaa - 07.12.2012
There is no list available like that. You are required to calculate them on your own. However you can use OnPlayerShootPlayer() by Wups to give custom damage to the player!
Re: Default MAX Weapon Damage Values -
cessil - 07.12.2012
Quote:
Originally Posted by Stewie`
the default weapon damage set may vary around the distance from the shooter to the target.
|
I have never witnessed this, however the shotgun damage varies by how many pellets hit the other player.
You could just cap the damage so it doesn't exceed a certain amount
Quote:
Originally Posted by Ballu Miaa
There is no list available like that. You are required to calculate them on your own. However you can use OnPlayerShootPlayer() by Wups to give custom damage to the player!
|
I don't see any reason to ever use that seeing as there's OnPlayerGiveDamage and OnPlayerTakeDamage.
He could just set everyone on the same team and then use OnPlayerTakeDamage to parse who shot who and if they should take damage and then sets the players health accordingly.
Re: Default MAX Weapon Damage Values -
Ballu Miaa - 07.12.2012
Quote:
Originally Posted by cessil
I don't see any reason to ever use that seeing as there's OnPlayerGiveDamage and OnPlayerTakeDamage.
He could just set everyone on the same team and then use OnPlayerTakeDamage to parse who shot who and if they should take damage and then sets the players health accordingly.
|
Yup that can work pretty well too. He could all multiple printf's displaying him the information once the player shoots. Damage taken , Distance where he shot ,etc. After getting all the information he has to check according to weapon , distance and bullets hit the player and give him custom damage.