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

Need advices or help troubleshooting? Ask for help here.
Post Reply
rww
Posts: 16
Joined: June 15th, 2018, 1:49 am

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

Post by rww » March 1st, 2019, 10:27 am

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
Image

Armelin

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

Post by Armelin » March 1st, 2019, 7:38 pm

200 is full as detailed on the API Wiki.

rww
Posts: 16
Joined: June 15th, 2018, 1:49 am

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

Post by rww » March 2nd, 2019, 5:24 am

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
Image

Lucas
Posts: 14
Joined: June 3rd, 2018, 9:22 am
Location: Earth

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

Post by Lucas » March 25th, 2019, 3:44 pm

I'm having the same problem

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests