Jump to content

Slow subtraction of oxygen


Matevsz

Recommended Posts

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

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.
×
×
  • Create New...