[Need Help] OnIncomingConnection
#1

Hi all,

i would like to know how could i use sendclientmessage and kick in OnIncomingConnection?

I tried but didn't work

Max
Reply
#2

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.
Reply
#3

Ok, i for the kick? Same thing?

Max
Reply
#4

Yes, move all of the relevant code to OnPlayerConnect...
Reply
#5

Hum,

it's about new system to prevent fake player

Max
Reply
#6

A fake player wouldn't receive the message anyway
Reply
#7

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
Reply
#8

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.
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)