Raised This Month: $32 Target: $400
 8% 

[L4d2]How to set l4d2 to not automatically take over special infections.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AK978
Senior Member
Join Date: Jun 2018
Old 07-26-2020 , 00:24   [L4d2]How to set l4d2 to not automatically take over special infections.
Reply With Quote #1

I want players to purchase special infections after they turn into a special infection team,

Is there a code that prevents players from automatically taking over special infections?

Last edited by AK978; 07-26-2020 at 00:28.
AK978 is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 07-26-2020 , 09:50   Re: [L4d2]How to set l4d2 to not automatically take over special infections.
Reply With Quote #2

Maybe it's possible, but you are going to have to wait at least 1 year here before the community makes something like that.
Alex101192 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 07-26-2020 , 19:23   Re: [L4d2]How to set l4d2 to not automatically take over special infections.
Reply With Quote #3

I think the translation is not good, there is some plugins that allows you to "buy" charger/jockey while on infected team.

This plugin allows it:
https://forums.alliedmods.net/showth...=278448&page=9

You may have to find an updated version through the pages
__________________
Marttt is offline
AK978
Senior Member
Join Date: Jun 2018
Old 07-27-2020 , 09:43   Re: [L4d2]How to set l4d2 to not automatically take over special infections.
Reply With Quote #4

I just want to prevent players from automatically taking over special infections.
AK978 is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 07-27-2020 , 21:27   Re: [L4d2]How to set l4d2 to not automatically take over special infections.
Reply With Quote #5

It seems not difficult, but depends on what plugins do you use?
There are so many plugins today that could spawn special infected during the game.
__________________
HarryPotter is offline
AK978
Senior Member
Join Date: Jun 2018
Old 07-28-2020 , 06:30   Re: [L4d2]How to set l4d2 to not automatically take over special infections.
Reply With Quote #6

l4dinfectedbots+l4d2_points_system

Last edited by AK978; 07-28-2020 at 06:30.
AK978 is offline
GoGetSomeSleep
Senior Member
Join Date: Dec 2018
Location: Miami/Florida
Old 08-08-2020 , 10:09   Re: [L4d2]How to set l4d2 to not automatically take over special infections.
Reply With Quote #7

Extend the automatic player zombie spawn time, show players the zombie selection menu that will spawn the moment they purchase, and finally use a different add-on that auto-spawns zombies to spawn bot zombies without waiting extended automatic spawn time.
GoGetSomeSleep is offline
Timocop
AlliedModders Donor
Join Date: Mar 2013
Location: Germany
Old 08-08-2020 , 15:05   Re: [L4d2]How to set l4d2 to not automatically take over special infections.
Reply With Quote #8

Since the takeover only works while you're dead (or ghost) just make players "alive" while you spawn an infected. This way the director will ignore the takeover.

Here is my old smlib stock:
PHP Code:
stock SetInfectedSpawnBlock(iIgnoreClientbool:bBlockbool:bCleanArray=true)
{
    static 
bool:_smlib_bResetGhost[MAXPLAYERS+1];
    static 
bool:_smlib_bResetLife[MAXPLAYERS+1];
    static 
i;

    if(
bBlock) {
        for(
1<= MaxClientsi++) {
            if(
bCleanArray) {
                
_smlib_bResetGhost[i] = false;
                
_smlib_bResetLife[i] = false;
            }

            if(
iIgnoreClient == i) continue;
            if(!
IsClientInGame(i)) continue;
            if(
IsFakeClient(i)) continue;
            if(
GetClientTeam(i) != 3) continue;

            if(
GetEntProp(iProp_Send"m_isGhost"1) > 0) {
                
_smlib_bResetGhost[i] = true;
                
SetEntProp(iProp_Send"m_isGhost"0);
            }
            else if(!
IsPlayerAlive(i)) {
                
_smlib_bResetLife[i] = true;
                
SetEntProp(iProp_Send"m_lifeState"0);
            }
        }
    }
    else
    {
        for(
1<= MaxClientsi++) {
            if(
_smlib_bResetGhost[i])
                
SetEntProp(iProp_Send"m_isGhost"1);

            if(
_smlib_bResetLife[i])
                
SetEntProp(iProp_Send"m_lifeState"1);

            
_smlib_bResetGhost[i] = false;
            
_smlib_bResetLife[i] = false;
        }
    }

PHP Code:
SetInfectedSpawnBlock(0true);
//Spawn infected via z_spawn or z_spawn_old
SetInfectedSpawnBlock(0false); 
__________________
Timocop is offline
AK978
Senior Member
Join Date: Jun 2018
Old 08-08-2020 , 22:33   Re: [L4d2]How to set l4d2 to not automatically take over special infections.
Reply With Quote #9

Quote:
Originally Posted by Timocop View Post
Since the takeover only works while you're dead (or ghost) just make players "alive" while you spawn an infected. This way the director will ignore the takeover.

Here is my old smlib stock:
PHP Code:
stock SetInfectedSpawnBlock(iIgnoreClientbool:bBlockbool:bCleanArray=true)
{
    static 
bool:_smlib_bResetGhost[MAXPLAYERS+1];
    static 
bool:_smlib_bResetLife[MAXPLAYERS+1];
    static 
i;

    if(
bBlock) {
        for(
1<= MaxClientsi++) {
            if(
bCleanArray) {
                
_smlib_bResetGhost[i] = false;
                
_smlib_bResetLife[i] = false;
            }

            if(
iIgnoreClient == i) continue;
            if(!
IsClientInGame(i)) continue;
            if(
IsFakeClient(i)) continue;
            if(
GetClientTeam(i) != 3) continue;

            if(
GetEntProp(iProp_Send"m_isGhost"1) > 0) {
                
_smlib_bResetGhost[i] = true;
                
SetEntProp(iProp_Send"m_isGhost"0);
            }
            else if(!
IsPlayerAlive(i)) {
                
_smlib_bResetLife[i] = true;
                
SetEntProp(iProp_Send"m_lifeState"0);
            }
        }
    }
    else
    {
        for(
1<= MaxClientsi++) {
            if(
_smlib_bResetGhost[i])
                
SetEntProp(iProp_Send"m_isGhost"1);

            if(
_smlib_bResetLife[i])
                
SetEntProp(iProp_Send"m_lifeState"1);

            
_smlib_bResetGhost[i] = false;
            
_smlib_bResetLife[i] = false;
        }
    }

PHP Code:
SetInfectedSpawnBlock(0true);
//Spawn infected via z_spawn or z_spawn_old
SetInfectedSpawnBlock(0false); 
thank you.
i will test.

Last edited by AK978; 08-08-2020 at 22:35.
AK978 is offline
Reply


Thread Tools
Display Modes

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 19:24.


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