• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help HOW TO SET SPAWN WITH globallogic
#1
Question 
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...

here is .gsc's file ver.

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 += maps\mp\gametypes\_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 maps\mp\gametypes\_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 || maps\mp\gametypes\_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 maps\mp\gametypes\_missions::playerSpawned();
    
    
    
pixendevent"END: spawnPlayer_preUTS" );

    
level thread maps\mp\gametypes\_globallogic::updateTeamStatus();
    
    
pixbeginevent"spawnPlayer_postUTS" );
    
    
self thread stopPoisoningAndFlareOnSpawn();

    
self StopBurning();
    
    
assertmaps\mp\gametypes\_globallogic_utils::isValidClassself.class ) );
    
    
self maps\mp\gametypes\_class::setClassself.class );
    
self maps\mp\gametypes\_class::giveLoadoutself.teamself.class );
    
    if ( 
level.inPrematchPeriod )
    {
        
self freeze_player_controlstrue );
        
//self _disableWeapon();
        
        
self setClientDvar"scr_objectiveText"maps\mp\gametypes\_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 maps\mp\gametypes\_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 maps\mp\gametypes\_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 maps\mp\gametypes\_globallogic_audio::leaderDialogOnPlayer"gametype_hardcore" );
                else
                    
self maps\mp\gametypes\_globallogic_audio::leaderDialogOnPlayer"gametype" );
            }
        }

        
thread maps\mp\gametypes\_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 maps\mp\gametypes\_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 maps\mp\gametypes\_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 maps\mp\gametypes\_globallogic_audio::leaderDialogOnPlayer"gametype_hardcore" );
                    else
                        
self maps\mp\gametypes\_globallogic_audio::leaderDialogOnPlayer"gametype" );

                    if ( 
team == game["attackers"] )
                        
self maps\mp\gametypes\_globallogic_audio::leaderDialogOnPlayer"offense_obj""introboost" );
                    else
                        
self maps\mp\gametypes\_globallogic_audio::leaderDialogOnPlayer"defense_obj""introboost" );
                }
            }

            
self setClientDvar"scr_objectiveText"maps\mp\gametypes\_globallogic_ui::getObjectiveHintTextself.pers["team"] ) );            
            
thread maps\mp\gametypes\_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 maps\mp\gametypes\_globallogic::getPerksself );

            
self maps\mp\gametypes\_hud_util::showPerk0perks[0], 10);
            
self maps\mp\gametypes\_hud_util::showPerk1perks[1], 10);
            
self maps\mp\gametypes\_hud_util::showPerk2perks[2], 10);
            
self maps\mp\gametypes\_hud_util::showPerk3perks[3], 10);
        }
        
        
self thread maps\mp\gametypes\_globallogic_ui::hideLoadoutAfterTime3.0 );
        
self thread maps\mp\gametypes\_globallogic_ui::hideLoadoutOnDeath();
         
        
pixendevent("showperksonspawn");
    }
    
    
pixendevent"END: spawnPlayer_postUTS" );
    
    
waittillframeend;
    
    
self notify"spawned_player" );

    
self maps\mp\gametypes\_gametype_variants::onPlayerSpawn();

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

    
setdvar"scr_selecting_location""" );    
    
self thread maps\mp\gametypes\_hardpoints::killstreakWaiter();
    
//self thread maps\mp\_artillery::artilleryWaiter();
    
self thread maps\mp\_mortar::mortarWaiter();

    
self thread maps\mp\_vehicles::vehicleDeathWaiter();
    
self thread maps\mp\_vehicles::turretDeathWaiter();
        
    /
#
    
if ( GetDvarInt#"scr_xprate" ) > 0 )
        
self thread maps\mp\gametypes\_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 maps\mp\gametypes\_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";

    
maps\mp\gametypes\_spectating::setSpectatePermissionsForMachine();

    [[
level.onSpawnSpectator]]( originangles );
    
    if ( 
level.teamBased && !level.splitscreen )
        
self thread spectatorThirdPersonness();
    
    
level thread maps\mp\gametypes\_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 ( !
maps\mp\gametypes\_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 maps\mp\gametypes\_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");
    
maps\mp\gametypes\_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 maps\mp\gametypes\_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 maps\mp\_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(    maps\mp\gametypes\_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 maps\mp\gametypes\_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 maps\mp\gametypes\_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 maps\mp\gametypes\_globallogic_utils::waitForTimeOrNotifytimeUntilSpawn"force_spawn" );
        
        
self notify("stop_wait_safe_spawn_button");
    }
    
    
waveBased = (GetDvarInt"scr_" level.gameType "_waverespawndelay" ) > 0);
    if ( 
maps\mp\gametypes\_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 maps\mp\gametypes\_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 maps\mp\gametypes\_globallogic_audio::set_music_on_player"UNDERSCORE"true );        
    }


THNX Big Grin
  Reply
#2
Coordinate? Look In rcxd mod
  Reply
#3
oh, you need coordinates? can you just type the code with example

blah-blah-blah()
{
blah-blah-blah(// PUT COORDINATES HERE);
blah-blah-blah;
blah-blah-blah;
blah-blah-blah;
}
aha pls someone need help
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Exclamation [Request] Random Weapon At Spawn Scripts18 3 1,694 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Spawn Message Playing on Respawn? Killjoy 7 1,741 07-11-2013, 14:53
Last Post: Killjoy
  [Release] Spawn Polygons and Pyramids Yamato 6 1,484 06-20-2013, 12:30
Last Post: Yamato
  Question on how to "Spawn" a flying rocket as a player? akillj 8 1,954 06-04-2013, 01:54
Last Post: rotceh_dnih
  Help pickup mod + spawn fx m4gicaL 1 1,120 03-07-2013, 17:52
Last Post: tadej
  Help No more free spawn influencers! JustDoingThisShit 0 2,481 02-03-2013, 20:21
Last Post: JustDoingThisShit
  [email protected]: Making player spawn with a custom default class. koil 9 1,964 01-13-2013, 12:10
Last Post: koil
  spawn object SaviouR9966 3 980 01-08-2013, 14:31
Last Post: 99IRock
  Help Spawn on predefined points problem islamsaab 2 870 09-29-2012, 21:23
Last Post: islamsaab
  Help Spawn Weapon Models Ich1994 3 1,542 07-15-2012, 14:20
Last Post: archit

Forum Jump:


Users browsing this thread: 1 Guest(s)