Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 105 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Menu's
[aL]Damo
General Member
Since: Mar 24, 2010
Posts: 187
Last: Nov 3, 2011
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Saturday, Oct. 2, 2010 12:02 pm
Hi there i have a small problem that i cannot seem to fix.

i have 2 menus in my map and some how they bug when you press esc on you keyboard -.- has anybody else had this problem i have seen other maps with menus that dont bug when you press esc is there something im doing wrong ?

i can give you my scripts if you need them or menu files

So if anybody can help me can you please msg me on xfire @ damod1995 or reply to this post

Thanks so much
Share |
[aL]Damo
General Member
Since: Mar 24, 2010
Posts: 187
Last: Nov 3, 2011
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Monday, Oct. 4, 2010 07:41 am
Bumpos anybody >.<
Share |
JerryTube
General Member
Since: Mar 4, 2007
Posts: 88
Last: Jul 1, 2013
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Monday, Oct. 4, 2010 11:59 am
What do you mean by "bug"?
As in it doesn't close?
Share |
[ZCT]Titan
General Member
Since: Feb 23, 2009
Posts: 172
Last: Apr 5, 2011
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Monday, Oct. 4, 2010 01:08 pm
im guessing he means they dont close or the menu gets all messed up. Which could be a issue with the menu. If one of these are the case post your menu on here and im sure some one can find your issue also post your script incase they need that also.
Share |
[aL]Damo
General Member
Since: Mar 24, 2010
Posts: 187
Last: Nov 3, 2011
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Monday, Oct. 4, 2010 02:48 pm
[ZCT]Titan writes...
Quote:
im guessing he means they dont close or the menu gets all messed up. Which could be a issue with the menu. If one of these are the case post your menu on here and im sure some one can find your issue also post your script incase they need that also.


Well my basic problem is when somebody uses the menu using F they can use it but if they press esc on the menu it bugs it so that it will not open again unless the map restarts. i shall also post my menu file and gsc at a later date as i am not at home atm
Share |
JerryTube
General Member
Since: Mar 4, 2007
Posts: 88
Last: Jul 1, 2013
[view latest posts]
Level 3
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Tuesday, Oct. 5, 2010 12:25 pm
Ahh i see.

The 'onEsc' function may be your problem..

onEsc
{
close yourmenuname
}


This is my menu for my cod4 mod if you need something to compare..

Code:
#define ORIGIN_CHOICE1        80 84

#define ORIGIN_CHOICE2        80 108

#define ORIGIN_CHOICE3        80 132

#define ORIGIN_CHOICE4        80 156

#define ORIGIN_CHOICE5        80 180


#define ORIGIN_IMAGE            300 140


#define ORIGIN_QUICKMESSAGETAB            32 224

#define ORIGIN_QUICKMESSAGEWINDOW        32 256


#undef FOG_SCROLL_TIME

#define FOG_SCROLL_TIME 40000


