TheGrimReaper Posted June 3, 2018 Share Posted June 3, 2018 function check(source) local recipient = getPlayerFromName(source) local accName = getAccountName ( getPlayerAccount ( recipient ) ) -- get his account name local r,g,b if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Forever" ) ) then setPlayerTeam ( recipient, FO ) r, g, b = getTeamColor ( FO ) setPlayerNametagColor ( recipient, r, g, b ) end end addEventHandler ( "onPlayerLogin", getRootElement(), check ) ================================================================ i made a lil script to add clans but it seems that when u reconnect or login again , u are removed from player, the clan members are added into an ACL group marked Forever , i made this piece of code, to add player back into team if the player is in the acl group on login. but it doesnt work. I am not really good at this but , i dont know how to get player from server side , can someone pls explain to me what is wrong in this piece of code and also tell me how to get player from server side thanks Link to comment
1LoL1 Posted June 3, 2018 Share Posted June 3, 2018 function check () local r,g,b if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Forever")) then setPlayerTeam(source, getTeamFromName("FO")) r, g, b = getTeamColor(getTeamFromName("FO")) setPlayerNametagColor(source, r, g, b) end end addEventHandler("onPlayerLogin", getRootElement(), check) 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