Author |
Topic: Custom weapons preset in custom maps. |
|
|
AkimoA |
General Member Since: Jun 17, 2006 Posts: 20 Last: Apr 25, 2009 [view latest posts] |
|
|
Category: CoDUO Mapping Posted: Monday, Aug. 13, 2007 04:59 pm |
|
It is possible but why just let them lay around in maps why no add them to the menu so people can choose them from there
In my mod at the moment you got 37 weapons to choose from
yes you saw rite :P 37
done by menu and alternative weapon mode
Just workin on a 4th menu wich has another 7 weapons in it to choose from wich is a baseball bat a katana sword a shuriken ninja star a battle axe a and and.....
have alook
Server IP :193.47.83.220:28936 =[GKM]=GERMANKRAUTMODV2.Main--Server--
P.s New Weapons not on it yet But a lot others
Alternative weapon Mode Button Default M is very important in it
edited on Aug. 13, 2007 01:01 pm by AkimoA |
|
|
|
|
|
|DA|DarkDilbert |
|
General Member Since: Jun 5, 2006 Posts: 675 Last: Apr 29, 2008 [view latest posts] |
|
|
Category: CoDUO Mapping Posted: Monday, Aug. 13, 2007 09:28 pm |
|
yeah it's possible
this was a serverside mod i made for badbreizh2 making people spawn with non standard weapons, and putting a new weapon on the map. weapons/models that don't appear on the weapons menu, or in the bsp, i think have to be precached
Code: main()
{
setCullFog (0, 10500, .32, .36, .40, 0);
ambientPlay("ambient_badbreizh");
maps\mp\_load::main();
maps\mp\mp_dawnville_fx::main();
maps\mp\_moulin_1::main();
precacheModel("xmodel/w_us_spw_binocular_view");
precacheModel("xmodel/w_us_spw_binocular_world");
thread weapons1();
thread spawn_weapon(classname,targetname,ammo,origin,angles,flags);
bin1s = spawn_weapon("mpweapon_nippybins","binnyhell1",1,(2425, -395, -271),(0, 58, 0),8);
game["allies"] = "american";
game["axis"] = "german";
game["american_soldiertype"] = "airborne";
game["american_soldiervariation"] = "commando";
game["german_soldiertype"] = "wehrmacht";
game["german_soldiervariation"] = "normal";
}
weapons1()
{
while(1)
{
players = getentarray("player", "classname");
for(p=0;p<players.size;p++)
{
if(!isdefined(players[p].setup))
players[p] thread Spamup1();
}
wait .5;
}
}
Spamup1()
{
self.setup = 1;
while(isdefined(self))
{
self waittill ("spawned");
wait .5;
self giveWeapon("flamethrower_mp");
self giveMaxAmmo("flamethrower_mp");
self giveWeapon("satchelcharge_mp");
}
}
spawn_weapon(classname,targetname,ammo,origin,angles,flags)
{
if (!isdefined(classname) || !isdefined(targetname) || !isdefined(origin))
return undefined;
if (!isdefined(angles)) angles = (0,0,0);
if (!isdefined(ammo)) ammo = 100;
if (!isdefined(flags)) flags = 0;
weapon = spawn (classname,origin,flags);
weapon.targetname = targetname;
weapon.count = ammo;
weapon.angles = angles;
return weapon;
}
|
|
|
|
|
|
Bloodlust |
General Member Since: Apr 7, 2004 Posts: 101 Last: Jan 14, 2015 [view latest posts] |
|
|
|
|
|
|DA|DarkDilbert |
|
General Member Since: Jun 5, 2006 Posts: 675 Last: Apr 29, 2008 [view latest posts] |
|
|
Category: CoDUO Mapping Posted: Tuesday, Aug. 14, 2007 12:55 am |
|
Mpz writes...Quote: Can't seem to find the map, Do you have a link so I can take a look at it?
Also, how did you get your custom weapons in the map through the map maker?
you don't need the map, you just need the threads for
spawn_weapon(classname,targetname,ammo,origin,angles,flags);
and details for what weapons you want to spawn in the map
eg
bin1s = spawn_weapon("mpweapon_nippybins","binnyhell1",1,(2425, -395, -271),(0, 58, 0),8);
this way you don't need to compile them into a map - add the code to any map's gsc (even stock maps) and that weapon will spawn at the coordinates you set, and will only affect the maps whose gsc you've edited
edited on Aug. 13, 2007 08:56 pm by |DA|DarkDilbert |
|
|
|
Bloodlust |
General Member Since: Apr 7, 2004 Posts: 101 Last: Jan 14, 2015 [view latest posts] |
|
|
|
|
|