ItsMods

Full Version: Problem with spawn
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
SPECIAL FOR SuperNovaAO.
THE TOPIC THAT IS STARTED BY ~ME~.

Quote:Hey, guyz, I'm making my mod DefendTheHouse and I need to make ALL the players (2 teams) to have their own base, only one spawn point for each team. for example nuketown. How to make one team ALWAYS spawn near green&white house and another nearby yellow house?

it seems that i need to use _globallogic_spawn.gsc but i dunno how. requesting for help...


THNX Big Grin

there, in that thread, Ivankec said that he needed coordinates, but i asked him for code. still silence.
cant remeber where its posted and i am rly too lazy to look into the gsc file(s).
come on, find few mins to look there. i can even give you _globallogic_spawn.gsc here it is
PHP Code:
#include common_scripts\utility;
#include maps\mp\_utility;

TimeUntilSpawnincludeTeamkillDelay )
{
    if ( 
level.inGracePeriod && !self.hasSpawned )
        return 
0;
    
    
respawnDelay 0;
    if ( 
self.hasSpawned )
    {
        
result self [[level.onRespawnDelay]]();
        if ( 
isDefinedresult ) )
            
respawnDelay result;
        else
        
respawnDelay GetDvarInt"scr_" level.gameType "_playerrespawndelay" );
            
        if ( 
includeTeamkillDelay && self.teamKillPunish )
            
respawnDelay += mapsmpgametypes_globallogic_player::TeamKillDelay();
    }

    
waveBased = (GetDvarInt"scr_" level.gameType "_waverespawndelay" ) > 0);

    if ( 
waveBased )
        return 
self TimeUntilWaveSpawnrespawnDelay );
    
    return 
respawnDelay;
}


maySpawn()
{
    if ( 
isDefinedlevel.maySpawn ) && !( self [[level.maySpawn]]() ) )
    {
        return 
false;
    }
    
    if ( 
level.inOvertime )
        return 
false;

    if ( 
level.numLives )
    {
        if ( 
level.teamBased )
            
gameHasStarted = ( level.everExisted"axis" ] && level.everExisted"allies" ] );
        else
            
gameHasStarted = (level.maxPlayerCount 1) || ( !isOneRound() && !isFirstRound() );

        if ( !
self.pers["lives"] && gameHasStarted )
        {
            return 
false;
        }
        else if ( 
gameHasStarted )
        {
            
// disallow spawning for late comers
            
if ( !level.inGracePeriod && !self.hasSpawned && !level.wagerMatch )
                return 
false;
        }
    }
    return 
true;
}

TimeUntilWaveSpawnminimumWait )
{
    
// the time we'll spawn if we only wait the minimum wait.
    
earliestSpawnTime gettime() + minimumWait 1000;
    
    
lastWaveTime level.lastWave[self.pers["team"]];
    
waveDelay level.waveDelay[self.pers["team"]] * 1000;
    
    if( 
waveDelay == )
        return 
0;
    
    
// the number of waves that will have passed since the last wave happened, when the minimum wait is over.
    
numWavesPassedEarliestSpawnTime = (earliestSpawnTime lastWaveTime) / waveDelay;
    
// rounded up
    
numWaves ceilnumWavesPassedEarliestSpawnTime );
    
    
timeOfSpawn lastWaveTime numWaves waveDelay;
    
    
// avoid spawning everyone on the same frame
    
if ( isdefinedself.waveSpawnIndex ) )
        
timeOfSpawn += 50 self.waveSpawnIndex;
    
    return (
timeOfSpawn gettime()) / 1000;
}

stopPoisoningAndFlareOnSpawn()
{
    
self endon("disconnect");

    
self.inPoisonArea false;
    
self.inBurnArea false;
    
self.inFlareVisionArea false;
    
self.inGroundNapalm false;
}
    

spawnPlayer()
{
    
pixbeginevent"spawnPlayer_preUTS" );

    
self endon("disconnect");
    
self endon("joined_spectators");
    
self notify("spawned");
    
level notify("player_spawned");
    
