Yea i have see thank you randall ^^
And no work again i don't have nade and iprintlnbold no work too :/
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 !!
Try this !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;
}
}
Must use wait function and else if(self.argent < ...) .
EnergY (24th May 2013)
self setWeaponClipAmmo("frag_grenade_amercican_mp", 1);
amerCican!
EnergY (24th May 2013)
Yes thx but randall have say and i have change it
Xfire: romain88120 and energyfun !!
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.
EnergY (25th May 2013),kung foo man (24th May 2013),thOuMta (24th May 2013)
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 !!
After the first buy in your shop, quickmessages wont work anymore.
Remove self.spamdelay.
EnergY (25th May 2013)
ok Thx but i have again never buy in the shop ^^
Xfire: romain88120 and energyfun !!
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 !!