Hacking away at my first ever plugin. One of its functions will be to reserve slots for registered members.
So if a player connects and his steamid isn't in our database, he will be kicked with a standard message in the modal kick dialog. However, I'd like to provide users with additional explanation over several lines in their console (how to register, display their steamid and tell them to use that during registration etc), something like this:
PHP Code:
client_cmd(id, "echo ^"Kicked! Reason:^"");
client_cmd(id, "echo ^"=======================================^"");
client_cmd(id, "echo ^"Reason + explanation of registration goes here^"");
client_cmd(id, "echo ^"You will need your SteamID during registration, it is: %s^"", authid);
client_cmd(id, "echo ^"=======================================^"");
server_cmd("kick #%d ^"Reserved for members. Check your console for more information^"", get_user_userid(id));
I also tried
PHP Code:
client_print(id, print_console, "Kicked! Reason:");
None of the above methods make messages show up in my client console, before I'm kicked, but the kick with message work fine. I am kicked as expected, but no sign of any message in my console. I suspect this might be due to the client not being fully connected yet? Currently I am running the steamid-check in client_putinserver. I have tried client_connect and client_authorized, but with the latter two I can't get any of my code to trigger at all.
I would be grateful if someone could prove a link to, or maybe write, an overview of the client join event chain. In what order are these client_* functions executed, and when do the different server+client commands and features become available+ready to be used in plugins?
Oh, and I tried searching for similar topics/issues but had little luck, so if there are other threads explaining what I'm missing here, please do post links. Thanks a bunch