Page 1 of 1

[BUG] setPlayeHealth(playerid,100) set 0 hp

Posted: March 1st, 2019, 10:27 am
by rww
Description:
Function setPlayeHealth(playerid,100) set 0 hp, only 200 value works. 150 is half hp, and under 100 = kill.

Reproducible:
Always

What you were doing when the bug happened:

Code: Select all

function onPlayerSpawned(playerid)
	setPlayeHealth(playerid, 100)
end
registerEvent("onPlayerSpawned", "onPlayerSpawn")
Someone say with function to setting Armour bugged the same like here

Re: [BUG] setPlayeHealth(playerid,100) set 0 hp

Posted: March 1st, 2019, 7:38 pm
by Armelin
200 is full as detailed on the API Wiki.

Re: [BUG] setPlayeHealth(playerid,100) set 0 hp

Posted: March 2nd, 2019, 5:24 am
by rww
But on Wiki is

Code: Select all

Int hp: HP ranges: < 0 = dead, > 0 = alive, 200 = full HP
So in wiki:
200 = full hp
100 = half hp
0 = dead

How it really works (in game):

200 = full hp
150 = half hp
100 = alive
99 or lower = dead

Btw. I use the latest LUA IVMP server build, with colored messages. If it matters

Re: [BUG] setPlayeHealth(playerid,100) set 0 hp

Posted: March 25th, 2019, 3:44 pm
by Lucas
I'm having the same problem