.:HyPeX:. Posted November 3, 2013 Share Posted November 3, 2013 can someone tell me why it isnt recognizing "LxG"? function checkIfPlayerIsLxGAfterNickchange(oldnick, nick) local playername0 = string.gsub(nick, "#%x%x%x%x%x%x", "") local playername = string.gsub(playername0, "[L]", "l") local playername1 = string.gsub(playername, "[X]", "x") local playername2 = string.gsub(playername1, "[G]", "g") if (string.find(playername2, "lxg")) and not (getPlayerTeam(source) == LxGteam ) then if (isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(source)), aclGetGroup("LxG"))) then setPlayerTeam(source,LxGteam) outputChatBox("Welcome back " .. nick .. "#00aaff to LxG!",source, 231, 106, 12, true) playSoundFrontEnd(source, 1) else setTimer(checkLoginOrKick, 1000, 1, source) outputChatBox("Please login within 1 secs or change your name or you'll be kicked!", source, 255, 0, 0, true) end end end addEventHandler("onPlayerChangeNick", getRootElement(), checkIfPlayerIsLxGAfterNickchange) Link to comment
.:HyPeX:. Posted November 3, 2013 Author Share Posted November 3, 2013 Nvm, found out the script works, but the kick aint working becouse it is not correctly defined. 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