Enable and disable gungame for certain maps?

Ask questions and share info about GunGame 5

Enable and disable gungame for certain maps?

Postby tammer123 » Sat Aug 11, 2012 1:40 pm

Enable and disable gungame for certain maps?
How can i accomplish that?
tammer123

Private
Private
 
Posts: 5
Joined: Sat Aug 11, 2012 1:39 pm

Postby satoon101 » Sat Aug 11, 2012 8:07 pm

You can use map configs files to load addons that need loaded on each map and unload the ones you don't need. If the map prefixes (cs_, de_, gg_, aim_, ect...) are specific to the addons you need loaded/unloaded, you can use this script:
http://addons.eventscripts.com/addons/v ... ptsmanager

Satoon
satoon101

Site Admin
Site Admin
 
Posts: 1055
Joined: Thu Oct 09, 2008 4:27 pm

Postby tammer123 » Sun Aug 12, 2012 6:15 pm

I got it, but to tell the truth i'm not so good with scripting.
How should the code look like for awp_, cs_, de_ and gg_ maps?
I would like to have normal awp, cs and de maps.
tammer123

Private
Private
 
Posts: 5
Joined: Sat Aug 11, 2012 1:39 pm

Postby satoon101 » Sun Aug 12, 2012 6:21 pm

If GunGame is the only addon you want to have loaded/unloaded based off of map type, and gg_ is the only map prefix that should have GunGame loaded, your es_scripts_db.txt file should look like:
"scripts"
{
    "gg"
    {
        "gungame51"    "script"
    }
}
That will auto-load gungame51 on gg_ maps and unload it on other maps.

Satoon
satoon101

Site Admin
Site Admin
 
Posts: 1055
Joined: Thu Oct 09, 2008 4:27 pm

Postby tammer123 » Sun Aug 12, 2012 7:35 pm

Thank you. Works :).
tammer123

Private
Private
 
Posts: 5
Joined: Sat Aug 11, 2012 1:39 pm

Re: Enable and disable gungame for certain maps?

Postby tammer123 » Tue Aug 14, 2012 2:34 pm

Sorry for double post, but after i re-tested, this didn't get things to work.
My SM DB file looks like :
"scripts"
{
    "gg"
    {
        "gungame51"    "script"
    "gg.cfg"    "cfg"
    }
    "awp"
    {
        "rb_armor_mod"    "script"
    "awp.cfg"   "script
    }
    "cs"
    {
    "awp.cfg"   "script
    }
    "de"
    {
    "awp.cfg"   "script
    }
}


Autoexec.cfg
es_load scriptsmanager
es_load gungame51
es_load rb_armor_mod


awp.cfg

es_unload gungame51


gg.cfg

es_load gungame51


And what Satoon suggested didn't work for me some reason. Had it.
tammer123

Private
Private
 
Posts: 5
Joined: Sat Aug 11, 2012 1:39 pm

Postby satoon101 » Tue Aug 14, 2012 4:09 pm

If all the cfg files do is load/unload gungame51, there is absolutely no reason to use them. Also, you seem to have some of the cfg files set to type "script" instead of "cfg".

Satoon
satoon101

Site Admin
Site Admin
 
Posts: 1055
Joined: Thu Oct 09, 2008 4:27 pm

Postby tammer123 » Tue Aug 14, 2012 4:25 pm

Okay, fixed that and took off the cfg files. But now if i change the map or map changes to another extension ex. AWP_game gungame still loads himself.
tammer123

Private
Private
 
Posts: 5
Joined: Sat Aug 11, 2012 1:39 pm



Return to General Discussion

Who is online

Users browsing this forum: No registered users and 19 guests

cron