When dedicated 2 mod isn't working
Moderator: Core Staff
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: When dedicated 2 mod isn't working
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.
Lookinto the menu files and find the correct scriptmenuresponse call.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: When dedicated 2 mod isn't working
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 ??
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 ??
Code: Select all
STATS_CAMO
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: When dedicated 2 mod isn't working
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.
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.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: When dedicated 2 mod isn't working
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");
}
}
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: When dedicated 2 mod isn't working
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?
---
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?
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: When dedicated 2 mod isn't working
That is one thing I can. Screw up working scriptsDrofder2004 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?
A mod on top of promod. So that you see the promod menu and all. That would be the best.
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: When dedicated 2 mod isn't working
The only thing you can do then is add code, not menus. (Unless you had the full promod source).
So, you can simply do:
Then, you can bind:
/bind m scriptmenuresponse camo #
where # is a number for the camo...
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");
}
}
}
/bind m scriptmenuresponse camo #
where # is a number for the camo...
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: When dedicated 2 mod isn't working
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?
And the other method you mentioned. Creating a new menu. Can you tell me how that works?
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: When dedicated 2 mod isn't working
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.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: When dedicated 2 mod isn't working
K.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.
So it's not possible.
Thank you very much for you help
Re: When dedicated 2 mod isn't working
Someone showed me this: http://paradox-.tek-9.org/blog/cod4_tweaks_opinions_about_them-482.html?page=3Drofder2004 wrote:If you are hooking into promod, you will need to know how their classes and their camo are defined.
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"
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: When dedicated 2 mod isn't working
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.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: When dedicated 2 mod isn't working
Ow, ok. So it's not going to happen.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.
Thanxs, again
Who is online
Users browsing this forum: No registered users and 46 guests