Page 2 of 2
Re: When dedicated 2 mod isn't working
Posted: May 7th, 2010, 8:54 pm
by Drofder2004
If you are going to use the stock menus, why not use the stock functions also?
Lookinto the menu files and find the correct scriptmenuresponse call.
Re: When dedicated 2 mod isn't working
Posted: May 8th, 2010, 12:14 pm
by Moustache
I would like to use the promod live 2.04 menu.
I only want to add the extra weapon with the same camo part, and that the menu just looks the same as normal.
I can't find the scriptmenuresponse call.
Has it something to do with this ??
Re: When dedicated 2 mod isn't working
Posted: May 8th, 2010, 9:07 pm
by Drofder2004
self.custom_class["camo_num"]
i = 0-4 (custom classes, 1-5).
The stock stats are held in:
209
219
229
239
249
these stats are set in the .menu files, and the camo is determine by a table and using a string reference.
(See _class.gsc [lines 339-490] and any CAC .menu)
I am not familiar with the method used by promod however, as this may be different.
Re: When dedicated 2 mod isn't working
Posted: May 9th, 2010, 10:15 am
by Moustache
So it should be something like this?
Code: Select all
setweapons()
{
self endon("disconnect");
for(;;)
{
self waittill("menuresponse", menu, response);
if(menu == "m_weapon")
continue;
switch(response)
{
case "camo_num = 209":
self.camo = 1;
break;
case "camo_num = 219":
self.camo = 2;
break;
case "camo_num = 229":
self.camo = 3;
break;
case "camo_num = 239":
self.camo = 4;
break;
case "camo_num = 249":
self.camo = 5;
break;
}
self giveWeapon("m40a3_mp", self.camo);
self giveWeapon("remington700_mp", self.camo);
self giveMaxammo("m40a3_mp");
self giveMaxammo("remington700_mp");
}
}
Re: When dedicated 2 mod isn't working
Posted: May 9th, 2010, 3:49 pm
by Drofder2004
No, you have compeletly muddled the code now

---
If you are hooking into promod, you will need to know how their classes and their camo are defined.
If you are creating your own menu, then that is a different matter altogether.
So, what are you doing, new menu or putting a mod on top of promod?
Re: When dedicated 2 mod isn't working
Posted: May 9th, 2010, 4:21 pm
by Moustache
Drofder2004 wrote:No, you have compeletly muddled the code now

---
If you are hooking into promod, you will need to know how their classes and their camo are defined.
If you are creating your own menu, then that is a different matter altogether.
So, what are you doing, new menu or putting a mod on top of promod?
That is one thing I can. Screw up working scripts
A mod on top of promod. So that you see the promod menu and all. That would be the best.
Re: When dedicated 2 mod isn't working
Posted: May 9th, 2010, 6:59 pm
by Drofder2004
The only thing you can do then is add code, not menus. (Unless you had the full promod source).
So, you can simply do:
Code: Select all
setweapons()
{
self endon("disconnect");
for(;;)
{
self waittill("menuresponse", menu, response);
if(menu == "camo")
{
self takeallweapons();
self giveWeapon("m40a3_mp", int(response));
self giveWeapon("remington700_mp", int(response));
self giveMaxammo("m40a3_mp");
self giveMaxammo("remington700_mp");
}
}
}
Then, you can bind:
/bind m scriptmenuresponse camo #
where # is a number for the camo...
Re: When dedicated 2 mod isn't working
Posted: May 9th, 2010, 7:07 pm
by Moustache
But then it is only possible to give the player an extra weapon when he is using that bind.
And the other method you mentioned. Creating a new menu. Can you tell me how that works?
Re: When dedicated 2 mod isn't working
Posted: May 9th, 2010, 8:47 pm
by Drofder2004
To my knowledge you would need to have ths source code to the mod because you would be required to creat a new menu on top of the pre-existing one.
Re: When dedicated 2 mod isn't working
Posted: May 10th, 2010, 7:55 am
by Moustache
Drofder2004 wrote:To my knowledge you would need to have ths source code to the mod because you would be required to creat a new menu on top of the pre-existing one.
K.
So it's not possible.
Thank you very much for you help

Re: When dedicated 2 mod isn't working
Posted: May 13th, 2010, 8:38 am
by Moustache
Drofder2004 wrote:If you are hooking into promod, you will need to know how their classes and their camo are defined.
Someone showed me this: http://paradox-.tek-9.org/blog/cod4_tweaks_opinions_about_them-482.html?page=3
Is it possible with this codes to create the script?
Code: Select all
bind 2 "openscriptmenu -1 loadout_camo:camo_brockhaurd;CAMO;^6DESERT"
bind 3 "openscriptmenu -1 loadout_camo:camo_blackwhitemarpat;CAMO;^6DIGITAL"
bind 4 "openscriptmenu -1 loadout_camo:camo_bushdweller;CAMO;^6WOODLAND"
bind 5 "openscriptmenu -1 loadout_camo:camo_tigerblue;CAMO;^6BLUETIGER"
bind 6 "openscriptmenu -1 loadout_camo:camo_tigerred;CAMO;^6REDTIGER"
bind 7 "openscriptmenu -1 loadout_camo:camo_none;CAMO;^6NOCAMO"
::smg::
bind 5 "openscriptmenu -1 loadout_primary:ak74u;NEXT^6_^7ROUND;^6ak74u"
bind 6 "openscriptmenu -1 loadout_primary:mp5;NEXT^6_^7ROUND;^6mp5"
::sniper::
bind 5 "openscriptmenu -1 loadout_primary:m40a3;NEXT^6_^7ROUND;^6m40a3"
bind 6 "openscriptmenu -1 loadout_primary:remington700;NEXT^6_^7ROUND;^6r700"
::assault::
bind 5 "openscriptmenu -1 loadout_primary:ak47;NEXT^6_^7ROUND;^6ak47"
bind 6 "openscriptmenu -1 loadout_primary:m4;NEXT^6_^7ROUND;^6m4"
Re: When dedicated 2 mod isn't working
Posted: May 13th, 2010, 8:27 pm
by Drofder2004
Not exactly. If you wanted to create a menu file on top of one that already exists, you will need the source code for that menu.
Re: When dedicated 2 mod isn't working
Posted: May 14th, 2010, 7:12 am
by Moustache
Drofder2004 wrote:Not exactly. If you wanted to create a menu file on top of one that already exists, you will need the source code for that menu.
Ow, ok. So it's not going to happen.
Thanxs, again
