Tommy. Posted January 6, 2017 Share Posted January 6, 2017 function createTEAM () teamSTAFF = createTeam ("STAFF", 0, 255, 255) end addEventHandler("onResourceStart", resourceRoot, createTEAM) groupSTAFF = { [ "Console" ] = true, [ "Admin" ] = true, [ "SuperModerator" ] = true, [ "Moderator" ] = true }; function STAFF() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup(groupSTAFF)) then setPlayerTeam(source, teamSTAFF) end end addEventHandler("onPlayerLogin",getRootElement(),STAFF) debugscript:http://prntscr.com/ds2kqi Link to comment
Captain Cody Posted January 6, 2017 Share Posted January 6, 2017 function createTEAM () teamSTAFF = createTeam ("STAFF", 0, 255, 255) end addEventHandler("onResourceStart", resourceRoot, createTEAM) groupSTAFF = { [ "Console" ] = true, [ "Admin" ] = true, [ "SuperModerator" ] = true, [ "Moderator" ] = true }; function STAFF() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("groupSTAFF")) then setPlayerTeam(source, teamSTAFF) end end addEventHandler("onPlayerLogin",getRootElement(),STAFF) " " <- These puppies, cannot forget them. Link to comment
Tommy. Posted January 6, 2017 Author Share Posted January 6, 2017 23 minutes ago, CodyL said: function createTEAM () teamSTAFF = createTeam ("STAFF", 0, 255, 255) end addEventHandler("onResourceStart", resourceRoot, createTEAM) groupSTAFF = { [ "Console" ] = true, [ "Admin" ] = true, [ "SuperModerator" ] = true, [ "Moderator" ] = true }; function STAFF() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("groupSTAFF")) then setPlayerTeam(source, teamSTAFF) end end addEventHandler("onPlayerLogin",getRootElement(),STAFF) " " <- These puppies, cannot forget them. function createTEAM () teamSTAFF = createTeam ("STAFF", 0, 255, 255) end addEventHandler("onResourceStart", resourceRoot, createTEAM) groupSTAFF = { [ "Console" ] = true, [ "Admin" ] = true, [ "SuperModerator" ] = true, [ "Moderator" ] = true }; function STAFF() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("groupSTAFF")) then setPlayerTeam(source, teamSTAFF) end end addEventHandler("onPlayerLogin",getRootElement(),STAFF) debugscript: http://prntscr.com/ds34m0 Link to comment
Captain Cody Posted January 6, 2017 Share Posted January 6, 2017 Oh sorry I hadn't read what was above. Link to comment
Tommy. Posted January 6, 2017 Author Share Posted January 6, 2017 1 minute ago, CodyL said: Oh sorry I hadn't read what was above. no problem Link to comment
Captain Cody Posted January 6, 2017 Share Posted January 6, 2017 One second and I'll have fixed one. function createTEAM () teamSTAFF = createTeam ("STAFF", 0, 255, 255) end addEventHandler("onResourceStart", resourceRoot, createTEAM) groupSTAFF = { [ "Console" ] = true, [ "Admin" ] = true, [ "SuperModerator" ] = true, [ "Moderator" ] = true }; function isHeIn() for i,v in pairs(groupSTAFF) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup(i)) then return true end end end function STAFF() if isHeIn() then setPlayerTeam(source, teamSTAFF) end end addEventHandler("onPlayerLogin",getRootElement(),STAFF) Might work. Link to comment
Tommy. Posted January 6, 2017 Author Share Posted January 6, 2017 3 minutes ago, CodyL said: One second and I'll have fixed one. function createTEAM () teamSTAFF = createTeam ("STAFF", 0, 255, 255) end addEventHandler("onResourceStart", resourceRoot, createTEAM) groupSTAFF = { [ "Console" ] = true, [ "Admin" ] = true, [ "SuperModerator" ] = true, [ "Moderator" ] = true }; function isHeIn() for i,v in pairs(groupSTAFF) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup(i)) then return true end end end function STAFF() if isHeIn() then setPlayerTeam(source, teamSTAFF) end end addEventHandler("onPlayerLogin",getRootElement(),STAFF) Might work. Thank you, I love you, brother. <3 1 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