Jump to content

Sobre fomesede


Recommended Posts

 
local Acl = {
    'Helper',
    'Admin',
    'Console',
}
 
addEventHandler('onResourceStart', root, function()
    for i , v in ipairs(getElementsByType('player')) do
        if getPlayerAcl(v) then
            if getElementData(v, 'Fome') and getElementData(v, 'Sede') then
                removeElementData(v, 'Fome')
                removeElementData(v, 'Sede')
            end
        end
    end
end)
 
addEventHandler('onPlayerLogin', root, function()
    if getPlayerAcl(source) then
        if getElementData(source, 'Fome') and getElementData(source, 'Sede') then
            removeElementData(source, 'Fome')
            removeElementData(source, 'Sede')
        end
    end
end)
 
function getPlayerAcl(player)
    for i , v in ipairs(Acl) do
        if aclGetGroup(v) and isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then
            return true
        end
    end
end
Edited by VictorBRP
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...