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 › Problem with custom spawns

Problem with custom spawns

Posts 1–7 of 7 · Page 1 of 1
prisma
prisma
Problem with custom spawns
[php]doSpawn()
{
if(getDvar("mapname") == "mp_checkpoint")
{
if(self.team == "allies")
{
self.randomspawn = randomInt(6);
if(self.randomspawn == 0) {
self SetOrigin((-3404,-1626,424)); }
if(self.randomspawn == 1) {
self SetOrigin((-3881,-440,424)); }
if(self.randomspawn == 2) {
self SetOrigin((-2919,-466,360)); }
if(self.randomspawn == 3) {
self SetOrigin((-3237,-247,360)); }
if(self.randomspawn == 4) {
self SetOrigin((-3230,-488,632)); }
if(self.randomspawn == 5) {
self SetOrigin((-2979,-454,496)); }
}

if(self.team == "axis")
{
self.randomspawn = randomInt(6);
if(self.randomspawn == 0) {
self SetOrigin((-2564,903,584)); }
if(self.randomspawn == 1) {
self SetOrigin((-2508,851,189)); }
if(self.randomspawn == 2) {
self SetOrigin((-3121,1132,312)); }
if(self.randomspawn == 3) {
self SetOrigin((-3611,888,224)); }
if(self.randomspawn == 4) {
self SetOrigin((-3915,1007,632)); }
if(self.randomspawn == 5) {
self SetOrigin((-2849,1055,488)); }
}
}
}

onPlayerSpawned()
{
self endon("disconnect");
self waittill("spawned_player");
self thread doSpawn();
}[/php]

That's my code....
My problem is that the players do spawn exactly 1time how I want them to spawn and after they died once they spawn how they normally spawn.
How can i fix this ?
#1 · edited 15y ago · 15y ago
TheSaboteur
TheSaboteur
i can help u i think =D

i had the problem to
cuz i deleted :

Code:
for(;;)
Code:
onPlayerSpawned()
{
    self endon("disconnect");

{
for(;;)
    self waittill("spawned_player");
    self thread doSpawn();
}  
}
thanks if it helped =D
#2 · 15y ago
prisma
prisma
Edit: Got it working now... Thanks TheSaboteur

Got another problem...
The first time a player spawns he spawns at the normal coordinates, untill he died onetime he spawns how i want him to spawn every time... How can I fix this ?
#3 · edited 15y ago · 15y ago
master131
[MPGH]master131
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");
        self thread doSpawn();
    }
}
#4 · 15y ago
Blubb1337
Blubb1337
Oh isn't it solved? <_>

/unsolved then <_<
#5 · edited 15y ago · 15y ago
prisma
prisma
Quote Originally Posted by master131 View Post
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");
        self thread doSpawn();
    }
}
Already got that... But the first time every player spawns how they normally do, after they died once or switched the Team they spawn how I want them to spawn...

ps: How can i force change the Team?
something like
Code:
If(self.team==Allies)
{self setTeam=axis
}
(except of all the mistakes x))
#6 · edited 15y ago · 15y ago
mathieutje12
mathieutje12
put it this in onPlayerConnect()

player thread doSpawn();
#7 · 15y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • Help with custom spawnsBy oktane in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    5Last post 15y ago
  • Help with custom spawnsBy apache-wd-forum in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    15Last post 15y ago
  • Problem(with login)By 22061988 in WarRock - International Hacks
    3Last post 19y ago
  • Problem With The New Pb Hw Ban Spoofer!By naomelembro14 in WarRock - International Hacks
    5Last post 19y ago
  • Problem with trainers mades for CE, help me plsBy juanitobalde in General Game Hacking
    0Last post 19y ago

Tags for this Thread

None