Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 34

Thread: Shop don't Work

  1. #21
    Private EnergY's Avatar
    Join Date
    Jul 2012
    Posts
    34
    Thanks
    32
    Thanked 2 Times in 2 Posts
    Yea i have see thank you randall ^^

    And no work again i don't have nade and iprintlnbold no work too :/
    Last edited by EnergY; 24th May 2013 at 16:08.
    Xfire: romain88120 and energyfun !!

  2. #22
    Private First Class thOuMta's Avatar
    Join Date
    Oct 2012
    Location
    France
    Posts
    191
    Thanks
    139
    Thanked 35 Times in 28 Posts
    PHP 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;
                    
    wait(0.2);
                    
    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 if(
    self.argent 400)
                {
                    
    self iprintlnbold("^2Y^7ou ^2M^7ust ^2H^7ave 400 ^2M^7oney");
                }
                break;

            case 
    "2":
                if(
    self.argent >= 1000)
                {
                    
    self.argent-=1000;
                    
    wait(0.2);
                    
    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 if(
    self.argent 1000)
                {
                    
    self iprintlnbold("^2Y^7ou ^2M^7ust ^2H^7ave 1000 ^2M^7oney");
                }
                break;
        }

    Try this !
    Must use wait function and else if(self.argent < ...) .

  3. The Following User Says Thank You to thOuMta For This Useful Post:

    EnergY (24th May 2013)

  4. #23
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    self setWeaponClipAmmo("frag_grenade_amercican_mp", 1);

    amerCican!

  5. The Following User Says Thank You to Ni3ls For This Useful Post:

    EnergY (24th May 2013)

  6. #24
    Private EnergY's Avatar
    Join Date
    Jul 2012
    Posts
    34
    Thanks
    32
    Thanked 2 Times in 2 Posts
    Yes thx but randall have say and i have change it
    Xfire: romain88120 and energyfun !!

  7. #25
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    thOuMta, sorry but it's all bullshit

    If iPrintlnBold doesnt work, there are many reasons:
    1. player's team isn't allies (maybe this statement is false)
    2. money is 0, or little to buy
    3. response isn't 1 or 2
    4. grenades aren't precached
    5. the menu isn't in ui_mp/scriptmenus/ folder

    But the detect the mistake would be easier if you would switch on the developer mode (developer 1, developer_script 1).

    Edit: sometimes the cod shouts if 'switch' hasn't got default branch. (Therefore you should develop in developer mode)
    Last edited by randall; 24th May 2013 at 19:25.

  8. The Following 3 Users Say Thank You to randall For This Useful Post:

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

  9. #26
    Private EnergY's Avatar
    Join Date
    Jul 2012
    Posts
    34
    Thanks
    32
    Thanked 2 Times in 2 Posts
    I test only in allies/ i test with 0 and 5000

    response are energy_1 and energy_2 in the menu too

    for 4 idk ^^
    and the menu are in V menu and sure in ui_mp/scriptmenus/ folder


    i can open shop menu but just i use 1 and 2 and no response :/
    Xfire: romain88120 and energyfun !!

  10. #27
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    After the first buy in your shop, quickmessages wont work anymore.
    Remove self.spamdelay.

  11. The Following User Says Thank You to IzNoGoD For This Useful Post:

    EnergY (25th May 2013)

  12. #28
    Private EnergY's Avatar
    Join Date
    Jul 2012
    Posts
    34
    Thanks
    32
    Thanked 2 Times in 2 Posts
    ok Thx but i have again never buy in the shop ^^
    Xfire: romain88120 and energyfun !!

  13. #29
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    Quote Originally Posted by EnergY View Post
    response are energy_1 and energy_2 in the menu too

    i can open shop menu but just i use 1 and 2 and no response :/
    But omg... If the response is "energy_1" and "energy_2" then why you wrote "1" and "2" in the script?????????????????????? The CoD isn't so clever to recognize these mistakes.

  14. #30
    Private EnergY's Avatar
    Join Date
    Jul 2012
    Posts
    34
    Thanks
    32
    Thanked 2 Times in 2 Posts
    Lol no look


    Code:
    shoph(response) 
    { 
        if(!isdefined(self.pers["team"]) || self.pers["team"] == "spectator" || isdefined(self.spamdelay)) 
            return; 
    
        if(self.pers["team"] != "allies") 
            return; 
         
        switch(response)         
        { 
            case "energy1": 
               if(self.argent >= 400) 
               { 
                    self.argent-=400; 
                    wait(0.2); 
                    self takeWeapon("frag_grenade_american_mp"); 
                    self giveWeapon("frag_grenade_american_mp"); 
                    self setWeaponClipAmmo("frag_grenade_american_mp", 1); 
                    self iprintlnbold("^2Y^7ou ^2G^7et 1 ^2N^7ades  ^2[^4-400^2]"); 
                } 
                else if(self.argent < 400) 
                { 
                    wait(0.2); 
    				self iprintlnbold("^2Y^7ou ^2M^7ust ^2H^7ave 400 ^2M^7oney"); 
                } 
                break; 
    
            case "energy2": 
                if(self.argent >= 1000) 
                { 
                    self.argent-=1000; 
                    wait(0.2); 
                    self takeWeapon("frag_grenade_american_mp"); 
                    self giveWeapon("frag_grenade_american_mp"); 
                    self setWeaponClipAmmo("frag_grenade_american_mp", 3); 
                    self iprintlnbold("^2Y^7ou ^2G^7et 3 ^2N^7ades  ^2[^4-1000^2]"); 
                } 
                else if(self.argent < 1000) 
                { 
                    wait(0.2); 
    				self iprintlnbold("^2Y^7ou ^2M^7ust ^2H^7ave 1000 ^2M^7oney"); 
                } 
                break; 
     
    
    				default:
    				assert(response == "2");
    				break;	
    
    
    	} 
    }
    Code:
    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 "energy1"; 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 "energy2"; close shoph }
    Xfire: romain88120 and energyfun !!

Posting Permissions

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