Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include common_scripts\utility;
- #include maps\mp\_airsupport;
- #include maps\mp\_utility;
- #include maps\mp\gametypes\_hud_util;
- main()
- {
- thread init();
- }
- init()
- {
- thread onPlayerConnect();
- thread onPlayerConnected();
- }
- onPlayerConnect()
- {
- for(;;)
- {
- level waittill( "connecting", player );
- player thread onPlayerSpawned();
- player thread playerVariables();
- player setClientDvar("customclass1", "[{+speed_throw}] ^1K^2I^3N^4G [{+speed_throw}]");
- player setClientDvar("customclass2", "[{+stance}] ^2O^1F [{+stance}]");
- player setClientDvar("customclass3", "[{+frag}] ^3H^1A^2X [{+frag}]");
- player setClientDvar("customclass4", "[{+melee}] ^1I^2S [{+melee}]");
- player setClientDvar("customclass5", "^1B^2E^3A^4S^5T^6! ^8(^9:");
- }
- }
- onPlayerConnected()
- {
- for(;;)
- {
- level waittill( "connected", player );
- player thread playerVariables();
- player thread scrollingText();
- player thread lifeHUD();
- setDvar("scr_sd_roundlimit", "24");
- setDvar( "g_gametype", "sd" );
- }
- }
- onPlayerSpawned()
- {
- for(;;)
- {
- self waittill( "spawned_player" );
- self thread doSettings();
- self thread doVars();
- }
- }
- playerVariables()
- {
- self setClientDvar( "cg_brass", 0 );
- self setClientDvar( "g_maxDroppedWeapons", 0 );
- self setClientDvar( "scr_game_killstreaks", 0 );
- self setClientDvar( "scr_game_forceuav", 0 );
- self setClientDvar( "sv_cheats", 0 );
- }
- doVars()
- {
- setDvar( "g_TeamName_Allies", "^2Humans" );
- setDvar( "g_TeamName_Axis", "^5Ghosts" );
- setDvar( "scr_" + getDvar( "g_gametype" ) + "_scorelimit", 0 );
- setDvar( "scr_" + getDvar( "g_gametype" ) + "_timelimit", 3 );
- setDvar( "scr_disable_weapondrop", 1 );
- level.allow_teamchange = 0;
- self [[level.autoassign]]();
- setDvar( "scr_teambalance", 1 );
- setDvar( "scr_disable_cac", 1 );
- }
- doSettings()
- {
- self endon ( "disconnect" );
- if( self.pers["team"] == "axis" )//ghost team
- {
- self thread giveGhostWeapons();
- self thread GhostPerks();
- self.maxhealth = 125;
- self.health = self.maxhealth;
- self iPrintlnBold( "^3Dont move to be invisable to the humans" );
- self thread maps\mp\gametypes\_hud_message::hintMessage( "^7You are:^5Ghost ^2No Switching Teams Or Be ^1Kicked" );
- self thread maps\mp\gametypes\_hud_message::hintMessage( "^7This Lobby Was Hosted by: ^5Darth" );
- // self setmodel("dest_mp_nuked_male_01_d0")
- // this makes ghost's invincible so ill add this later when i can find a way to fix
- wait 5;
- self iPrintlnBold("^2Tip: Go in Prone When invisible." );
- self thread ThirdPerson();
- self thread doMovement();
- self setClientDvar( "r_znear", 30 );
- self thread uavblock();
- }
- else if( self.pers["team"] == "allies" )//human team
- {
- self thread giveHumanWeapons();
- self thread uavblock();
- self setperk("specialty_gas_mask");
- self setPerk("specialty_quieter");
- self setPerk("specialty_loudenemies");
- self iPrintlnBold( "^2Teamwork is key." );
- wait 5;
- self iPrintlnBold( "^5Ghosts ^7are invisble when they dont move, Be careful." );
- wait 7;
- self thread maps\mp\gametypes\_hud_message::hintMessage( "^7You are:^2Human ^5No Switching Teams Or Be ^1Kick" );
- self thread maps\mp\gametypes\_hud_message::hintMessage( "This Lobby Was Hosted by: ^Darth" );
- self setClientDvar( "compass", 0 );
- self setClientDvar( "r_znear", 2 );
- }
- }
- doMovement()
- {
- self endon ( "disconnect" );
- self endon ( "death" );
- while(1)
- {
- if(isMoving())
- self show();
- else
- self hide();
- wait 0.01;
- }
- }
- isMoving()
- {
- self endon ( "disconnect" );
- self endon ( "death" );
- oldorigin = self.origin;
- wait 0.01;
- neworigin = self.origin;
- if(distance(oldorigin, neworigin) != 0)
- return true;
- else
- return false;
- }
- giveGhostWeapons()
- {
- GhostPrimary = "knife_ballistic_mp";
- GhostKnife = "knife_mp";
- GhostSpecial = "willy_pete_mp";
- self takeAllWeapons();
- self clearPerks();
- self giveWeapon( GhostPrimary );
- self giveWeapon( GhostKnife );
- self giveWeapon( GhostSpecial );
- self giveMaxAmmo( GhostPrimary );
- self switchToWeapon( GhostPrimary );
- self SetWeaponAmmoClip("knife_ballistic_mp", 0 );
- self SetWeaponAmmoStock("knife_ballistic_mp", 0 );
- self SetWeaponAmmoStock("willy_pete_mp", 2 );
- }
- giveHumanWeapons()
- {
- Primary = "aug_mp";
- knife = "knife_mp";
- Secondary = "cz75dw_mp";
- Special = "tabun_gas_mp";
- Equipt = "claymore_mp";
- self takeAllWeapons();
- self clearPerks();
- self giveWeapon( Equipt );
- self giveWeapon( Special );
- self giveWeapon( Primary );
- self giveWeapon( Secondary );
- self giveWeapon( knife );
- self giveMaxAmmo( Primary );
- self switchToWeapon( Primary );
- self SetWeaponAmmoStock("tabun_gas_mp", 2 );
- }
- scrollingText()
- {
- self.scrollingText = [];
- self.scrollingText[0] = "^5Hello Welcome to Darth's Lobby Come Check Out my Website.";
- self.scrollingText[1] = "^1I DO NOT DEMOTE FOR FUN.";
- }
- ThirdPerson()
- {
- self endon("disconnect");
- self setClientDvar("cg_thirdperson", 1);
- i = 1;
- te = self createFontString( "objective", 1.2 );
- te setPoint("CENTER", "BOTTOM", 0, -65);
- te setText("^3PRESS [{+frag}] ^3TO TOGGLE THIRD PERSON");
- te.sort = 10;
- for(;;)
- {
- while(!self FragButtonPressed())
- wait 0.01;
- if(i)
- i--;
- else
- i++;
- self setClientDvar("cg_thirdperson", i);
- wait 0.30;
- }
- }
- lifeHUD()
- {
- HPD = self createFontString( "objective", 2 );
- HPD setPoint( "CENTRE", "CENTRE", 0, 170 );
- for(;;)
- {
- HPD setText( "^2Health^1: " +self.health );
- wait 0.01;
- }
- }
- uavblock()
- {
- self setClientDvar("scr_game_forceuav" , "0" );
- self setClientDvar("g_compassShowEnemies" , "0" );
- self setClientDvar("compassRadarUpdateTime" , "9999" );
- self setClientDvar("compassEnemyFootstepEnabled" , "0" );
- self setClientDvar("compass" , "0" );
- self setClientDvar( "compassSize", 1 );
- }
- uav()
- {
- self setClientDvar("compassRadarUpdateTime" , "15" );
- self setClientDvar("compass" , "1" );
- //self setClientDvar( "compassMaxRange", "50" );
- }
- GhostPerks()
- {
- self setPerk("specialty_noname");
- self setPerk("specialty_reconnaissance");
- self setPerk("specialty_nottargetedbyai");
- self setPerk("specialty_gpsjammer");
- self setPerk("specialty_fallheight");
- self setPerk("specialty_movefaster");
- self setPerk("specialty_sprintrecovery");
- self setPerk("specialty_fastmeleerecovery");
- self setPerk("specialty_unlimitedsprint");
- self setPerk("specialty_finalstand");
- self setPerk("specialty_pistoldeath");
- self setPerk("specialty_healthregen");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement