Use cod4x http features to pull rules from cod4xwebadmin ?
-
I have been looking for a way to display rules in game periodically. B3 does a decent job with this but I have not found anything other than creating a custom script ( which really doesn't work all that great for me. )
What I have now:
Custom gsc with hard coded rules.What would be awesome:
Julia pull rules from web4xadmin and display them every x minutes... Maybe don't even need julia for this ... idk -
The best way is to do it in gsc
-
ok, will stick with that... thanks
-
@jff-vince this is what I use on my server for server messages every X seconds
#include maps\mp\gametypes\_hud_util; init() { level.delay_serv_messages = getDvarInt("server_messages_delay"); level thread server_messages(); } server_messages() { self endon("disconnect"); svrmsg = []; if (getDvar("serv_message_1")!=""){ svrmsg[0]=getDvar("serv_message_1"); } if (getDvar("serv_message_2")!=""){ svrmsg[1]=getDvar("serv_message_2"); } if (getDvar("serv_message_3")!=""){ svrmsg[2]=getDvar("serv_message_3"); } if (getDvar("serv_message_4")!=""){ svrmsg[3]=getDvar("serv_message_4"); } if (getDvar("serv_message_5")!=""){ svrmsg[4]=getDvar("serv_message_5"); } if (getDvar("serv_message_6")!=""){ svrmsg[5]=getDvar("serv_message_6"); } if (getDvar("serv_message_7")!=""){ svrmsg[6]=getDvar("serv_message_7"); } if (getDvar("serv_message_8")!=""){ svrmsg[7]=getDvar("serv_message_8"); } if (getDvar("serv_message_9")!=""){ svrmsg[8]=getDvar("serv_message_9"); } if (getDvar("serv_message_10")!=""){ svrmsg[9]=getDvar("serv_message_10"); } while(1) { for(i = 0; i < svrmsg.size; i++) { wait level.delay_serv_messages; sayClient(svrmsg[i]); }; } } sayClient(str) { exec( "say "+ str ); }
In server cfg
//Time interval between messages if they are enabled set server_messages_delay 45 set serv_message_1 "Register on Our website and create ^3Screenshots ^7from any Player on the server" set serv_message_2 "For available commands type ^3!help" set serv_message_3 "" set serv_message_4 "" set serv_message_5 "" set serv_message_6 "" set serv_message_7 "" set serv_message_8 "" set serv_message_9 "" set serv_message_10 ""
-
I would like to try this out also. I am using OW MoD and instead of having a main_shared folder I have the extras in a server side IWD file withing the MoD Folder. _spawnprotection.gsc for example when I wanted a minute spawn countdown on Sniper Server. That's proper Sniper not quick scope PromoD Sniping
Anyway what would the name of the file be please if i tried the script above and put in my server side IWD? _hud_util.gsc or something? If it works great..if not it was worth the try
In OW you can already have server messages and banner messages but not in 'the chat' location which IMO would be much better. B3 does this but I dont use it anymore since I am using the WebAdmin.
Thanks
Smiley -
What have you named your file @NeHo ? Does it matter?
-
it doesn't matter
-
Works a treat - Thank you