AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CSS] AutoGungame (https://forums.alliedmods.net/showthread.php?t=97830)

BDeep 07-20-2009 07:51

[CSS] AutoGungame
 
2 Attachment(s)
Autogungame by BDeep Version 1.4

This plugin executes different configs based on the map prefix. If a map begins with de_ or cs_ it will exec the config that you specify in the autoguname.cfg, any other map it will exec the config that you specify autoguname.cfg.

CVars:

// This file was auto-generated by SourceMod (v1.2.1)
// ConVars for plugin "autogungame.smx"
// The prefix of a hostage map.
// Default: "cs_"
sm_autogungame_csMapPrefix "cs_"
// A CFG File to run for NON Gungame Maps. Example EXEC CSS.CFG
// Default: ""
sm_autogungame_csscfg "exec csscvars.cfg"
// The prefix of a defuse map.
// Default: "de_"
sm_autogungame_deMapPrefix "de_"
// A CFG File to run for Gungame Maps. Example EXEC GG.CFG
// Default: ""
sm_autogungame_ggcfg "exec ggcvars.cfg"

I created this plugin for a few reasons.
1. Couldnt find one like it here
2. I wanted to move away from EventScripts and any other addons due to crashes
3. I like the idea of one server running two mods.

I ran this plugin all last night on my server with 15 people playing for about 5 hours and had no issues. If you have any or want any changes please let me know. This is only my second plugin so be gentle:)

I would like to thank these people for helping me learn to write plugins:
psyconic
pheadxdll
pRED
GreyScale
bl4nk
DJ Tsunami
Also Berni for the Approval and the last code changes

Version 1.4 - Changed last elseif once again per Berni's post on page 2 Also changed the sm_auto_gungame_version per Berni's post.

Version 1.3 - Changed last Elseif back to using strcontains.

Version 1.2 - Updated Version cvar to sm_auto_gungame_version. Alos updated code per bl4nk's post.

Version 1.1 - Updated cvar AutoGungame Version to AutoGunGameVersion (per Antithasys)
Version 1.0 - Updated to add cvar for the version.
Please update your servers, Thanks

BDeep 07-23-2009 15:37

Re: [CSS] AutoGungame
 
Over 100 views and no comments!?
Just out of curiousity do I have to do something to get this approved or did I do something wrong?

coach 07-24-2009 08:07

Re: [CSS] AutoGungame
 
Loaded this plugin but not quite sure if what I want is possible as I can't seem to get it. I want it to be in GunGame mode on "cs" maps & normal css on "de" maps. This is how I setup the autogungame.cfg:

// The prefix of a hostage map.
// -
// Default: "cs_"
sm_autogungame_csMapPrefix "cs_"

// A CFG File to run for NON Gungame Maps. Example EXEC CSS.CFG
// -
// Default: ""
sm_autogungame_ggcfg "exec gg.cfg"

// The prefix of a defuse map.
// -
// Default: "de_"
//sm_autogungame_deMapPrefix "de_"

// A CFG File to run for Gungame Maps. Example EXEC GG.CFG
// -
// Default: ""
sm_autogungame_csscfg "exec css.cfg"

I changed it around & thought it would work but no go. I have the normal CSS working but it doesn't run the GunGame cfg on map change. If I run the gg.cfg from console it will then become GunGame but would like it to this automatically.

BDeep 07-24-2009 08:12

Re: [CSS] AutoGungame
 
Try this,

// The prefix of a hostage map.
// -
// Default: "cs_"
sm_autogungame_csMapPrefix "XX_"

Then as long as you dont have a map that has "XX_" in it you should be ok.

It will run GG on cs_ maps (and and thing else that doesnt have cs_) and turn it off on de_

If this doesnt work let me know I will make on/off cvars for the de_ and the cs_ cvars.

So here is what your config should be:

// The prefix of a hostage map.
// -
// Default: "cs_"
sm_autogungame_csMapPrefix "XX_"

// A CFG File to run for NON Gungame Maps. Example EXEC CSS.CFG
// -
// Default: ""
sm_autogungame_ggcfg "exec css.cfg"

// The prefix of a defuse map.
// -
// Default: "de_"
//sm_autogungame_deMapPrefix "de_"

// A CFG File to run for Gungame Maps. Example EXEC GG.CFG
// -
// Default: ""
sm_autogungame_csscfg "exec gg.cfg"

coach 07-24-2009 08:36

Re: [CSS] AutoGungame
 
Thanks, yep that worked good. Testing now :)

BDeep 07-24-2009 09:03

Re: [CSS] AutoGungame
 
Cool, let me know how it works or if you have any other problems.

Aresz 07-25-2009 03:11

Re: [CSS] AutoGungame
 
You dont realy need this plugin, if you have Mani Admin pluing installed. Just maka a gg_map.cfg and put it in your cstrike/cfg/mani_admin_plugin/map_config/ directory.

coach 07-25-2009 04:53

Re: [CSS] AutoGungame
 
All working fine. As I use SM & not mani it is not an option.

My current cfg:

// The prefix of a hostage map.
// Default: "cs_"
sm_autogungame_csMapPrefix "XX_"

// A CFG File to run for NON Gungame Maps. Example EXEC CSS.CFG
// -
// Default: ""
sm_autogungame_ggcfg "exec gg.cfg"

// The prefix of a defuse map.
// -
// Default: "de_"
//sm_autogungame_deMapPrefix "de_"

// A CFG File to run for Gungame Maps. Example EXEC GG.CFG
// -
// Default: ""
sm_autogungame_csscfg "exec css.cfg"

I am wanting to add gg maps. Hints on how to have GunGame run on both cs_ & gg_ maps. Still leaving de_ maps as normal CSS.

BDeep 07-25-2009 13:33

Re: [CSS] AutoGungame
 
You dont need to do anything. That is what the plugin was designed to do. Your current config is perfect no changes needed just add your gungame maps as you would any other map.

coach 07-25-2009 21:43

Re: [CSS] AutoGungame
 
Excellent!!!! Thank you.


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

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