Outlaw Posted August 10, 2019 Share Posted August 10, 2019 local Ranks = { "Owner", "Developer", "Admin", "Community Manager", "SuperModerator", "Moderator", "Warden", "Quality Assurance", "Hero", "VIP", } addEvent("IF:GetStaffs",true) addEventHandler("IF:GetStaffs",root, function() local a = {} local tabs = 0 for k,group in ipairs(Ranks) do for k,v in ipairs(aclGroupListObjects(aclGetGroup(group))) do if v:find("user.") then local main = getAccount(v:gsub("user.",""),nil) if main then local playeracc = getAccountName(getAccount(v:gsub("user.",""),nil)) local nickacc = executeSQLQuery("SELECT username FROM accountUsername WHERE account=?", playeracc) local accn = getAccount(playeracc) if accn then if #nickacc > 0 then local player = nickacc[1].username local pac = getAccountPlayer (accn) if pac then debug: bad argument #1 to 'ipairs' (table expected, got boolean) Link to comment
Bassam*Syria Posted August 10, 2019 Share Posted August 10, 2019 السلام عليكم , انا حاولت اعملها لك بطريقة ثانيه , وكنت سمتعجل الصراحة لاني بطلع خخ انت اقفل التحققات و الفانكشن تمام ؟ وجرب local Ranks = { "Owner", "Developer", "Admin", "Community Manager", "SuperModerator", "Moderator", "Warden", "Quality Assurance", "Hero", "VIP", } addEvent("IF:GetStaffs",true) addEventHandler("IF:GetStaffs",root, function() local a = {} local tabs = 0 local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accName = getAccountName(account) local hasPermission for _, groupName in ipairs(Ranks) do local group = aclGetGroup(groupName) if group then if isObjectInACLGroup("user."..accName, group) then local main = getAccount(v:gsub("user.",""),nil) if main then local playeracc = getAccountName(getAccount(v:gsub("user.",""),nil)) local nickacc = executeSQLQuery("SELECT username FROM accountUsername WHERE account=?", playeracc) local accn = getAccount(playeracc) if accn then if #nickacc > 0 then local player = nickacc[1].username local pac = getAccountPlayer (accn) if pac then 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