September 14, 2025, 05:45:30 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Wondering where all the forums have gone?

Join the community Discord server!

Pages: [1]

Author Topic: [Serverside] Welcome updater  (Read 1440 times)

MrRatermat

  • Junior Member
  • **
  • Karma: 7
  • Offline Offline
  • Posts: 175
  • PLUGINS PLUGINS PLUGINS!
    • NO TRUE SCOTSMAN WOULD PLAY GG2 WITHOUT PLUGINS
[Serverside] Welcome updater
« on: October 28, 2015, 01:24:55 pm »

Welcome updater
This serverside plugin will check the WelcomeMessage option in gg2.ini every minute (approx), and will retransmit the welcome message if it gets updated. Great for unwanted commentaries.
Please note: This is a serverside plugin: It only works if you are the host.



Sending a new welcome message is simple.
  • Open gg2.ini (the options file)
  • Scroll down to "WelcomeMessage="
  • Change the text to the desired edit message
  • Wait a few seconds for the update to get noticed
  • ??
  • PROFIT




Known bugs:
  • When the server is started, the welcome message will display twice instead of once. (Affects host only)
  • Game maker is dumb and writes to gg2.ini when closed, even when no changes are made. This causes Notepad++ to think the file was edited.


To install this plugin, download "welcomeupdater.gml" and put it in your Plugins folder
« Last Edit: April 07, 2016, 08:27:24 pm by MrRatermat »
Logged

MrRatermat

  • Junior Member
  • **
  • Karma: 7
  • Offline Offline
  • Posts: 175
  • PLUGINS PLUGINS PLUGINS!
    • NO TRUE SCOTSMAN WOULD PLAY GG2 WITHOUT PLUGINS
Re: [Serverside] Welcome updater
« Reply #1 on: April 07, 2016, 08:27:51 pm »

Update: Increased interval from 10 seconds to 1 minute.
Logged

billymaze

  • Veteran Member
  • ******
  • Karma: 10
  • Offline Offline
  • Posts: 6732
Re: [Serverside] Welcome updater
« Reply #2 on: April 07, 2016, 10:57:29 pm »

    if (global.nextchecktime > 1800)
is this in ticks? I thought gg2 ran at 60tps
Logged

MrRatermat

  • Junior Member
  • **
  • Karma: 7
  • Offline Offline
  • Posts: 175
  • PLUGINS PLUGINS PLUGINS!
    • NO TRUE SCOTSMAN WOULD PLAY GG2 WITHOUT PLUGINS
Re: [Serverside] Welcome updater
« Reply #3 on: April 10, 2016, 12:36:15 pm »

    if (global.nextchecktime > 1800)
is this in ticks? I thought gg2 ran at 60tps
Yeah, you only run 60FPS servers if you're a buffoon.
global.nextchecktime is incremented by 0.5 if you're running 60fps, and 1 at 30fps, so the time is always 1 minute.

Code: [Select]
global.nextchecktime += global.delta_factor;
« Last Edit: April 10, 2016, 12:36:57 pm by MrRatermat »
Logged
Pages: [1]
 

Page created in 0.024 seconds with 36 queries.