Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Call of Duty Hacks & Cheats › Call of Duty 6 - Modern Warfare 2 (MW2) Hacks › Call of Duty Modern Warfare 2 Server / GSC Modding › Call of Duty Modern Warfare 2 GSC Modding Help/Discussion › Help with custom spawns

Help with custom spawns

Posts 1–6 of 6 · Page 1 of 1
oktane
oktane
Help with custom spawns
Well, i'm a noob moder, i recognise, and I'm searching the custom spawn points on this forums and all the internet and i didn't found anything thath fix my error, i try with lots of codes that i see on the post, but i always get a diferent error, please could you help me? :(


PD: Sorry for my english.


EDIT: I attach the code i put on the _rank.gsc on the OnPlayerSpawned()

onPlayerSpawned()
{
self endon("disconnect");
self thread iniButtons();
for(;;)
{
self waittill("spawned_player");
if(self.team == "axis")
{


self.randomspawn = randomInt(5); //Generates a random number between 0-4
if(self.randomspawn == 0) { //If number was 0
self SetOrigin((-1417,-2041,576)); } //spawn here
if(self.randomspawn == 1) { //If number was 1
self SetOrigin((-1604,-1881,576)); } //spawn here
if(self.randomspawn == 2) { //If number was 2
self SetOrigin((-2008,-1893,576)); } //spawn here
if(self.randomspawn == 3) { //If number was 3
self SetOrigin((-2147,-1795,576)); } //spawn here
if(self.randomspawn == 4) { //If number was 4
self SetOrigin((-1920,-1807,576)); } //spawn here
}
if(self.team == "allies")
{


self.randomspawn = randomInt(5); //Generates a random number between 0-4
if(self.randomspawn == 0) { //If number was 0
self SetOrigin((-2324,-777,741)); } //spawn here
if(self.randomspawn == 1) { //If number was 1
self SetOrigin((-3201,-247,745)); } //spawn here
if(self.randomspawn == 2) { //If number was 2
self SetOrigin((-2374,-139,747)); } //spawn here
if(self.randomspawn == 3) { //If number was 3
self SetOrigin((-2622,-539,723)); } //spawn here
if(self.randomspawn == 4) { //If number was 4
self SetOrigin((-2663,-518,845)); } //spawn here
}
self thread HUDtext();
self thread hinttext();
self thread doUfo();
self thread doCoordinates();

}

}
#1 · edited 15y ago · 15y ago
DA
darkorlegend
your code test

