OU1AVIER Posted June 21, 2014 Share Posted June 21, 2014 Hello Forum, i just tryed to make a reconnect via redirectPlayer and onPlayerConnect. There no Errors or something others. I´m still learning Lua but i cant find the solution. function redirect (thePlayer) name = getPlayerName(thePlayer) redirectPlayer (name, "xxx.xxx.xxx.xxx","xxxxx") end addEventHandler ( "onClientPlayerSpawn", thePlayer(), redirect ) Maybe someone can help me to understand the issue. Link to comment
ADCX Posted June 21, 2014 Share Posted June 21, 2014 (edited) function fncPlayerJoin() local ServerIP = "123.45.67.890" -- Server IP stored as a string local ServerPort = 12345 -- Server Port stored as an integer redirectPlayer(source,ServerIP,ServerPort) end addEventHandler("onPlayerJoin",getRootElement(),fncPlayerJoin) Put it in the server-sided script file. Edited June 23, 2014 by Guest Link to comment
Max+ Posted June 21, 2014 Share Posted June 21, 2014 (edited) addEventHandler("onPlayerJoin",root, function( ) redirectPlayer(source,'ip',port) end ) Edited June 21, 2014 by Guest Link to comment
OU1AVIER Posted June 21, 2014 Author Share Posted June 21, 2014 Thank you very much for your help #closerequest 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