Weapon Trader - waw
Weapon Trader gives you the ability to trade weapons with the weapon on the table that you or another player has put there.
Here is a script with a prefab that only has a trigger and tag_origin, with the right kvps for the script, to get you started. You can place this prefab in your map as many times as you like, on a table or bench, or where ever.
Updates:
v1.1 changes getweaponlist() to GetWeaponsListPrimaries()
v1.2 isolated redundant statements to a TradeWeapons() function
current weapon is grenade statement is not necessary, but left it in
linked the trigger to its target (gun) for multiple placement
added suport for two triggers per gun in case it falls upside down
added player.revivetrigger condition recommended by DidUknowiPwn
v1.3 changed it so you can swap the same weapon now (swaps your ammo count)
Simply
Download MC_weapon_trader_v1.3.rar
Extract the files.
Put the _mc_weapon_trade.gsc in your root/mods/nazi_zombie_mapname/maps/ folder
Copy the _prefabs folder to your root/map_source/ folder
Insert the prefab in your map, on a table or something, as many times as you like.
Open your nazi_zombie_mapname.gsc and find the following:
maps\_zombiemode::main();
and put maps\_mc_weapon_trade::init(); under it like this:
maps\_zombiemode::main(); maps\_mc_weapon_trade::init();
Compile your map and build your mod.
You can edit the starting weapon and cost to trade by editing the following in the init() function:
startingWeapon = "kar98k"; //change this to be the first weapon on trade table cost = 0; //change this to cost something to trade, i.e. 250, 750
Ammo and clip size will be tracked as you trade.