SA-MP Forums Archive
Weapons making no damage - 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: Weapons making no damage (/showthread.php?tid=609852)



Weapons making no damage - Amator - 17.06.2016

Hi, I'm on a project and actually, we can take damages from fists or melee weapons and even grenades/flames, but absolutely 0 damage from bullet weapons.

There are no teams, only one class and I don't know what else can cause that. Thanks for your help.


Re: Weapons making no damage - Dayrion - 17.06.2016

Hey. Can you show your OnPlayerTakeDamage & OnPlayerGiveDamage ?


Re: Weapons making no damage - Gammix - 17.06.2016

Do you return 0 in OnPlayerWeaponShot?

(0 - no damage)


Re: Weapons making no damage - Amator - 17.06.2016

There are none of what you cited both, should I add them?


Re: Weapons making no damage - xTURBOx - 17.06.2016

PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
   return 
0;

This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported

So will prevent damage from bullet weapons
(NOTE: driver driveby/ vehicle shoot(EG: sea sparrow)) is not supported