SA-MP Forums Archive
now to call OnPlayerGiveDamage ?? - 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: now to call OnPlayerGiveDamage ?? (/showthread.php?tid=395032)



now to call OnPlayerGiveDamage ?? - Azazelo - 24.11.2012

How to make code to call OnPlayerGiveDamage,

is it PlayerGiveDamage(playerid,.....) ??


Re: now to call OnPlayerGiveDamage ?? - Kindred - 24.11.2012

Haven't posted or scripted in a while, so my post may be useless.

First off, why do you want to call that callback? It is called when a player gives damage to someone else, such as shooting another player.


Re: now to call OnPlayerGiveDamage ?? - Azazelo - 24.11.2012

Yes i know "It is called when a player gives damage" i want test is player able to take damage, when damage given by player it may be miss shoot but when called by code is 100% shoot so if player OnPlayerTakedmg not be called player id is not possible to take damage.


Re: now to call OnPlayerGiveDamage ?? - cessil - 25.11.2012

OnPlayerGiveDamage is called AFTER they have hit them on their screen, the server is not able to tell if the other player will take damage.
You can call it via the script by just using OnPlayerGiveDamage(.. however it'll just call what ever script you put in there and not deal any players damage.