SA-MP Forums Archive
[Y_Hooks] Problem with OnPlayerDamage - 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: [Y_Hooks] Problem with OnPlayerDamage (/showthread.php?tid=658545)



[Y_Hooks] Problem with OnPlayerDamage - IdonTmiss - 06.09.2018

I tried hooking "OnPlayerDamage" from weapon-config it didn't work, the code I used

PHP код:
hook OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart
{
    
SetPlayerHealth(playerid1.0);
    return 
1;

It also doesn't work with Pawn.CMD callback "OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags)"


Re: [Y_Hooks] Problem with OnPlayerDamage - IdonTmiss - 06.09.2018

Well I saw that Pawn.CMD was faster than y_commands that's why I use it


Re: [Y_Hooks] Problem with OnPlayerDamage - v1k1nG - 06.09.2018

Is this what you're looking for? I have weapon-config.inc too and.. why not learn something new right now
https://sampforum.blast.hk/showthread.php?tid=574534


Re: [Y_Hooks] Problem with OnPlayerDamage - IdonTmiss - 06.09.2018

Quote:
Originally Posted by v1k1nG
Посмотреть сообщение
Is this what you're looking for? I have weapon-config.inc too and.. why not learn something new right now
https://sampforum.blast.hk/showthread.php?tid=574534
thanks