Doigyfu

[Question] Player/Ped Stats Range

Recommended Posts

Hello! I'm a new member here, and just started my journey through scripting for MTA (but i have some previous knowledge about programming and lua). So... I'm trying to script some kind of advanced rpg system, and I want to add hunger, thirst and sleep needs, but i want it's maximum values (aka time for complete depletion) to be altered by the default character stats. I have found out how to get the character stats, and the problem now is: what are the maximum and minimum values returned by getPedStat()? I tried the wiki, and there is said that there are some stats which are integer values, and some others are float. All the ones I want are float, but, I don't know if could I use, for instance, something like

sleep = baseValue/fat

because i don't know if fat goes from 0 to 999 or 1 to 1000. Wasn't able to find this anywhere either. Could you guys give a little help to this rookie right here?

(sorry for my bad english)

Share this post


Link to post

Afaik from 0 to 1000. Because according to wiki 1000 enable dual weapons.

https://wiki.multitheftauto.com/wiki/Weapon_skill_levels

 

If you really want to know it for sure, then the obvious solution for a programmer is to debug it, isn't it?

setPedStat(localPlayer, 21, 1000)
iprint("super cow value:", getPedStat(localPlayer, 21))

 

 

  • Like 1

Share this post


Link to post

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.