GrubaS Posted May 14, 2015 Share Posted May 14, 2015 Hello guys, I want make script when Player join then it will be shows color team. I trying with setTimer bcz without setTimer it will be get "Spectators" team color after 2 secs CWSCRIPT moves players to team. (cwscript is decompiled) but when join players are in team "Spectators" It's my code. + this setTimer dont working function gowno(gowno) setTimer( function () local r,g,b = getTeamColor(getPlayerTeam(source)) local hex = RGBToHex(r,g,b) outputChatBox("* "..hex..""..getPlayerName(source):gsub("#%x%x%x%x%x%x","").." #FF6464has joined the game", gowno, 255, 100, 100, true) end, 5000, 1) end addEventHandler('onPlayerJoin', root, gowno ) function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end Sorry for my bad english. Link to comment
ALw7sH Posted May 14, 2015 Share Posted May 14, 2015 What we should do? What's the problem ? And any errors ? ( debugscript ) Link to comment
GrubaS Posted May 14, 2015 Author Share Posted May 14, 2015 What we should do?What's the problem ? And any errors ? ( debugscript ) thanks for answer but i fixed it thanks 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