</Mr.Tn6eL> Posted July 2, 2015 Share Posted July 2, 2015 انا اقول كذا راح يصير لاق افضل طريقة Client addEventHandler("onClientElementDataChange", root, function(name) if getElementType(source) == "player" and name == "Admin" then guiSetEnabled(button, getElementData(source, "Admin")) end end) Server function Events(_, account) if eventName == "onPlayerLogin" then if isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("Console")) then setElementData(source, "Admin", true) end elseif eventName == "onPlayerLogout" then setElementData(source, "Admin", false) elseif eventName == "onResourceStart" then for k,v in ipairs(getElementsByType("player")) do local account = getPlayerAccount(v) if account and not isGuestAccount(account) and isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("Console")) then setElementData(v, "Admin", false) end end end end addEventHandler("onPlayerLogin", root, Events) addEventHandler("onPlayerLogout", root, Events) addEventHandler("onResourceStart", resourceRoot, Events) Link to comment
TAPL Posted July 2, 2015 Share Posted July 2, 2015 ^ true سطر 12 المفروض + else false 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