Hello!
I have request if anyone wants to help or provide me a favor.
1) so basically i still learn how codes works as you can see i tried to make nemesis freeze for 10 second before he attack, but the problem is humans can shoot him while he still frozen and this is can effect him and lose so much hp.
2) Also before gamemode start.. at countdown, player can be nemesis in anywhere, like in water or ladders or even hide places.
Request : i wanna make nemesis can't take any damage/shoots while he's still frozen and teleport in spawn places when user get nemesis
is this possible?
HTML Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>
#include <dhudmessage>
#include <zp50_class_nemesis>
#include <zombieplague>
new float: g_fPlayer[33]
new g_fTime
public plugin_init()
{
register_plugin("Freeze First Nemesis", "1.0", "Hn.S")
g_fTime = register_cvar("zp_nemesis_freezetime", "10.0")
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled", 1)
}
// Freeze Nemesis
public zp_fw_core_infect_post(id)
{
if(is_user_alive(id) && zp_get_user_nemesis(id))
{
g_fPlayer[id] = get_user_maxspeed(id)
set_user_maxspeed(id, 1.0)
set_task(get_pcvar_float(g_fTime), "UnFreeze", id)
}
}
// Unfreeze user
public UnFreeze(id)
{
set_user_maxspeed(id, g_fPlayer[id])
set_dhudmessage(255, 0, 0, -1.0, 0.4)
show_dhudmessage(0, "The Nemesis is released!^nRun for your lives!")
}