New Weapons


(VTX-aussie) #1

RRRRRRRRRR… :(:frowning: I had New Weapons… By mistake deleted source and now trying to get my weapons back… BUT here is the thing… everytime i goto select my weapon From the soldier Bank it comes up with could not find Weapon 5
This is the Code that i had working Which had the modle to spawn but no actions to go with it i just want to know what i havnt done this time round to not make it work.

OK this is what i have compiled

This in bg_misc…


// bismarck FG42 Model information     
/*QUAKED weapon_fg42 (.3 .3 1) (-16 -16 -16) (16 16 16) SUSPENDED SPIN - RESPAWN
-------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
model="models/weapons2/fg42/fg42.md3"
*/
     {
          "weapon_fg42", 
          "sound/misc/w_pkup.wav",
{     "models/weapons2/fg42/fg42.md3", 
               "models/weapons2/fg42/v_fg42.md3", 
               "models/weapons2/fg42/pu_fg42.md3", 
               0, 0 },

          "icons/iconw_mauser_1",     // icon
               "icons/ammo5",          // ammo icon
          "FG42 Paratroop Rifle",          // pickup
          10,
          IT_WEAPON,
          WP_FG42,
          WP_MAUSER,
          WP_FG42,
          "",                         // precache
          "",                         // sounds
          {0,0,0,0}
     }, 

This is the code for the model of the weapon I THINK
But i am not sure on where i have to place it does it matter? as long as it is with the rest of the others?

where the


	{ WP_FLAMETHROWER,		"Flamethrower",				PT_RIFLE,					"mp_weapon",	10, "ui_mp/assets/weapon_flamethrower.tga","stand_machinegun",		"stand_machinegun", "limbo_flame" },

under it i placed


     { WP_FG42,                    "^1FG42^7",                              PT_LIGHTONLY | PT_RIFLE,     "mp_weapon",     14, "ui_mp/assets/weapon_fg42.tga",               "relaxed_idle_2h_1",     "relaxed_idle_2h_1", "limbo_fg42" },

where the 14 is that is where u assign the case number
so i put this in g_client.c where the soldier weapon choosing is.


			case 14:	// WP_FG42
				if ( pc != PC_SOLDIER )
					return;

				COM_BitSet( client->ps.weapons, WP_FG42 );
				client->ps.ammoclip[BG_FindAmmoForWeapon(WP_FG42)] = 200;
				client->ps.weapon = WP_FG42;
				break;

Just a copy from flamethrower no reloading yet.
And went around the code adding anything that i thought that WP_THOMPSON might of used and added in WP_FG42 where thought was needed.

Ok then Made a PAK file where the MDC files where needed.
so i made one contain the FG42 files from PAK0.pak and copied all the files from that (not really needed just the fg42 ones.) Then added them into a pak. so i copied all the ones from the directory models/weapons2/ look at the moddel code above to get what i mean by the path.

And thats what i think i did What am i doing wrong now? Do i have to define something?
add in WP_FG42 somewhere? is my moddle direction wrong Please help if someone magages to get it to work please let us know…


(dutchmeat) #2

how ?


(VTX-aussie) #3

www.planetquake.com/code3arena

and look at the tutorial for adding a flamethrower


(drover700) #4

(being lame)
did u delete it like a file (i have no idea wat ur doin really)
if u did check the recylcling bin.
if im right cool.
if im wrong, dont slap me for bein an idiot.


(kamikazee) #5

Wow, a :bump: - reply!