Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 40 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Help with a weapon mod
paulb39
General Member
Since: Jan 3, 2006
Posts: 492
Last: Oct 16, 2011
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Monday, Aug. 9, 2010 02:31 pm
I have an all weapons mod for my UO server. It allows any team to select any gun. Such as a german can select a thompson.

I want to add a fg42, flamethrower, and bazooka to the list of guns people can select.

I'm banging my head against a wall trying to figure it out.

Any help appreciated

Heres the all weapons mod I'm trying to modify.

http://crazymoddedserver.com/Server1/Awe_Headshot/zzzzdxallweaponsfinal.pk3
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoDUO Mapping
Posted: Monday, Aug. 9, 2010 06:44 pm
hmm, i dont know what it is exacly, but look for the coduo eqivulent =)

find the .pk3 file that has "ui_mp"->"scriptmenus"->then edit the weapon_american/german/russian.gsc and the team one aswell, i think if i remeber you dont have to add any scripting and try to look for the _weapons.gsc

btw look in all your .pk3 for files that look like they have something like it.

there is proberally a line that says src_allow_weapon_bazooka_mp "0"
just change that to src_allow_weapon_bazooka_mp "1"

or it might be like

//src_allow_weapon_bazooka_mp "1"

the // means "do not read this line" so if you take them out them out of everything that it says then it should load up =)
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoDUO Mapping
Posted: Monday, Aug. 9, 2010 06:55 pm
looked at the mod and i found this code,

Code:
	level.allow_mg34 = getCvar("scr_allow_mg34");
	if(level.allow_mg34 == "")
		level.allow_mg34 = "1";
	setCvar("scr_allow_mg34", level.allow_mg34);
	setCvar("ui_allow_mg34", level.allow_mg34);
	makeCvarServerInfo("ui_allow_mg34", "1");

	level.allow_fg42 = getCvar("scr_allow_fg42");
	if(level.allow_fg42 == "")
		level.allow_fg42 = "0";
	setCvar("scr_allow_fg42", level.allow_fg42);
	setCvar("ui_allow_fg42", level.allow_fg42);
	makeCvarServerInfo("ui_allow_fg42", "0");

	level.allow_panzerfaust = getCvar("scr_allow_panzerfaust");
	if(level.allow_panzerfaust == "")
		level.allow_panzerfaust = "1";
	setCvar("scr_allow_panzerfaust", level.allow_panzerfaust);
	setCvar("ui_allow_panzerfaust", level.allow_panzerfaust);
	makeCvarServerInfo("ui_allow_panzerfaust", "1");

	level.allow_bazooka = getCvar("scr_allow_bazooka");
	if(level.allow_bazooka == "")
		level.allow_bazooka = "1";
	setCvar("scr_allow_bazooka", level.allow_bazooka);
	setCvar("ui_allow_bazooka", level.allow_bazooka);
	makeCvarServerInfo("ui_allow_bazooka", "1");

	level.allow_panzerschreck = getCvar("scr_allow_panzerschreck");
	if(level.allow_panzerschreck == "")
		level.allow_panzerschreck = "1";
	setCvar("scr_allow_panzerschreck", level.allow_panzerschreck);
	setCvar("ui_allow_panzerschreck", level.allow_panzerschreck);
	makeCvarServerInfo("ui_allow_panzerschreck", "1");

	level.allow_flamethrower = getCvar("scr_allow_flamethrower");
	if(level.allow_flamethrower == "")
		level.allow_flamethrower = "1";
	setCvar("scr_allow_flamethrower", level.allow_flamethrower);
	setCvar("ui_allow_flamethrower", level.allow_flamethrower);
	makeCvarServerInfo("ui_allow_flamethrower", "1");

	level.allow_binoculars = getCvar("scr_allow_binoculars");
	if(level.allow_binoculars == "")
		level.allow_binoculars = "1";
	setCvar("scr_allow_binoculars", level.allow_binoculars);
	setCvar("ui_allow_binoculars", level.allow_binoculars);
	makeCvarServerInfo("ui_allow_binoculars", "1");

	level.allow_artillery = getCvar("scr_allow_artillery");
	if(level.allow_artillery == "")
		level.allow_artillery = "1";
	setCvar("scr_allow_artillery", level.allow_artillery);
	setCvar("ui_allow_artillery", level.allow_artillery);
	makeCvarServerInfo("ui_allow_artillery", "1");

	level.allow_satchel = getCvar("scr_allow_satchel");
	if(level.allow_satchel == "")
		level.allow_satchel = "1";
	setCvar("scr_allow_satchel", level.allow_satchel);
	setCvar("ui_allow_satchel", level.allow_satchel);
	makeCvarServerInfo("ui_allow_satchel", "1");

	level.allow_grenades = getCvar("scr_allow_grenades");
	if(level.allow_grenades == "")
		level.allow_grenades = "1";
	setCvar("scr_allow_grenades", level.allow_grenades);
	setCvar("ui_allow_grenades", level.allow_grenades);
	makeCvarServerInfo("ui_allow_grenades", "1");

	level.allow_smoke = getCvar("scr_allow_smoke");
	if(level.allow_smoke == "")
		level.allow_smoke = "1";
	setCvar("scr_allow_smoke", level.allow_smoke);
	setCvar("ui_allow_smoke", level.allow_smoke);
	makeCvarServerInfo("ui_allow_smoke", "1");


anyway, where it says "1" that means it is allowing the weapon so this is the bit you need to find.

i found it in the _teams.gsc just search for bazooka in your _teams.gsc and it should work and change where it says
Code:
	level.allow_bazooka = getCvar("scr_allow_bazooka");
	if(level.allow_bazooka == "")
		level.allow_bazooka = "0";
	setCvar("scr_allow_bazooka", level.allow_bazooka);
	setCvar("ui_allow_bazooka", level.allow_bazooka);


that is most likley what your says, so just change it to
Code:
	level.allow_bazooka = getCvar("scr_allow_bazooka");
	if(level.allow_bazooka == "")
		level.allow_bazooka = "1";
	setCvar("scr_allow_bazooka", level.allow_bazooka);
	setCvar("ui_allow_bazooka", level.allow_bazooka);
and that should work.
do the same thing for the others and it should work =)

Thanks, Ukdjaj[thumbs_up]
Share |
paulb39
General Member
Since: Jan 3, 2006
Posts: 492
Last: Oct 16, 2011
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Monday, Aug. 9, 2010 07:56 pm
Thanks, but I don't think you really understand my problem.

You seem to be saying if I do scr_allow_bazooka 1, it will put a bazooka in the weapon list, but all that does is allow bazookas in the game in general.

Same for fg42 and flamethrower, those cvars just allow them to be in game, that doesn't add them to the menu.

DemonSeed helped me do this for CoD1 (not UO)
I had an all weapon mod, he had every weapon, but he did not add a fg42 to the list (you can see thread here to see what I'm talking about)

I'm having the same problem here, the guy who made the mod lets you choose between all weapons except the fg42, flamethrower and bazooka. So I have to edit the files in the scriptmenus folder to add them, but I don't know how.
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoDUO Mapping
Posted: Tuesday, Aug. 10, 2010 08:36 am
ok then, what you have to do is first find the weapon file for the bazooka

should be called bazooka_mp and found in the folder weapons->mp

get that and put it in a .pk3

now precache the weapon by opening your _weapons.gsc, in maps/mp/gametypes and adding your weapon to where you want, so you add the line
Code:
precacheItem("BAZOOKA_MP");



now if you find your team_russian/german/american.gsc files add this line in:
Code:
execKey "8" { play "mouse_click"; scriptMenuResponse "BAZOOKA_MP"; }


then when you press "8" you will spawn with the bazooka, but you want it to show up so when you click it, it works so nowgive it its own "item definition"

Code:
itemDef 
 {
  name   "button_BAZOOKA_MP"
  visible   1
  rect   0 0 128 24
  origin   ORIGIN_CHOICE1
  forecolor  GLOBAL_UNFOCUSED_COLOR
  type   ITEM_TYPE_BUTTON
  text   "American Bazooka!
  textfont  UI_FONT_NORMAL
  textscale  GLOBAL_TEXT_SIZE
  textstyle  ITEM_TEXTSTYLE_SHADOWED
  textaligny  20
  dvartest  "ui_allow_BAZOOKA_MP"
  showDvar  { "1" }
  action
  {
   play "mouse_click";
   scriptMenuResponse "BAZOOKA_MP";
  }


and give it its weapon_info
Code:
itemDef
 {
  name   "BAZOOKA_MP_info"
  visible   0
  rect   0 0 128 10
  origin   ORIGIN_WEAPONACCURACY
  backcolor  1 1 1 .125
   style   WINDOW_STYLE_FILLED
  decoration
 }}


(these are not the only things you need to edit, edit the same things in weapon files and make sure you add the line to the other files

"hide bazooka_mp;" and to ONLY the bazooka one, "show bazooka_mp this should help you till demon seed comes back =)

but try to copy the code of what UO did in the .gsc, because my code might be slightly off =)

Thanks, Ukdjaj[thumbs_up]
Share |
paulb39
General Member
Since: Jan 3, 2006
Posts: 492
Last: Oct 16, 2011
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Tuesday, Aug. 10, 2010 02:13 pm
Those are the things I tried, and I got it to appear in the list, but when I select it, it just says "unknown weapon selected"
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoDUO Mapping
Posted: Tuesday, Aug. 10, 2010 02:33 pm
hmm, try copying the mp44 weapon file and rename it to bazooka_mp and if it loads up with the mp44 that means that its the weapon file thats wrong
Share |
paulb39
General Member
Since: Jan 3, 2006
Posts: 492
Last: Oct 16, 2011
[view latest posts]
Level 5
Category: CoDUO Mapping
Posted: Tuesday, Aug. 10, 2010 03:31 pm
ukdjaj writes...
Quote:
hmm, try copying the mp44 weapon file and rename it to bazooka_mp and if it loads up with the mp44 that means that its the weapon file thats wrong


Shows the bazooka, I click it, it says unknown weapon.
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoDUO Mapping
Posted: Tuesday, Aug. 10, 2010 06:12 pm
still with the mp44 weapon file? then it must be a error you have made in one of the .gsc's. go back and pick out a weapon (say mp44) and make sure in each file where the mp44 is mentioned, you copy that and mention the bazooka (pick out a weapon from all teams and do the same thing) if that doesn't work, i dont know sorry

Thanks, Ukdjaj[thumbs_up]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»