if(cd[id] != 0) { ColorChat(id, GREY, "%s You have to wait^x03 %d^x01 seconds to use this ability again", PREFIX, cd[id]) return }
if(limit[id] <= 0) { ColorChat(id, GREY, "%s You have can use this ability^x03 5^x01 times per round!", PREFIX) return }
new i = zp_get_extra_item_id("Zombie Madness")
zp_force_buy_extra_item(id, i, 0)
--limit[id]
cd[id] = 20
set_task(20.0, "coolDown", id + TASK_CD, _, _, "b") } }
public event_round_start() { for (new id=1; id <= 33; id++) { if (!is_user_connected(id)) continue;
cd[id] = 0 limit[id] = 5 } }
public coolDown(taskid) { new id = ID_CD
if(cd[id] == 0) remove_task(id+TASK_CD)
--cd[id] }
public zp_user_infected_post(id, infector) { if (is_user_connected(id) && zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == mCLS) { ColorChat(id, GREY, "%s Press^x03 R^x01 to use the ability.", PREFIX) } }