Raised This Month: $ Target: $400
 0% 

Instant Hostname Update


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DjOptimuS
Senior Member
Join Date: Jan 2009
Old 12-29-2011 , 18:03   Instant Hostname Update
Reply With Quote #1

Everybody know that when you change the hostname in the middle of the game, it won't show to the players until they reconnect, or map change.

How can i do this ? To instantly update the server hostname, in order to show the changed hostname immediately to the online players?

The function will be used for a war servers plugin. Here is my actual function

PHP Code:
replace(generalsaysizeof (generalsay) - 1".start """);
                
                new 
tag1[16], tag2[16];
                
strtok(generalsaytag1sizeof (tag1) - 1tag2sizeof (tag2) - 1'+');
                
                
client_print(0print_chat"Tag1: %s, Tag2: %s"tag1tag2);
                
client_print(0print_chat"Tag1: %s, Tag2: %s"tag1tag2);
                
client_print(0print_chat"Tag1: %s, Tag2: %s"tag1tag2);
                
                new 
hhhh[32];
                
formatex(hhhhsizeof (hhhh) - 1"%L %s vs. %s"LANG_SERVER"NUME_BOT"tag1tag2);
                
                
set_cvar_string("hostname"hhhh); 
And the start command is in say_chat

.start CLAN1+CLAN2

and the clans splitted by strtok with the aid of that plus.

Thank you very much for your support and your time.

Last edited by DjOptimuS; 12-29-2011 at 18:04.
DjOptimuS is offline
Reply



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 14:29.


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