Jump to content

I need help with setPedStat()


amine2

Recommended Posts

Posted

I need help with setPedStat().

When i use setPedStat() for max health to "150" then the health will be 5 and i cant set the health back to 100 or 150

(I edit the health with admin panel )

function setMaxHealth(player)
	setPedStat ( player, 24, 150 )
end
addCommandHandler("health", setMaxHealth)

 

Posted

this function sets your health, the maximum is 100, it does not mean that if you put 150 your maximum health will be 150, if you exceed it sometimes it tends to bug, put numbers between 0 - 100

  • Moderators
Posted
Quote

wiki:
value: the new value of the stat. It must be between 0 and 1000.

Set it to 1000 ?

  • Moderators
Posted
3 hours ago, amine2 said:

And how i can set the max health ?

 

 

setPedStat ( thePlayer, 24, 1000 ) -- increase upper limit to max
setElementHealth ( thePlayer, 200 ) -- fill to upper limit >> or spawn the player

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...