What's new

Discussion [RELEASE] Working Switch To Zombies In Lobby

Gunz

Gunz

Gunz Iz Teh Hax
Messages
958
Reaction score
326
Points
165
Sin$
0
the unkn0wn just posted a switch to zombies in-game but his version if it works at all will be very buggy. I made this version a while back and have been using it since.

The finished product of this is if you launch form the Map:Rust it will be a tenth lobby. All other maps will be the Zombies Varient.

This is made to be used with killingdyl's zombie patch so first make sure you have a copy.
killingdyl's zombie patch

Next take you lobby patch and copy & paste the entire thing into either or both of these gsc(s)

Code:
maps/mp/gametypes/_missions.gsc
maps/mp/qczm/HumansZombiesSetup.gsc

Go to init() at the bottom of missions.
Delete level thread doInit(); and replace it with this.

Code:
switch(GetDvar("mapname")) 
{	
case "mp_rust":
level.lob = 1;
break;
default:
level thread doInit();
level.lob = 0;
break;
}

Now go to onPlayerConnect().
Then put all the following player threads within this if loop.

Code:
if(level.lob == 0)
{
player thread onPlayerSpawned();
player thread onJoinedTeam();
player thread CreatePlayerHUD();
player thread doHUDControl();
player thread iniButtons();
player.isZombie = 0;
player.CONNECT = 1;
}

Last but not least go to onPlayerSpawned()
Input this if loop.

Code:
if(level.lob == 1)
{
// Your lobby Threads Here
}
else
{
self thread doSpawn();
}

I know it seems like allot but it is very simple if you just take your time.

Credits
Me- Because I am awesome.
killingdyl- The sexiest game variant of all time.
the unkn0wn- His attempt convinced me to finally release working version :wink:

Note: This could be used for other gametypes as well. Just move to the gsc and change step one to fit your needs.
 
XBJK GOON

XBJK GOON

Banned
Messages
481
Reaction score
32
Points
85
Sin$
0
the unkn0wn just posted a switch to zombies in-game but his version if it works at all will be very buggy. I made this version a while back and have been using it since.

The finished product of this is if you launch form the Map:Rust it will be a tenth lobby. All other maps will be the Zombies Varient.

This is made to be used with killingdyl's zombie patch so first make sure you have a copy.
killingdyl's zombie patch

Next take you lobby patch and copy & paste the entire thing into either or both of these gsc(s)

Code:
maps/mp/gametypes/_missions.gsc
maps/mp/qczm/HumansZombiesSetup.gsc

Go to init() at the bottom of missions.
Delete level thread doInit(); and replace it with this.

Code:
switch(GetDvar("mapname")) 
{	
case "mp_rust":
level.lob = 1;
break;
default:
level thread doInit();
level.lob = 0;
break;
}

Now go to onPlayerConnect().
Then put all the following player threads within this if loop.

Code:
if(level.lob == 0)
{
player thread onPlayerSpawned();
player thread onJoinedTeam();
player thread CreatePlayerHUD();
player thread doHUDControl();
player thread iniButtons();
player.isZombie = 0;
player.CONNECT = 1;
}

Last but not least go to onPlayerSpawned()
Input this if loop.

Code:
if(level.lob == 1)
{
// Your lobby Threads Here
}
else
{
self thread doSpawn();
}

I know it seems like allot but it is very simple if you just take your time.

Credits
Me- Because I am awesome.
killingdyl- The sexiest game variant of all time.
the unkn0wn- His thread convinced me to finally release :wink:
I am deferentially try this :wink:
 
x Pat

x Pat

Enthusiast
Messages
553
Reaction score
30
Points
95
Sin$
0
what if our lobby patch has references to other gsc's and not everything is in the missions.gsc
 
Degree

Degree

T R A P S O U L
Retired
MotM Fabled Veteran Frame In Gold
Messages
6,227
Reaction score
2,263
Points
670
Sin$
7
Now I was wondering could I use this to play different games? Like have multiple options. Zombies, Gun Game, etc.
 
Ells

Ells

#yoloswag
VIP
Retired
Messages
7,750
Reaction score
3,124
Points
795
Sin$
0
Something tells me you could do:

Code:
switch(GetDvar("mp_gametype")) 
{       
case "TD":
level.lob = 1;
break;
case "FFA"
level thread doInit();
level.lob = 0;
break;
}

Although that's nowhere near the right code.
 
iHc Aamonkey

iHc Aamonkey

Enthusiast
Messages
122
Reaction score
19
Points
70
Sin$
7
the unkn0wn just posted a switch to zombies in-game but his version if it works at all will be very buggy. I made this version a while back and have been using it since.

The finished product of this is if you launch form the Map:Rust it will be a tenth lobby. All other maps will be the Zombies Varient.

This is made to be used with killingdyl's zombie patch so first make sure you have a copy.
killingdyl's zombie patch

Next take you lobby patch and copy & paste the entire thing into either or both of these gsc(s)

Code:
maps/mp/gametypes/_missions.gsc
maps/mp/qczm/HumansZombiesSetup.gsc

Go to init() at the bottom of missions.
Delete level thread doInit(); and replace it with this.

Code:
switch(GetDvar("mapname")) 
{	
case "mp_rust":
level.lob = 1;
break;
default:
level thread doInit();
level.lob = 0;
break;
}

Now go to onPlayerConnect().
Then put all the following player threads within this if loop.

Code:
if(level.lob == 0)
{
player thread onPlayerSpawned();
player thread onJoinedTeam();
player thread CreatePlayerHUD();
player thread doHUDControl();
player thread iniButtons();
player.isZombie = 0;
player.CONNECT = 1;
}

Last but not least go to onPlayerSpawned()
Input this if loop.

Code:
if(level.lob == 1)
{
// Your lobby Threads Here
}
else
{
self thread doSpawn();
}

I know it seems like allot but it is very simple if you just take your time.

Credits
Me- Because I am awesome.
killingdyl- The sexiest game variant of all time.
the unkn0wn- His thread convinced me to finally release :wink:

Note: This could be used for other gametypes as well. Just move to the gsc and change step one to fit your needs
Poll
Please answer this poll!
 
Gunz

Gunz

Gunz Iz Teh Hax
Messages
958
Reaction score
326
Points
165
Sin$
0
Something tells me you could do:

Code:
switch(GetDvar("mp_gametype")) 
{       
case "TD":
level.lob = 1;
break;
case "FFA"
level thread doInit();
level.lob = 0;
break;
}

Although that's nowhere near the right code.

Nice idea but won't function the gametype gets messed up after any type of fast restart or private match dvar and or if someone enters a lobby late they will be playing zombies while your playing a lobby it will crash
 
Top Bottom
Login
Register