top sniper Posted January 8, 2012 Share Posted January 8, 2012 what is the problem with this code ? function redirect() redirectPlayer(source, "178.33.90.184", 20002) end addEventHandler("onPlayerJoin", root, redirect) Link to comment
FatalTerror Posted January 8, 2012 Share Posted January 8, 2012 Don't have problem... redirectPlayer() must admin rights, if your script don't have, give him. Link to comment
myonlake Posted January 8, 2012 Share Posted January 8, 2012 FatalTerror, it has an error. 20002 must be in a string mode. local ip = "178.33.90.184" local port = "20002" local root = getRootElement() addEventHandler("onPlayerJoin", root, function() redirectPlayer(source, ip, port) end) Link to comment
Cadu12 Posted January 8, 2012 Share Posted January 8, 2012 Wrong, myonlake. bool redirectPlayer ( player thePlayer, string serverIP, int serverPort, [ string serverPassword ] Port must be in a integer only. Link to comment
myonlake Posted January 8, 2012 Share Posted January 8, 2012 Cadu12 said: Wrong, myonlake. bool redirectPlayer ( player thePlayer, string serverIP, int serverPort, [ string serverPassword ] Port must be in a integer only. Cool, well, my server works just fine with string port. Link to comment
Al3grab Posted January 8, 2012 Share Posted January 8, 2012 function redirect() redirectPlayer(source, "178.33.90.184", tonumber(20002)) end addEventHandler("onPlayerJoin", root, redirect) Link to comment
Klesh Posted January 8, 2012 Share Posted January 8, 2012 Al3grab, its alredy fixed, you're late. 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