Jullul7000 Posted January 18, 2014 Posted January 18, 2014 ACL Group Admin will be moven to staff team when login? How to do it? Thanks for answer
xXMADEXx Posted January 18, 2014 Posted January 18, 2014 onPlayerLogin -- event isObjectInACLGroup getTeamFromName
xDrul Posted January 18, 2014 Posted January 18, 2014 local staff = createTeam("Staff", 255, 255, 255) function onLogin(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setPlayerTeam(thePlayer, staff) end end addEventHandler("onPlayerLogin", getRootElement(), onLogin) Something like this, i can't test it atm as i'm not on my PC. If it doesn't work, tell me what debugscript says.
!#NssoR_) Posted January 18, 2014 Posted January 18, 2014 or function onLogin(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setPlayerTeam(thePlayer, getTeamFromName ('Staff')) end end addEventHandler("onPlayerLogin", getRootElement(), onLogin)
TAPL Posted January 18, 2014 Posted January 18, 2014 ^^ You both wrong, onPlayerLogin doesn't have player parameter. local staff = createTeam("Staff", 255, 255, 255) addEventHandler("onPlayerLogin", root, function(_, acc) local accName = getAccountName(acc) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then setPlayerTeam(source, staff) end end)
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