What's new

Discussion [RELEASE] Working Switch To Zombies In Lobby

G

Gunz

Gunz Iz Teh Hax
Messages
958
Reaction score
326
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.
 
K

Kyllswitch

And Justice for All
Messages
2,253
Reaction score
429
Sexy B)
 
M

MoDz 4 MoDz

Getting There
Messages
1,462
Reaction score
182
very detailed i like it!
 
X

x Pat

Enthusiast
Messages
553
Reaction score
30
gunz you never cease to amaze me
 
M

MgK

Enthusiast
Messages
372
Reaction score
113
gunz is the shittt lol in a good way.
+rep you deserve it,
 
K

killingdyl

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

MY FAVORITE PART LOL Nice
 
X

XBJK GOON

Banned
Messages
483
Reaction score
32
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:
 
D

dakotareed

Enthusiast
Messages
64
Reaction score
11
nice post man thanks for this good job
 
X

x Pat

Enthusiast
Messages
553
Reaction score
30
what if our lobby patch has references to other gsc's and not everything is in the missions.gsc
 
D

Degree

T R A P S O U L
Retired
Messages
6,229
Reaction score
2,263
Now I was wondering could I use this to play different games? Like have multiple options. Zombies, Gun Game, etc.
 
G

Gunz

Gunz Iz Teh Hax
Messages
958
Reaction score
326
what if our lobby patch has references to other gsc's and not everything is in the missions.gsc
Then move the contents of the other gscs into one of the ones mentioned and remove the prefix
 
G

Gunz

Gunz Iz Teh Hax
Messages
958
Reaction score
326
Now I was wondering could I use this to play different games? Like have multiple options. Zombies, Gun Game, etc.
Yes you could I will update the post with a example
 
M

MikeVizBeast

Enthusiast
Messages
205
Reaction score
122
Nice Job Im trying To Test Now + Rep
 
K

KieranxX

Enthusiast
Messages
599
Reaction score
64
Good Post !

Lot of Detail
 
E

Ells

#yoloswag
VIP
Retired
Messages
7,756
Reaction score
3,121
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.
 
I

iHc Aamonkey

Enthusiast
Messages
122
Reaction score
19
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!
 
G

Gunz

Gunz Iz Teh Hax
Messages
958
Reaction score
326
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