zaticsergiu Posted November 24, 2013 Posted November 24, 2013 local positions= { { -3511.0622558594, 1745.8352050781, 75.607810974121 }, { -3507.8325195313, 1771.8107910156, 75.607810974121 }, { -3552.9904785156, 1773.0948486328, 75.607810974121 }, { -3555.6606445313, 1742.8951416016, 75.607810974121 }, } function oh(thePlayer) local azar = math.random ( #positions ) setPedArmor ( thePlayer, 0 ) takeAllWeapons (thePlayer) setElementPosition (thePlayer, unpack ( positions [ azar ] ) ) setElementHealth (thePlayer, 1) end addCommandHandler("oh", oh) player's health not decrease like he has godmode help Sorry for my bad english
glowdemon1 Posted November 24, 2013 Posted November 24, 2013 Does it do the rest like setPedArmor() etc? Because AFAIK math.random only works with numbers, so try math.random(1,4) Try local positions= { { -3511.0622558594, 1745.8352050781, 75.607810974121 }, { -3507.8325195313, 1771.8107910156, 75.607810974121 }, { -3552.9904785156, 1773.0948486328, 75.607810974121 }, { -3555.6606445313, 1742.8951416016, 75.607810974121 }, } function oh(thePlayer) local azar = math.random ( 1,4 ) local x,y,z = unpack(positions[azar]) setPedArmor ( thePlayer, 0 ) takeAllWeapons (thePlayer) setElementPosition (thePlayer, x,y,z) setElementHealth (thePlayer, 1) end addCommandHandler("oh", oh) MySQL based MP3 System - unique radio stations My mappings
zaticsergiu Posted November 24, 2013 Author Posted November 24, 2013 still not working, when i fighting unarmed health not decrease
Moderators IIYAMA Posted November 25, 2013 Moderators Posted November 25, 2013 is this out side the gta san map? 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
TAPL Posted November 25, 2013 Posted November 25, 2013 -3555.6606445313 This is out side of gta sa map. Melee weapons does not work outside the range -3000 | 3000.
Moderators IIYAMA Posted November 25, 2013 Moderators Posted November 25, 2013 then he better can try this: http://mta.dzek.eu/mmove/ 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