Post: [CODE] Exit out of any mod menu before restarting the game.
04-14-2011, 03:02 AM #1
pcfreak30
>> PCFreak30.com Happy<<
(adsbygoogle = window.adsbygoogle || []).push({}); Ok, so i was talking to TheFallen online, and this just randomly hit me. A lot of people (including me) forget my mod menu is still open (CFG one) when the game restarts.

EDIT: To resolve any confusing, when I referred to "my mod menu", i was referring to the one I was using at time, not saying this is specific to my menu system.. It would work for any menu system in general..

So a simple solution I came up with is before the "map", "map_restart, or "quick_restart" command, have it re-execute the buttons_default.cfg.

Code:

    
exec buttons_default.cfg
iIf the mod menu is on tactical layout, then:


    
exec buttons_tactical.cfg
Here is a example XML and CFG code from my generator:

XML:
    
<menu>
<title>Test</title>
<item>
<name>Restart</name>
<cmd>exec buttons_default.cfg;fast_restart</cmd>
</item>
</menu>
CFG:

    
//Created with PCFreak30's CFG Menu Generator
//Visit pcfreak30.com for Hacking and Modding News and more!

bind BUTTON_RSHLDR "+attack"
bind BUTTON_LSHLDR "+speed_throw"
bind BUTTON_RTRIG "+frag"
bind BUTTON_LTRIG "+smoke"
bind BUTTON_RSTICK "+melee"
bind BUTTON_LSTICK "+breath_sprint"
set gpad_button_rstick_deflect_max 1
set gpad_button_lstick_deflect_max 1
bind BUTTON_A "+gostand"
bind BUTTON_B "+stance"
bind BUTTON_X "+usereload"
bind BUTTON_Y "weapnext"
bind DPAD_UP "+actionslot 1"
bind DPAD_DOWN "+actionslot 2"
bind DPAD_RIGHT "+actionslot 4"
bind BUTTON_START "togglemenu"
bind DPAD_LEFT "vstr 1m"
set 1m "con_errormessagetime 90;set Cg_hudchatposition 310 250;bind BUTTON_B vstr 1e; cg_chatheight 7;vstr 1opt1"
set 1t "say ==== Test ====;"
set 1e "bind DPAD_UP +actionslot 1;bind DPAD_DOWN +actionslot 2;bind BUTTON_B +stance;bind BUTTON_A +gostand;con_errormessagetime 10;say Mod Menu Closed;set Cg_hudchatposition 5 500;"
set 1opt1 "vstr 1t;say -- Restart --;bind BUTTON_A vstr 1opt1r; bind DPAD_UP vstr 1opt1; bind DPAD_DOWN vstr 1opt1;bind BUTTON_B vstr 1m"
set 1opt1r "exec buttons_default.cfg;fast_restart;"
So i just thought this might be useful. Saves time from accidentally pressing x for restarting the game 5 times..
(adsbygoogle = window.adsbygoogle || []).push({});

The following 3 users say thank you to pcfreak30 for this useful post:

add_me, BuC-ShoTz, egoDream
04-14-2011, 07:33 PM #11
pcfreak30
>> PCFreak30.com Happy<<
Originally posted by .Pluto View Post
Wait not flaming but does the menu not close or something? Never used a 1.12 patch.



Read above post..

The following user thanked pcfreak30 for this useful post:

add_me
04-14-2011, 07:41 PM #12
Very useful thanks bro! :y:
04-16-2011, 04:09 AM #13
this is pretty useful. thanks
04-18-2011, 12:36 AM #14
Air.Jordan
Black and Yellow
Nice Code man, This shall be helpful Smile
04-18-2011, 06:17 AM #15
add_me
Do a barrel roll!
woow nice !! i will put that in my patch

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo