AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Limit respawn zombie plague (https://forums.alliedmods.net/showthread.php?t=339557)

JUSTINR 09-17-2022 13:31

Limit respawn zombie plague
 
Hello , how could I add limit to respawn to be 3 times per round.

I activated respawn in infection mode ,swarm mode and plague mode .

I use zombie plague advanced

Code:

https://forums.alliedmods.net/showthread.php?t=118684?t=118684

JUSTINR 09-20-2022 08:53

Re: Limit respawn zombie plague
 
Someone?

deprale 09-22-2022 00:07

Re: Limit respawn zombie plague
 
It's such a big plugin that is very very thought out, that even such a small change like this one would result in unwanted behaviour, to do such a thing with this specific game mode plug-in you would need to re-code a LOT of convoluted checks.

You could probably just use zp_respawn_user native from a separate plugin and respawn a player 3 times in that round, it's a relatively small plugin but still I would recommend against it, reply back if you really want it regardless I guess I can give it a try.

JUSTINR 09-22-2022 10:25

Re: Limit respawn zombie plague
 
Zombie plague special have limit respawn to every modes, but i dont know what to do

deprale 09-22-2022 16:38

Re: Limit respawn zombie plague
 
Quote:

Originally Posted by JUSTINR (Post 2789401)
Zombie plague special have limit respawn to every modes, but i dont know what to do

If you turn on csdm mode then you can edit csdm_spawns variable to 3. I'll take another look tonight but don't promise anything.

JUSTINR 09-25-2022 11:34

Re: Limit respawn zombie plague
 
I will try ..

JUSTINR 09-28-2022 13:25

Re: Limit respawn zombie plague
 
No working

JUSTINR 10-01-2022 03:52

Re: Limit respawn zombie plague
 
Someone ?

deprale 10-01-2022 16:18

Re: Limit respawn zombie plague
 
Quote:

Originally Posted by JUSTINR (Post 2790094)
Someone ?

PHP Code:

#include <amxmodx>
#include <cstrike> // reliable cs_get_user_team instead of buggy get_user_team
#include <zombie_plague_advance>
#define PLUGIN "zpa respawn limit"
#define AUTHOR "deprale"
#define VERSION "1.0"

new cvar_RespawnLimit
new SpawnCountMAX_PLAYERS ]


public 
plugin_init( )
{
    
register_pluginPLUGINVERSION AUTHOR );

    
cvar_RespawnLimit register_cvar"zp_spawn_limit""3"FCVAR_PROTECTED )
}


public 
client_deathkillervictim )
{
    if( 
SpawnCountvictim ] == get_pcvar_numcvar_RespawnLimit ) )
        return 
PLUGIN_HANDLED
    

    zp_respawn_user
victimcs_get_user_teamvictim ) == CS_TEAM_CT ZP_TEAM_HUMAN ZP_TEAM_ZOMBIE )
    
SpawnCountvictim ]++
    return 
PLUGIN_CONTINUE
}

public 
client_connectedid )
{
    
SpawnCountid ] = 0
}

public 
client_disconnectedid )
{
    
SpawnCountid ] = 0


try this :)

JUSTINR 10-13-2022 04:12

Re: Limit respawn zombie plague
 
Quote:

Originally Posted by deprale (Post 2790150)
PHP Code:

#include <amxmodx>
#include <cstrike> // reliable cs_get_user_team instead of buggy get_user_team
#include <zombie_plague_advance>
#define PLUGIN "zpa respawn limit"
#define AUTHOR "deprale"
#define VERSION "1.0"

new cvar_RespawnLimit
new SpawnCountMAX_PLAYERS ]


public 
plugin_init( )
{
    
register_pluginPLUGINVERSION AUTHOR );

    
cvar_RespawnLimit register_cvar"zp_spawn_limit""3"FCVAR_PROTECTED )
}


public 
client_deathkillervictim )
{
    if( 
SpawnCountvictim ] == get_pcvar_numcvar_RespawnLimit ) )
        return 
PLUGIN_HANDLED
    

    zp_respawn_user
victimcs_get_user_teamvictim ) == CS_TEAM_CT ZP_TEAM_HUMAN ZP_TEAM_ZOMBIE )
    
SpawnCountvictim ]++
    return 
PLUGIN_CONTINUE
}

public 
client_connectedid )
{
    
SpawnCountid ] = 0
}

public 
client_disconnectedid )
{
    
SpawnCountid ] = 0


try this :)

No working


All times are GMT -4. The time now is 14:56.

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