{
    menuDef
    {
        name            "commander"
        rect            0 0 640 480
        style            WINDOW_STYLE_EMPTY
        focusColor        COLOR_FOCUSED
        blurWorld        5.0
       onEsc
        {
        scriptMenuResponse "exit"; close commander    
        }
        onOpen
        {
        show image_inf;
        }
// TITLE
        itemDef
        {
            type            ITEM_TYPE_TEXT
            visible            1
            origin            ORIGIN_TITLE
            forecolor        1 1 1 1
            text            "Commander Menu"
            textfont        UI_FONT_NORMAL
            decoration
        }

// CHOICES
        execKey "1" { play "mouse_click"; close commander; open infantry}
        execKey "2" { play "mouse_click"; close commander; open armour}
        execKey "3" { play "mouse_click"; close commander; open helicopters}    
        execKey "4" { play "mouse_click"; close commander; open weapons}    
        execKey "5" { ScriptMenuResponse "ammo"; close commander}

        itemDef 
        {
            name            "button_infantry"
            visible            1
            rect            0 0 128 24
            origin            ORIGIN_CHOICE1
            type            ITEM_TYPE_BUTTON
            text            "1. Infantry"
            textfont        UI_FONT_NORMAL
            textscale        .4
            textstyle        ITEM_TEXTSTYLE_SHADOWED
            textaligny        20
            action
            {
                play "mouse_click";
                close commander; 
                open infantry;
            }
            onFocus
            {
                hide image_arm;
                hide image_heli;
                play "mouse_over";
                show image_inf;
            }
        
        }
        
        itemDef 
        {
            name            "button_armour"
            visible            1
            rect            0 0 128 24
            origin            ORIGIN_CHOICE2
            type            ITEM_TYPE_BUTTON
            text            "2. Armour"
            textfont        UI_FONT_NORMAL
            textscale        .4
            textstyle        ITEM_TEXTSTYLE_SHADOWED
            textaligny        20
            action
            {
                play "mouse_click";
                close commander;
                open armour
            }
            onFocus
            {
                hide image_inf;
                hide image_heli;
                play "mouse_over";
                show image_arm;
            }
        
        }
                
        itemDef 
        {
            name            "button_helicopters"
            visible            1
            rect            0 0 128 24
            origin            ORIGIN_CHOICE3
            type            ITEM_TYPE_BUTTON
            text            "3. Helicopters"
            textfont        UI_FONT_NORMAL
            textscale        .4
            textstyle        ITEM_TEXTSTYLE_SHADOWED
            textaligny        20
            action
            {
                play "mouse_click";
                close commander; 
                open helicopters
            }
            onFocus
            {
                hide image_inf;
                hide image_arm;
                play "mouse_over";
                show image_heli;
            }
        
        }
        
        itemDef 
        {
            name            "button_weapons"
            visible            1
            rect            0 0 128 24
            origin            ORIGIN_CHOICE4
            type            ITEM_TYPE_BUTTON
            text            "4. Personal Weapons"
            textfont        UI_FONT_NORMAL
            textscale        .4
            textstyle        ITEM_TEXTSTYLE_SHADOWED
            textaligny        20
            action
            {
                play "mouse_click";
                close commander; 
                open weapons            
            }
            onFocus
            {
                hide image_inf;
                hide image_arm;
                hide image_heli;
            }
        
        }
        

        itemDef 
        {
            name            "button_ammo"
            visible            1
            rect            0 0 128 24
            origin            ORIGIN_CHOICE5
            type            ITEM_TYPE_BUTTON
            text            "5. Ammo ($100)"
            textfont        UI_FONT_NORMAL
            textscale        .4
            textstyle        ITEM_TEXTSTYLE_SHADOWED
            textaligny        20
            action
            {
                play "mouse_click";
                close commander; 
                ScriptmenuResponse "ammo";            
            }
            onFocus
            {
                hide image_inf;
                hide image_arm;
                hide image_heli;
            }
        
        }
        
        // IMAGES
        itemDef
        {
            name            "image_inf"
            visible         0
            rect            0 0 256 256
            origin            ORIGIN_IMAGE
             style            WINDOW_STYLE_SHADER
            background    "warfare_infantry"
            decoration
        }
        
        itemDef
        {
            name            "image_arm"
            visible         0
            rect            0 0 256 256
            origin            ORIGIN_IMAGE
             style            WINDOW_STYLE_SHADER
            background        "warfare_armour"
            decoration
        }
        
        itemDef
        {
            name            "image_heli"
            visible         0
            rect            0 0 256 256
            origin            ORIGIN_IMAGE
             style            WINDOW_STYLE_SHADER
            background        "warfare_helicopter"
            decoration
        }
        
        //#include "ui_mp/leftside_options.inc"
        
    
        
    }
    

  }

Share |
[aL]Damo
General Member
Since: Mar 24, 2010
Posts: 187
Last: Nov 3, 2011
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Tuesday, Oct. 5, 2010 02:39 pm
JerryTube writes...
Quote:
Ahh i see.

The 'onEsc' function may be your problem..

onEsc
{
close yourmenuname
}


This is my menu for my cod4 mod if you need something to compare..

Code:
#define ORIGIN_CHOICE1        80 84

#define ORIGIN_CHOICE2        80 108

#define ORIGIN_CHOICE3        80 132

#define ORIGIN_CHOICE4        80 156

#define ORIGIN_CHOICE5        80 180


#define ORIGIN_IMAGE            300 140


#define ORIGIN_QUICKMESSAGETAB            32 224

#define ORIGIN_QUICKMESSAGEWINDOW        32 256


#undef FOG_SCROLL_TIME

#define FOG_SCROLL_TIME 40000


{
    menuDef
    {
        name            "commander"
        rect            0 0 640 480
        style            WINDOW_STYLE_EMPTY
        focusColor        COLOR_FOCUSED
        blurWorld        5.0
       onEsc
        {
        scriptMenuResponse "exit"; close commander    
        }
        onOpen
        {
        show image_inf;
        }
// TITLE
        itemDef
        {
            type            ITEM_TYPE_TEXT
            visible            1
            origin            ORIGIN_TITLE
            forecolor        1 1 1 1
            text            "Commander Menu"
            textfont        UI_FONT_NORMAL
            decoration
        }

// CHOICES
        execKey "1" { play "mouse_click"; close commander; open infantry}
        execKey "2" { play "mouse_click"; close commander; open armour}
        execKey "3" { play "mouse_click"; close commander; open helicopters}    
        execKey "4" { play "mouse_click"; close commander; open weapons}    
        execKey "5" { ScriptMenuResponse "ammo"; close commander}

        itemDef 
        {
            name            "button_infantry"
            visible            1
            rect            0 0 128 24
            origin            ORIGIN_CHOICE1
            type            ITEM_TYPE_BUTTON
            text            "1. Infantry"
            textfont        UI_FONT_NORMAL
            textscale        .4
            textstyle        ITEM_TEXTSTYLE_SHADOWED
            textaligny        20
            action
            {
                play "mouse_click";
                close commander; 
                open infantry;
            }
            onFocus
            {
                hide image_arm;
                hide image_heli;
                play "mouse_over";
                show image_inf;
            }
        
        }
        
        itemDef 
        {
            name            "button_armour"
            visible            1
            rect            0 0 128 24
            origin            ORIGIN_CHOICE2
            type            ITEM_TYPE_BUTTON
            text            "2. Armour"
            textfont        UI_FONT_NORMAL
            textscale        .4
            textstyle        ITEM_TEXTSTYLE_SHADOWED
            textaligny        20
            action
            {
                play "mouse_click";
                close commander;
                open armour
            }
            onFocus
            {
                hide image_inf;
                hide image_heli;
                play "mouse_over";
                show image_arm;
            }
        
        }
                
        itemDef 
        {
            name            "button_helicopters"
            visible            1
            rect            0 0 128 24
            origin            ORIGIN_CHOICE3
            type            ITEM_TYPE_BUTTON
            text            "3. Helicopters"
            textfont        UI_FONT_NORMAL
            textscale        .4
            textstyle        ITEM_TEXTSTYLE_SHADOWED
            textaligny        20
            action
            {
                play "mouse_click";
                close commander; 
                open helicopters
            }
            onFocus
            {
                hide image_inf;
                hide image_arm;
                play "mouse_over";
                show image_heli;
            }
        
        }
        
        itemDef 
        {
            name            "button_weapons"
            visible            1
            rect            0 0 128 24
            origin            ORIGIN_CHOICE4
            type            ITEM_TYPE_BUTTON
            text            "4. Personal Weapons"
            textfont        UI_FONT_NORMAL
            textscale        .4
            textstyle        ITEM_TEXTSTYLE_SHADOWED
            textaligny        20
            action
            {
                play "mouse_click";
                close commander; 
                open weapons            
            }
            onFocus
            {
                hide image_inf;
                hide image_arm;
                hide image_heli;
            }
        
        }
        

        itemDef 
        {
            name            "button_ammo"
            visible            1
            rect            0 0 128 24
            origin            ORIGIN_CHOICE5
            type            ITEM_TYPE_BUTTON
            text            "5. Ammo ($100)"
            textfont        UI_FONT_NORMAL
            textscale        .4
            textstyle        ITEM_TEXTSTYLE_SHADOWED
            textaligny        20
            action
            {
                play "mouse_click";
                close commander; 
                ScriptmenuResponse "ammo";            
            }
            onFocus
            {
                hide image_inf;
                hide image_arm;
                hide image_heli;
            }
        
        }
        
        // IMAGES
        itemDef
        {
            name            "image_inf"
            visible         0
            rect            0 0 256 256
            origin            ORIGIN_IMAGE
             style            WINDOW_STYLE_SHADER
            background    "warfare_infantry"
            decoration
        }
        
        itemDef
        {
            name            "image_arm"
            visible         0
            rect            0 0 256 256
            origin            ORIGIN_IMAGE
             style            WINDOW_STYLE_SHADER
            background        "warfare_armour"
            decoration
        }
        
        itemDef
        {
            name            "image_heli"
            visible         0
            rect            0 0 256 256
            origin            ORIGIN_IMAGE
             style            WINDOW_STYLE_SHADER
            background        "warfare_helicopter"
            decoration
        }
        
        //#include "ui_mp/leftside_options.inc"
        
    
        
    }
    

  }



tyvm for your responce jerry so here is my menu
Code:

#include "ui/menudef.h"
#include "ui_mp/common_macro.inc"

#define CHOICE_GROUP			"kalahari_v4"

#include "ui_mp/menustyle.inc"
#include "ui/choices_setup_common.menu"

#include "ui_mp/popupstyle.inc"	
#include "ui/choices_setup_popmenu.menu"


#undef CHOICE_POPUP_BACKCOLOR
#define CHOICE_POPUP_BACKCOLOR  0.2 0.2 0.22 0.65


#define ORIGIN_QUICKMESSAGEWINDOW		0 16

{
	menuDef
	{
		IMPROVED_POPUP_SETUP_ONOPEN( kalahari_v4, 6, 6, 160, ;, setDvar cl_bypassMouseInput "1";, 0 )
		onClose{ setDvar cl_bypassMouseInput "0" }
		onEsc{close kalahari_v4}
		
		CHOICE_POPMENU_TITLE( "^2Public Menu" )
		
		itemDef
		{
			name			"window"
			group			ingamebox
			visible			1
			rect			16 20 0 0
			origin			ORIGIN_QUICKMESSAGEWINDOW
			forecolor		1 1 1 1
			textfont		UI_FONT_NORMAL
			textstyle		ITEM_TEXTSTYLE_SHADOWED
			textscale		TEXTSIZE_SMALL
			textaligny		8
			text			 "^01. ^2Advertise"
			decoration
		}
		execKey "1" { scriptMenuResponse "1"; close kalahari_v4 }
		
		itemDef
		{
			name			"window"
			group			ingamebox
			visible			1
			rect			16 40 0 0
			origin			ORIGIN_QUICKMESSAGEWINDOW
			forecolor		1 1 1 1
			textfont		UI_FONT_NORMAL
			textstyle		ITEM_TEXTSTYLE_SHADOWED
			textscale		TEXTSIZE_SMALL
			textaligny		8
			text			 "^02. ^2You rock!"
			decoration
		}
		execKey "2" { scriptMenuResponse "2"; close kalahari_v4 }	
		
		itemDef
		{
			name			"window"
			group			ingamebox
			visible			1
			rect			16 60 0 0
			origin			ORIGIN_QUICKMESSAGEWINDOW
			forecolor		1 1 1 1
			textfont		UI_FONT_NORMAL
			textstyle		ITEM_TEXTSTYLE_SHADOWED
			textscale		TEXTSIZE_SMALL
			textaligny		8
			text			 "^03. ^2Teleport Down !"
			decoration
		}
		execKey "3" { scriptMenuResponse "3"; close kalahari_v4 }
		
		itemDef
		{
			name			"window"
			group			ingamebox
			visible			1
			rect			16 80 0 0
			origin			ORIGIN_QUICKMESSAGEWINDOW
			forecolor		1 1 1 1
			textfont		UI_FONT_NORMAL
			textstyle		ITEM_TEXTSTYLE_SHADOWED
			textscale		TEXTSIZE_SMALL
			textaligny		8
			text			 "^04. ^2To The Saferoom PPL"
			decoration
		}
		execKey "4" { scriptMenuResponse "4"; close kalahari_v4 }	
	}
		
}

have i put the onESC function in the right place also my menu is called kalahari_v4.menu just incase you need to know
Share |
[aL]Damo
General Member
Since: Mar 24, 2010
Posts: 187
Last: Nov 3, 2011
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Thursday, Oct. 7, 2010 03:03 pm
hmmm i tried it with the menu file above but for some reason it did not work i pressed esc and it still messed up and wouldent reapear
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»