Admigo Posted December 13, 2011 Posted December 13, 2011 Heey all, I made a code for scoreboard if player login in he sets to a team in scoreboard. My clan Works(END) but vip dont work. Code: if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then setPlayerTeam ( player, teamAdmin) else if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP!" ) ) then setPlayerTeam ( player, teamVIP ) else setPlayerTeam ( player, teamPlayers ) end No Errors. Why its not working? Thanks Admigo
BinSlayer1 Posted December 13, 2011 Posted December 13, 2011 Should have errors.. You got 2 ifs and 1 end instead of 2.. LUA has this 'elseif' feature which you can use.. so do this if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then setPlayerTeam ( player, teamAdmin) elseif isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "VIP!" ) ) then setPlayerTeam ( player, teamVIP ) else setPlayerTeam ( player, teamPlayers ) end
BinSlayer1 Posted December 13, 2011 Posted December 13, 2011 and i think you need timer setTimer he doesn't need squat.. This is obviously not his full script and he already handles this IF, because he says it's working fine except for the else part which I believe I have fixed
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