Matevsz Posted December 23, 2015 Share Posted December 23, 2015 Hi there, how do the player to slowly subtraction oxygen? Link to comment
Mr. Bubbles Posted December 23, 2015 Share Posted December 23, 2015 Hi there, how do the player to slowly subtraction oxygen? Please see the following functions: GetPedOxygenLevel SetPedOxygenLevel and if you want to mess with the max ped oxygen value: GetPedMaxOxygenLevel Link to comment
Matevsz Posted December 24, 2015 Author Share Posted December 24, 2015 and how to do it after exiting the water in skin 97 after 5 seconds when you do not enter back into the water delete us skin and oxygen bar. After taking a skin back to us what we had. local playerData = { skinGracza = source.model } local pasekTlenu = {"breath"} addEventHandler("onResourceStart", resourceRoot, function(localPlayer) setTimer(function(localPlayer) local Skin = tonumber(getElementModel(localPlayer)) if ((not Skin) or (Skin ~= 97)) then return end if isElementInWater(localPlayer) then else setElementModel(playerData.skinGracza, 0, 0) setPlayerHudComponentVisible(pasekTlenu, false) end end, 5000, 0) end ) Error: attempt to index global 'source' > skinGracza = source.model 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