hugodoss Posted October 11, 2021 Share Posted October 11, 2021 alguém sabe se tem como fazer pra um certo grupo não sentir fome? EX: a pessoas ta no grupo Staff ai ela não sente fome e nem sede Link to comment
VictorBRP Posted October 13, 2021 Share Posted October 13, 2021 (edited) 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 October 13, 2021 by VictorBRP 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