TorNix~|nR Posted January 14, 2021 Posted January 14, 2021 Hello guys, I don't know where the problem is in this code I'm trying to make the button only for the ACL 'Admin' The messages 'fail' and 'done' in server-side are working but the panel appears anyway client-side addEvent("trigger", true) addEventHandler("onClientGUIClick", getRootElement(), function() if (source == button[1]) then triggerServerEvent("trigger", localPlayer) guiSetVisible(window[4], true) guiBringToFront(window[4]) end) server-side addEvent("trigger", true) function Test(plr) if (not isElement(plr)) then return end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then triggerClientEvent(plr, "trigger", plr) outputChatBox("done") else return outputChatBox("fail") end end end addEventHandler("trigger", root, Test) any help please?
Moderators IIYAMA Posted January 14, 2021 Moderators Posted January 14, 2021 1 hour ago, TorNix~|nR said: I don't know where the problem is in this code Without library, you have to use triggerClientEvent to send a message back. You can't use the return keyword to send data back. "onClientGUIClick" > triggerServerEvent > isObjectInACLGroup... > triggerClientEvent > guiSetVisible... 1
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