top sniper Posted January 8, 2012 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)
FatalTerror Posted January 8, 2012 Posted January 8, 2012 Don't have problem... redirectPlayer() must admin rights, if your script don't have, give him.
myonlake Posted January 8, 2012 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)
Cadu12 Posted January 8, 2012 Posted January 8, 2012 Wrong, myonlake. bool redirectPlayer ( player thePlayer, string serverIP, int serverPort, [ string serverPassword ] Port must be in a integer only.
myonlake Posted January 8, 2012 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.
Al3grab Posted January 8, 2012 Posted January 8, 2012 function redirect() redirectPlayer(source, "178.33.90.184", tonumber(20002)) end addEventHandler("onPlayerJoin", root, redirect)
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