SA-MP Forums Archive
Injured system - 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: Injured system (/showthread.php?tid=637110)



Injured system - valelele - 08.07.2017

If one player is < 45 hp and I shoot him with a deagle he is respawning but I wants to put him in injured like another weapons like M4 or AK-47. Why he is respawning? It's because damage deagle from GTA Singeplayer?


https://www.youtube.com/watch?v=ZZ8T...ature=*********


Re: Injured system - aoky - 08.07.2017

It's because the damage is too big, just get the weaponconfig include and get the players health then do

if(amount > PlayerHealth)
setplayerhealth(playerid, 45);
and continue from there


Re: Injured system - HoussemGaming - 08.07.2017

Quote:
Originally Posted by aoky
Посмотреть сообщение
It's because the damage is too big, just get the weaponconfig include and get the players health then do

if(amount > PlayerHealth)
setplayerhealth(playerid, 45);
and continue from there
It will be not good to set the PlayerHealth
make it like that
Код:
SetPlayerHealth(playerid, GetPlayerHealth(playerid)-45);
Correct me if i'm wrong