Tokio Posted October 1, 2018 Share Posted October 1, 2018 i downloaded this script: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3716 and i wanna give access for the panel only for admins.. but how can i do this? sorry for my bad english... Link to comment
VenomOG Posted October 1, 2018 Share Posted October 1, 2018 (edited) 17 minutes ago, Nerve said: i downloaded this script: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3716 and i wanna give access for the panel only for admins.. but how can i do this? sorry for my bad english... https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup Edited October 1, 2018 by Knuck Link to comment
LyricalMM Posted October 1, 2018 Share Posted October 1, 2018 Add this to script: accountname = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then Link to comment
Tokio Posted October 1, 2018 Author Share Posted October 1, 2018 2 hours ago, LyricalMM said: Add this to script: accountname = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then yeah, but where? which file? Link to comment
Dimos7 Posted October 1, 2018 Share Posted October 1, 2018 look at meta which is server side and add it on it Link to comment
URBAN Posted October 1, 2018 Share Posted October 1, 2018 (edited) 143. line at guimanager.lua function toggleEditor ( ) if getElementData(localPlayer,"admin") then else return end add somewhere at core.lua addEventHandler("onPlayerLogin", root, function() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Admin")) then setElementData(source,"admin",true) end end) Edited October 1, 2018 by URBAN Link to comment
Discord Moderators Pirulax Posted October 3, 2018 Discord Moderators Share Posted October 3, 2018 Nobody realized that isObjectInACLGroup accepts an element too? Link to comment
sanyisasha Posted October 3, 2018 Share Posted October 3, 2018 8 hours ago, Pirulax said: Nobody realized that isObjectInACLGroup accepts an element too? Pirulaaax. (Szia) No, nobody because it's dose not accept elements. If it is, the wiki wrong! (It writes that theObject can only string) bool isObjectInACLGroup ( string theObject, aclgroup theGroup ) Link to comment
Discord Moderators Pirulax Posted October 4, 2018 Discord Moderators Share Posted October 4, 2018 Actually, I was wrong, it doesnt, but hasObjectPermissionTo does. Maybe we could add the ability to pass in elements as well. 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