Raised This Month: $ Target: $400
 0% 

[L4D2] Remove all infected (Common, uncommon, special)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lala1990
BANNED
Join Date: Oct 2010
Old 10-25-2010 , 05:44   [L4D2] Remove all infected (Common, uncommon, special)
Reply With Quote #1

hi just wanna ask, how do you code a plugin to remove all the infected from the map, and prevent anymore infected from spawning? and if possible, remove the director script so that the round will not proceed on if someone goes into the saferoom?
lala1990 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 10-25-2010 , 11:31   Re: [L4D2] Remove all infected (Common, uncommon, special)
Reply With Quote #2

Some cvars to make no infected, common or bosses:

PHP Code:
        SetConVarInt(FindConVar("director_no_bosses"), 1);
        
SetConVarInt(FindConVar("director_no_mobs"), 1);
        
SetConVarInt(FindConVar("z_common_limit"), 0);
        
SetConVarInt(FindConVar("z_boomer_limit"), 0);
        
SetConVarInt(FindConVar("z_charger_limit"), 0);
        
SetConVarInt(FindConVar("z_hunter_limit"), 0);
        
SetConVarInt(FindConVar("z_jockey_limit"), 0);
        
SetConVarInt(FindConVar("z_smoker_limit"), 0);
        
SetConVarInt(FindConVar("z_spitter_limit"), 0); 
I'm not sure if you need to also set the limits with the versus cvars (z_versus_hunter_limit) etc.

Combine that with a plugin that detects if they're in the safe or not.

To reset a cvar: ResetConVar(FindConVar("z_common_limit"));

Oh there there is also a 'director_stop' command.
__________________
Silvers is offline
lala1990
BANNED
Join Date: Oct 2010
Old 10-26-2010 , 07:09   Re: [L4D2] Remove all infected (Common, uncommon, special)
Reply With Quote #3

thank you very much! i've got one more thing to ask, when a person hosts a game via listen server, is he considered a client also? or he isn't?
lala1990 is offline
necavi
Veteran Member
Join Date: Sep 2010
Old 10-26-2010 , 07:29   Re: [L4D2] Remove all infected (Common, uncommon, special)
Reply With Quote #4

He is considered a client as well, so I'm afraid you won't be able to use sourcemod at the same time. You can start a dedicated server, and then join it on the same computer, of course (but you'll need a different install directory for the server).
necavi is offline
Andersso
Member
Join Date: Nov 2009
Location: E8 2A 2A 2A 2A
Old 10-26-2010 , 10:40   Re: [L4D2] Remove all infected (Common, uncommon, special)
Reply With Quote #5

Even if you are client index "1" when you host a listen server, you will be index 0 (server) in the console.
Andersso is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode