AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Zombie Plague 4.3 zombie delay start (https://forums.alliedmods.net/showthread.php?t=327570)

Shadypastbrightfuture 09-26-2020 22:41

Zombie Plague 4.3 zombie delay start
 
Greetings Everyone,
I am looking for a Zombie Plague 4.3 plugin to give Humans a Heads up. I am looking for something like zombies will be frozen for first few seconds and Humans can move during that period. Any help is appreciated. i am looking the plugin for ZP 4.3 and not for 5.0 because my server has 4.3 and i had made a lot of changes, so don't want to spend that much time to upgrade it to 5.0. Thanks

Mankled 09-26-2020 23:41

Re: Zombie Plague 4.3 zombie delay start
 
change zp_delay to more ;D and put zp_countdown(it doesnt come in zp 4.3, its a plugin)

Shadypastbrightfuture 09-27-2020 12:18

Re: Zombie Plague 4.3 zombie delay start
 
Zp_delay will only increase the warmup period for both humans and Zombies. i am using 1 zp_delay so the infection start at the beginning of round. I want to add something which can freeze the zombies for say 8 more seconds so the humans have some time.

Countdown will just count the time, it has nothing to do with what i am looking for.
Still thanks for the suggestion. Appreciate your help

AnimalMonster 10-07-2020 12:12

Re: Zombie Plague 4.3 zombie delay start
 
Quote:

Originally Posted by Shadypastbrightfuture (Post 2719250)
Zp_delay will only increase the warmup period for both humans and Zombies. i am using 1 zp_delay so the infection start at the beginning of round. I want to add something which can freeze the zombies for say 8 more seconds so the humans have some time.

Countdown will just count the time, it has nothing to do with what i am looking for.
Still thanks for the suggestion. Appreciate your help

PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

new cvar_freeze

public plugin_init()
{
     
register_plugin("LAlA","LALA","LALA")
     
cvar_freeze register_cvar("zp_freeze_time""8")
}

public 
zp_round_started()
{
      
g_seconds get_pcvar_num(cvar_freeze)
      
set_task(1.0"countdown"0__"b")
}

public 
countdown(id)
{
        if(!
zp_get_user_zombie(id))
        return;

        new 
g_unfreeze -= g_seconds
        
new text[64]
        
        
set_pev(idpev_maxspeed0)

        if(
g_unfreeze 0
        {
                
set_pev(idpev_maxspeed300)
                
remove_task(0)
                return;
        }
        
        
formatex(textcharsmax(text), "Zombie released in %s"g_unfreeze)

        
set_dhudmessage(25500, -1.00.3600.50.8)
    
show_dhudmessage(0text)


Haven't tested but try it.
Also i have doubts about it working/

Supremache 10-07-2020 22:19

Re: Zombie Plague 4.3 zombie delay start
 
Quote:

Originally Posted by Shadypastbrightfuture (Post 2719154)
Greetings Everyone,
I am looking for a Zombie Plague 4.3 plugin to give Humans a Heads up. I am looking for something like zombies will be frozen for first few seconds and Humans can move during that period. Any help is appreciated. i am looking the plugin for ZP 4.3 and not for 5.0 because my server has 4.3 and i had made a lot of changes, so don't want to spend that much time to upgrade it to 5.0. Thanks

PHP Code:

RemoveFreezetime register_cvar("remove_freeze""15.0"// This is the time for removing feeze from users 

Code:
#include <amxmodx> #include <fakemeta_util> #include <engine> #define PLUGIN "Countdown Timer & Freeze" #define VERSION "1.0" #define AUTHOR "Bugsy & Supremache" #define MAX_PLAYERS 32 const TaskStartCountdown = 34234243; const TaskCountdown = 34234244; const TaskRemoveFreeze = 34234245; new const PrecacheSoundList[ 11 ][] = {     "",     "fvox/one.wav",     "fvox/two.wav",     "fvox/three.wav",     "fvox/four.wav",     "fvox/five.wav",     "fvox/six.wav",     "fvox/seven.wav",     "fvox/eight.wav",     "fvox/nine.wav",     "fvox/ten.wav" }; new g_iCountdown new g_iFrost[MAX_PLAYERS+1] new RemoveFreezetime; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_logevent( "EventRoundStart" , 2 , "1=Round_Start" )     RemoveFreezetime = register_cvar("remove_freeze", "15.0") } public plugin_precache() {     for ( new i = 0 ; i < sizeof( PrecacheSoundList ); i++ ) {         if ( PrecacheSoundList[ i ][ 0 ] != EOS )             precache_sound( PrecacheSoundList[ i ] )     } } public client_disconnect(id) {     g_iFrost[id] = false; } public EventRoundStart() {     if ( !task_exists( TaskStartCountdown ) && !task_exists( TaskCountdown )  && !task_exists( TaskRemoveFreeze ) ) {         set_task( 4.0 , "StartCountdown" , TaskStartCountdown );         set_task( get_pcvar_float(RemoveFreezetime), "RemoveFreeze", TaskRemoveFreeze)     } } public StartCountdown() {     set_task( 1.0 , "ZombieCountdown" , TaskCountdown , .flags="a" , .repeat= ( g_iCountdown = 10 ) ) } public ZombieCountdown() {     emit_sound( 0 , CHAN_VOICE , PrecacheSoundList[ g_iCountdown ] , 1.0 , ATTN_NORM , 0 , PITCH_NORM )         set_hudmessage(179, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);     show_hudmessage(0, "Infection in %i", g_iCountdown-- );         new iPlayers[32], iNum     get_players(iPlayers, iNum, "ch")             for(new iPlayer, i; i < iNum; i++) {         iPlayer = iPlayers[i]         if(!is_user_alive(iPlayer)) return         new flags=pev(iPlayer,pev_flags)         if (!(flags&FL_FROZEN))             flags|=FL_FROZEN,set_pev(iPlayer, pev_flags, flags)         g_iFrost[iPlayer] = true;     } } public RemoveFreeze() {     new iPlayers[32], iNum     get_players(iPlayers, iNum, "ch")         for(new iPlayer, i; i < iNum; i++) {         iPlayer = iPlayers[i]         if(!is_user_alive(iPlayer)) return                 new flags = pev(iPlayer,pev_flags)         if (flags&FL_FROZEN)             flags&=~FL_FROZEN,set_pev(iPlayer,pev_flags,flags)         g_iFrost[iPlayer] = false;         static Float:vec[3], Float:amt         entity_get_vector(iPlayer,EV_VEC_rendercolor,vec)         amt=entity_get_float(iPlayer,EV_FL_renderamt)                 if (vec[0]==0.0 && vec[1]==90.0 && vec[2]==128.0&&amt==30.0)             fm_set_rendering(iPlayer)     } } // Glow color when user be freeze /* public client_PreThink(id) {     if (g_iFrost[id] && is_user_alive(id))     {         set_rendering(id, kRenderFxGlowShell, 0, 90, 180, kRenderNormal, 30)     } } */


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

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