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

Members Online

»
0 Active | 50 Guests
Online:

LATEST FORUM THREADS

»
Medal Of Honor
CoD4 SP Mapping
Deleting enemy corpses
CoD4 SP Mapping
Dynamic materials
CoD2 General

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 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access
Page
Next Page
subscribe
Author Topic: how do i make a cod4 custom map use certain weapons
Pinball
General Member
Since: Jun 19, 2005
Posts: 61
Last: Jul 17, 2017
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Tuesday, Jun. 27, 2017 12:08 pm
attachment: image(34.8Kb)
My clan has a map on the server that uses the shotgun, handgun and knife only. I can't find anything anywhere on how to do this, I need help please. The map on our server is called " mp_sgpko_arena "
Share |
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 256
Last: Sep 9, 2017
[view latest posts]
Level 5
Category: CoD4 MP Mapping
Posted: Thursday, Jun. 29, 2017 06:10 am
It's a mod, not a map
Share |
Pinball
General Member
Since: Jun 19, 2005
Posts: 61
Last: Jul 17, 2017
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Thursday, Jun. 29, 2017 07:37 am
I don't think so, because it's the only map on the server that you can only use a shotgun, hand gun and a knife. If it was a mod every map on the server would be the same way.
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Sunday, Jul. 2, 2017 11:34 am
This map script should do the trick, not tested though.

Code:

main()
{
	// usual map stuff
	
	thread onPlayerConnect();
}

onPlayerConnect()
{
	while(1)
	{
		level waittill("connected", player);
		player thread onPlayerSpawn();
	}
}

onPlayerSpawn()
{
	self endon("disconnect");
	while(1)
	{
		self waittill("spawn");
		wait 0.05; // Wait for game spawn scripts to do their thing
		if(self.sessionstate == "playing") // Make sure we're still alive
		{
			self takeAllWeapons();
			self giveWeapon("shotgun_mp");
			self giveWeapon("handgun_mp");
		}
	}
}


Change shotgun_mp and handgun_mp to the weapons you want to give the player.
Share |
Pinball
General Member
Since: Jun 19, 2005
Posts: 61
Last: Jul 17, 2017
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Sunday, Jul. 2, 2017 03:27 pm
ok, where does this script go?
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Sunday, Jul. 2, 2017 03:45 pm
Use it as the script that goes with your map, it's the one called (your map name).gsc in raw/maps/mp/

Replace the '// usual map stuff' section with the code from the original .gsc that defines what teams your map uses (spetsnaz etc).
Share |
Pinball
General Member
Since: Jun 19, 2005
Posts: 61
Last: Jul 17, 2017
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Sunday, Jul. 2, 2017 09:06 pm
Is this right? I did what you said and it's not working.
----------------------
main()
{
//maps\mp\mp_backlot_fx::main();
//maps\createart\mp_backlot_art::main();
maps\mp\_load::main();

//maps\mp\_compass::setupMiniMap("compass_map_mp_arc_arena");

//setExpFog(500, 2200, 0.81, 0.75, 0.63, 0);
VisionSetNaked( "mp_small_lot" );
ambientPlay("ambient_backlot_ext");

game["allies"] = "marines";
game["axis"] = "opfor";
game["attackers"] = "axis";
game["defenders"] = "allies";
game["allies_soldiertype"] = "desert";
game["axis_soldiertype"] = "desert";

setdvar( "r_specularcolorscale", "1" );

setdvar("r_glowbloomintensity0",".25");
setdvar("r_glowbloomintensity1",".25");
setdvar("r_glowskybleedintensity0",".3");
setdvar("compassmaxrange","1800");

thread onPlayerConnect();
}

onPlayerConnect()
{
while(1)
{
level waittill("connected", player);
player thread onPlayerSpawn();
}
}

onPlayerSpawn()
{
self endon("disconnect");
while(1)
{
self waittill("spawn");
wait 0.05; // Wait for game spawn scripts to do their thing
if(self.sessionstate == "playing") // Make sure we're still alive
{
self takeAllWeapons();
self giveWeapon("m1014_mp");
self giveWeapon("deserteagle_mp");
}
}
}
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Monday, Jul. 3, 2017 03:55 am
Oops, I used "spawn" instead of "spawned", this should do it:

Code:

main()
{
	//maps\mp\mp_backlot_fx::main();
	//maps\createart\mp_backlot_art::main();
	maps\mp\_load::main();

	//maps\mp\_compass::setupMiniMap("compass_map_mp_arc_arena");

	//setExpFog(500, 2200, 0.81, 0.75, 0.63, 0);
	VisionSetNaked( "mp_small_lot" );
	ambientPlay("ambient_backlot_ext");

	game["allies"] = "marines";
	game["axis"] = "opfor";
	game["attackers"] = "axis";
	game["defenders"] = "allies";
	game["allies_soldiertype"] = "desert";
	game["axis_soldiertype"] = "desert";

	setdvar( "r_specularcolorscale", "1" );

	setdvar("r_glowbloomintensity0",".25");
	setdvar("r_glowbloomintensity1",".25");
	setdvar("r_glowskybleedintensity0",".3");
	setdvar("compassmaxrange","1800");
	
	thread onPlayerConnect();
}

onPlayerConnect()
{
	while(1)
	{
		level waittill("connected", player);
		player thread onPlayerSpawn();
	}
}

onPlayerSpawn()
{
	self endon("disconnect");
	while(1)
	{
		self waittill("spawn");
		wait 0.05; // Wait for game spawn scripts to do their thing
		if(self.sessionstate == "playing") // Make sure we're still alive
		{
			self takeAllWeapons();
			self giveWeapon("m1014_mp");
			self giveWeapon("deserteagle_mp");
		}
	}
}
Share |
Pinball
General Member
Since: Jun 19, 2005
Posts: 61
Last: Jul 17, 2017
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Monday, Jul. 3, 2017 05:59 am
Still not working.[confused][banghead]
Share |
Pinball
General Member
Since: Jun 19, 2005
Posts: 61
Last: Jul 17, 2017
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Friday, Jul. 7, 2017 02:47 pm
Does anyone else have any ideas?
Share |
Restricted Access Restricted Access
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP 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

»