Raised This Month: $ Target: $400
 0% 

Print multiline messages to clients console before kick


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
supergreg
Senior Member
Join Date: Jul 2007
Location: Oslo, Norway
Old 06-07-2009 , 19:11   Print multiline messages to clients console before kick
Reply With Quote #1

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 ^"KickedReason:^"");
client_cmd(id"echo ^"=======================================^"");
client_cmd(id"echo ^"Reason explanation of registration goes here^"");
client_cmd(id"echo ^"You will need your SteamID during registrationit is: %s^""authid);
client_cmd(id"echo ^"=======================================^"");
server_cmd("kick #%d ^"Reserved for membersCheck your console for more information^""get_user_userid(id)); 
I also tried
PHP Code:
client_print(idprint_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
supergreg is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:47.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode