Sasu Posted July 2, 2013 Posted July 2, 2013 --Server local adminACL = { "Admin", "SuperModerator", "Moderator", "Console" } addCommandHandler("update", function(source) local playerAcc = getPlayerAccount(source) local accName = getAccountName(playerAcc) for _, objects in ipairs(adminACL) do if isObjectInACLGroup ("user."..accName, aclGetGroup ( objects ) ) then triggerClientEvent(source, "onAdminCommandUpdate", source) end end end ) --Client addEvent("onAdminCommandUpdate", true) addEventHandler("onAdminCommandUpdate", root, function() guiSetVisible(updatePanel, true) showCursor(true) end ) I don't know why this scripts works in my local server and when I upload to another server dont work . Can you say me why? State: Inactive
iMr.3a[Z]eF Posted July 2, 2013 Posted July 2, 2013 YOU'LL HAVE TO BE IN ALL GROUPS To Visit Us Press Here: mtasa://5.9.206.180:22002
Castillo Posted July 2, 2013 Posted July 2, 2013 Why do you say that? the loop will check if you're on one of these groups. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iMr.3a[Z]eF Posted July 2, 2013 Posted July 2, 2013 Why do you say that? the loop will check if you're on one of these groups. this will works as far as i know -- server local adminACL = {} adminACL[1] = { "Admin" } adminACL[2] = { "SuperModerator" } adminACL[3] = { "Moderator" } adminACL[4] = { "Console" } addCommandHandler("update", function(source) local playerAcc = getPlayerAccount(source) local accName = getAccountName(playerAcc) for _, objects in ipairs(adminACL) do if isObjectInACLGroup ("user."..accName, aclGetGroup ( adminACL[1] ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( adminACL[2] ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( adminACL[3] ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( adminACL[4] ) ) then triggerClientEvent(source, "onAdminCommandUpdate", source) end end end ) --Client addEvent("onAdminCommandUpdate", true) addEventHandler("onAdminCommandUpdate", root, function() guiSetVisible(updatePanel, true) showCursor(true) end ) To Visit Us Press Here: mtasa://5.9.206.180:22002
Sasu Posted July 2, 2013 Author Posted July 2, 2013 Why do you say that? the loop will check if you're on one of these groups. this will works as far as i know -- server local adminACL = {} adminACL[1] = { "Admin" } adminACL[2] = { "SuperModerator" } adminACL[3] = { "Moderator" } adminACL[4] = { "Console" } addCommandHandler("update", function(source) local playerAcc = getPlayerAccount(source) local accName = getAccountName(playerAcc) for _, objects in ipairs(adminACL) do if isObjectInACLGroup ("user."..accName, aclGetGroup ( adminACL[1] ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( adminACL[2] ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( adminACL[3] ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( adminACL[4] ) ) then triggerClientEvent(source, "onAdminCommandUpdate", source) end end end ) --Client addEvent("onAdminCommandUpdate", true) addEventHandler("onAdminCommandUpdate", root, function() guiSetVisible(updatePanel, true) showCursor(true) end ) So I dont need the table -.- . Anyway I have just resolved. --Server local adminACL = { "Admin", "SuperModerator", "Moderator", "Console" } addEvent("updateOn", true) addEventHandler("updateOn", root, function() local playerAcc = getPlayerAccount(source) local accName = getAccountName(playerAcc) for _, objects in ipairs(adminACL) do if isObjectInACLGroup ("user."..accName, aclGetGroup ( objects ) ) then triggerClientEvent(source, "onAdminCommandUpdate", source) end end end ) --Client addEvent("onAdminCommandUpdate", true) addEventHandler("onAdminCommandUpdate", root, function() guiSetVisible(updatePanel, true) showCursor(true) end ) addCommandHandler("update", function() triggerServerEvent("updateOn", localPlayer) end ) State: Inactive
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