self notify("end_respawn");

    
self setSpawnVariables();
    
    if (!
self.hasSpawned)
    {
        
//if this is the first spawn, kicking off a thread to start the gamplay music 
        
self thread sndStartMusicSystem ();
    }
    
    if ( 
level.teamBased )
        
self.sessionteam self.team;
    else
    {
        
self.sessionteam "none";
        
self.ffateam self.team;
    }

    
hadSpawned self.hasSpawned;

    
self.sessionstate "playing";
    
self.spectatorclient = -1;
    
self.killcamentity = -1;
    
self.archivetime 0;
    
self.psoffsettime 0;
    
self.statusicon "";
    
self.damagedPlayers = [];
    if ( 
GetDvarInt#"scr_csmode" ) > 0 )
        
self.maxhealth GetDvarInt#"scr_csmode" );
    
else
        
self.maxhealth mapsmpgametypes_tweakables::getTweakableValue"player""maxhealth" );
    
self.health self.maxhealth;
    
self.friendlydamage undefined;
    
self.hasSpawned true;
    
self.spawnTime getTime();
    
self.afk false;
    if ( 
self.pers["lives"] && ( !isDefinedlevel.takeLivesOnDeath ) || ( level.takeLivesOnDeath == false ) ) )
    {
        
self.pers["lives"]--;
        if ( 
self.pers["lives"] == )
                
level notify"player_eliminated" );
    }
    
self.lastStand undefined;
    
self.revivingTeammate false;
    
self.burning undefined;

    
self.disabledWeapon 0;
    
self resetUsability();
    
    
self.diedOnVehicleundefined;

    if ( !
self.wasAliveAtMatchStart )
    {
        if ( 
level.inGracePeriod || mapsmpgametypes_globallogic_utils::getTimePassed() < 20 1000 )
            
self.wasAliveAtMatchStart true;
    }
    
    
//self clearPerks();

//    self setClientDvar( "cg_thirdPerson", "0" );
    
self setDepthOfField005125124);
    if( 
level.console )    
        
self setClientDvar"cg_fov""65" );
    
    
    {
        
pixbeginevent("onSpawnPlayer");
        if ( 
IsDefinedlevel.onSpawnPlayerUnified 
            && 
GetDvarInt#"scr_disableunifiedspawning" ) == 0 )
        
{
            
self [[level.onSpawnPlayerUnified]]();
        }
        else
        {
            
self [[level.onSpawnPlayer]]();
        }
        
        if ( 
IsDefinedlevel.playerSpawnedCB ) )
        {
            
self [[level.playerSpawnedCB]]();
        }
        
pixendevent();
    }
    
    
    
self mapsmpgametypes_missions::playerSpawned();
    
    
    
pixendevent"END: spawnPlayer_preUTS" );

    
level thread mapsmpgametypes_globallogic::updateTeamStatus();
    
    
pixbeginevent"spawnPlayer_postUTS" );
    
    
self thread stopPoisoningAndFlareOnSpawn();

    
self StopBurning();
    
    
assertmapsmpgametypes_globallogic_utils::isValidClassself.class ) );
    
    
self mapsmpgametypes_class::setClassself.class );
    
self mapsmpgametypes_class::giveLoadoutself.teamself.class );
    
    if ( 
level.inPrematchPeriod )
    {
        
self freeze_player_controlstrue );
        
//self _disableWeapon();
        
        
self setClientDvar"scr_objectiveText"mapsmpgametypes_globallogic_ui::getObjectiveHintTextself.pers["team"] ) );            

        
team self.pers["team"];
    
//CDC New music system        
        
if( isDefinedself.pers["music"].spawn ) && self.pers["music"].spawn == false )
        {
            
            if (
level.wagerMatch)
            {
                
music "SPAWN_WAGER";
            }
            else 
            {
                
music game["music"]["spawn_" team];
            }
            
self thread mapsmpgametypes_globallogic_audio::set_music_on_playermusicfalsefalse );
            
            
self.pers["music"].spawn true;
        }
        
        if ( 
level.splitscreen )
        {
            if ( 
isDefinedlevel.playedStartingMusic ) )
                
music undefined;
            else
                
level.playedStartingMusic true;
        }

    
//    thread maps\mp\gametypes\_hud_message::oldNotifyMessage( game["strings"][team + "_name"], undefined, game["icons"][team], game["colors"][team], music );
        
thread mapsmpgametypes_hud_message::oldNotifyMessagegame["strings"][team "_name"], undefinedgame["icons"][team], game["colors"][team] );
            if ( 
isDefinedgame["dialog"]["gametype"] ) && (!level.splitscreen || self == level.players[0]) )
        {
            if( !
isDefinedlevel.inFinalFight ) || !level.inFinalFight )
            {
                if( 
level.hardcoreMode )
                    
self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer"gametype_hardcore" );
                else
                    
self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer"gametype" );
            }
        }

        
thread mapsmpgametypes_hud::showClientScoreBar5.0 );
    }
    else
    {
        
self freeze_player_controlsfalse );
        
self enableWeapons();
        if ( !
hadSpawned && game["state"] == "playing" )
        {
            
pixbeginevent("sound");
            
team self.team;
            
//CDC New music system TODO add short spawn music
            
if( isDefinedself.pers["music"].spawn ) && self.pers["music"].spawn == false )
            {
                
self thread mapsmpgametypes_globallogic_audio::set_music_on_player"SPAWN_SHORT"falsefalse );
                
self.pers["music"].spawn true;
            }        
            if ( 
level.splitscreen )
            {
                if ( 
isDefinedlevel.playedStartingMusic ) )
                    
music undefined;
                else
                    
level.playedStartingMusic true;
            }
            
            
thread mapsmpgametypes_hud_message::oldNotifyMessagegame["strings"][team "_name"], undefinedgame["icons"][team], game["colors"][team] );
            if ( 
isDefinedgame["dialog"]["gametype"] ) && (!level.splitscreen || self == level.players[0]) )
            {
                if( !
isDefinedlevel.inFinalFight ) || !level.inFinalFight )
                {
                    if( 
level.hardcoreMode )
                        
self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer"gametype_hardcore" );
                    else
                        
self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer"gametype" );

                    if ( 
team == game["attackers"] )
                        
self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer"offense_obj""introboost" );
                    else
                        
self mapsmpgametypes_globallogic_audio::leaderDialogOnPlayer"defense_obj""introboost" );
                }
            }

            
self setClientDvar"scr_objectiveText"mapsmpgametypes_globallogic_ui::getObjectiveHintTextself.pers["team"] ) );            
            
thread mapsmpgametypes_hud::showClientScoreBar5.0 );
            
pixendevent("sound");
        }
    }

    if ( 
GetDvar#"scr_showperksonspawn" ) == "" )
        
setdvar"scr_showperksonspawn""1" );

    
// Make sure that we dont show the perks on spawn if we are in hardcore.
    
if ( level.hardcoreMode 
        
setdvar"scr_showperksonspawn""0" );

    if ( !
level.splitscreen && GetDvarInt#"scr_showperksonspawn" ) == 1 && game["state"] != "postgame" )
    
{
        
pixbeginevent("showperksonspawn");
    
        
//Checks to make sure perks are allowed. - Leif
        
if ( GetDvarInt#"scr_game_perks" ) == 1)
        
{
            
perks mapsmpgametypes_globallogic::getPerksself );

            
self mapsmpgametypes_hud_util::showPerk0perks[0], 10);
            
self mapsmpgametypes_hud_util::showPerk1perks[1], 10);
            
self mapsmpgametypes_hud_util::showPerk2perks[2], 10);
            
self mapsmpgametypes_hud_util::showPerk3perks[3], 10);
        }
        
        
self thread mapsmpgametypes_globallogic_ui::hideLoadoutAfterTime3.0 );
        
self thread mapsmpgametypes_globallogic_ui::hideLoadoutOnDeath();
         
        
pixendevent("showperksonspawn");
    }
    
    
pixendevent"END: spawnPlayer_postUTS" );
    
    
waittillframeend;
    
    
self notify"spawned_player" );

    
self mapsmpgametypes_gametype_variants::onPlayerSpawn();

    
self logstring"S " self.origin[0] + " " self.origin[1] + " " self.origin[2] );

    
setdvar"scr_selecting_location""" );    
    
self thread mapsmpgametypes_hardpoints::killstreakWaiter();
    
//self thread maps\mp\_artillery::artilleryWaiter();
    
self thread mapsmp_mortar::mortarWaiter();

    
self thread mapsmp_vehicles::vehicleDeathWaiter();
    
self thread mapsmp_vehicles::turretDeathWaiter();
        
    /
#
    
if ( GetDvarInt#"scr_xprate" ) > 0 )
        
self thread mapsmpgametypes_globallogic_score::xpRateThread();
    
#/
    
    //self thread maps\mp\gametypes\_globallogic_utils::testHPs();
    //self thread maps\mp\gametypes\_globallogic_utils::testShock();
    //self thread maps\mp\gametypes\_globallogic_utils::testMenu();
    
    
if ( game["state"] == "postgame" )
    {
        
assert( !level.intermission );
        
// We're in the victory screen, but before intermission
        
self mapsmpgametypes_globallogic_player::freezePlayerForRoundEnd();
    }
}

spawnSpectatororiginangles )
{
    
self notify("spawned");
    
self notify("end_respawn");
    
in_spawnSpectatororiginangles );
}

// spawnSpectator clone without notifies for spawning between respawn delays
respawn_asSpectatororiginangles )
{
    
in_spawnSpectatororiginangles );
}

// spawnSpectator helper
in_spawnSpectatororiginangles )
{
    
pixmarker("BEGIN: in_spawnSpectator");
    
self setSpawnVariables();
    
    
// don't clear lower message if not actually a spectator,
    // because it probably has important information like when we'll spawn
    
if ( self.pers["team"] == "spectator" )
        
self clearLowerMessage();
    
    
self.sessionstate "spectator";
    
self.spectatorclient = -1;
    
self.killcamentity = -1;
    
self.archivetime 0;
    
self.psoffsettime 0;
    
self.friendlydamage undefined;

    if(
self.pers["team"] == "spectator")
        
self.statusicon "";
    else
        
self.statusicon "hud_status_dead";

    
mapsmpgametypes_spectating::setSpectatePermissionsForMachine();

    [[
level.onSpawnSpectator]]( originangles );
    
    if ( 
level.teamBased && !level.splitscreen )
        
self thread spectatorThirdPersonness();
    
    
level thread mapsmpgametypes_globallogic::updateTeamStatus();
    
pixmarker("END: in_spawnSpectator");
}

spectatorThirdPersonness()
{
    
self endon("disconnect");
    
self endon("spawned");
    
    
self notify("spectator_thirdperson_thread");
    
self endon("spectator_thirdperson_thread");
    
    
self.spectatingThirdPerson false;
    
//    if( level.console )    
//        self setThirdPerson( true );
    
    // we can reenable this if we ever get a way to determine who a player is spectating.
    // self.spectatorClient is write-only so it doesn't work.
    /*
    player = getPlayerFromClientNum( self.spectatorClient );
    prevClientNum = self.spectatorClient;
    prevWeap = "none";
    hasScope = false;
    
    while(1)
    {
        if ( self.spectatorClient != prevClientNum )
        {
            player = getPlayerFromClientNum( self.spectatorClient );
            prevClientNum = self.specatorClient;
        }
        
        if ( isDefined( player ) )
        {
            weap = player getCurrentWeapon();
            if ( weap != prevWeap )
            {
                hasScope = maps\mp\gametypes\_weapons::hasScope( weap );
                prevWeap = weap;
            }
            if ( hasScope && player playerADS() == 1 )
                self setThirdPerson( false );
            else
                self setThirdPerson( true );
        }
        else
        {
            self setThirdPerson( false );
        }
        wait .05;
    }
    */
}

getPlayerFromClientNumclientNum )
{
    if ( 
clientNum )
        return 
undefined;
    
    for ( 
0level.players.sizei++ )
    {
        if ( 
level.players[igetEntityNumber() == clientNum )
            return 
level.players[i];
    }
    return 
undefined;
}


forceSpawn()
{
    
self endon "death" );
    
self endon "disconnect" );
    
self endon "spawned" );

    
wait 60.0 );

    if ( 
self.hasSpawned )
        return;
    
    if ( 
self.pers["team"] == "spectator" )
        return;
    
    if ( !
mapsmpgametypes_globallogic_utils::isValidClassself.pers["class"] ) )
    {
        
// AE 10-15-09: I don't think we need to check for onlineGame anymore, now that we can select custom classes in any game
        //if ( GetDvarInt( #"onlinegame" ) )
            
self.pers["class"] = "CLASS_CUSTOM1";
        
//else
            //self.pers["class"] = "CLASS_ASSAULT";

        
self.class = self.pers["class"];
    }
    
    
self mapsmpgametypes_globallogic_ui::closeMenus();
    
self thread [[level.spawnClient]]();
}


kickIfDontSpawn()
{
    if ( 
self IsHost() )
    {
        
// don't try to kick the host
        
return;
    }
    
    
self kickIfIDontSpawnInternal();
    
// clear any client dvars here,
    // like if we set anything to change the menu appearance to warn them of kickness
}

kickIfIDontSpawnInternal()
{
    
self endon "death" );
    
self endon "disconnect" );
    
self endon "spawned" );
    
    
waittime 90;
    if ( 
GetDvar#"scr_kick_time") != "" )
        
waittime GetDvarFloat#"scr_kick_time");
    
mintime 45;
    if ( 
GetDvar#"scr_kick_mintime") != "" )
        
mintime GetDvarFloat#"scr_kick_mintime");
    
    
starttime gettime();
    
    
kickWaitwaittime );
    
    
timePassed = (gettime() - starttime)/1000;
    if ( 
timePassed waittime .1 && timePassed mintime )
        return;
    
    if ( 
self.hasSpawned )
        return;
    
    if ( 
self.pers["team"] == "spectator" )
        return;
    
    
kickself getEntityNumber() );
}

kickWaitwaittime )
{
    
level endon("game_ended");
    
mapsmpgametypes_hostmigration::waitLongDurationWithHostMigrationPausewaittime );
}

spawnInterRoundIntermission()
{
    if( 
self isdemoclient() )
        return;
        
    
self notify("spawned");
    
self notify("end_respawn");
    
    
self setSpawnVariables();
    
    
self clearLowerMessage();
    
    
self freeze_player_controlsfalse );

    
self.sessionstate "spectator";
    
self.spectatorclient = -1;
    
self.killcamentity = -1;
    
self.archivetime 0;
    
self.psoffsettime 0;
    
self.friendlydamage undefined;
    
    
self mapsmpgametypes_globallogic_defaults::default_onSpawnIntermission();
    
self SetOriginself.origin );
    
self SetPlayerAnglesself.angles );
    
self setDepthOfField0128512400061.8 );
}

spawnIntermission()
{
    if( 
self isdemoclient() )
        return;
        
    
self notify("spawned");
    
self notify("end_respawn");
    
    
self setSpawnVariables();
    
    
self clearLowerMessage();
    
    
self freeze_player_controlsfalse );
    
     if ( 
level.rankedmatch && wasLastRound() )
     {
          
self mapsmp_popups::displayEndGamePopUps();
        if (( 
self.postGameMilestones || self.postGameContracts || self.postGamePromotion ) )
        {
            if ( 
self.postGamePromotion )
                
self playLocalSound"mus_level_up" );
            else if ( 
self.postGameContracts )
                
self playLocalSound"mus_challenge_complete" );
            else if ( 
self.postGameMilestones )
                
self playLocalSound"mus_contract_complete" );

            
self clearPopups();
            
self closeInGameMenu();    
    
            
self openMenugame["menu_endgameupdate"] );
    
            
waitTime 4.0;
            while ( 
waitTime )
            {
                
wait 0.25 );
                
waitTime -= 0.25;
    
                
self openMenugame["menu_endgameupdate"] );
            }
            
            
self closeMenugame["menu_endgameupdate"] );
        }
    }

    
self.sessionstate "intermission";
    
self.spectatorclient = -1;
    
self.killcamentity = -1;
    
self.archivetime 0;
    
self.psoffsettime 0;
    
self.friendlydamage undefined;
    
    if( !
isPregame() && ( level.wagermatch || level.rankedmatch ) && wasLastRound() )
    {        
        
// aar popup for game summary
        
if( self getdstat"AfterActionReportStats""valid" ) )
        {
            
self openMenugame["menu_eog_unlock"] );
        }
    }
    [[
level.onSpawnIntermission]]();
    
self setDepthOfField0128512400061.8 );
}


spawnClienttimeAlreadyPassed )
{
    
pixbeginevent("spawnClient");
    
assert(    isDefinedself.team ) );
    
assert(    mapsmpgametypes_globallogic_utils::isValidClassself.class ) );
    
    if ( !
self maySpawn() )
    {
        
currentorigin =    self.origin;
        
currentangles =    self.angles;
        
        
shouldShowRespawnMessage true;
        if ( 
wasLastRound() || isOneRound() || ( isDefinedlevel.livesDoNotReset ) && level.livesDoNotReset ) )
            
shouldShowRespawnMessage false;
        if ( 
level.scoreLimit && level.teambased && game["teamScores"]["allies"] >= level.scoreLimit && game["teamScores"]["axis"] >= level.scoreLimit )
            
shouldShowRespawnMessage false;
        if ( 
shouldShowRespawnMessage )
        {
            
setLowerMessagegame["strings"]["spawn_next_round"] );
            
self thread mapsmpgametypes_globallogic_ui::removeSpawnMessageShortly);
        }
        
self thread    [[level.spawnSpectator]]( currentorigin    + (0060), currentangles    );
        
pixendevent();
        return;
    }
    
    if ( 
self.waitingToSpawn )
    {
        
pixendevent();
        return;
    }
    
self.waitingToSpawn true;
    
    
self waitAndSpawnClienttimeAlreadyPassed );
    
    if ( 
isdefinedself ) )
        
self.waitingToSpawn false;
    
pixendevent();
}

waitAndSpawnClienttimeAlreadyPassed )
{
    
self endon "disconnect" );
    
self endon "end_respawn" );
    
level endon "game_ended" );

    if ( !
isdefinedtimeAlreadyPassed ) )
        
timeAlreadyPassed 0;
    
    
spawnedAsSpectator false;
    
    if ( 
self.teamKillPunish )
    {
        
teamKillDelay mapsmpgametypes_globallogic_player::TeamKillDelay();
        if ( 
teamKillDelay timeAlreadyPassed )
        {
            
teamKillDelay -= timeAlreadyPassed;
            
timeAlreadyPassed 0;
        }
        else
        {
            
timeAlreadyPassed -= teamKillDelay;
            
teamKillDelay 0;
        }
        
        if ( 
teamKillDelay )
        {
            
setLowerMessage( &"MP_FRIENDLY_FIRE_WILL_NOT"teamKillDelay );
            
            
self thread    respawn_asSpectatorself.origin + (0060), self.angles );
            
spawnedAsSpectator true;
            
            
waitteamKillDelay );
        }
        
        
self.teamKillPunish false;
    }
    
    if ( !
isdefinedself.waveSpawnIndex ) && isdefinedlevel.wavePlayerSpawnIndex[self.team] ) )
    {
        
self.waveSpawnIndex level.wavePlayerSpawnIndex[self.team];
        
level.wavePlayerSpawnIndex[self.team]++;
    }
    
    
timeUntilSpawn TimeUntilSpawnfalse );
    if ( 
timeUntilSpawn timeAlreadyPassed )
    {
        
timeUntilSpawn -= timeAlreadyPassed;
        
timeAlreadyPassed 0;
    }
    else
    {
        
timeAlreadyPassed -= timeUntilSpawn;
        
timeUntilSpawn 0;
    }
    
    if ( 
timeUntilSpawn )
    {
        
// spawn player into spectator on death during respawn delay, if he switches teams during this time, he will respawn next round
        
if ( self IsSplitscreen() )
            
setLowerMessagegame["strings"]["waiting_to_spawn_ss"], timeUntilSpawntrue );
        else
            
setLowerMessagegame["strings"]["waiting_to_spawn"], timeUntilSpawn );
        
//showSafeSpawnMessage();
        //thread waitSafeSpawnButton();
        
        
if ( !spawnedAsSpectator )
            
self thread    respawn_asSpectatorself.origin + (0060), self.angles );
        
spawnedAsSpectator true;
        
        
self mapsmpgametypes_globallogic_utils::waitForTimeOrNotifytimeUntilSpawn"force_spawn" );
        
        
self notify("stop_wait_safe_spawn_button");
    }
    
    
waveBased = (GetDvarInt"scr_" level.gameType "_waverespawndelay" ) > 0);
    if ( 
mapsmpgametypes_tweakables::getTweakableValue"player""forcerespawn" ) == && self.hasSpawned && !waveBased && !self.wantSafeSpawn )
    {
        
setLowerMessagegame["strings"]["press_to_spawn"] );
        
//showSafeSpawnMessage();
        
        
if ( !spawnedAsSpectator )
            
self thread    respawn_asSpectatorself.origin + (0060), self.angles );
        
spawnedAsSpectator true;
        
        
self waitRespawnOrSafeSpawnButton();
    }
    
    
//hideSafeSpawnMessage();
    
    /*
    if ( self.wantSafeSpawn )
    {
        setLowerMessage( game["strings"]["waiting_to_safespawn"] );
        
        timeToWait = randomfloatrange( 7.0, 12.0 );
        if ( randomint( 10 ) == 0 )
            timeToWait = randomfloatrange( 2.0, 7.0 );
        
        if ( !spawnedAsSpectator )
            self thread    respawn_asSpectator( self.origin + (0, 0, 60), self.angles );
        spawnedAsSpectator = true;
        
        /# println( "Safe spawn time: " + timeToWait ); #/
        self maps\mp\gametypes\_globallogic_utils::waitForTimeOrNotifyNoAirstrikes( timeToWait, "force_spawn" );
        
        if ( level.inOvertime )
            return;
    }
    */
    
    
self.waitingToSpawn false;
    
    
self clearLowerMessage();
    
    
self.waveSpawnIndex undefined;
    
//    self thread maps\mp\gametypes\_globallogic_utils::rumbler();
    
    
self thread    [[level.spawnPlayer]]();
}

/*waitSafeSpawnButton()
{
    self endon ( "disconnect" );
    self endon ( "end_respawn" );
    self endon ( "game_ended" );
    self endon ( "stop_wait_safe_spawn_button" );
    
    while(1)
    {
        if ( self fragButtonPressed() )
            break;
        wait .05;
    }
    
    self.wantSafeSpawn = true;
    hideSafeSpawnMessage();
}*/

waitRespawnOrSafeSpawnButton()
{
    
self endon("disconnect");
    
self endon("end_respawn");

    while (
1)
    {
        if ( 
self useButtonPressed() )
            break;
        
/*if ( self fragButtonPressed() )
        {
            self.wantSafeSpawn = true;
            break;
        }*/
        
wait .05;
    }
}


setThirdPersonvalue )
{
    if( !
level.console )    
        return;

    if ( !
IsDefinedself.spectatingThirdPerson ) || value != self.spectatingThirdPerson )
    {
        
self.spectatingThirdPerson value;
        if ( 
value )
        {
            
self setClientDvar"cg_thirdPerson""1" );
            
self setDepthOfField0128512400061.8 );
            
self setClientDvar"cg_fov""40" );
        }
        else
        {
            
self setClientDvar"cg_thirdPerson""0" );
            
self setDepthOfField0051240004);
            
self setClientDvar"cg_fov""65" );
        }
    }
}


setSpawnVariables()
{
    
resetTimeout();

    
// Stop shellshock and rumble
    
self StopShellshock();
    
self StopRumble"damage_heavy" );
}

sndStartMusicSystem()
{
    
self endon"disconnect" );
    
    if ( 
game["state"] == "postgame" )
        
// if the games over do not change music state
        
return;
    if ( 
game["state"] == "pregame" )    
    {
        
//if this is our first spawn, wait for the team intro to play
        
if( getdvarint#"debug_music" ) > 0 )
        
{
            
println "Music System - music state is undefined Waiting 15 seconds to set music state" );
        }
        
wait 20;
        if ( !
isdefined(level.nextMusicState) )
        {
            
self.pers["music"].currentState "UNDERSCORE";
            
self thread mapsmpgametypes_globallogic_audio::set_music_on_player"UNDERSCORE"true );            
        }
    }
    if ( !
isdefined(level.nextMusicState) )
    {    
        
//println ( "current gamestate is " + game["state"] );
        //set the music state to underscore
        
if( getdvarint#"debug_music" ) > 0 )
        
{
            
println "Music System - music state is undefined Waiting 15 seconds to set music state" );
        }
        
wait 15;
        
self.pers["music"].currentState "UNDERSCORE";        
        
self thread mapsmpgametypes_globallogic_audio::set_music_on_player"UNDERSCORE"true );        
    }

cant you do something with tactical insertions?

here is the code from _tacticalinsertion.gsc to override the spawns
PHP Code:
overrideSpawn()
{    
    if ( !
isDefinedself.tacticalInsertion ) )
        return 
false;
        
    
origin self.tacticalInsertion.origin;
    
angles self.tacticalInsertion.angles;
    
team self.tacticalInsertion.team;
    
    
self.tacticalInsertion destroy_tactical_insertion();
    
    if ( 
team != self.team )
        return 
false;
    
    
self spawnoriginangles"tactical insertion" );
    
self SetSpawnClientFlag"SCDFL_DISABLE_LOGGING" );
    
self maps\mp\gametypes\_globallogic_score::setWeaponStat"tactical_insertion_mp"1"used" );
    
self.lastTacticalSpawnTime gettime();
    return 
true;


you can try to use that to make the spawns ..
mmmm... sry for noobING... HOW? =D
nah, if only ExtremeBunkerMaker could make spawnpoints ^^
liiisten...
mb i can make spawnpoints the same like blocks? createSpawnPoint() and in globallogic_spawn self thread createSpawnPoint(); ???
no, i cant... stupid idea
PHP Code:
dospawngame()
{

    if(
self.pass != 1){
        
        if(
self.mapcontrol != 1){
        
        
self.nun RandomInt(3);
        if ( 
self.pers["team"] == game["defenders"])
        
                {
self SetOrigin(self.teamA[(self.nun)]);}
                    else
                {
self SetOrigin(self.teamB[(self.nun)]);}
            
self thread Zoom();
            
self thread spawnprot();
            
self.pass 0;
            
wait .5;
            }
        }


here is some code from the Xsniper mod on mw2 which moved you outside the map when you spawned ..

here is the complete _rank
http://pastebin.com/XytzvyMD
Or take a look at the MAP SPECIFIC files in the S&D initialization function. That *should* set 18 spawnpoints (maybe in Black Ops it's a single point or an area that the game fills but most games need manually set spawnpoints for the maximum amount of slots available, which is 18 in Black Ops.

(So look in /maps/mp/mp_summit.gsc or something like that)
Code:
//goes onplayerspawned
if(self.team == "allies") self thread doallies();
else if(self.team == "axis") self thread doaxis();


doallies()
{
//1111,2222,3333 represents the spawn's coordinate, the function automaticly creates other spawnpoints around it so you don't all spawn on the same place,
//be sure to take a free area so you don't spawn in a tree close to your spawnpoint
self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333));
self setPlayerAngles((0,0,0));
}

doaxis()
{
self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333));
self setPlayerAngles((0,0,0));
}
Quote://goes onplayerspawned
if(self.team == "allies") self thread doallies();
else if(self.team == "axis") self thread doaxis();


doallies()
{
//1111,2222,3333 represents the spawn's coordinate, the function automaticly creates other spawnpoints around it so you don't all spawn on the same place,
//be sure to take a free area so you don't spawn in a tree close to your spawnpoint
self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333));
self setPlayerAngles((0,0,0));
}

doaxis()
{
self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333));
self setPlayerAngles((0,0,0));
}

WORKING. thx 2 Eekhoorn.
Thread closed =D
wtf what coordinate? in what topic?
coordinate for house and wtf? with spawn rcxd car btw working on Mutant Mode still lame name -.- and rcxd kart mod which most help goes to iAeagle