Jump to content

Recommended Posts

Posted

setPedStat(getLocalPlayer(), 24, 650)

setPedMaxHealth(getLocalPlayer())

 

These commands do not want to work, do not show any errors. But unfortunately it doesn't set my health at around 125 points, it just sets me to 100 HP

 

Maybe bug? pls help

  • Moderators
Posted
1 hour ago, redditing said:

Maybe bug? pls help

Not a bug:

Quote

When this function is used client side, it can only be used on client side created peds.

https://wiki.multitheftauto.com/wiki/SetPedStat

 

Serverside:

addCommandHandler("setMaxHealth", function (player) 
	setPedStat(player, 24, 650) 
end)

 

Also according to this formula: (not sure if this is valid)

stat = 650
print(100 + (stat - 569) / 4.31) -- 118.79350348028 max health

Source: https://wiki.multitheftauto.com/wiki/GetPedMaxHealth

 

  • Thanks 1

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...