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, 03:04 AM #2
egoDream
Can’t trickshot me!
Originally posted by pcfreak30 View Post
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.

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..


simple but i never would of thought of that lol, thanks
04-14-2011, 04:47 AM #3
Blackstorm
Veni. Vidi. Vici.
You really made a whole thread for this?

The following 2 users say thank you to Blackstorm for this useful post:

emsp, JamazkieHD
04-14-2011, 09:50 AM #4
Apathy
Save Point
Wow, pcfreak, I didn't know you had this mmuch repzor on here.

The following user thanked Apathy for this useful post:

BuC-ShoTz
04-14-2011, 02:06 PM #5
BuC-ShoTz
TeamMvKâ?¢
Originally posted by Apathy View Post
Wow, pcfreak, I didn't know you had this mmuch repzor on here.


heres a little for you
04-14-2011, 03:13 PM #6
GawLey
Keeper
wow nice post man, this should be good for new patches
04-14-2011, 05:02 PM #7
nice thread thanks man this helps
04-14-2011, 06:15 PM #8
Merkii
Former Staff
Wait I haven't been in much CFG what happens if you're in teh menu?
04-14-2011, 07:19 PM #9
pcfreak30
>> PCFreak30.com Happy<<
Originally posted by I
Wait I haven't been in much CFG what happens if you're in teh menu?


um simply when restarting, the binds don't reset so if you press fast restart, and press X after restart, it will restart again..

Bt annoying. Remember CFG isn't programming, so it has NO logic.
04-14-2011, 07:31 PM #10
.Pluto
Splicer
Wait not flaming but does the menu not close or something? Never used a 1.12 patch.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo