-Doc- Posted May 26, 2015 Share Posted May 26, 2015 (edited) .dot. Edited June 1, 2016 by Guest Link to comment
Walid Posted May 26, 2015 Share Posted May 26, 2015 Can some one help me make a script? For example i type /muscle 1000 and player stats sets to 1000 or another number Try this function setMuscle(player,cmd,number) if isElement(player) then if not tonumber(number) then return end if getPedStat(player,23) == 1000 then return end setPedStat (player,23, tonumber(number)) end end addCommandHandler("muscle",setMuscle) Link to comment
-Doc- Posted May 26, 2015 Author Share Posted May 26, 2015 Can some one help me make a script? For example i type /muscle 1000 and player stats sets to 1000 or another number Try this function setMuscle(player,cmd,number) if isElement(player) then if not tonumber(number) then return end if getPedStat(player,23) == 1000 then return end setPedStat (player,23, tonumber(number)) end end addCommandHandler("muscle",setMuscle) Lol. Not working. Its working only for 1000 i need for all numbers. Max number 1000 Link to comment
Walid Posted May 26, 2015 Share Posted May 26, 2015 lol just replace equal with bigger than. function setMuscle(player,cmd,number) if isElement(player) then if not tonumber(number) then return end if getPedStat(player,23) > 1000 then return end setPedStat (player,23, tonumber(number)) end end addCommandHandler("muscle",setMuscle) /muscle 800 Link to comment
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