Quote:
Originally Posted by Shadypastbrightfuture
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(id, pev_maxspeed, 0)
if(g_unfreeze = 0)
{
set_pev(id, pev_maxspeed, 300)
remove_task(0)
return;
}
formatex(text, charsmax(text), "Zombie released in %s", g_unfreeze)
set_dhudmessage(255, 0, 0, -1.0, 0.36, 0, 0.5, 0.8)
show_dhudmessage(0, text)
}
Haven't tested but try it.
Also i have doubts about it working/