Tokio Posted October 1, 2018 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...
VenomOG Posted October 1, 2018 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
LyricalMM Posted October 1, 2018 Posted October 1, 2018 Add this to script: accountname = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then
Tokio Posted October 1, 2018 Author 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?
Dimos7 Posted October 1, 2018 Posted October 1, 2018 look at meta which is server side and add it on it
URBAN Posted October 1, 2018 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
Discord Moderators Pirulax Posted October 3, 2018 Discord Moderators Posted October 3, 2018 Nobody realized that isObjectInACLGroup accepts an element too?
sanyisasha Posted October 3, 2018 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 )
Discord Moderators Pirulax Posted October 4, 2018 Discord Moderators 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.
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