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

Need advices or help troubleshooting? Ask for help here.
Post Reply
rww
Posts: 16
Joined: Fri Jun 15, 2018 6:49 am

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

Post by rww » Fri Mar 01, 2019 4:27 pm

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
Posts: 32
Joined: Sun Jul 30, 2017 4:28 am

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

Post by Armelin » Sat Mar 02, 2019 1:38 am

200 is full as detailed on the API Wiki.

rww
Posts: 16
Joined: Fri Jun 15, 2018 6:49 am

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

Post by rww » Sat Mar 02, 2019 11: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: 13
Joined: Sun Jun 03, 2018 2:22 pm
Location: Earth

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

Post by Lucas » Mon Mar 25, 2019 8:44 pm

I'm having the same problem

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest