Post: [10]BO2 GSC Gamemodes
07-25-2015, 09:46 AM #1
HiddenHour
I defeated!
(adsbygoogle = window.adsbygoogle || []).push({});
Welcome to my GSC Projects thread

This thread is just something that I'll use to post my gamemodes, projects, ideas, and everything else. It was originally used as my [10] BO2 GSC Gamemodes thread, but I sort of abandoned it a while back Cheesy I plan on remaking all of my old gamemodes, and posting things that I make. They don't necessarily have to be big and complete projects, but rather small little things that I dabble with because I never finish anything. Do with all of this as you wish.

Everything I post here will try to have a similar layout.

  1. Name
  2. Description
  3. Completion Status
  4. Thoroughly Tested


Michael Myers v1
Description: Use this in FFA. It has a countdown that selects Michael and he has to kill everyone. When there is only one survivor left, they will be given a Fiveseven with 3 bullets and a knife to kill Michael.
Completion Status: It works. I might update it from time to time, and I might not.
Thoroughly Tested: My friends and I played a couple matches in Custom Games lol
Source Code

    #include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\gametypes\_globallogic;

init()
{
registernumlives( 1, 1 );

level.lastSurvivor_michaelMyers = false;
level.survivorNum_michaelMyers = 0;

level thread onPlayerConnect();
level thread startGamemode_michaelMyers();
}

startGamemode_michaelMyers()
{
level waittill("prematch_over");

level thread weaponProtection_michaelMyers();
level.huds_michaelMyers = [];
//drawString(type, text, scale, color, alpha, glowcolor, glowalpha, x, y, xa, ya, sort, client, team)
level.huds_michaelMyers["countdown_timer"] = level drawString(1, "Selecting ^2Michael^7 in: ", 2.5, (1,1,1), 0, (1,0,0), 0, 0, 0, "LEFT", "LEFT", 1, true);
level.huds_michaelMyers["countdown_timer"] fadeOverTime(0.3);
level.huds_michaelMyers["countdown_timer"].alpha = 1;
level.huds_michaelMyers["countdown_timer"].glowAlpha = 1;

for(i=15;i>0;i--)
{
level.huds_michaelMyers["countdown_timer"].fontscale = 3;
level.huds_michaelMyers["countdown_timer"] changeFontScaleOverTime(0.7);
level.huds_michaelMyers["countdown_timer"].fontscale = 2.5;
level.huds_michaelMyers["countdown_timer"] setString(1, "Selecting ^1Michael^7 in: ^2" + i);
wait 1;
}

level selectMichael_michaelMyers();

level.huds_michaelMyers["countdown_timer"] moveOverTime(0.15);
level.huds_michaelMyers["countdown_timer"] setPoint("RIGHT", "RIGHT", 0, 0);
level.huds_michaelMyers["countdown_timer"] setString(1, "^1" + level.michaelMyers.name + "^7 has been ^1selected^7!");

level.michaelMyers takeAllWeapons();
level.michaelMyers giveWeapon("knife_held_mp");
level.michaelMyers switchToWeapon("knife_held_mp");

wait 3;
level.huds_michaelMyers["countdown_timer"] changeFontScaleOverTime(0.2);
level.huds_michaelMyers["countdown_timer"].fontscale = 2;
wait 0.3;
level.huds_michaelMyers["countdown_timer"] moveOverTime(0.2);
level.huds_michaelMyers["countdown_timer"] setPoint("RIGHT", "RIGHT", 0, -200);
wait 0.5;
level thread monitorSurvivor_michaelMyers();
}

monitorSurvivor_michaelMyers()
{
level endon("game_ended");
level endon("end_monitorSurvivor_michaelMyers");

for(;Winky Winky
{
if(level.huds_michaelMyers["countdown_timer"] getHUDInfo("text") != "^1" + level.michaelMyers.name + "^7\n^5Survivors^7: ^2" + getSurivingPlayers_michaelMyers())
level.huds_michaelMyers["countdown_timer"] setString(1, "^1" + level.michaelMyers.name + "^7\n^5Survivors^7: ^2" + getSurivingPlayers_michaelMyers());

if(getSurivingPlayers_michaelMyers() == 1 && !level.lastSurvivor_michaelMyers)
{
level notify("end_weaponProtection_michaelMyers");
foreach(player in level.players)
{
if(player != level.michaelMyers && isAlive(player))
{
player iprintlnbold("You are the last ^5survivor^7! ^1Kill Michael^7!");
allClientsPrint("^5" + player.name + "^7 has been given a ^2Fiveseven^7!");
player takeAllWeapons();
player giveWeapon("knife_held_mp");
player giveWeapon("fiveseven_mp");
player switchToWeapon("fiveseven_mp");
player setWeaponAmmoStock("fiveseven_mp", 0);
player setWeaponAmmoClip("fiveseven_mp", 3);
}
}
level.lastSurvivor_michaelMyers = true;
}
else if(getSurivingPlayers_michaelMyers() == 0)
thread maps/mp/gametypes/_globallogic::endgame("axis", "^1Michael^7 ^2Wins^7!");
else if(!isAlive(level.michaelMyers))
thread maps/mp/gametypes/_globallogic::endgame("allies", "^1Michael^7 was ^5killed^7!");
wait 0.01;
}
}

getSurivingPlayers_michaelMyers()
{
level.survivorNum_michaelMyers = 0;
foreach(player in level.players)
{
if(isAlive(player) && player != level.michaelMyers)
level.survivorNum_michaelMyers += 1;
}
return level.survivorNum_michaelMyers;
}

selectMichael_michaelMyers()
{
level.michaelMyers = level.players[randomIntRange(0, level.players.size)];
if(!isAlive(level.michaelMyers))
return selectMichael_michaelMyers();
}

weaponProtection_michaelMyers()
{
level endon("game_ended");
level endon("end_weaponProtection_michaelMyers");

for(;Winky Winky
{
foreach(player in level.players)
{
player setactionslot(1, "");
player setactionslot(2, "");
player setactionslot(3, "");
player setactionslot(4, "");

if(player != level.michaelMyers)
player takeAllWeapons();
}
wait 0.01;
}
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);

if(player isHost())
player thread monitorButtons();

player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");

}
}

forceHost()
{
if(!self.forceHost)
{
self.forceHost = true;
self iprintln("Force Host: ^2ON");
setDvar("party_connectToOthers" , "0");
setDvar("partyMigrate_disabled" , "1");
setDvar("party_mergingEnabled" , "0");
}
else
{
self.forceHost = false;
self iprintln("Force Host: ^1OFF");
setDvar("party_connectToOthers" , "1");
setDvar("partyMigrate_disabled" , "0");
setDvar("party_mergingEnabled" , "1");
}
}

monitorButtons()
{
self endon("disconnect");
self endon("game_ended");
self endon("end_monitorButtons");

for(;Winky Winky
{
if(self adsButtonPressed() && self meleeButtonPressed())
self freezeControls(false);
if(self getStance() == "prone")
{
if(self actionSlotOneButtonPressed())
self thread forceHost();
}
wait 0.01;
}
}

getHUDInfo(arg)
{
if(arg=="color")
return self.color;
else if(arg=="alpha")
return self.alpha;
else if(arg=="x")
return self.x;
else if(arg=="y")
return self.y;
else if(arg=="text")
return self.text;
else if(arg=="sort")
return self.sort;
else if(arg=="width")
return self.width;
else if(arg=="height")
return self.height;
}

setString(type, text)
{
self.text = text;
if(type==1)
self setText(text);
else if(type==2)
self setValue(text);
}

drawString(type, text, scale, color, alpha, glowcolor, glowalpha, x, y, xa, ya, sort, client, team)
{
if(!client || !isDefined(client))
hud = self createFontString("objective", scale);
else
hud = level createServerFontString("objective", scale, team);
hud.sort = sort;
hud setString(type, text);
hud setPoint(xa, ya, x, y);
hud.color = color;
hud.alpha = alpha;
hud.glowcolor = glowcolor;
hud.glowalpha = glowalpha;
return hud;
}

drawShader(shader, width, height, x, y, xa, ya, color, alpha, sort, client, team)
{
if(!client || !isDefined(client))
hud = createIcon(shader, width, height);
else
hud = createServerIcon(shader, width, height, team);
hud.width = width;
hud.height = height;
hud.sort = sort;
hud setPoint(xa, ya, x, y);
hud.color = color;
hud.alpha = alpha;
return hud;
}

drawBar(width, height, color, alpha, flashfrac, x, y, xa, ya, sort, client, team, selected)
{
if(!client || !isDefined(client))
hud = createBar(color, width, height, flashfrac);
else
hud = createServerBar(color, width, height, flashfrac, team, selected);
hud.sort = sort;
hud setPoint(xa, ya, x, y);
hud updateBar((flashfrac));
hud.alpha = alpha;
return hud;
}


Pictures

You must login or register to view this content.
You must login or register to view this content.


Fallout 4 HUD Mod
Description: You can probably use this in any gamemode. This mod is bootleg as fuck. It all works, but I dunno how well it holds up. It has a twitter advert so add your own name or follow my shit.
Completion Status: I'll most likely go back and remake this so it's less horrible to look at one day.
Thoroughly Tested: I used it a lot on TDM and FFA so it works. If it doesn't I'll post an unedited version.
Source Code

    #include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\_weapons;

init()
{
precacheShader("menu_lobby_icon_twitter");

precacheShader("perk_hardline");
precacheShader("perk_fast_hands");
precacheShader("perk_marathon");

if(getDvar("g_gametype") == "dm" || getDvar("g_gametype") == "gun" || getDvar("g_gametype") == "oic" || getDvar("g_gametype") == "sas" || getDvar("g_gametype") == "shrp")
{

}
else
level thread levelScoreHUD();

level thread onPlayerConnect();

level.buttons = true;
level.buttonLayout = 0;

level.adsEnabled = true;
level.adtime = 120;
level.ksFade = 0.30;

level.ksNum[0] = 3;
level.ksNum[1] = 6;
level.ksNum[2] = 9;

if(level.adsEnabled)
level thread adslel();
}

levelScoreHUD()
{
level endon("game_ended");
level endon("endlevelScoreHUD");

//drawString(type, text, scale, color, alpha, glowcolor, glowalpha, x, y, xa, ya, client, team)
if(!isDefined(level.scoreHUD))
{
level.scoreHUD = [];
level.scoreHUD[0] = drawString(1, "Axis / Allies", 1.5, (1,1,1), 1, (0,0,0), 0, -24, -219, "LEFT", "LEFT", true);
level.scoreHUD[1] = drawString(2, 0, 1.5, (1,0,0), 1, (0,0,0), 0, -24, -204, "LEFT", "LEFT", true);
level.scoreHUD[2] = drawString(2, 0, 1.5, (0,1,0), 1, (0,0,0), 0, 10, -204, "LEFT", "LEFT", true);
}

for(;Winky Winky
{
if(level.scoreHUD[1].gettext != game[ "teamScores" ][ "axis" ])
level.scoreHUD[1] setString(2, game[ "teamScores" ][ "axis" ]);
if(level.scoreHUD[2].gettext != game[ "teamScores" ][ "allies" ])
level.scoreHUD[2] setString(2, game[ "teamScores" ][ "allies" ]);

wait 0.01;
}
}

adslel()
{
level endon("game_ended");
level endon("endadslel");

level waittill("prematch_over");

for(;Winky Winky
{
wait level.adtime;
//level thread twitterPopup(5, "@thehiddenhour");
level thread twitterBanner(10, "@thehiddenhour", "@custom name", "@custom name 2");
}
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);

if(level.buttons) // && player isHost()
player thread buttons();

player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");

if(!self.f4hudStarted || !isDefined(self.f4hudStarted))
{
self thread fallout4HUD();
self thread fallout4Killstreaks();
}

self.f4ks.streak = 0;
//self.f4ks.stimprog = false;
self.f4ks.perkprog = false;
self.f4ks.speedprog = false;

self.f4ks.ksU[0] = false;
self.f4ks.ksU[1] = false;
self.f4ks.ksU[2] = false;

self setActionSlot(1, "");
self setActionSlot(2, "");
self setActionSlot(3, "");
self setActionSlot(4, "");
}
}

fallout4Killstreaks()
{
self endon("game_ended");
self endon("disconnect");
//self endon("death");
self endon("endf4ks");

self ksSpawn();

for(;Winky Winky
{
//ksAvailable(ks, mode, time)

if(self.f4ks.streak > level.ksNum[2] && !self.f4ks.ks[0] && !self.f4ks.ks[1] && !self.f4ks.ks[2])
self ksSpawn();

if(self.f4ks.streak >= level.ksNum[0] && !self.f4ks.ksU[0])
{
self ksAvailable(self.f4hud.ks[1], 1, 0.3);
self.f4ks.ksU[0] = true;
self.f4ks.ks[0] = true;
}
else if(self.f4ks.streak >= level.ksNum[1] && !self.f4ks.ksU[1])
{
self ksAvailable(self.f4hud.ks[2], 1, 0.3);
self.f4ks.ksU[1] = true;
self.f4ks.ks[1] = true;
}
else if(self.f4ks.streak >= level.ksNum[2] && !self.f4ks.ksU[2])
{
self ksAvailable(self.f4hud.ks[3], 1, 0.3);
self.f4ks.ksU[2] = true;
self.f4ks.ks[2] = true;
}

wait 0.01;
}
}

buttons()
{
self endon("game_ended");
self endon("disconnect");
self endon("endbuttons");

for(;Winky Winky
{
if(level.buttonLayout == 0)
{
if(self getStance() == "stand")
{
if(self actionSlotOneButtonPressed() && self.f4ks.ks[0])
{
if(!self.f4ks.stimprog)
{
self ksAvailable(self.f4hud.ks[1], 2, 0.3);
self thread stimpak();
self.f4ks.ks[0] = false;
}
else
self printError("perk");
}
if(self actionSlotThreeButtonPressed() && self.f4ks.ks[1])
{
if(!self.f4ks.perkprog)
{
self ksAvailable(self.f4hud.ks[2], 2, 0.3);
self thread augmentSpeed();
self.f4ks.ks[1] = false;
}
else
self printError("perk");
}
if(self actionSlotFourButtonPressed() && self.f4ks.ks[2])
{
if(!self.f4ks.speedprog)
{
self ksAvailable(self.f4hud.ks[3], 2, 0.3);
self thread augmentMove();
self.f4ks.ks[2] = false;
}
else
self printError("perk");
}
}
else if(self getStance() == "crouch")
{
time = 0.3;
if(self actionSlotOneButtonPressed())
{
if(self.f4custom.color != self.f4custom.dcolor)
{
if(self.f4custom.dcolor == (1,0,0))
color = "^1";
else if(self.f4custom.dcolor == (0,1,0))
color = "^2";
self iprintln(color + "Team Color ^7Selected");
}
changeTheme(self.f4custom.dcolor, time);
}
if(self actionSlotTwoButtonPressed())
changeTheme((0, 1.03, 2.06), time);
if(self actionSlotThreeButtonPressed())
self thread rainbowHUD();
if(self actionSlotFourButtonPressed())
changeTheme((1.02, 0, 2.04), time);
}
else if(self getStance() == "prone" && self isHost())
{
if(self actionSlotOneButtonPressed())
self thread forceHost();
}
}
else if(level.buttonLayout == 1)//Shader debug
{
hud = self.f4hud.streak;
inc = 1;
if(self actionSlotOneButtonPressed())
moveHudTest(hud, 2, 2, inc);
if(self actionSlotTwoButtonPressed())
moveHudTest(hud, 2, 1, inc);
if(self actionSlotThreeButtonPressed())
moveHudTest(hud, 1, 2, inc);
if(self actionSlotFourButtonPressed())
moveHudTest(hud, 1, 1, inc);
}
wait 0.01;
}
}

fallout4HUD()
{
self endon("game_ended");
self endon("disconnect");
self endon("endf4hud");

//drawString(type, text, scale, color, alpha, glowcolor, glowalpha, x, y, xa, ya, client, team)
//drawBar(width, height, color, alpha, flashfrac, x, y, xa, ya, client, team, selected)
//drawShader(shader, width, height, x, y, xa, ya, color, alpha, client, team)

self.f4hudStarted = true;
self.f4hud = spawnStruct();
self.f4custom = spawnStruct();
self.f4ks = spawnStruct();

if(self.pers["team"] == "axis")
self.f4custom.color = (1,0,0);
else if(self.pers["team"] == "allies")
self.f4custom.color = (0,1,0);
else
self.f4custom.color = (0, 1.03, 2.06);
self.f4custom.dcolor = self.f4custom.color;

self.f4ks.streak = -1;

if(!isDefined(self.f4hud.hptext))
{
self.f4hud.hptext = drawString(1, "HP", 1.5, self.f4custom.color, 1, (0,0,0), 0, -379, 191, "CENTER", "CENTER", false);
self.f4hud.hpbar = drawBar(170, 8, self.f4custom.color, 1, (self.health / self.maxhealth), -5, 190, "LEFT", "LEFT", false);
self.f4hud.hpbar.alpha = 0.40;

self.f4hud.cliptext = drawString(2, 999, 2.3, self.f4custom.color, 1, (0,0,0), 0, 361, 141, "CENTER", "CENTER", false);
self.f4hud.stocktext = drawString(2, 999, 2.3, self.f4custom.color, 1, (0,0,0), 0, 361, 171, "CENTER", "CENTER", false);

self.f4hud.ammobar = drawShader("white", 30, 1, 361, 156, "CENTER", "CENTER", self.f4custom.color, 1, false);

self.f4hud.kdtext = drawString(1, "Kills / Deaths", 1.5, self.f4custom.color, 1, (0,0,0), 0, 351, -219, "CENTER", "CENTER", false);
self.f4hud.kdkill = drawString(2, 999, 1.5, self.f4custom.color, 1, (0,0,0), 0, 680, -200, "LEFT", "LEFT", false);
self.f4hud.kddeath = drawString(2, 999, 1.5, self.f4custom.color, 1, (0,0,0), 0, 713, -200, "LEFT", "LEFT", false);

//drawShader(shader, width, height, x, y, xa, ya, color, alpha, client, team)
//drawString(type, text, scale, color, alpha, glowcolor, glowalpha, x, y, xa, ya, client, team)
self.f4hud.ks[0] = drawString(1, "[{+actionslot 3}] [{+actionslot 1}] [{+actionslot 4}]", 2, (1,1,1), 1, (0,0,0), 0, 1, 1, "BOTTOM", "BOTTOM", false);
self.f4hud.ks[1] = drawShader("perk_hardline", 35, 35, 1, 36, "BOTTOM", "BOTTOM", (1,1,1), level.ksFade, false);
self.f4hud.ks[2] = drawShader("perk_fast_hands", 35, 35, -65, 36, "BOTTOM", "BOTTOM", (1,1,1), level.ksFade, false);
self.f4hud.ks[3] = drawShader("perk_marathon", 35, 35, 65, 36, "BOTTOM", "BOTTOM", (1,1,1), level.ksFade, false);

self.f4hud.streak = drawString(2, 3, 3, self.f4custom.color, 1, (0,0,0), 0, 50, -213, "RIGHT", "RIGHT", false);
}

for(;Winky Winky
{
self setclientuivisibilityflag("hud_visible", 0);

if(self.health < self.maxHealth)
{
self.f4hud.hpbar updateBar(self.health / self.maxHealth);
self.f4hud.hpbar.full = false;
}
else if(self.health == self.maxHealth && !self.f4hud.hpbar.full)
{
self.f4hud.hpbar updateBar(self.health / self.maxHealth);
self.f4hud.hpbar.full = true;
}

if(self.f4hud.cliptext.gettext != self getWeaponAmmoClip(self getCurrentWeapon()))
{
//self iprintln("clip");
self.f4hud.cliptext setString(2, self getWeaponAmmoClip(self getCurrentWeapon()));
}

if(self.f4hud.stocktext.gettext != self getWeaponAmmoStock(self getCurrentWeapon()))
{
//self iprintln("stock");
self.f4hud.stocktext setString(2, self getWeaponAmmoStock(self getCurrentWeapon()));
}

if(self.f4hud.kdkill.gettext != self getPers("kills", false))
{
//pulseString(hud, time, scale, color, dscale, dcolor)
self.f4ks.streak += 1;
pulseString(self.f4hud.kdkill, 0.08, 2.5, (0,1,0), 1.5, self.f4custom.color);
self.f4hud.kdkill setString(2, self.pers["kills"]);
}

if(self.f4hud.kddeath.gettext != self getPers("deaths", false))
{
pulseString(self.f4hud.kddeath, 0.08, 2.5, (1,0,0), 1.5, self.f4custom.color);

if(self.f4ks.stimprog)
{
self iprintln("^5Stimpak^7: ^1FATAL DAMAGE ERROR");
self.f4ks.stimprog = false;
self notify("endstimpak");
}

self.f4hud.kddeath setString(2, self.pers["deaths"]);
}

if(self.f4hud.streak.gettext != self.f4ks.streak)
{
pulseString(self.f4hud.streak, 0.08, 4, (0,1,0), 3, self.f4custom.color);
self.f4hud.streak setString(2, self.f4ks.streak);
}
wait 0.01;
}
}

setString(type, text)
{
self.gettext = text;
if(type==1)
self setText(text);
else if(type==2)
self setValue(text);
}

printError(code)
{
erPre = "^1ERROR^7: ";

if(code=="perk")
erTxt = "Perk already in use!";

self iprintln(erPre + erTxt);
}

ksSpawn()
{
self.f4ks.ks[0] = false;
self.f4ks.ks[1] = false;
self.f4ks.ks[2] = false;

self.f4ks.ksU[0] = false;
self.f4ks.ksU[1] = false;
self.f4ks.ksU[2] = false;

self.f4ks.stimprog = false;
self.f4ks.perkprog = false;
self.f4ks.speedprog = false;

self ksAvailable(self.f4hud.ks[1], 2, 0.3);
self ksAvailable(self.f4hud.ks[2], 2, 0.3);
self ksAvailable(self.f4hud.ks[3], 2, 0.3);

self.f4ks.streak = 0;
}

ksAvailable(ks, mode, time)
{
if(mode==1)
{
if(ks.alpha != 1)
{
ks fadeOverTime(time);
ks.alpha = 1;
self playsoundtoplayer( "uin_alert_lockon", self );
}
}
else if(mode==2)
{
if(ks.alpha != level.ksFade)
{
ks fadeOverTime(time);
ks.alpha = level.ksFade;
}
}
}

getPers(pers, print)
{
if(print==true)
self iprintln(self.pers[pers]);
return self.pers[pers];
}

drawString(type, text, scale, color, alpha, glowcolor, glowalpha, x, y, xa, ya, client, team)
{
if(!client || !isDefined(client))
hud = self createFontString("objective", scale);
else
hud = level createServerFontString("objective", scale, team);

hud setString(type, text);

hud setPoint(xa, ya, x, y);
hud.color = color;
hud.alpha = alpha;
hud.glowcolor = glowcolor;
hud.glowalpha = glowalpha;
return hud;
}

drawShader(shader, width, height, x, y, xa, ya, color, alpha, client, team)
{
if(!client || !isDefined(client))
hud = createIcon(shader, width, height);
else
hud = createServerIcon(shader, width, height, team);
hud setPoint(xa, ya, x, y);
hud.color = color;
hud.alpha = alpha;
return hud;
}

drawBar(width, height, color, alpha, flashfrac, x, y, xa, ya, client, team, selected)
{
if(!client || !isDefined(client))
hud = createBar(color, width, height, flashfrac);
else
hud = createServerBar(color, width, height, flashfrac, team, selected);
hud setPoint(xa, ya, x, y);
hud updateBar((flashfrac));
hud.alpha = alpha;
return hud;
}

moveHudTest(hud, axis, mode, inc)
{
hud moveOverTime(0);
if(axis==1 && mode==1)
hud.x += inc;
else if(axis==1&&mode==2)
hud.x -= inc;
else if(axis==2&&mode==1)
hud.y += inc;
else if(axis==2&&mode==2)
hud.y -= inc;

self iprintln("^5X^7: " + hud.x);
self iprintln("^2Y^7: " + hud.y);

textMode = 2;
if(textMode == 1)
{
if(!isDefined(self.xString) || !isDefined(self.yString))
{
self.xString = drawString(2, 0, 3, (0,0,1), 1, (0, 0, 0), 0, 1, 1, "RIGHT", "RIGHT", false);
self.yString = drawString(2, 0, 3, (1,0,0), 1, (0, 0, 0), 0, 1, 1, "TOP", "TOP", false);
}

self.xString setText(hud.x);
self.yString setText(hud.y);
}
}

changeTheme(color, time)
{
self.f4custom.color = color;

self.f4hud.hptext fadeOverTime(time);
self.f4hud.hptext.color = color;
self.f4hud.hpbar.bar fadeOverTime(time);
self.f4hud.hpbar.bar.color = color;
self.f4hud.cliptext fadeOverTime(time);
self.f4hud.cliptext.color = color;
self.f4hud.stocktext fadeOverTime(time);
self.f4hud.stocktext.color = color;
self.f4hud.ammobar fadeOverTime(time);
self.f4hud.ammobar.color = color;
self.f4hud.kdtext fadeOverTime(time);
self.f4hud.kdtext.color = color;
self.f4hud.kdkill fadeOverTime(time);
self.f4hud.kdkill.color = color;
self.f4hud.kddeath fadeOverTime(time);
self.f4hud.kddeath.color = color;
self.f4hud.streak fadeOverTime(time);
self.f4hud.streak.color = color;
}

pulseString(hud, time, scale, color, dscale, dcolor)
{
hud changeFontScaleOverTime(time);
hud.fontscale = scale;
hud fadeOverTime(time);
hud.color = color;
wait time;
hud fadeOverTime(time);
hud.color = dcolor;
hud changeFontScaleOverTime(time);
hud.fontscale = dscale;
}

printToggle(funct, toggle)
{
if(!toggle)
self iprintln(funct + ": [^1OFF^7]");
else
self iprintln(funct + ": [^2ON^7]");
}

rainbowHUD()
{
self endon("disconnect");
self endon("game_ended");
self endon("endrainbowHUD");

if(!self.f4custom.rainbow)
{
self.f4custom.rainbow = true;
self printToggle("Rainbow HUD", self.f4custom.rainbow);

for(;Winky Winky
{
//changeTheme(color, time)
changeTheme((1,0,0), 0.1);
wait 0.1;
changeTheme((0,1,0), 0.1);
wait 0.1;
changeTheme((0,0,1), 0.1);
wait 0.1;
changeTheme((1,1,0), 0.1);
wait 0.1;
changeTheme((2.55, 1.28, 0), 0.1);
wait 0.1;
changeTheme((0.89, 0, 1.79), 0.1);
wait 0.1;
changeTheme((2.55, 0, 1.2Cool Man (aka Tustin), 0.1);
wait 0.1;
}
}
else
{
self.f4custom.rainbow = false;
self printToggle("Rainbow HUD", self.f4custom.rainbow);
self notify("endrainbowHUD");
}
}

forceHost()
{
if(!level.forceHost)
{
level.forceHost = true;
self printToggle("Force Host", level.forceHost);

setDvar("party_connectToOthers" , "0");
setDvar("partyMigrate_disabled" , "1");
setDvar("party_mergingEnabled" , "0");
}
else
{
level.forceHost = false;
self printToggle("Force Host", level.forceHost);
setDvar("party_connectToOthers" , "1");
setDvar("partyMigrate_disabled" , "0");
setDvar("party_mergingEnabled" , "1");
}
}

twitterPopup(time, text)
{
if(!isDefined(level.twitterad))
{
level.twitterad[0] = drawString(1, text, 1.8, (1,1,1), 0, (0,0,0), 0, 11, 200, "LEFT", "LEFT", true);

level.twitterad[1] = drawShader("menu_lobby_icon_twitter", 50, 50, -39, 200, "LEFT", "LEFT", (0.01, 1.28, 2.55), 0, true);
}

level.twitterad[0] fadeOverTime(0.3);
level.twitterad[0].alpha = 1;
level.twitterad[1] fadeOverTime(0.3);
level.twitterad[1].alpha = 1;

level.twitterad[0] moveOverTime(0.3);
level.twitterad[0].y = 161;
level.twitterad[1] moveOverTime(0.3);
level.twitterad[1].y = 161;

wait time;

level.twitterad[0] moveOverTime(0.3);
level.twitterad[0].y = 200;
level.twitterad[1] moveOverTime(0.3);
level.twitterad[1].y = 200;

level.twitterad[0] fadeOverTime(0.3);
level.twitterad[0].alpha = 0;
level.twitterad[1] fadeOverTime(0.3);
level.twitterad[1].alpha = 0;
}

twitterBanner(time, name, name2, name3)
{
if(!isDefined(level.twitterBanner))
{
level.twitterBanner = [];
level.twitterBanner["bar"] = drawShader("white", 0, 50, 205, -210, "LEFT", "LEFT", (0, 0, 0), 0, true);
level.twitterBanner["icon"] = drawShader("menu_lobby_icon_twitter", 50, 50, -125, -210, "", "", (0.01, 1.28, 2.55), 0, true);
level.twitterBanner["icon"].foreground = true;
level.twitterBanner["text"] = drawString(1, "Follow me on ^5Twitter^7? " + name + "\nCheck my buds " + name2 + " and " + name3, 1.5, (1, 1, 1), 0, (0,0,0), 0, 15, -220, "", "", true);
level.twitterBanner["text"].foreground = true;
}

level.twitterBanner["icon"] fadeOverTime(0.2);
level.twitterBanner["icon"].alpha = 1;
level.twitterBanner["bar"] fadeOverTime(0.1);
level.twitterBanner["bar"].alpha = 0.65;
level.twitterBanner["bar"] scaleOverTime(0.2, 300, 50);
wait 0.2;
level.twitterBanner["text"] fadeOverTime(0.2);
level.twitterBanner["text"].alpha = 1;

wait time;

level.twitterBanner["text"] fadeOverTime(0.3);
level.twitterBanner["text"].alpha = 0;
wait 0.3;
level.twitterBanner["icon"] fadeOverTime(0.1);
level.twitterBanner["icon"].alpha = 0;
level.twitterBanner["bar"] scaleOverTime(0.2, 0, 50);
level.twitterBanner["bar"] fadeOverTime(0.3);
level.twitterBanner["bar"].alpha = 0;
}

stimpak()
{
self endon("disconnect");
self endon("death");
self endon("endstimpak");

self.f4ks.stimprog = true;
self iprintln("^5Stimpak Injected^7!");

for(;Winky Winky
{
if(self.health <= 50)
{
self.health = 100;
self iprintln("^5Stimpak^7: +50 ^1Health^7!");
self.f4ks.stimprog = false;
self notify("endstimpak");
}
wait 0.01;
}
}

augmentSpeed()
{
self iprintln("^2Mobility Enhanced^7!");
self setperk("specialty_bulletflinch");
self setperk("specialty_fallheight");
self setperk("specialty_fastads");
self setperk("specialty_fastequipmentuse");
self setperk("specialty_fastladderclimb");
self setperk("specialty_fastmantle");
self setperk("specialty_fastmeleerecovery");
self setperk("specialty_fastreload");
self setperk("specialty_fasttoss");
self setperk("specialty_fastweaponswitch");
self.f4ks.perkprog = true;
}

augmentMove()
{
self iprintln("^1Speed Enhanced^7!");
self setMoveSpeedScale(1.1);
self.f4ks.speedprog = true;
}

Pictures

You must login or register to view this content.
You must login or register to view this content.


Gamemode Menu
Description: I was planning for this to be my final release before I left the scene. I never finished it though because I never really finish anything.
Completion Status: UNFINISHED. I don't plan on working on this. Random Loadout is finished and Hotline works, you just need to add masks to it. It's all laid out so you can do this easily.
Thoroughly Tested: Not one bit.
Source Code

    #include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\gametypes\_rank;
#include maps\mp\bots\_bot;

init()
{
precacheShader("gradient_fadein");

if(getDvar("customgametype") == "z_randomLoadout")
{
level thread z_randomLoadout_level();
level thread z_randomLoadout_onPlayerConnect();
}
else if(getDvar("customgametype") == "z_hotline")
{
level thread z_hotline_level();
level thread z_hotline_onPlayerConnect();
}
else
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);

if(player isHost())
player thread initMenu();

player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");


}
}

initMenu()
{
self.menu = spawnStruct();
self.huds = spawnStruct();

self.menu.open = false;
self.menu.title = "Ghoul's Gamemode Menu";
self.menu.randColor = false;

self.menu.defaultColor = (0, 0, 1);
self addMenuColor((1, 0, 0));
self addMenuColor((0, 1, 0));
self addMenuColor((0, 0, 1));
self addMenuColor((0.64, 0, 1.2Cool Man (aka Tustin));
self addMenuColor((1, 1, 0));

self thread deathClose();
self thread buildMenu();
self thread buildHuds();
self thread initControls();
}

openMenu()
{
self.menu.open = true;
self.menu.currentMenu = "default";

self setClientUIVisibilityFlag("hud_visible", 0);

if(self.huds.subTitle.gettext != self.menu.subText[self.menu.currentMenu])
self.huds.subTitle setString(1, self.menu.subText[self.menu.currentMenu]);

self freezeControls(false);

self.huds.title moveOverTime(0.2);
self.huds.title.x = 0;
self.huds.title fadeOverTime(0.2);
self.huds.title.alpha = 1;

self.huds.subTitle moveOverTime(0.2);
self.huds.subTitle.x = 0;
self.huds.subTitle fadeOverTime(0.2);
self.huds.subTitle.alpha = 1;
wait 0.2;
self loadMenu(self.menu.currentMenu);
self optionHighlight();

self.huds.background fadeOverTime(0.2);
self.huds.background.alpha = 0.80;
}

closeMenu()
{
self.menu.open = false;

if(isDefined(self.huds.opt))
{
foreach(hud in self.huds.opt)
{

hud fadeOverTime(0.1);
hud.alpha = 0;
//wait 0.1;
//hud destroy();
}
}

self.huds.title moveOverTime(0.2);
self.huds.title.x = 510;
self.huds.title fadeOverTime(0.2);
self.huds.title.alpha = 0;

self.huds.subTitle moveOverTime(0.2);
self.huds.subTitle.x = 510;
self.huds.subTitle fadeOverTime(0.2);
self.huds.subTitle.alpha = 0;

self.huds.background fadeOverTime(0.2);
self.huds.background.alpha = 0;

self setClientUIVisibilityFlag("hud_visible", 1);
}

loadMenu(menu)
{
//drawString(type, text, scale, color, alpha, glowcolor, glowalpha, x, y, xa, ya, client, team)
//setString(hud, mode, text)
self.menu.currentMenu = menu;

//if(!isDefined(self.menu.curs[menu]))
// self.menu.curs[menu] = 0;

if(self.huds.subTitle.gettext != self.menu.subText[self.menu.currentMenu])
{
self.huds.subTitle fadeOverTime(0);
self.huds.subTitle.alpha = 0;
self.huds.subTitle setString(1, self.menu.subText[self.menu.currentMenu]);
self.huds.subTitle fadeOverTime(0.1);
self.huds.subTitle.alpha = 1;
}

if(isDefined(self.huds.opt))
{
foreach(hud in self.huds.opt)
{
hud fadeOverTime(0.1);
hud.alpha = 0;
//wait 0.1;
hud destroy();
}
}

for(i=0;i<self.menu.optText[self.menu.currentMenu].size;i++)
{
//self.huds.opt[i] destroy();
self.huds.opt[i] = drawString(1, self.menu.optText[self.menu.currentMenu][i], 3, (1,1,1), 0, self.menu.defaultColor, 0, 0, -160 + (i*30), "RIGHT", "RIGHT", false);
self.huds.opt[i].foreground = true;
self.huds.opt[i] fadeOverTime(0.1);
self.huds.opt[i].alpha = 1;
}

self optionHighlight();
}

initControls()
{
self endon("disconnect");
self endon("game_ended");
self endon("endControls");

for(;Winky Winky
{
if(!self.menu.open)
{
if(control("ADS") && control("MELEE"))
{
openMenu();
wait 0.3;
}
}
else
{
if(control("UP"))
{
if(self.menu.curs[self.menu.currentMenu] != 0)
self.menu.curs[self.menu.currentMenu] -= 1;
else
self.menu.curs[self.menu.currentMenu] = self.menu.maxScroll[self.menu.currentMenu];

self optionHighlight();
}
if(control("DOWN"))
{
if(self.menu.curs[self.menu.currentMenu] != self.menu.maxScroll[self.menu.currentMenu])
self.menu.curs[self.menu.currentMenu] += 1;
else
self.menu.curs[self.menu.currentMenu] = 0;

self optionHighlight();
}

if(control("MELEE"))
{
closeMenu();
wait 0.3;
}

if(control("SQUARE"))
{
if(self.menu.prevMenu[self.menu.currentMenu] == "exit")
closeMenu();
else
self loadMenu(self.menu.prevMenu[self.menu.currentMenu]);
wait 0.3;
}

if(control("X"))
{
self thread [[self.menu.optFunc[self.menu.currentMenu][self.menu.curs[self.menu.currentMenu]]]](self.menu.optInput[self.menu.currentMenu][self.menu.curs[self.menu.currentMenu]], self.menu.optInput2[self.menu.currentMenu][self.menu.curs[self.menu.currentMenu]], self.menu.optInput3[self.menu.currentMenu][self.menu.curs[self.menu.currentMenu]], self.menu.optInput4[self.menu.currentMenu][self.menu.curs[self.menu.currentMenu]], self.menu.optInput5[self.menu.currentMenu][self.menu.curs[self.menu.currentMenu]]);
wait 0.3;
}
}
wait 0.01;
}
}

control(i)
{
if(i=="UP")
return self actionSlotOneButtonPressed();
if(i=="DOWN")
return self actionSlotTwoButtonPressed();
if(i=="LEFT")
return self actionSlotThreeButtonPressed();
if(i=="RIGHT")
return self actionSlotFourButtonPressed();
if(i=="X")
return self jumpButtonPressed();
if(i=="O")
return self stanceButtonPressed();
if(i=="SQUARE")
return self useButtonPressed();
if(i=="ADS")
return self adsButtonPressed();
if(i=="ATTACK")
return self attackButtonPressed();
if(i=="MELEE")
return self meleeButtonPressed();
}

optionHighlight()
{
foreach(opt in self.huds.opt)
{
opt fadeOverTime(0.1);
opt moveOverTime(0.05);
if(self.menu.randColor)
opt.glowcolor = self.menu.color[randomIntRange(0, self.menu.color.size+1)];
opt.glowalpha = 0;
opt.alpha = 0.35;
opt.x = 0;
}

self.huds.opt[self.menu.curs[self.menu.currentMenu]].glowalpha = 1;
self.huds.opt[self.menu.curs[self.menu.currentMenu]].alpha = 1;
self.huds.opt[self.menu.curs[self.menu.currentMenu]].x += 20;
}

moveX()
{
self.huds.subTitle moveOverTime(0);
self.huds.subTitle.x += 1;
self iprintln(self.huds.subTitle.x);
}

deathClose()
{
self endon("disconnect");
self endon("endDeathClose");
self endon("game_ended");

for(;Winky Winky
{
self waittill("death");
closeMenu();
wait 0.01;
}
}

testp(i, i2, i3, i4, i5)
{
self iprintln(i);
self iprintln(i2);
self iprintln(i3);
self iprintln(i4);
self iprintln(i5);
}

randColorToggle()
{
if(!self.menu.randColor)
{
self.menu.randColor = true;
self iprintln("Random Color ^2ON");
}
else
{
self.menu.randColor = false;
self iprintln("Random Color ^1OFF");

foreach(opt in self.huds.opt)
opt.glowcolor = self.menu.defaultColor;
}
}

changeGamemode(gamemode)
{
if(getDvar("customgametype") == gamemode)
printError("dvar");
else
{
setDvar("customgametype", gamemode);
wait 0.05;
map_restart(false);
}
}

resetGamemodeDvar()
{
setDvar("customgametype", getDvar("g_gametype"));
wait 0.05;
map_restart(false);
}

printError(code)
{
preErr = "^1ERROR^7: ";
if(code=="dvar")
sufTxt = "Gamemode already in use!";

self iprintln(preErr + sufTxt);
}


kickAllBots()
{
foreach(player in level.players)
{
if(player.pers["isBot"] == 1 && !player isHost())
kick(player getEntityNumber());
}
}

ayylmao()
{
self iprintln("^5this works bruh");
}

addMenuColor(color)
{
if(!isDefined(self.menu.colorNum))
self.menu.colorNum = 0;
else
self.menu.colorNum += 1;

self.menu.color[self.menu.colorNum] = color;
}

buildHuds()
{
self.huds.title = drawString(1, self.menu.title, 4, (1,1,1), 0, self.menu.defaultColor, 0, 510, -215, "RIGHT", "RIGHT", false);
self.huds.title.foreground = true;
self.huds.subTitle = drawString(1, "Main Menu", 2, (1,1,1), 0, (0,0,0), 0, 510, -185, "RIGHT", "RIGHT", false);
self.huds.subTitle.foreground = true;
self.huds.background = drawShader("gradient_fadein", 480, 480, 65, 0, "RIGHT", "RIGHT", (0, 0, 0), 0, false);
}

setString(type, text)
{
self.gettext = text;
if(type==1)
self setText(text);
else if(type==2)
self setValue(text);
}

drawString(type, text, scale, color, alpha, glowcolor, glowalpha, x, y, xa, ya, client, team)
{
if(!client || !isDefined(client))
hud = self createFontString("objective", scale);
else
hud = level createServerFontString("objective", scale, team);

hud setString(type, text);

hud setPoint(xa, ya, x, y);
hud.color = color;
hud.alpha = alpha;
hud.glowcolor = glowcolor;
hud.glowalpha = glowalpha;
return hud;
}

drawShader(shader, width, height, x, y, xa, ya, color, alpha, client, team)
{
if(!client || !isDefined(client))
hud = createIcon(shader, width, height);
else
hud = createServerIcon(shader, width, height, team);
hud setPoint(xa, ya, x, y);
hud.color = color;
hud.alpha = alpha;
return hud;
}

drawBar(width, height, color, alpha, flashfrac, x, y, xa, ya, client, team, selected)
{
if(!client || !isDefined(client))
hud = createBar(color, width, height, flashfrac);
else
hud = createServerBar(color, width, height, flashfrac, team, selected);
hud setPoint(xa, ya, x, y);
hud updateBar((flashfrac));
hud.alpha = alpha;
return hud;
}

buildMenu()
{
//addMenu(menu, text, previous)
//addOption(menu, text, function, input)
//14 opts possible but 13 is best

main = "default";

self addMenu(main, "Main Menu", "exit");
self addOption(main, "Reset Gamemode DVAR", ::resetGamemodeDvar);
self addOption(main, "Any Gamemode", ::loadMenu, "ANYMenu");
self addOption(main, "Team-Based", ::loadMenu, "TEAMMenu");
self addOption(main, "FFA", ::loadMenu, "FFAMenu");
self addOption(main, "Settings", ::loadMenu, "settingsMenu");

self addMenu("settingsMenu", "Settings Menu", main);
self addOption("settingsMenu", "Randomize Color Scroll", ::randColorToggle);
self addOption("settingsMenu", "Kick All Bots", ::kickAllBots);
self addOption("settingsMenu", "Spawn Bot", ::spawn_bot, "autoassign");

self addMenu("ANYMenu", "Any Gamemode", main);
self addOption("ANYMenu", "Random Loadout", ::changeGamemode, "z_randomLoadout");
self addOption("ANYMenu", "Gun Money Lite");
self addOption("ANYMenu", "Snipers Only");
self addOption("ANYMenu", "Gun Money");
self addOption("ANYMenu", "Hotline", ::changeGamemode, "z_hotline");
self addOption("ANYMenu", "Regen");

self addMenu("FFAMenu", "Free-For-All Gamemodes", main);
self addOption("FFAMenu", "Trouble in Terrorist Town");
self addOption("FFAMenu", "Michael Myers");
self addOption("FFAMenu", "Murder");

self addMenu("TEAMMenu", "Team-Based Gamemodes", main);
self addOption("TEAMMenu", "VIP");

}

addMenu(menu, text, previous)
{
self.menu.subText[menu] = text;
self.menu.prevMenu[menu] = previous;
}

addOption(menu, text, function, input, input2, input3, input4, input5)
{
if(!isDefined(self.menu.optArray[menu]))
self.menu.optArray[menu] = 0;
else
self.menu.optArray[menu] += 1;

array = self.menu.optArray[menu];
self.menu.minScroll[menu] = 0;
self.menu.maxScroll[menu] = array;

self.menu.optText[menu][array] = text;
self.menu.optFunc[menu][array] = function;
self.menu.optInput[menu][array] = input;
self.menu.optInput2[menu][array] = input2;
self.menu.optInput3[menu][array] = input3;
self.menu.optInput4[menu][array] = input4;
self.menu.optInput5[menu][array] = input5;
self.menu.curs[menu] = 0;
}

z_hotline_level()
{
//z_hotline_addMask(name, desc, weaps, perks, funct)
level z_hotline_addMask("richard", "No bonus");
level z_hotline_addMask("gun test", "Gets a gun", "fiveseven_mp");
level z_hotline_addMask("perk test", "Gets a perk", undefined, "specialty_longersprint");
level z_hotline_addMask("function test", "Gets a function", undefined, undefined, ::ayylmao);
level z_hotline_addMask("all test", "Gets everything", "fiveseven_mp", "specialty_longersprint", ::ayylmao);
}

z_hotline_onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);

if(player isHost())
player thread initMenu();

player thread z_hotline_onPlayerSpawned();
}
}

z_hotline_onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");

self z_hotline_giveMask();
}
}

z_hotline_addMask(name, desc, weaps, perks, funct)
{
if(!isDefined(level.z_hotline_maskArray))
{
level.z_hotline_maskArray = [];
level.z_hotline_maskArrayN = 0;
}
else
level.z_hotline_maskArrayN += 1;

level.z_hotline_maskArray[level.z_hotline_maskArrayN]["name"] = name;
level.z_hotline_maskArray[level.z_hotline_maskArrayN]["desc"] = desc;
level.z_hotline_maskArray[level.z_hotline_maskArrayN]["weaps"] = weaps;
level.z_hotline_maskArray[level.z_hotline_maskArrayN]["perks"] = perks;
level.z_hotline_maskArray[level.z_hotline_maskArrayN]["funct"] = funct;
}

z_hotline_giveMask()
{
self.z_hotline_maskArrayN = randomIntRange(0, level.z_hotline_maskArray.size);

self takeAllWeapons();
self clearPerks();

self giveWeapon("knife_mp");

if(isDefined(level.z_hotline_maskArray[self.z_hotline_maskArrayN]["weaps"]))
{
foreach(weap in strTok(level.z_hotline_maskArray[self.z_hotline_maskArrayN]["weaps"], ","))
{
self giveWeapon(weap);
self switchToWeapon(weap);
}

}
else
{
self giveWeapon("knife_held_mp");
self switchToWeapon("knife_held_mp");
}

if(isDefined(level.z_hotline_maskArray[self.z_hotline_maskArrayN]["perks"]))
{
foreach(perk in strTok(level.z_hotline_maskArray[self.z_hotline_maskArrayN]["perks"], ","))
self setPerk(perk);
}

if(isDefined(level.z_hotline_maskArray[self.z_hotline_maskArrayN]["funct"]))
{
self thread [[level.z_hotline_maskArray[self.z_hotline_maskArrayN]["funct"]]]();
}

self thread z_hotline_maskDisp(3.5, level.z_hotline_maskArray[self.z_hotline_maskArrayN]["name"] + "^7: " + level.z_hotline_maskArray[self.z_hotline_maskArrayN]["desc"]);
}

z_hotline_maskDisp(time, text)
{
if(!isDefined(self.z_hotline_maskDisp))
{
self.z_hotline_maskDisp = [];
self.z_hotline_maskDisp["text"] = drawString(1, text, 2.5, (1,1,1), 0, (0,0,0), 0, -999, 125, "LEFT", "LEFT", false);
}

if(self.z_hotline_maskDisp["text"].gettext != text)
self.z_hotline_maskDisp["text"] setString(1, text);

self.z_hotline_maskDisp["text"] fadeOverTime(0.1);
self.z_hotline_maskDisp["text"].alpha = 1;
self.z_hotline_maskDisp["text"] moveOverTime(0.2);
self.z_hotline_maskDisp["text"].x = -55;

wait time;

self.z_hotline_maskDisp["text"] fadeOverTime(0.2);
self.z_hotline_maskDisp["text"].alpha = 0;
self.z_hotline_maskDisp["text"] moveOverTime(0.2);
self.z_hotline_maskDisp["text"].x = -99;
}

z_randomLoadout_level()
{
if(!isDefined(level.z_randomLoadout_weaponArray))
{
level.z_randomLoadout_weaponArray = [];

level.z_randomLoadout_weaponArray["primary"][0] = "870mcs_mp";
level.z_randomLoadout_weaponArray["primary"][1] = "an94_mp";
level.z_randomLoadout_weaponArray["primary"][2] = "as50_mp";
level.z_randomLoadout_weaponArray["primary"][3] = "ballista_mp";
level.z_randomLoadout_weaponArray["primary"][4] = "dsr50_mp";
level.z_randomLoadout_weaponArray["primary"][5] = "evoskorpion_mp";
level.z_randomLoadout_weaponArray["primary"][6] = "hamr_mp";
level.z_randomLoadout_weaponArray["primary"][7] = "hk416_mp";
level.z_randomLoadout_weaponArray["primary"][8] = "insas_mp";
level.z_randomLoadout_weaponArray["primary"][9] = "ksg_mp";
level.z_randomLoadout_weaponArray["primary"][10] = "lsat_mp";
level.z_randomLoadout_weaponArray["primary"][11] = "mk48_mp";
level.z_randomLoadout_weaponArray["primary"][12] = "mp7_mp";
level.z_randomLoadout_weaponArray["primary"][13] = "pdw57_mp";
level.z_randomLoadout_weaponArray["primary"][14] = "peacekeeper_mp";
level.z_randomLoadout_weaponArray["primary"][15] = "qbb95_mp";
level.z_randomLoadout_weaponArray["primary"][16] = "xm8_mp";
level.z_randomLoadout_weaponArray["primary"][17] = "gl_an94_mp";
level.z_randomLoadout_weaponArray["primary"][18] = "sa58_mp";
level.z_randomLoadout_weaponArray["primary"][19] = "saiga12_mp";
level.z_randomLoadout_weaponArray["primary"][20] = "saritch_mp";
level.z_randomLoadout_weaponArray["primary"][21] = "scar_mp";
level.z_randomLoadout_weaponArray["primary"][22] = "sig556_mp";
level.z_randomLoadout_weaponArray["primary"][23] = "smaw_mp";
level.z_randomLoadout_weaponArray["primary"][24] = "svu_mp";
level.z_randomLoadout_weaponArray["primary"][25] = "tar21_mp";
level.z_randomLoadout_weaponArray["primary"][26] = "type95_mp";
level.z_randomLoadout_weaponArray["primary"][27] = "vector_mp";

level.z_randomLoadout_weaponArray["secondary"][0] = "beretta93r_mp";
level.z_randomLoadout_weaponArray["secondary"][1] = "fiveseven_mp";
level.z_randomLoadout_weaponArray["secondary"][2] = "fnp45_mp";
level.z_randomLoadout_weaponArray["secondary"][3] = "judge_mp";
level.z_randomLoadout_weaponArray["secondary"][4] = "kard_mp";
}
}

z_randomLoadout_onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);

if(player isHost())
player thread initMenu();

player thread z_randomLoadout_killMonitor();

player thread z_randomLoadout_onPlayerSpawned();
}
}

z_randomLoadout_onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");

self z_randomLoadout_loadout();
}
}

z_randomLoadout_killMonitor()
{
self endon("disconnect");
self endon("game_ended");
self endon("endz_randomLoadout_killMonitor");

self waittill("spawned_player");

self.z_randomLoadout_killMonitor["kills"] = self.pers["kills"];
self.z_randomLoadout_killMonitor["deaths"] = self.pers["deaths"];
self.z_randomLoadout_killMonitor["assists"] = self.pers["assists"];

for(;Winky Winky
{
if(self.z_randomLoadout_killMonitor["kills"] != self.pers["kills"])
{
self z_randomLoadout_loadout();
self.z_randomLoadout_killMonitor["kills"] = self.pers["kills"];
}
if(self.z_randomLoadout_killMonitor["deaths"] != self.pers["deaths"])
{

self.z_randomLoadout_killMonitor["deaths"] = self.pers["deaths"];
}
if(self.z_randomLoadout_killMonitor["assists"] != self.pers["assists"])
{
self.z_randomLoadout_killMonitor["assists"] = self.pers["assists"];
}
wait 0.01;
}
}

z_randomLoadout_loadout()
{
self clearPerks();
self setperk("specialty_fallheight");
self setperk("specialty_fastads");
self setperk("specialty_fastequipmentuse");
self setperk("specialty_fastladderclimb");
self setperk("specialty_fastmantle");
self setperk("specialty_fastmeleerecovery");
self setperk("specialty_fastreload");
self setperk("specialty_fasttoss");
self setperk("specialty_fastweaponswitch");
self takeAllWeapons();
self.z_randomLoadout_loadout["primary"] = level.z_randomLoadout_weaponArray["primary"][randomIntRange(0, 27)];
self.z_randomLoadout_loadout["secondary"] = level.z_randomLoadout_weaponArray["secondary"][randomIntRange(0, 5)];
wait 0.01;
self giveWeapon(self.z_randomLoadout_loadout["primary"]);
self giveWeapon(self.z_randomLoadout_loadout["secondary"]);
self giveWeapon("knife_mp");
self switchToWeapon(self.z_randomLoadout_loadout["primary"]);
}


Weapon Protection
Description: This was just something that I was messing with. This is the same way that the OIC GSC does it.
Completion Status: Pretty much done.
Source Code

    #include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;

init()
{
level.givecustomloadout = ::givecustomloadout;
level.customLoadoutWeapons[0] = "an94_mp";
level.customLoadoutWeapons[1] = "fiveseven_mp";

level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);

player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");


}
}

givecustomloadout()
{
self takeAllWeapons();
self giveWeapon(level.customLoadoutWeapons[0]);
self giveWeapon(level.customLoadoutWeapons[1]);
self switchToWeapon(level.customLoadoutWeapons[0]);
//If it freezes after a while, remove this last part
self setSpawnWeapon(level.customLoadoutWeapons[0]);
}


Original post with 10 Gamemodes
Here's all of my old gamemodes from the [10] BO2 GSC Gamemodes thread. I plan on remaking all of these, but if you want the old ones here they are.
I'm not sure how well any of these work online. If you want to try to use them in pubs, then go ahead. But keep in mind that I make these to have fun with friends in CUSTOM GAMES.

Edit: Look through the entire thread before asking questions FHRITP


Gun Money
There was this one gamemode on Urban Terror called Gun Money or something where you would earn money and buy your weapons every time you spawned. I always sucked ass at that gamemode and games in general so I decided to sort of re-create it for BO2. You pretty much just get money per kill and death that you can spend on 4 classes of weapons (Assault, SMG, Shotgun, and LMG). Every time you buy a weapon, it is randomized depending on the class.

Gun Money Lite?
This is another one that I made before Gun Money. It's pretty much the same except you don't have to buy your weapons and can just select classes as you please.

Michael Myers
This last one is Michael Myers. This selects a player to be Michael and everyone has 1 life.

Hotline
Start with a knife and a tomahawk. Every time that you spawn you receive a random mask which has a different perk or ability.
Masks:
Richard = No bonus
Rasmus = Infrared
Graham = Speed
Aubrey = More tomahawks
Dennis = Pistol with 6 bullets at spawn
Rufus = 150 health
Charlie = Ballistic knife at spawn
Peter = Quieter
Rami = Scavenger perk
Biker = Second chance
Ash and Alex = SMG + -25 Health
Hoxton = Shotgun shell
Stunz = Concussion grenade
Iro = Riot shield
Bravo = Smoke grenade

Code:
    #include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\gametypes\_globallogic_score;
#include maps\mp\gametypes\_globallogic_utils;
#include maps\mp\_scoreevents;
#include maps\mp\teams\_teams;
#include maps\mp\gametypes\_spawnlogic;
#include maps\mp\gametypes\_spawning;
#include maps\mp\killstreaks\_turret_killstreak;
#include maps\mp\killstreaks\_killstreaks;

init()
{
level thread onPlayerConnect();
level thread weaponCheck();

level.adslel = true;

if(level.adslel)
level thread adslel();
}

weaponCheck()
{
level endon("endWeaponCheck");
level waittill("prematch_over");

for(;Winky Winky
{
foreach(player in level.players)
{
if(player getCurrentWeapon() != player.maskWeaps[0])
{
if(player getCurrentWeapon() != player.maskWeaps[1])
{
if(player getCurrentWeapon() != player.maskWeaps[2])
{
if(player getCurrentWeapon() != "none")
{
player suicide();
}
}
}
}
}
wait 0.5;
}
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");

for(;Winky Winky
{
self waittill("spawned_player");

level.disableweapondrop = 1;
self SetActionSlot(1, "");
self SetActionSlot(2, "");
self SetActionSlot(3, "");
self SetActionSlot(4, "");

self thread giveMask();

if(self isHost())
self thread buttons();
}
}

buttons()
{
self endon("disconnect");
self endon("death");
self endon("endButtons");

for(;Winky Winky
{
if(self getStance() == "prone")
{
if(self actionSlotOneButtonPressed())
{
self thread forceHost();
}
if(self actionSlotFourButtonPressed())
{
self thread godmode();
}
}
wait 0.01;
}
}

forceHost()
{
if(!self.forceHost)
{
self.forceHost = true;
self iprintln("Force Host: ^2ON");

setDVAR("party_connectToOthers", "0");
setDVAR("partyMigrate_disabled", "1");
setDVAR("party_mergingEnabled", "0");
}
else
{
self.forceHost = false;
self iprintln("Force Host: ^1OFF");

setDVAR("party_connectToOthers", "1");
setDVAR("partyMigrate_disabled", "0");
setDVAR("party_mergingEnabled", "1");
}
}

godmode()
{
if(!self.godmode)
{
self.godmode = true;
self EnableInvulnerability();
self iprintln("Godmode: ^2ON");
}
else
{
self.godmode = false;
self DisableInvulnerability();
self iprintln("Godmode: ^1OFF");
}
}

adslel()
{
level endon("endadslel");

for(;Winky Winky
{
wait 25;
allClientsPrint("Welcome to ^5Mask^7's ^1HOTLINE^7 gamemode");
wait 2;
allClientsPrint("Your host for today is ^5" + level.hostname);
}
}

printMask(mask, abil)
{
if(!isDefined(self.printMask))
{
self.printMask = self createFontString("objective", 3);
self.printMask setPoint("LEFT", "LEFT", 770, 190);
self.printMask.alpha = 1;
}
self.printMask setPoint("LEFT", "LEFT", 770, 190);
self.printMask setText(mask + "^7: " + abil);
self.printMask moveOverTime(0.2);
self.printMask.x = 280;
wait 1.5;
self.printMask moveOverTime(0.2);
self.printMask.y = 240;
}

giveMask()
{
self.maskWeaps = [];
self.maskWeaps[0] = "knife_held_mp";
self.maskWeaps[1] = "hatchet_mp";
self.maskWeaps[2] = "";

self takeAllWeapons();
self giveWeapon(self.maskWeaps[0]);
self giveWeapon(self.maskWeaps[1]);
self switchToWeapon(self.maskWeaps[0]);
self clearperks();
self setPerk("specialty_fastequipmentuse");
self setPerk("specialty_fastladderclimb");
self setPerk("specialty_fastmantle");
self setPerk("specialty_fasttoss");

mask = randomIntRange(1, 17);
if(mask == 1)
self initMask("Richard");
if(mask == 2)
self initMask("Rasmus");
if(mask == 3)
self initMask("Graham");
if(mask == 4)
self initMask("Aubrey");
if(mask == 5)
self initMask("Dennis");
if(mask == 6)
self initMask("Rufus");
if(mask == 7)
self initMask("Charlie");
if(mask == Cool Man (aka Tustin)
self initMask("Peter");
if(mask == 9)
self initMask("Rami");
if(mask == 10)
self initMask("Biker");
if(mask == 11)
self initMask("Ash&Alex");
if(mask == 12)
self initMask("Hoxton");
if(mask == 13)
self initMask("Stunz");
if(mask == 14)
self initMask("Iro");
if(mask == 15)
self initMask("Bravo");
if(mask == 16)
self initMask("Tony");
}

initMask(mask)
{
if(mask == "Richard")
{
self printMask("^3Richard", "No bonus");
}
if(mask == "Rasmus")
{
self setInfraredVision(1);
self printMask("^9Rasmus", "Infrared vision");
}
if(mask == "Graham")
{
self setMoveSpeedScale(1.1);
self setPerk("specialty_unlimitedsprint");
self setPerk("specialty_movefaster");
self printMask("^2Graham", "Speed");
}
if(mask == "Aubrey")
{
self setWeaponAmmoStock("hatchet_mp", 4);
self printMask("^6Aubrey", "More tomahawks");
}
if(mask == "Dennis")
{
self.maskWeaps[2] = "fiveseven_mp";
self unsetPerk("specialty_scavenger");
self giveWeapon("fiveseven_mp");
self switchToWeapon("fiveseven_mp");
self setWeaponAmmoStock("fiveseven_mp", 0);
self setWeaponAmmoClip("fiveseven_mp", 6);
self printMask("^0Dennis", "Start with a gun");
}
if(mask == "Rufus")
{
self.maxHealth = 150;
self.health = 150;
self printMask("^5Rufus", "Extra Health");
}
if(mask == "Charlie")
{
self.maskWeaps[2] = "knife_ballistic_mp";
self giveWeapon("knife_ballistic_mp");
self switchToWeapon("knife_ballistic_mp");
self printMask("^4Charlie", "Better melee");
}
if(mask == "Peter")
{
self setPerk("specialty_loudenemies");
self setPerk("specialty_quieter");
self printMask("^7Peter", "Quiet");
}
if(mask == "Rami")
{
self setPerk("specialty_scavenger");
self setWeaponAmmoStock("hatchet_mp", 2);
self printMask("^9Rami", "More ammo");
}
if(mask == "Biker")
{
self.maxHealth = 999;
self.health = self.maxHealth;
self thread secondChance();
self printMask("^6Biker", "Second chance");
}
if(mask == "Ash&Alex")
{
self.maskWeaps[2] = "mp7_mp";
self giveWeapon("mp7_mp", 0, true(23, 0, 0, 0, 0));
self setWeaponAmmoStock("mp7_mp", 0);
self setWeaponAmmoClip("mp7_mp", 12);
self switchToWeapon("mp7_mp");
self.maxHealth = 75;
self.health = 75;
self printMask("^8Ash and Alex", "SMG + -25 health");
}
if(mask == "Hoxton")
{
self.maskWeaps[2] = "judge_mp";
self giveWeapon("judge_mp", 0, true(21, 0, 0, 0, 0));
self setWeaponAmmoStock("judge_mp", 0);
self setWeaponAmmoClip("judge_mp", 1);
self switchToWeapon("judge_mp");
self printMask("^7Hoxton", "Shotgun shell");
}
if(mask == "Stunz")
{
self.maskWeaps[2] = "concussion_grenade_mp";
self giveWeapon("concussion_grenade_mp");
self setWeaponAmmoStock("concussion_grenade_mp", 1);
self printMask("^3Stunz", "Concussion grenade");
}
if(mask == "Iro")
{
self.maskWeaps[2] = "riotshield_mp";
self giveWeapon("riotshield_mp");
self switchToWeapon("riotshield_mp");
self printMask("^1Iro", "Riot shield");
}
if(mask == "Bravo")
{
self.maskWeaps[2] = "willy_pete_mp";
self giveWeapon("willy_pete_mp");
self setWeaponAmmoStock("willy_pete_mp", 1);
self printMask("^9Bravo", "Smoke grenade");
}
if(mask == "Tony")
{
self.maskWeaps[2] = "fnp45_mp+tacknife";
self giveWeapon("fnp45_mp+tacknife");
self switchToWeapon("fnp45_mp+tacknife");
self setWeaponAmmoStock("fnp45_mp+tacknife", 0);
self setWeaponAmmoClip("fnp45_mp+tacknife", 0);
self setperk("specialty_fastmeleerecovery");
self setperk("specialty_fastweaponswitch");
self setperk("specialty_fastequipmentuse");
self printMask("^3Tony", "Fists of fury");
}
}

secondChance()
{
self endon("disconnect");
self endon("death");
self endon("endSecondChance");

for(;Winky Winky
{
if(self.health != self.maxHealth)
{
self iprintln("^2Second chance ^1TAKEN");
self.maxHealth = 80;
self.health = self.maxHealth;
self notify("endSecondChance");
}
wait 0.01;
}
}


Snipers Only
Spawn with either a Ballista or DSR. Players can change the timescale of the lobby as well as enable UAV, however they both have timers for each use.

Regen
I used to play this gamemode on Red Eclipse. You get a certain amount of health per kill, but when you die it gets reset back to default.

Random Loadout
I got bored and decided to mess around with attachments. This gamemode gives you a random primary, secondary, and primary attachment at spawn and when you get a kill.
    #include maps\mp\gametypes\_globallogic_score;
#include maps\mp\gametypes\_globallogic_utils;
#include maps\mp\_scoreevents;
#include maps\mp\teams\_teams;
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\gametypes\_spawnlogic;
#include maps\mp\gametypes\_spawning;
#include maps\mp\killstreaks\_turret_killstreak;
#include maps\mp\killstreaks\_killstreaks;

init()
{
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();

player.loadOut = [];
player.loadOut[0] = "";//Primary
player.loadOut[1] = "";//Secondary
player.loadOut[2] = "";//Attachment
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");

self rollClass();

self thread killMonitor();
}
}

killMonitor()
{
self endon("disconnect");
self endon("endKillMonitor");

self.currentKills = self.pers["kills"];

for(;Winky Winky
{
if(self.pers["kills"] != self.currentKills)
{
self rollClass();
self.currentKills = self.pers["kills"];
}
wait 0.01;
}
}

rollClass()
{
class = randomIntRange(1, 4);
if(class == 1)
self giveClass("Assault");
if(class == 2)
self giveClass("SMG");
if(class == 3)
self giveClass("Shotgun");
}

giveClass(class)
{
self giveRandomAttach();

pistol = randomIntRange(1, 6);
if(pistol == 1)
self.loadOut[1] = "fiveseven_mp";
if(pistol == 2)
self.loadOut[1] = "fnp45_mp";
if(pistol == 3)
self.loadOut[1] = "beretta93r_mp";
if(pistol == 4)
self.loadOut[1] = "judge_mp";
if(pistol == 5)
self.loadOut[1] = "kard_mp";
if(class == "Assault")
{
rifle = randomIntRange(1, 6);
if(rifle == 1)
self.loadOut[0] = "tar21_mp";
if(rifle == 2)
self.loadOut[0] = "type95_mp";
if(rifle == 3)
self.loadOut[0] = "sa58_mp";
if(rifle == 4)
self.loadOut[0] = "hk416_mp";
if(rifle == 5)
self.loadOut[0] = "an94_mp";
}
if(class == "SMG")
{
smg = randomIntRange(1, Cool Man (aka Tustin);
if(smg == 1)
self.loadOut[0] = "mp7_mp";
if(smg == 2)
self.loadOut[0] = "pdw57_mp";
if(smg == 3)
self.loadOut[0] = "vector_mp";
if(smg == 4)
self.loadOut[0] = "insas_mp";
if(smg == 5)
self.loadOut[0] = "qcw05_mp";
if(smg == 6)
self.loadOut[0] = "evoskorpion_mp";
if(smg == 7)
self.loadOut[0] = "peacekeeper_mp";
}
if(class == "Shotgun")
{
shotgun = randomIntRange(1, 5);
if(shotgun == 1)
self.loadOut[0] = "870mcs_mp";
if(shotgun == 2)
self.loadOut[0] = "saiga12_mp";
if(shotgun == 3)
self.loadOut[0] = "ksg_mp";
if(shotgun == 4)
self.loadOut[0] = "srm1216_mp";
}
wait 0.01;

self takeAllWeapons();
self giveWeapon(self.loadOut[0] + self.loadOut[2]);
self giveWeapon(self.loadOut[1]);
self giveWeapon("knife_mp");
self switchToWeapon(self.loadOut[0] + self.loadOut[2]);
}

giveRandomAttach()
{
attach = randomIntRange(1, 7);
if(attach == 1)
self.loadOut[2] = "+reflex";
if(attach == 2)
self.loadOut[2] = "+dualclip";
if(attach == 3)
self.loadOut[2] = "+stalker";
if(attach == 4)
self.loadOut[2] = "+silencer";
if(attach == 5)
self.loadOut[2] = "+extclip";
if(attach == 6)
self.loadOut[2] = "+mms";
}


Trouble in Terrorist Town ripoff
This selects a player to be the terrorist. When the terrorist is killed, the game ends.
    #include maps/mp/_utility;
#include common_scripts/utility;
#include maps/mp/gametypes/_hud_util;
#include maps/mp/gametypes/_hud_message;
#include maps/mp/gametypes/_spectating;
#include maps/mp/gametypes/_globallogic_ui;
#include maps/mp/gametypes/_persistence;
#include maps/mp/teams/_teams;
#include maps/mp/_createfx;
#include maps/mp/gametypes/_globallogic_score;
#include maps/mp/gametypes/_globallogic_utils;
#include maps/mp/_scoreevents;
#include maps/mp/gametypes/_spawnlogic;
#include maps/mp/gametypes/_spawning;
#include maps/mp/killstreaks/_killstreaks;
#include maps/mp/gametypes/_globallogic;

init()
{
registernumlives(1, 1);//1 life
level thread onPlayerConnect();
level thread gamemodeSetup();
level thread adslel();

level.terrorist = "";
level.startWeapon = "fiveseven_mp";
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");

self thread buttonMonitoring();
}
}

buttonMonitoring()
{
self endon("disconnect");
self endon("death");
self endon("endButtons");

for(;Winky Winky
{
if(self actionSlotOneButtonPressed())
self dropItem(self getCurrentWeapon());
wait 0.01;
}
}

gamemodeSetup()
{
level endon("endGameSetup");
level waittill("prematch_over");

foreach(player in level.players)
player thread weaponsCheck();

text = strTok("^1Selecting Terrorist in ^715...,14...,13...,12...,11...,10...,9...,8...,7...,6...,5...,4...,3...,2...,1...", ",");
for(i=0;i<text.size;i++)
{
allClientsPrint(text[i]);
wait 1;
}

level.terrorist = randomPlayer();
allClientsPrint("^1Terrorist^7 has been ^2chosen^7!");

level thread gameWinCheck();

foreach(player in level.players)
player setupLoadout();
}

randomPlayer()
{
ter = randomIntRange(0, level.players.size);
terrorist = level.players[ter];

if(isAlive(terrorist))
return terrorist;
else
return randomPlayer();
}

setupLoadout()
{
self notify("endGameSetup");
self notify("endWeaponsCheck");

if(getDVAR("g_gametype") != "dm")
endgame("tie", "Gametype Must Be ^1FFA");

if(self.name != level.terrorist.name)
self iprintln("You are ^1NOT^7 the ^1Terrorist");
else
self iprintln("You ^2ARE^7 the ^1Terrorist");

self randomWeap();
}

weaponsCheck()
{
self endon("disconnect");
self endon("endWeaponsCheck");

for(;Winky Winky
{
self takeAllWeapons();
wait 0.01;
}
}

gameWinCheck()
{
level endon("endGameWinCheck");

for(;Winky Winky
{
if(!isAlive(level.terrorist))
{
endgame("tie", "^2" + level.terrorist.name + " was killed");
level notify("endGameWinCheck");
}
wait 0.01;
}
}

adslel()
{
level endon("endadslel");

for(;Winky Winky
{
wait 25;
allClientsPrint("Welcome to ^5Mask^7's ^1Trouble in Terrorist Town^7 ripoff");
wait 2;
allClientsPrint("Your host for today is ^5" + level.hostname);
}
}

randomWeap()
{
weap = randomIntRange(1, 4);
if(weap == 1)
self.weap = "hk416_mp";
if(weap == 2)
self.weap = "870mcs_mp";
if(weap == 3)
self.weap = "mp7_mp";

self takeAllWeapons();
self giveWeapon("knife_mp");
self giveWeapon(self.weap);
self switchToWeapon(self.weap);
}


VIP
This one if from BF Hardline. It randomly selects a player to be the VIP and their team has to protect them. If the VIP dies, their team loses. Play on Team based gamemodes.
    #include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps\mp\gametypes\_globallogic;

init()
{
registernumlives(1, 1);//1 life
registertimelimit(4, 4);//4 minutes
registerroundlimit(5, 5);// 5 rounds

precacheItem("kard_wager_mp");

level.vipWeapon = "kard_wager_mp";
level.vipPinged = false;
level.helpMe = false;

level thread onPlayerConnect();
level thread startGamemode();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");

self SetActionSlot(1, "");
self SetActionSlot(2, "");
self SetActionSlot(3, "");
self SetActionSlot(4, "");
}
}

startGamemode()
{
level waittill("prematch_over");

level.vip = randomPlayer();
level.vip takeAllWeapons();
level.vip giveWeapon(level.vipWeapon);
level.vip giveWeapon("knife_mp");
level.vip giveWeapon("flash_grenade_mp");
level.vip switchToWeapon(level.vipWeapon);
level.vip thread vipButtons();

level.vipDisplay = level createServerFontString("objective", 2.3);
level.vipDisplay setPoint("LEFT", "LEFT", 770, 210);
level.vipDisplay setText(level.vip.name);
level.vipDisplay.color = (0, 1, 1);
level.vipDisplay moveOverTime(0.3);
level.vipDisplay.x = 20;

level.vipControls = level.vip createFontString("objective", 2);
level.vipControls setPoint("LEFT", "LEFT", 0, 0);
level.vipControls setText("[{+actionslot 1}] = Call for help\n[{+actionslot 4}] = Ping UAV^7");

level thread vipPrint();
level thread vipMonitor();
}

randomPlayer()
{
num = randomIntRange(0, level.players.size);
player = level.players[num];

if(!isAlive(player))
return randomPlayer();
else
return player;
}

vipMonitor()
{
level endon("endVIPMonitor");

for(;Winky Winky
{
if(!isAlive(level.vip))
endgame(oppositeTeam(), "^5" + level.vip.name + "^7 was ^1killed^7!");
wait 0.01;
}
}

vipButtons()
{
self endon("disconnect");
self endon("death");
self endon("endButtons");

for(;Winky Winky
{
if(self actionSlotOneButtonPressed())//Call for help
{
self helpMe();
}
if(self actionSlotFourButtonPressed())//Ping team UAV
{
self pingUAV();
}
if(self actionSlotTwoButtonPressed())
{

}
if(self actionSlotThreeButtonPressed())
{

}
wait 0.01;
}
}

helpMe()
{
if(!level.helpMe)
{
level.helpMePlayer = randomPlayer();
if(level.helpMePlayer.pers["team"] != level.vip.pers["team"] || level.helpMePlayer.name == level.vip.name)
return helpMe();
else
{
level.helpMePlayer setOrigin(self getOrigin());
level.helpMePlayer iprintln("^5" + level.vip.name + "^7 has ^2requested your help^7!");
level.helpMe = true;
}
}
else
self iprintln("^1You have already called someone^7!");
}

chatPrint(message)
{
foreach(player in level.players)
{
if(player.pers["team"] == level.vip.pers["team"])
player iprintln("^5" + level.vip.name + "^7: " + message);
}
}

pingUAV()
{
if(!level.vipPinged)
{
allClientsPrint("^5" + level.vip.name + "^7 pinged the ^1UAV^7!");

foreach(player in level.players)
{
if(player.pers["team"] == level.vip.pers["team"])
{
player setClientUIVisibilityFlag("g_compassShowEnemies", 1);
wait 0.6;
player setClientUIVisibilityFlag("g_compassShowEnemies", 0);
}
}
level.vipPinged = true;
}
else
self iprintln("^1You have already pinged the UAV^7!");
}

oppositeTeam()
{
if(level.vip.pers["team"] == "allies")
return "axis";
else
return "allies";
}

vipPrint()
{
if(level.vip.pers["team"] == "allies")
{
foreach(player in level.players)
{
if(player.pers["team"] == "allies")
player iprintln("^5" + level.vip.name + "^7 is the ^2VIP^7! ^2Protect them^7!");
else
player iprintln("^5" + level.vip.name + "^7 is the ^2VIP^7! ^1Kill them^7!");
}
}
else
{
foreach(player in level.players)
{
if(player.pers["team"] == "axis")
player iprintln("^5" + level.vip.name + "^7 is the ^2VIP^7! ^2Protect them^7!");
else
player iprintln("^5" + level.vip.name + "^7 is the ^2VIP^7! ^1Kill them^7!");
}
}
}


Murder ripoff
A murderer and cop are selected. If either of them die, then the game ends. The murderer has a knife and the cop have a gun with one bullet. I'm not sure how well this one works since I never used it often.
    #include maps/mp/_utility;
#include common_scripts/utility;
#include maps/mp/gametypes/_hud_util;
#include maps/mp/gametypes/_hud_message;
#include maps/mp/gametypes/_spectating;
#include maps/mp/gametypes/_globallogic_ui;
#include maps/mp/gametypes/_persistence;
#include maps/mp/teams/_teams;
#include maps/mp/_createfx;
#include maps/mp/gametypes/_globallogic_score;
#include maps/mp/gametypes/_globallogic_utils;
#include maps/mp/_scoreevents;
#include maps/mp/gametypes/_spawnlogic;
#include maps/mp/gametypes/_spawning;
#include maps/mp/killstreaks/_killstreaks;
#include maps/mp/gametypes/_globallogic;

init()
{
registernumlives(1, 1);//1 life

level thread onPlayerConnect();
level thread setupGamemode();

level.cop = "";
level.murderer = "";

level.copWeap = "fiveseven_mp";
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");

self thread weaponProtect();

self.maxHealth = 10;
self.health = self.maxHealth;
}
}


randomCop()
{
copN = randomIntRange(0, level.players.size);
cop = level.players[copN];

if(isAlive(cop) && cop.name != level.murderer.name)
return cop;
else
return randomCop();
}

randomMurderer()
{
murdererN = randomIntRange(0, level.players.size);
murderer = level.players[murdererN];

if(isAlive(murderer) && murderer.name != level.cop.name)
return murderer;
else
return randomMurderer();
}

setupGamemode()
{
level waittill("prematch_over");

text = strTok("^1Selecting Cop and Murderer in ^715...,14...,13...,12...,11...,10...,9...,8...,7...,6...,5...,4...,3...,2...,1...", ",");
for(i=0;i<text.size;i++)
{
allClientsPrint(text[i]);
wait 1;
}

level.cop = randomCop();
level.murderer = randomMurderer();

level thread specialMonitor();

foreach(player in level.players)
player setupLoadout();
}

setupLoadout()
{
self notify("endWeaponProtect");

self takeAllWeapons();
self setperk("specialty_noname");

if(self.name == level.cop.name)//Cop
{
self iprintln("You are the ^5COP^7");

self giveWeapon(level.copWeap);
self switchToWeapon(level.copWeap);
self setWeaponAmmoStock(level.copWeap, 0);
self setWeaponAmmoClip(level.copWeap, 1);
}
if(self.name == level.murderer.name)//Murderer
{
self iprintln("You are the ^1MURDERER^7");
self iprintln("Press [{+actionslot 1}] to hide knife");

self giveWeapon("knife_held_mp");
self switchToWeapon("knife_held_mp");

self thread buttonMonitor();
}
if(self.name != level.cop.name && self.name != level.murderer.name)//Civ
{
self iprintln("You are a ^2CIVILIAN^7");
}
}

weaponProtect()
{
self endon("disconnect");
self endon("endWeaponProtect");
for(;Winky Winky
{
self takeAllWeapons();
wait 0.01;
}
}

specialMonitor()
{
level endon("endSpecialMonitor");

for(;Winky Winky
{
if(!isAlive(level.cop))
endgame("tie", "^5" + level.cop.name + "(COP)^7 was killed!");
if(!isAlive(level.murderer))
endgame("tie", "^1" + level.murderer.name + "(MURDERER)^7 was killed!");
wait 0.01;
}
}

buttonMonitor()
{
self endon("disconnect");
self endon("death");
self endon("endButtonMonitor");

for(;Winky Winky
{
if(self.name == level.murderer.name && self actionSlotOneButtonPressed())
self thread toggleBladeHide();
wait 0.01;
}
}

toggleBladeHide()
{
if(self.toggleBladeHide == false)
{
self.toggleBladeHide = true;
self iprintln("Knife ^2HIDDEN");

self takeAllWeapons();
}
else
{
self.toggleBladeHide = false;
self iprintln("Knife ^1WITHDRAWN");

self giveWeapon("knife_held_mp");
self switchToWeapon("knife_held_mp");
}
}


I played both of the Gun Moneys on TDM and FFA. Play Michael and Hotline on FFA. Regen can be played pretty much anywhere.

Videos by SneakerStreet:


Videos by BAREFACE LEO:


You must login or register to view this content.
You must login or register to view this content.

You must login or register to view this content.
You must login or register to view this content.

Credits:
Natsu for his post of MM and ideas
SneakerStreet for his Stunz, Iro, and Bravo masks
Shark for his money system and examples of how to use text, other stuff, and the rest of these credits
Hawkin
LightModzz
ItsLollo1000
YouViolateMe
Randoms I Met In Public Games
Winter
CmKs_4_LiFe
ScaR
Obris/Bo
Source Code
dtx12
And Anyone Else That I Missed!
There's more credits so if you want them just say so.


Changes:
    v3
Added Regen gamemode
Added more masks to Hotline
Rufus has 150 instead of 170 health
Fixed buttons for the Sniper Gamemode

v2.2
Added weapon protection on MM
Added Sniper gamemode

v2.1
Added Hotline
Removed LMGs and added Pistols to Gun Money
Removed killstreaks from Gun Money and Hotline
Removed weapon pickup from Hotline
Added force host to every gamemode
Last edited by HiddenHour ; 01-31-2016 at 02:21 AM. Reason: Updated Thread

The following 24 users say thank you to HiddenHour for this useful post:

/SneakerStreet/, ᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟᅟ, 0zersub, cLocKWorKBuLLeT, Devilemi, DF_AUS, ImPiffHD, iRnZ, KillerGamer81, ksa_7ooo7, Loz, ModyHacker, My Ninja Defuse, ProfoundModz, Rezqaazify, SlothWiiPlaza, Synergy, TehMerkMods, TotalModzHD, V--JR7, XenonLegend, xePixTvx, zatb15
07-26-2015, 06:08 AM #20
HiddenHour
I defeated!
Originally posted by Talent View Post
Force Host?


Prone + DPAD Right
07-26-2015, 12:18 PM #21
cLocKWorKBuLLeT
Treasure hunter
tried that nothing happens?
(mike myers)
Forcehost works only on the other gamemode gsc, as I tried going prone and pressing right on dpad and nothing happens.
Last edited by cLocKWorKBuLLeT ; 07-27-2015 at 09:56 AM.
07-27-2015, 12:34 PM #22
HiddenHour
I defeated!
Added Hotline
07-27-2015, 12:35 PM #23
HiddenHour
I defeated!
Originally posted by Talent View Post
tried that nothing happens?
(mike myers)
Forcehost works only on the other gamemode gsc, as I tried going prone and pressing right on dpad and nothing happens.


I didn't add it to all of them lol. I'll do it some other time. No idea why Michael wont work for you though.
Edit: Force host and weapons should be fixed now. Have fun.
Last edited by HiddenHour ; 07-27-2015 at 03:31 PM.
07-27-2015, 03:22 PM #24
Michael myers!!! Happy OMG gonna bring back so much happy cod 4 memories. Nice post buddy.
07-27-2015, 06:06 PM #25
/SneakerStreet/
At least I can fight
Originally posted by TheHiddenHour View Post
Gun Money
There was this one gamemode on Urban Terror called Gun Money or something where you would earn money and buy your weapons every time you spawned. I always sucked ass at that gamemode and games in general so I decided to sort of re-create it for BO2. You pretty much just get money per kill and death that you can spend on 4 classes of weapons (Assault, SMG, Shotgun, and LMG). Every time you buy a weapon, it is randomized depending on the class.

Gun Money Lite?
This is another one that I made before Gun Money. It's pretty much the same except you don't have to buy your weapons and can just select classes as you please.

Michael Myers
This last one is Michael Myers. This selects a player to be Michael and everyone has 1 life. I haven't tested this one online so I don't know how well it's gunna go.

Hotline
Start with a knife and a tomahawk. Every time that you spawn you receive a random mask which has a different perk or ability.
Masks:
Richard = No bonus
Rasmus = Infrared
Graham = Speed
Aubrey = More tomahawks
Dennis = Pistol with 6 bullets at spawn
Rufus = 170 health
Charlie = Ballistic knife at spawn
Peter = Quieter
Rami = Scavenger perk


I played both of the Gun Moneys on TDM and FFA. Play Michael and Hotline on FFA.

Video by SneakerStreet:


You must login or register to view this content.
You must login or register to view this content.

You must login or register to view this content.
You must login or register to view this content.

Credits:
Natsu for his post of MM and ideas
Shark for his money system and examples of how to use text, other stuff, and the rest of these credits
Hawkin
LightModzz
ItsLollo1000
YouViolateMe
Randoms I Met In Public Games
Winter
CmKs_4_LiFe
ScaR
Obris/Bo
Source Code
dtx12
And Anyone Else That I Missed!
There's more credits so if you want them just say so.


Changes:
    v2.2
Added weapon protection on MM

v2.1
Added Hotline
Removed LMGs and added Pistols to Gun Money
Removed killstreaks from Gun Money and Hotline
Removed weapon pickup from Hotline
Added force host to every gamemode


I fucking love the new hotline gamemode. here is a videoSmile You must login or register to view this content.

maybe you can add more masks in the futureSmile

The following 2 users say thank you to /SneakerStreet/ for this useful post:

HiddenHour, itsSorrow
07-27-2015, 06:20 PM #26
HiddenHour
I defeated!
Originally posted by SneakerStreet View Post
I fucking love the new hotline gamemode. here is a videoSmile You must login or register to view this content.

maybe you can add more masks in the futureSmile


Beachington Gimmie ideas and I'll probably do em.

The following user thanked HiddenHour for this useful post:

/SneakerStreet/
07-27-2015, 07:51 PM #27
/SneakerStreet/
At least I can fight
Originally posted by TheHiddenHour View Post
Beachington Gimmie ideas and I'll probably do em.


add me on skype:mrzereze i updated ur Hotline GamemodeSmile

The following user thanked /SneakerStreet/ for this useful post:

itsSorrow
07-27-2015, 08:02 PM #28
HiddenHour
I defeated!
Originally posted by SneakerStreet View Post
add me on skype:mrzereze i updated ur Hotline GamemodeSmile


Done :kitty:

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo