Best-Killer1 Posted September 4, 2015 Share Posted September 4, 2015 Guys Please Help Me Please really i need fix it urgent please This the ACL.xml But i need to change things from this i don't know how please help me i can pay i swear function isPlayerStaff ( p ) if ( p and getElementType ( p ) == 'player' ) then if ( isPlayerInACL ( p, "Level 1" ) or isPlayerInACL ( p, "Level 2" ) or isPlayerInACL ( p, "Level 3" ) or isPlayerInACL ( p, "Level 4" ) or isPlayerInACL ( p, "Level 5" ) or isPlayerInACL ( p, "Admin" ) or isPlayerInACL ( p, "Console" ) ) then return true end return false end end function getPlayerStaffLevel ( p, var ) if ( isPlayerStaff ( p ) ) then local str = nil local num = nil for i=1,5 do if ( isPlayerInACL ( p, 'Level '..tostring ( i ) ) ) then num = i str = 'Level '..tostring ( i ) break end end if ( var == 'string' ) then return str elseif ( var == 'int' ) then return num else return str, num end end return 0,0 end function getAllStaff ( ) local staff = { ['Level 1'] = { }, ['Level 2'] = { }, ['Level 3'] = { }, ['Level 4'] = { }, ['Level 5'] = { }, } for i=1,5 do for k, v in ipairs ( aclGroupListObjects ( aclGetGroup ( "Level "..tostring ( i ) ) ) ) do if ( string.find ( tostring ( v ), 'user.' ) ) then local name = tostring ( v:gsub ( "user.", "" ) ) staff['Level '..tostring ( i )][#staff['Level '..tostring ( i )]+1] = name end end end return staff end function isPlayerInACL ( player, acl ) local account = getPlayerAccount ( player ) if ( isGuestAccount ( account ) ) then return false end if ( aclGetGroup ( acl ) ) then return isObjectInACLGroup ( "user."..getAccountName ( account ), aclGetGroup ( acl ) ) end return false; end function getOnlineStaff ( ) local online = { } for i, v in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerStaff ( v ) ) then table.insert ( online, v ) end end return online end -- NG 1.1.4 -- -- Set element data to make getting staff on client side -- function setNewPlayerStaffData ( p ) if ( isPlayerStaff ( p ) ) then setElementData ( p, "staffLevel", getPlayerStaffLevel ( p, 'int' ) ) else setElementData ( p, 'staffLevel', 0 ); end end addEventHandler ( "onPlayerLogin", root, function ( ) setNewPlayerStaffData ( source ) end ); addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, p in pairs ( getElementsByType ( "player" ) ) do setNewPlayerStaffData ( p ); end end ); (I Can Pay 15$ ) But Fix It and let me test it i will pay you Link to comment
kikos500 Posted September 4, 2015 Share Posted September 4, 2015 So you want to change levels to ur current acl groups? Or the opposite???? Link to comment
Mr.Aleks Posted September 4, 2015 Share Posted September 4, 2015 What do you actually want? Add me on skype and we will do it. Link to comment
Best-Killer1 Posted September 4, 2015 Author Share Posted September 4, 2015 i need change this scripts for staff work :- pls help function isPlayerStaff ( p ) if ( p and getElementType ( p ) == 'player' ) then if ( isPlayerInACL ( p, "Level 1" ) or isPlayerInACL ( p, "Level 2" ) or isPlayerInACL ( p, "Level 3" ) or isPlayerInACL ( p, "Level 4" ) or isPlayerInACL ( p, "Level 5" ) or isPlayerInACL ( p, "Admin" ) or isPlayerInACL ( p, "Console" ) ) then return true end return false end end function getPlayerStaffLevel ( p, var ) if ( isPlayerStaff ( p ) ) then local str = nil local num = nil for i=1,5 do if ( isPlayerInACL ( p, 'Level '..tostring ( i ) ) ) then num = i str = 'Level '..tostring ( i ) break end end if ( var == 'string' ) then return str elseif ( var == 'int' ) then return num else return str, num end end return 0,0 end function getAllStaff ( ) local staff = { ['Level 1'] = { }, ['Level 2'] = { }, ['Level 3'] = { }, ['Level 4'] = { }, ['Level 5'] = { }, } for i=1,5 do for k, v in ipairs ( aclGroupListObjects ( aclGetGroup ( "Level "..tostring ( i ) ) ) ) do if ( string.find ( tostring ( v ), 'user.' ) ) then local name = tostring ( v:gsub ( "user.", "" ) ) staff['Level '..tostring ( i )][#staff['Level '..tostring ( i )]+1] = name end end end return staff end function isPlayerInACL ( player, acl ) local account = getPlayerAccount ( player ) if ( isGuestAccount ( account ) ) then return false end if ( aclGetGroup ( acl ) ) then return isObjectInACLGroup ( "user."..getAccountName ( account ), aclGetGroup ( acl ) ) end return false; end function getOnlineStaff ( ) local online = { } for i, v in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerStaff ( v ) ) then table.insert ( online, v ) end end return online end -- NG 1.1.4 -- -- Set element data to make getting staff on client side -- function setNewPlayerStaffData ( p ) if ( isPlayerStaff ( p ) ) then setElementData ( p, "staffLevel", getPlayerStaffLevel ( p, 'int' ) ) else setElementData ( p, 'staffLevel', 0 ); end end addEventHandler ( "onPlayerLogin", root, function ( ) setNewPlayerStaffData ( source ) end ); addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, p in pairs ( getElementsByType ( "player" ) ) do setNewPlayerStaffData ( p ); end end ); 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