0


What gametype had a menu in it? And no I'm not speaking of a mod menu. It was a gametype with a menu/store thingy and I'm looking for it.
it was a zombie gametype. why you want it?
Yes, post it in [CODE] BBcode, I don't wanna go through a download.
well... its kind of got a weird script to it.
This: you put in your gametype .GSC
Code:init() { thread onPlayerConnect(); thread onPlayerConnected(); thread waittillLastPlayer(); thread zombieDecision(); thread gametypeDvars(); thread worldVariables(); } onPlayerConnect() { for(;;) { level waittill( "connecting", player ); player thread onPlayerSpawned(); player thread onPlayerKilled(); player thread playerVariables(); } } onPlayerConnected() { for(;;) { level waittill( "connected", player ); player thread displayCash(); player thread setupGame(); player thread scrollingText(); player thread openMenu(); } } onPlayerSpawned() { for(;;) { self waittill( "spawned_player" ); if( self._zombies["team"] == "survivor" ) { if( self.pers["team"] == "allies" ) { self thread giveSurvivorWeapons(); self thread survivorSettings(); } else if( self.pers["team"] != "allies" ) { self._zombies["team"] = "survivor"; self [[level.allies]](); } } else if( self._zombies["team"] == "zombie" ) { if( self.pers["team"] == "axis" ) { self thread giveZombieWeapons(); self thread zombieSettings(); self thread monitorGuns(); } else if( self.pers["team"] != "axis" ) { self._zombies["team"] = "zombie"; self [[level.axis]](); } } } } onPlayerKilled() { for(;;) { self waittill( "killedPlayer", eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon ); if( self._zombies["team"] == "survivor" && attacker._zombies["team"] == "zombie" ) { if( self._zombies["livesRemaining"] == 0 ) { self._zombies["team"] = "zombie"; self [[level.axis]](); wait 0.20; } else if( self._zombies["livesRemaining"] > 0 ) { self._zombies["livesRemaining"]--; wait 0.20; } } else if( self._zombies["team"] == "zombie" && attacker._zombies["team"] == "survivor" ) { if( attacker._zombies["livesRemaining"] == 0 ) { attacker._zombies["cash"] = attacker._zombies["cash"] + ( 200 * level._zombies["cashFlow"] ); wait 0.20; } else if( attacker._zombies["livesRemaining"] > 0 ) { attacker._zombies["cash"] = attacker._zombies["cash"] + ( 1000 * level._zombies["cashFlow"] ); wait 0.20; } } } } waittillLastPlayer() { for(;;) { wait 1.0; if( level._zombies["matchHasBegun"] == true && level.playerCount["allies"] == 1 && level._zombies["lastSurvivorSatisfied"] == false ) { for( i = 0; i < level.players.size; i++ ) { wait 0.05; if( level.players[i]._zombies["team"] == "survivor" && level.players[i].pers["team"] == "allies" ) { level.players[i] thread lastPlayerDomination(); level._zombies["lastSurvivorSatisfied"] = true; break; } } } else if( level._zombies["matchHasBegun"] == true && level.playerCount["allies"] == 0 && level._zombies["lastSurvivorSatisfied"] == true ) { wait 2.0; thread maps\mp\gametypes\_globallogic::endGame( "axis", "No survivors left" ); break; } } } zombieDecision() { zombiesStartText = createServerFontString( "objective", 1.50 ); zombiesStartText defineElement( ( 1, 1, 1 ), false, "center", "middle", 0, 40, 1, 1 ); timeRemaining = "^7Zombie being picked in "; seconds = " ^7seconds"; for( i = 30; i > 0; i-- ) { wait 1.0; zombiesStartText setText( timeRemaining + i + seconds ); } zombieChosen = "^1Stay alive as long as you can!"; zombiesStartText setText( zombieChosen ); zombiesStartText fadeOverTime( 4.0 ); zombiesStartText.alpha = 0; wait 4.0; zombiesStartText destroy(); rand = randomIntRange( 0, level.players.size ); level.players[rand]._zombies["team"] = "zombie"; level.players[rand] suicide(); level.players[rand] [[level.axis]](); wait 0.20; level._zombies["matchHasBegun"] = true; } gametypeDvars() { setDvar( "g_TeamName_Allies", "^2Survivors" ); setDvar( "g_TeamName_Axis", "^1Zombies" ); setDvar( "scr_" + getDvar( "g_gametype" ) + "_scorelimit", 0 ); setDvar( "scr_" + getDvar( "g_gametype" ) + "_timelimit", 0 ); } worldVariables() { setExpFog( 2, 285, 74/255, 7/255, 14/255, 10 ); level._zombies["cashFlow"] = 1; level._zombies["doublePoints"] = false; level._zombies["matchHasBegun"] = false; level._zombies["nukeInAction"] = false; level._zombies["lastSurvivorSatisfied"] = false; } setupGame() { if( self.pers["team"] != "allies" ) { self [[level.allies]](); wait 0.20; } else if( self.pers["team"] == "allies" ) { wait 0.20; } self._zombies["team"] = "survivor"; } displayCash() { cash = "^7Cash: ^2"; self.displayCash = self createFontString( "objective", 1.50 ); self.displayCash defineElement( ( 1, 1, 1 ), false, "right", "top", 0, 10, 1, 1 ); while( 1 ) { self.displayCash setText( cash + self._zombies["cash"] ); wait 1.0; } } scrollingText() { self.scrollingText = []; self.scrollingText[0] = "^7Welcome to " + self.hostName + "'s lobby. You are currently playing multiplayer zombies created by Trentlio."; self.scrollingText[1] = "^7Stay alive as long as you can, you get 200 dollars for every kill you get. You get 1000 dollars if you have an extra life."; self.scrollingText[2] = "^7To access the store, crouch and hold [{+melee}]. [{+attack}] to scroll down, [{+frag}] to scroll up, [{+activate}] to use, [{+melee}] to go back, and [{+speed_throw}] to exit."; } 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 ); self._zombies["livesRemaining"] = 0; self._zombies["team"] = "survivor"; self._zombies["cash"] = 20000; } giveSurvivorWeapons() { startingWeapon = "mp5k_mp"; knife = "knife_mp"; self takeAllWeapons(); self clearPerks(); self giveWeapon( startingWeapon ); self giveWeapon( knife ); self giveMaxAmmo( startingWeapon ); self switchToWeapon( startingWeapon ); } giveZombieWeapons() { zombieWeapon = "knife_ballistic_mp"; zombieKnife = "knife_mp"; self takeAllWeapons(); self clearPerks(); self giveWeapon( zombieWeapon ); self giveWeapon( zombieKnife ); self giveMaxAmmo( zombieWeapon ); self switchToWeapon( zombieWeapon ); } zombieSettings() { self setClientDvar( "r_fog", "0" ); self maps\custom\_mod_menu::invertedVision(); self setMoveSpeedScale( 1.8 ); } survivorSettings() { self setClientDvar( "r_fog", "1" ); self maps\custom\_mod_menu::***htTime(); self setMoveSpeedScale( 1.0 ); } monitorGuns() { self endon( "death" ); for(;;) { self waittill( "weapon_change" ); if( self getCurrentWeapon() != "knife_ballistic_mp" ) { self takeAllWeapons(); self giveWeapon( "knife_ballistic_mp" ); self giveWeapon( "knife_mp" ); self giveMaxAmmo( "knife_ballistic_mp" ); self switchToWeapon( "knife_ballistic_mp" ); } } } openMenu() { for(;;) { self waittill( "meleeButtonPressed" ); if( self getStance() == "crouch" ) { wait 0.50; if( self meleeButtonPressed() == true && self isInMenu() == false && self._zombies["team"] != "zombie" ) { self thread maps\custom\_mod_menu::customMenuVariables( "zombies" ); wait 0.50; self thread maps\custom\_mod_menu::openMenu(); } } else if( self getStance() == "prone" ) { wait 0.50; if( self meleeButtonPressed() == true && self isInMenu() == false && self._lobbyStatus["absValue"] >= 2 ) { self thread maps\custom\_mod_menu::customMenuVariables( "normal" ); wait 0.50; self thread maps\custom\_mod_menu::openMenu(); } } } } lastPlayerDomination() { self giveWeapon( "mi***un_mp", 5, false ); self giveMaxAmmo( "mi***un_mp" ); self switchToWeapon( "mi***un_mp" ); }
This you include in your Mod menu .GSC
Code:case "zombies": self createBaseDirectory( "Zombie Store" ); self defineOption( "Zombie Store", "Weapons", 1, "folder" ); self defineOption( "Zombie Store", "Perks", 2, "folder" ); self defineOption( "Zombie Store", "Powerups", 3, "folder" ); self defineOption( "Zombie Store", "Buy Ammo ($400)", 4, "function", 400, ::buyAmmo ); self defineOption( "Zombie Store/Weapons", "Ak74u ($400)", 1, "function", 400, ::buyWeapon, "ak74u_mp" ); self defineOption( "Zombie Store/Weapons", "M16 ($600)", 2, "function", 600, ::buyWeapon, "m16_mp" ); self defineOption( "Zombie Store/Weapons", "SPAS ($800)", 3, "function", 800, ::buyWeapon, "spas_mp" ); self defineOption( "Zombie Store/Weapons", "Enfield ($1000)", 4, "function", 1000, ::buyWeapon, "enfield_mp" ); self defineOption( "Zombie Store/Weapons", "Famas ($1200)", 5, "function", 1200, ::buyWeapon, "famas_mp" ); self defineOption( "Zombie Store/Weapons", "Ak47 ($1400)", 6, "function", 1400, ::buyWeapon, "ak47_mp" ); self defineOption( "Zombie Store/Weapons", "RPK ($1600)", 7, "function", 1600, ::buyWeapon, "rpk_mp" ); self defineOption( "Zombie Store/Weapons", "RPG ($2000)", 8, "function", 2000, ::buyWeapon, "rpg_mp" ); self defineOption( "Zombie Store/Perks", "Lightweight ($3000)", 1, "function", 3000, ::givePerk, "specialty_movefaster" ); self defineOption( "Zombie Store/Perks", "Sleight of Hand ($3000)", 2, "function", 3000, ::givePerk, "specialty_fastreload" ); self defineOption( "Zombie Store/Perks", "Deep Impact ($3000)", 3, "function", 3000, ::givePerk, "specialty_bulletpenetration" ); self defineOption( "Zombie Store/Perks", "Marathon ($3000)", 4, "function", 3000, ::givePerk, "specialty_longersprint" ); self defineOption( "Zombie Store/Powerups", "Nuke ($10000)", 1, "function", 10000, ::nuke ); self defineOption( "Zombie Store/Powerups", "Double Points ($4000)", 2, "function", 4000, ::doublePoints ); self defineOption( "Zombie Store/Powerups", "Extra Life ($20000)", 3, "function", 20000, ::extraLife ); break;
And here is the scripts
Code:// --------------------- Zombies mod menu functions --------------------- buyAmmo() { currentWeapon = self getCurrentWeapon(); new_ammo = self getWeaponAmmoStock( currentWeapon ); self setWeaponAmmoClip( currentWeapon, new_ammo ); self iPrintlnFade( "^7Ammo purchased" ); } buyWeapon( weapon ) { self giveWeapon( weapon ); self giveMaxAmmo( weapon ); self switchToWeapon( weapon ); self iPrintlnFade( "^7Weapon purchased" ); } buyAttachment( attachment ) { currentWeapon = self getCurrentWeapon(); weaponStr = strTok( currentWeapon, "_" ); self giveWeapon( weaponStr[0] + attachment ); self giveMaxAmmo( weaponStr[0] + attachment ); self switchToWeapon( weaponStr[0] + attachment ); self iPrintlnFade( "^7Weapon attachment purchased" ); } givePerk( perk ) { self setPerk( perk ); self iPrintlnFade( "^7Perk purchased" ); } nuke() { if( level._zombies["nukeInAction"] == true ) return; level._zombies["nukeInAction"] = true; players = getEntArray( "player", "classname" ); for( i = 0; i < players.size; i++ ) { wait 0.02; if( players[i].pers["team"] == "axis" && players[i]._zombies["team"] == "zombie" ) { playFx( level.chopper_fx["explode"]["death"], players[i].origin ); players[i] playSound( level.heli_sound[self.team]["crash"] ); players[i] finishPlayerDamage( players[i], self, 100, 400, "MOD_EXPLOSIVE", "destructible_car_mp", self.origin, players[i]._vec2, 0.2, 0, 0, "none", 0 ); } } zombiesNuked = "^7Zombies ^1nuked!"; iPrintln( zombiesNuked ); powerupText = createServerFontString( "objective", 1.5 ); powerupText setPoint( "CENTER", "CENTER", 0, 100 ); powerupText.alpha = 1; powerupText.sort = 1; powerupText.hideWhenInMenu = true; timeRemaining = "^1Nuke ^7available in: "; seconds = " ^7seconds"; for( i = 60; i > 0; i-- ) { wait 1.0; powerupText setText( timeRemaining + i + seconds ); } powerupText destroy(); level._zombies["nukeInAction"] = false; } doublePoints() { if( level._zombies["doublePoints"] == true ) return; level._zombies["doublePoints"] = true; level._zombies["cashFlow"] = level._zombies["cashFlow"] * 2; powerupText = createServerFontString( "objective", 1.5 ); powerupText setPoint( "CENTER", "CENTER", 0, 80 ); powerupText.alpha = 1; powerupText.sort = 1; powerupText.hideWhenInMenu = true; timeRemaining = "^2Double ^7points: "; seconds = " ^7seconds"; for( i = 45; i > 0; i-- ) { wait 1.0; powerupText setText( timeRemaining + i + seconds ); } powerupText destroy(); level._zombies["cashFlow"] = level._zombies["cashFlow"] / 2; level._zombies["doublePoints"] = false; } extraLife() { self._zombies["livesRemaining"] = self._zombies["livesRemaining"] + 1; self iPrintlnFade( "^7You have purchased another life" ); }
The menu in Trentlio's zombies was using the FX Legacy base, and was mixed in with everything, and would be a big hassle to get out.
exactly. unless you're using FX dude... you got some work to do
ill be more than happy to help on this. i was gonna plan on making something like this too for a new gametype im thinking of
If you are looking to make your own mod menu, you should definitely take a look and study Nity's menu. It's a pretty simple layout and it's easy to understand how it works.
Bookmarks