Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34

Thread: Shop don't Work

  1. #11
    Private EnergY's Avatar
    Join Date
    Jul 2012
    Posts
    34
    Thanks
    32
    Thanked 2 Times in 2 Posts
    Yes Thank You thOuMta

    Thank you too Ni3l
    Last edited by kung foo man; 23rd May 2013 at 17:38. Reason: Merged 2 thank you posts, do we even need them with thanks-mod? :D
    Xfire: romain88120 and energyfun !!

  2. #12
    Private EnergY's Avatar
    Join Date
    Jul 2012
    Posts
    34
    Thanks
    32
    Thanked 2 Times in 2 Posts
    Fuck don't work again !! but Why O_o all menu work :/ and script :/
    Xfire: romain88120 and energyfun !!

  3. #13
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Show your script now and say whats not working

  4. #14
    Private EnergY's Avatar
    Join Date
    Jul 2012
    Posts
    34
    Thanks
    32
    Thanked 2 Times in 2 Posts
    ok ,

    Code:
    shoph(response)
    {
        if(!isdefined(self.pers["team"]) || self.pers["team"] == "spectator" || isdefined(self.spamdelay))
            return;
    
        self.spamdelay = true;
    
        if(self.pers["team"] != "allies")
            return;
        
        switch(response)        
        {
            case "1":
    		   if(self.argent >= 400)
                {
                   self.argent-=400;
    			   self takeWeapon("frag_grenade_american_mp");
                    self giveWeapon("frag_grenade_american_mp");
                    self setWeaponClipAmmo("frag_grenade_amercican_mp", 1);
                    self iprintlnbold("^2Y^7ou ^2G^7et 1 ^2N^7ades  ^2[^4-400^2]");
                }
                
                 else
                {
                    self iprintlnbold("^2Y^7ou ^2M^7ust ^2H^7ave 400 ^2M^7oney");
                }
                break;
    
            case "2":
                if(self.argent >= 1000)
                {
    				self.argent-=1000;
    				self takeWeapon("frag_grenade_american_mp");
                    self giveWeapon("frag_grenade_american_mp");
                    self setWeaponClipAmmo("frag_grenade_amercican_mp", 3);
                    self iprintlnbold("^2Y^7ou ^2G^7et 3 ^2N^7ades  ^2[^4-1000^2]");
                }
                 
    			 else
                {
                    self iprintlnbold("^2Y^7ou ^2M^7ust ^2H^7ave 1000 ^2M^7oney");
                }
                
                break;
        }
    }
    And again i use 1 or 2 and i don't get nades :/
    Xfire: romain88120 and energyfun !!

  5. #15
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Show menu file

  6. #16
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Show the actual error.

    Also show what you traced so far.

  7. #17
    Private EnergY's Avatar
    Join Date
    Jul 2012
    Posts
    34
    Thanks
    32
    Thanked 2 Times in 2 Posts
    File in zom.gsc

    Code:
    thread zom_energy\_menus::init();
    And

    Code:
    level.xenon = (getcvar("xenonGame") == "true");
    	if(level.xenon) // Xenon only
    		thread maps\mp\gametypes\_richpresence::init();
    	else // PC only
    		thread zom_energy\_quickmessages::init();
    And now in _menus.gsc
    Code:
    if(menu == game["menu_quickcommands"])
    				maps\mp\gametypes\_quickmessages::quickcommands(response);
    			else if(menu == game["menu_quickstatements"])
    				maps\mp\gametypes\_quickmessages::quickstatements(response);
    			else if(menu == game["menu_quickresponses"])
    				maps\mp\gametypes\_quickmessages::quickresponses(response);
    			else if(menu == game["menu_shoph"])
    				zom_energy\_quickmessages::shoph(response);
    shop script are in _quickmessages.gsc
    Xfire: romain88120 and energyfun !!

  8. #18
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    OMG cant you read? Show your menu file! shoph.menu
    And wtf is this?
    Code:
    else if(menu == game["menu_shoph"])
    				zom_energy\_quickmessages::shoph(response);
    You say your script is in quickmessages...
    Code:
    else if(menu == game["menu_shoph"])
    maps\mp\gametypes\_quickmessages::shoph(response);

  9. #19
    Private EnergY's Avatar
    Join Date
    Jul 2012
    Posts
    34
    Thanks
    32
    Thanked 2 Times in 2 Posts
    I change places for test

    Code:
    #include "ui_mp/menudef.h"
    #define ORIGIN_QUICKMESSAGETAB			32 224
    
    #define ORIGIN_QUICKMESSAGEWINDOW		32 256
    
    
    {
    	menuDef
    	{
    		name			"shoph"
    		visible			0
    		fullscreen		0
    		rect			0 0 640 480
    		focuscolor		1 1 1 1
    		disablecolor		0 0 0 0
     		style			WINDOW_STYLE_EMPTY
    
    		onOpen
    		{
    			setDvar cl_bypassMouseInput "1"
    		}
    		onClose
    		{
    			setDvar cl_bypassMouseInput "0"
    		}
    
    // WINDOW BACKGROUND
    		itemDef
    		{
    			name			"window_background"
    			visible			1
    			rect			0 0 224 192
    			origin			ORIGIN_QUICKMESSAGEWINDOW
    			style			WINDOW_STYLE_FILLED
    			forecolor		1 1 1 1
    			backcolor		0 0 0 0.7975
    			decoration
    		}
    	
    // WINDOW LINES
    		itemDef
    		{
    			name			"window_lines"
    			visible			1
    			rect			3 0 2 187
    			origin			ORIGIN_QUICKMESSAGEWINDOW
    			style			WINDOW_STYLE_FILLED
    			backcolor		1 1 1 .125
    			decoration
    		}
    		itemDef
    		{
    			name			"window_lines"
    			visible			1
    			rect			219 0 2 187
    			origin			ORIGIN_QUICKMESSAGEWINDOW
    			style			WINDOW_STYLE_FILLED
    			backcolor		1 1 1 .125
    			decoration
    		}
    		itemDef
    		{
    			name			"window_lines"
    			visible			1
    			rect			5 0 214 2
    			origin			ORIGIN_QUICKMESSAGEWINDOW
    			style			WINDOW_STYLE_FILLED
    			backcolor		1 1 1 .125
    			decoration
    		}
    		itemDef
    		{
    			name			"window_lines"
    			visible			1
    			rect			3 187 218 2
    			origin			ORIGIN_QUICKMESSAGEWINDOW
    			style			WINDOW_STYLE_FILLED
    			backcolor		1 1 1 .125
    			decoration
    		}
    
    // TITLE
    		itemDef
    		{
    			name			"title"
    			visible			1
    			rect			0 0 224 32
    			origin			ORIGIN_QUICKMESSAGETAB
    			style			WINDOW_STYLE_FILLED
    			forecolor		1 1 1 1
    			backcolor		0 0 0 0.7975
    			type			ITEM_TYPE_TEXT
    			text			"^2H^7unter ^2S^7hop ^2[^7Money^2]"
    			textfont		UI_FONT_NORMAL
    			textscale		.24
    			textalignx		112
    			textaligny		24
    			textalign		ITEM_ALIGN_CENTER
    			decoration
    		}
    		itemDef
    		{
    			name			"title_quickmessage_gray"
    			visible			1
    			rect			3 3 218 29
    			origin			ORIGIN_QUICKMESSAGETAB
    			style			WINDOW_STYLE_FILLED
    			backcolor		1 1 1 .125
    			decoration
    		}
    
    		itemDef
    		{
    			name			"window"
    			visible			1
    			rect			16 20 0 0
    			origin			ORIGIN_QUICKMESSAGEWINDOW
    			forecolor		1 1 1 1
    			textfont		UI_FONT_NORMAL
    			textscale		.24
    			textaligny		8
    			text			"1. 1 ^2G^7renade   ^2[^7400^2]"
    			decoration
    		}
    		execKey "1" { scriptMenuResponse "1"; close shoph }
    		
    		itemDef
    		{
    			name			"window"
    			visible			1
    			rect			16 40 0 0
    			origin			ORIGIN_QUICKMESSAGEWINDOW
    			forecolor		1 1 1 1
    			textfont		UI_FONT_NORMAL
    			textscale		.24
    			textaligny		8
    			text			"2. 3 ^2G^7renade   ^2[^71000^2]"
    			decoration
    		}
    		execKey "2" { scriptMenuResponse "2"; close shoph }
    	
    
    		itemDef
    		{
    			name			"window"
    			visible			1
    			rect			16 148 0 0
    			origin			ORIGIN_QUICKMESSAGEWINDOW
    			forecolor		1 1 1 1
    			textfont		UI_FONT_NORMAL
    			textscale		.24
    			textaligny		8
    			text			"@QUICKMESSAGE_ESC_EXIT"
    			decoration
    		}
    	}
    }
    Xfire: romain88120 and energyfun !!

  10. #20
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    You wrote wrong the name of the nades: "frag_grenade_amercican_mp" amerCican xD

    In the next step preCache the american nades in _weapons.gsc, or else you wont get grenades on maps where the allies are british or russians.

  11. The Following 2 Users Say Thank You to randall For This Useful Post:

    EnergY (24th May 2013),kung foo man (24th May 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •