question about a server welcome message
-
im making a server welcome message, which obviously sends a message when a user joins a server, it works, got it working to where it doesnt say welcome again after every round, but my issue is, everytime a game ends and starts a new match. the scripts get reloaded, therefore saying welcome again the next match. is there a way to not reload a script? or is there a workaround like making a log of ids/who's in the server, and when the script is reloaded it wont execute if they've already gotten the welcome message.
code:
main() { level thread onplayerconnect(); } onplayerconnect() { for ( ;; ) { level waittill( "connecting", player ); player thread onplayerspawned(); } } onplayerspawned() { level endon( "forever" ); self endon( "game_end" ); for(;;) { self waittill( "joined_team" ); self IPrintLnBold( "text text text text" ); } }```
-
Aprazoh this might not be the answer you want but using a server manager would do that for you already and would provide a lot of tools to have a decent server
Reports, votekick, automatic messages, kick, bans and more all which can be configured or disabledYou could use IW4MAdmin or Node Server Manager
-
Resxt i heard something about server managers i just didn't know what they did, but ill try it out thank you!
-
Aprazoh An example on my server with IW4MAdmin (note that you can edit the message, colors etc.)
The message in the middle is only displayed to the player connecting and the two others are displayed to everyone -
Resxt yeah i just watched a video on it i saw a few servers with that, im actually setting it up right now lol its exactly what i was looking for, i just thought people made it themselves with a gsc script thats why i came here