[Need Help] OnIncomingConnection -
scott1 - 14.06.2014
Hi all,
i would like to know how could i use sendclientmessage and kick in OnIncomingConnection?
I tried but didn't work
Max
Re: [Need Help] OnIncomingConnection -
Calgon - 14.06.2014
You will want to use the OnPlayerConnect callback instead. OnIncomingConnection is called before the player has completed the connection, so you can't send them messages yet.
Re: [Need Help] OnIncomingConnection -
scott1 - 14.06.2014
Ok, i for the kick? Same thing?
Max
Re: [Need Help] OnIncomingConnection -
Calgon - 14.06.2014
Yes, move all of the relevant code to OnPlayerConnect...
Re: [Need Help] OnIncomingConnection -
scott1 - 14.06.2014
Hum,
it's about new system to prevent fake player
Max
Re: [Need Help] OnIncomingConnection -
Calgon - 14.06.2014
A fake player wouldn't receive the message anyway
Re: [Need Help] OnIncomingConnection -
scott1 - 15.06.2014
Yes but i am making an system.
Player who whan join have to login into my website.
When they will connect to the server, in OnIncomingConnection
if the ip isn't in the player stats, kick an say him that they need to log in into website to play
Max
Re: [Need Help] OnIncomingConnection -
HeLiOn_PrImE - 15.06.2014
You can'd do that using the incoming connection callback. It won't return a player's ID for you to use.
Sendclientmessage needs a player ID. You don't have a choice but to let him connect, send the message and after that kick.
Or don't send a message at all. Just refuse the connection.
Re: [Need Help] OnIncomingConnection -
scott1 - 15.06.2014
Quote:
Originally Posted by HeLiOn_PrImE
You can'd do that using the incoming connection callback. It won't return a player's ID for you to use.
Sendclientmessage needs a player ID. You don't have a choice but to let him connect, send the message and after that kick.
Or don't send a message at all. Just refuse the connection.
|
public OnIncomingConnection(playerid, ip_address[], port)
I got not choise, i will use blockipadress
Max