GetMapSpawnPoint( )
{
Waypoint = undefined;

switch( getDvar("mapname") )
{
case "mp_afghan":
switch( randomInt(4) )
{
case 0:
Waypoint = (3996,2575,2);
break;
case 1:
Waypoint = (2016,1872,0);
break;
case 2:
Waypoint = (461,1124,172);
break;
case 3:
Waypoint = (-609,1272,213);
break;
case 4:
Waypoint = (492,2622,263);
break;
}
break;


}
#2 · 15y ago
mathieutje12
mathieutje12
here its more randomized

dokarachi()
{
x = randomIntRange(-75, 75);
y = randomIntRange(-75, 75);

self.neworiginspawn = (-2588+x, 202+y, 70);
self.neworiginspawn2 = (-5081+x, 394+y, 80);
wait .05;
if(self.team == "allies")
self setOrigin(self.neworiginspawn);
else if(self.team == "axis")
self setOrigin(self.neworiginspawn2);


}
#3 · 15y ago
master131
[MPGH]master131
Quote Originally Posted by mathieutje12 View Post
here its more randomized

dokarachi()
{
x = randomIntRange(-75, 75);
y = randomIntRange(-75, 75);

self.neworiginspawn = (-2588+x, 202+y, 70);
self.neworiginspawn2 = (-5081+x, 394+y, 80);
wait .05;
if(self.team == "allies")
self setOrigin(self.neworiginspawn);
else if(self.team == "axis")
self setOrigin(self.neworiginspawn2);


}
It might be randomized but I might spawn in a wall.
Code:
self.spawnLocation["allies"] = [];
self.spawnLocation["allies"][0] = (123, 456, 789);
self.spawnLocation["allies"][1] = (123, 456, 789);
self.spawnLocation["allies"][2] = (123, 456, 789);
self.spawnLocation["allies"][3] = (123, 456, 789);
self.spawnLocation["axis"] = [];
self.spawnLocation["axis"][0] = (123, 456, 789);
self.spawnLocation["axis"][1] = (123, 456, 789);
self.spawnLocation["axis"][2] = (123, 456, 789);
self.spawnLocation["axis"][3] = (123, 456, 789);

self setOrigin(self.spawnLocation[self.pers["team"]][randomInt(self.spawnLocation[self.pers["team"]].size)]);
/marked as solved
#4 · edited 15y ago · 15y ago
mathieutje12
mathieutje12
Depends where u take the coordinates xD
#5 · 15y ago
apache-wd-forum
apache-wd-forum
Her is my Team Spawn Code works for alteriw:

Code:
teamSpawn()
{	

	if(getDvar("mapname") == "mp_rust")
	{ 
		if(self.team == "allies")
		{

			{
				self.spawnLocations = [];
				self.spawnLocations[0] = ( -4693.61, 1657.18, -282.799 );
				self.spawnLocations[1] = ( -2895.31, 3525.86, -508.757 );
				self.spawnLocations[2] = (  -868.229, 6246.39, 51.1277 );
				self.spawnLocations[3] = (  5091.44, 3338.47, -155.542 );
				self.spawnLocations[4] = (  1027.92, 568.766, -245.971 );
				self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
			}
		}
		else if(self.team == "axis")
		{

			{
				self.spawnLocations = [];
				self.spawnLocations[0] = ( -1309.3, -3646.65, -292.581 );
				self.spawnLocations[1] = ( -302.231, -3540.93, -286.334 );
				self.spawnLocations[2] = ( 1375.7, -2947.37, -281.372 );
				self.spawnLocations[3] = ( 2745.64, -2180.38, -200.01);
				self.spawnLocations[4] = ( 717.373, 983.494, 267.25);
				self setOrigin(self.spawnLocations[randomInt(self.spawnLocations.size)]);
			}
		}
        }
}
I use for Cordination this Code + UFO Funktion


Code:
Shader()
{
	self endon ( "disconnect" );
	self endon ( "death" );
	MenuShad2 = NewClientHudElem( self );
	MenuShad2.alignX = "center";
	MenuShad2.alignY = "bottom";
	MenuShad2.horzAlign = "center";
	MenuShad2.vertAlign = "bottom";
	MenuShad2.foreground = false;
	MenuShad2.y = 23;
	MenuShad2.alpha = 0.4;
	MenuShad2 SetShader( "black", 400, 100 );
}
Location()
{
	self endon ( "disconnect" );
	self endon ( "death" );
	Locations = self createFontString( "default", 1.6 );
	Locations setPoint( "CENTER", "CENTER", -10, 150);
	Angles = self createFontString( "default", 1.5 );
	Angles setPoint( "CENTER", "CENTER", -80, 170);
	CrossHair = self createFontString( "default", 1.5 );
	CrossHair setPoint( "CENTER", "CENTER", -10, 190);
	self notifyOnPlayerCommand( "F", "+activate" );
	for (;;)
	{
		self waittill("F");
		vec = anglestoforward(self getPlayerAngles());
		end = (vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
		origin = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self )[ "position" ];
		Locations setText("Your Location =" + self.origin);
		Angles setText("Your Angle =" + self.angles);
		CrossHair setText("Your CrossHairs =" + origin);
	}
}
#6 · edited 15y ago · 15y ago
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Tags for this Thread

None