AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Warmup Round (1.1.8, Updated: 10/7/2008) (https://forums.alliedmods.net/showthread.php?t=78218)

XARIUS 09-29-2008 18:15

Warmup Round (1.1.8, Updated: 10/7/2008)
 
3 Attachment(s)
General:

A while ago I promised some people I would at write a working warmup plugin, since the current ones are all "unapproved". I realize Liam has a warmup round in his weapon restrictions plugin, but even that has some outstanding issues. So this one is basic and standalone.

I'm happy to take feature requests for this, so long as they aren't outrageous. Simple is good sometimes. =)

Info:

You can configure the warmup time length, whether or not to respawn the players, and the weapon they will recieve for the duration of the warmup round. If you give them a hegrenade, it will be unlimited. The unlimited nades are a blast with LDuke's flaming SuperNades

Usage:

Sit back and have fun.

Installation:

Download the zip file and extract into your /cstrike/ directory.

Manual Installation:
  • Copy warmup.smx to addons/sourcemod/plugins/
  • Copy warmup.phrases.txt to addons/sourcemod/translations/
  • Copy warmup.sp to addons/sourcemod/scripting/
The plugin will automatically create your config (warmup.cfg) file in: /cstrike/cfg/sourcemod/

Configuration:
  • sm_warmupround_enabled: Enables or disables the plugin (Default: 1)
  • sm_warmupround_time: How long should the warmup round last. (Default: 30 seconds)
  • sm_warmupround_respawn: Automatically respawn players during warmup. (Default: 1)
  • sm_warmupround_weapon: Weapon to give during the warmup round. ie: knife, hegrande, p228, deagle, elite, etc. (Default: hegrenade)
  • sm_warmupround_friendlyfire: If you normally use friendly fire, setting this to 1 will disable friendly fire before warmup, and re-enable it after warmup. (Default: 0)
  • sm_warmupround_preexec: Config file to execute prior to warmup starting. File goes in your /cfg/ directory.
  • sm_warmupround_postexec: Config file to execute after warmup has finished. File goes in your /cfg/ directory.
Changelog:

Version 1.1.8:

Changed GetEntDataEnt to GetEntDataEnt2 for stability. Possible crash scenario. Also changed to using "knife" instead of "" in sm_warmupround_weapon. I don't know what I was thinking on that one.

You should upgrade to this version, as GetEntDataEnt has the potential for a server crash in previous versions.

Version 1.1.7:

Added hidden CVAR: sm_warmupround_active. This value will automatically change from 0 to 1 when the warmup round is active, then back to 0 when it's over. This can be used for stats programs or other plugin author's who don't want certain activities occuring during the warmup round. Between this feature and the pre/post config files, I don't see what else can be done to provide stats support.

Version 1.1.6:

Added validation to the cvar sm_warmupround_weapon to ensure that the proper weapon names are being set.

Version 1.1.5:

Prevented timer from carrying over to next map when map was changed during warmup.

Version 1.1:

Added CVARS, see above for usage.

sm_warmupround_friendlyfire
sm_warmupround_preexec
sm_warmupround_postexec

The preexec and postexec files should give people a way to disable their stat monitoring during the warmup time period.

Since new CVAR's were added, you will need to delete your warmup.cfg file and allow it to be re-created, or add the new cvar's manually.

Version 1.02:

Please delete your warmup.cfg and let the plugin re-create it! Sorry folks!

Updated version CVAR to sm_warmupround_version.
Changed PrintCenterTextAll to PrintHintTextToAll - it just looks better.
Minor code cleanup.

Version 1.01:

Minor code cleanup, prevent players from using purchased weapons during warmup.

Version 1.0:

First public release. Hopefully no bugs. =)

exvel 09-30-2008 09:51

Re: Warmup Round
 
Good job.

Liam 09-30-2008 11:09

Re: Warmup Round
 
You need to stop them buying weapons during the warmup.

XARIUS 09-30-2008 11:10

Re: Warmup Round
 
Quote:

Originally Posted by Liam (Post 693016)
You need to stop them buying weapons during the warmup.

Check changelog, I just did actually. =) Well, it doesn't prevent it, but it strips whatever they buy away, which is plenty since the game gets reset after warmup.

SAMURAI16 09-30-2008 11:40

Re: Warmup Round
 
just FYI OnConfigsExecuted() it's not working on listen servers until next version of SourceMOD

if (StrEqual(newValue[0], "1", false))
use
if(newValue[0] == '1')

XARIUS 09-30-2008 11:54

Re: Warmup Round
 
Quote:

Originally Posted by SAMURAI16 (Post 693028)
just FYI OnConfigsExecuted() it's not working on listen servers until next version of SourceMOD

if (StrEqual(newValue[0], "1", false))
use
if(newValue[0] == '1')

I sorta got in the bad habit of overusing StrEqual after having some weird issues doing compares like that. Then again, they were much longer strings, unlike this case.

Thanks for the heads up on OnConfigsExecuted, I wasn't aware of that! Is it best to just move that stuff into OnMapStart for the time being? I figure the number of listen servers out there would be pretty few.

SAMURAI16 09-30-2008 11:57

Re: Warmup Round
 
if you'r not going to use:
if(newValue[0] == '1'
then use
if(StrEqual(newValue,"1"))

Don't check string[char num] with StrEqual

Place the stuff from OnConfigsExecuted() in OnPluginStart() until next SM Version or let it there permanently

XARIUS 09-30-2008 14:31

Re: Warmup Round
 
Doh - I see what you're saying. Thanks, nice catch.

Updaed. =)

DJ Tsunami 09-30-2008 16:21

Re: Warmup Round
 
Unfortunately the forum does not allow you to use the same public cvar twice. Even if we change the cvar on the old plugin, somewhere there will still be a record of it, disallowing you to use it.

XARIUS 09-30-2008 16:23

Re: Warmup Round
 
Quote:

Originally Posted by DJ Tsunami (Post 693219)
Unfortunately the forum does not allow you to use the same public cvar twice. Even if we change the cvar on the old plugin, somewhere there will still be a record of it, disallowing you to use it.

Oh, sucktastic. Okie, I'll come up with a new cvar then!

Thanks,

X


All times are GMT -4. The time now is 20:29.

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