Doigyfu Posted February 22, 2019 Posted February 22, 2019 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)
Moderators IIYAMA Posted February 22, 2019 Moderators Posted February 22, 2019 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)) 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now