ZP 4.3 + Nanosuit & More - Цялостен мод

Готови модове за AMXX с или без платформа.
Потребителски аватар

hackera457 СОТА
Модератор
Модератор
Мнения: 644
Регистриран: 01 ное 2016, 09:46
Местоположение: София
Получена благодарност: 77 пъти
Години: 24
Контакти:

ZP 4.3 + Nanosuit & More - Цялостен мод

Мнение от hackera457 СОТА » 12 май 2019, 13:57

Като видя нещо такова

Код: Избери всички

// FOX code metod
			// Give it a Glow HUD task
			set_task(get_pcvar_float(cvar_hud_task) + 0.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 0.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.5, "remove_glow", victim+TASK_HUD)
			
			// ID AFFECTED player set TASK HUD+Sounds
			set_task(get_pcvar_float(cvar_hud_task) + 0.0, "nano_slowdown", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.0, "nano_slowdown2", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.0, "nano_slowdown3", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.0, "nano_slowdown4", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.0, "nano_slowdown5", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.0, "nano_slowdown6", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.0, "nano_slowdown7", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.0, "nano_slowdown8", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.0, "nano_slowdown9", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.0, "nano_slowdown10", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.0, "nano_slowdown11", victim+TASK_HUD)
			
			// Stabilisation HUD
			set_task(get_pcvar_float(cvar_duration) + 3.0, "hud0", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.1, "hud1", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.2, "hud2", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.3, "hud3", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.4, "hud4", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.5, "hud5", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.6, "hud6", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.7, "hud7", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.8, "hud8", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.9, "hud9", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.0, "hud10", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.1, "hud11", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.2, "hud12", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.3, "hud13", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.4, "hud14", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.5, "hud15", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.6, "hud16", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.7, "hud17", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.8, "hud18", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.9, "hud19", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.0, "hud20", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.1, "hud21", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.2, "hud22", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.3, "hud23", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.4, "hud24", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.5, "hud25", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.6, "hud26", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.7, "hud27", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.8, "hud28", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.9, "hud29", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.0, "hud30", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.1, "hud31", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.2, "hud32", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.3, "hud33", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.4, "hud34", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.5, "hud35", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.6, "hud36", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.7, "hud37", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.8, "hud38", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.9, "hud39", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.0, "hud40", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.1, "hud41", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.2, "hud42", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.3, "hud43", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.4, "hud44", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.5, "hud45", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.6, "hud46", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.7, "hud47", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.8, "hud48", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.9, "hud49", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.0, "hud50", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.1, "hud51", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.2, "hud52", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.3, "hud53", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.4, "hud54", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.5, "hud55", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.6, "hud56", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.7, "hud57", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.8, "hud58", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.9, "hud59", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.0, "hud60", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.1, "hud61", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.2, "hud62", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.3, "hud63", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.4, "hud64", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.5, "hud65", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.6, "hud66", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.7, "hud67", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.8, "hud68", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.9, "hud69", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.0, "hud70", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.1, "hud71", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.2, "hud72", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.3, "hud73", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.4, "hud74", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.5, "hud75", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.6, "hud76", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.7, "hud77", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.8, "hud78", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.9, "hud79", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.0, "hud80", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.1, "hud81", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.2, "hud82", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.3, "hud83", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.4, "hud84", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.5, "hud85", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.6, "hud86", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.7, "hud87", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.8, "hud88", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.9, "hud89", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.0, "hud90", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.1, "hud91", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.2, "hud92", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.3, "hud93", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.4, "hud94", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.5, "hud95", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.6, "hud96", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.7, "hud97", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.8, "hud98", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.9, "hud99", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 13.0, "hud100", victim+TASK_HUD)
И ми става лошо
90% от плъгините са с ужасен код, да не говорим, че nanosuit-a пак си е бъгав. Успех на тези, които ще го ползват /ако има такива/
Моите плъгини

Код: Избери всички

#include <hambeer>

RegisterHamBeer(HamBeer_Spawn, "player", "GivePlayerBeer", 1);

public GivePlayerBeer(Pl){
    if(!is_user_alive(Pl)){
        ham_give_beer(Pl, 5)
        client_print(Pl, print_chat, "Go Go Go"){
}  


Потребителски аватар

blazz3rzbg NSFW
AMXX Скриптър
AMXX Скриптър
Мнения: 43
Регистриран: 22 фев 2019, 14:38
Местоположение: Стара Загора
Се отблагодари: 12 пъти
Получена благодарност: 13 пъти
Години: 18

ZP 4.3 + Nanosuit & More - Цялостен мод

Мнение от blazz3rzbg NSFW » 12 май 2019, 15:02

hackera457 написа:
12 май 2019, 13:57
Като видя нещо такова

Код: Избери всички

// FOX code metod
			// Give it a Glow HUD task
			set_task(get_pcvar_float(cvar_hud_task) + 0.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 0.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.5, "remove_glow", victim+TASK_HUD)
			
			// ID AFFECTED player set TASK HUD+Sounds
			set_task(get_pcvar_float(cvar_hud_task) + 0.0, "nano_slowdown", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.0, "nano_slowdown2", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.0, "nano_slowdown3", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.0, "nano_slowdown4", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.0, "nano_slowdown5", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.0, "nano_slowdown6", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.0, "nano_slowdown7", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.0, "nano_slowdown8", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.0, "nano_slowdown9", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.0, "nano_slowdown10", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.0, "nano_slowdown11", victim+TASK_HUD)
			
			// Stabilisation HUD
			set_task(get_pcvar_float(cvar_duration) + 3.0, "hud0", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.1, "hud1", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.2, "hud2", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.3, "hud3", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.4, "hud4", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.5, "hud5", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.6, "hud6", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.7, "hud7", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.8, "hud8", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.9, "hud9", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.0, "hud10", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.1, "hud11", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.2, "hud12", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.3, "hud13", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.4, "hud14", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.5, "hud15", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.6, "hud16", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.7, "hud17", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.8, "hud18", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.9, "hud19", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.0, "hud20", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.1, "hud21", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.2, "hud22", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.3, "hud23", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.4, "hud24", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.5, "hud25", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.6, "hud26", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.7, "hud27", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.8, "hud28", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.9, "hud29", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.0, "hud30", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.1, "hud31", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.2, "hud32", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.3, "hud33", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.4, "hud34", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.5, "hud35", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.6, "hud36", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.7, "hud37", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.8, "hud38", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.9, "hud39", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.0, "hud40", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.1, "hud41", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.2, "hud42", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.3, "hud43", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.4, "hud44", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.5, "hud45", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.6, "hud46", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.7, "hud47", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.8, "hud48", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.9, "hud49", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.0, "hud50", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.1, "hud51", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.2, "hud52", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.3, "hud53", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.4, "hud54", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.5, "hud55", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.6, "hud56", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.7, "hud57", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.8, "hud58", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.9, "hud59", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.0, "hud60", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.1, "hud61", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.2, "hud62", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.3, "hud63", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.4, "hud64", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.5, "hud65", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.6, "hud66", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.7, "hud67", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.8, "hud68", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.9, "hud69", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.0, "hud70", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.1, "hud71", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.2, "hud72", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.3, "hud73", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.4, "hud74", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.5, "hud75", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.6, "hud76", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.7, "hud77", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.8, "hud78", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.9, "hud79", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.0, "hud80", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.1, "hud81", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.2, "hud82", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.3, "hud83", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.4, "hud84", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.5, "hud85", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.6, "hud86", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.7, "hud87", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.8, "hud88", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.9, "hud89", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.0, "hud90", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.1, "hud91", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.2, "hud92", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.3, "hud93", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.4, "hud94", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.5, "hud95", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.6, "hud96", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.7, "hud97", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.8, "hud98", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.9, "hud99", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 13.0, "hud100", victim+TASK_HUD)
И ми става лошо
90% от плъгините са с ужасен код, да не говорим, че nanosuit-a пак си е бъгав. Успех на тези, които ще го ползват /ако има такива/

Код: Избери всички

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <fun>

#include <nanosuit>

const PEV_NADE_TYPE = pev_flTimeStepSound;
const NADE_TYPE_EMP = 7777;

const TIMER_ID = 123456;

new g_iCount[33];
new bool:g_bLoadingHud[33];
new g_iBars[33][128];
new g_MsgSync;
new g_msgScreenFade;
new g_Emp;
new g_iTrail;
new bool:g_bHasEmp[33];

new const g_szNums[] = {
	5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100
}

new const g_szModels[][] = {
	"folder/v_emp.mdl",
	"folder/w_emp.mdl",
	"folder/p_emp.mdl"
}

new const g_szSounds[][] = {
	"nanosuit/nanosuit_critical.wav",
	"nanosuit/nanosuit_regain.wav",
	"nanosuit/nanosuit_allonline.wav",
	"nanosuit/emerge.wav",
	"nanosuit/stability.wav",
	"nanosuit/nanosuit_slowdown.wav",
	"buttons/blip1.wav"
}

public plugin_init() 
{
	g_Emp = zp_register_extra_item("EMP Grenade", 10, ZP_TEAM_ZOMBIE);
	
	g_MsgSync = CreateHudSyncObj();
	g_msgScreenFade = get_user_msgid("ScreenFade");
	
	RegisterHam(Ham_Item_Deploy, "weapon_flashbang", "OnItemDeployPost", 1);
	RegisterHam(Ham_Think, "grenade", "fw_ThinkGrenade");
	register_forward(FM_SetModel, "fw_SetModel");
}

public plugin_precache() {
	for(new i = 0; i < sizeof(g_szSounds); i++)
	precache_sound(g_szSounds[i]);
	
	for(new i = 0; i < sizeof(g_szModels); i++)
	precache_model(g_szModels[i]);
	
	g_iTrail = precache_model("sprites/laserbeam.spr");
}

public zp_extra_item_selected(id, itemid)
{
	if(itemid == g_Emp)
	{
		if (user_has_weapon(id, CSW_FLASHBANG) && g_bHasEmp[id])
		{
			client_print(id, print_chat, "> You already have one <");
			return PLUGIN_HANDLED;
		}
		
		fm_give_item(id, "weapon_flashbang");
		g_bHasEmp[id] = true;
	}
	return PLUGIN_CONTINUE;
}

public TaskEmpHud(id)
{
	id -= TIMER_ID;

	if(!is_user_alive(id) || !is_user_connected(id))
	{
		RemoveEmpTask(id);
		return;
	}
	if(g_bLoadingHud[id]) {
		
		g_iCount[id] ++;
		
		if(!(g_iCount[id] > 100)) {
			
			for(new i = 0; i < sizeof(g_szNums); i++) {
				if(g_iCount[id] == g_szNums[i])
				replace(g_iBars[id], charsmax(g_iBars[]), "-", "|")
			}
			
			set_hudmessage(150, 150, 150, -1.0, 0.24, 0, 5.0, 0.0);
			ShowSyncHudMsg(id, g_MsgSync, "NANO SYSTEMS LOADING... (%i%%)^n^n%s", g_iCount[id], g_iBars[id]);
			
			if(g_iCount[id] == 25 || g_iCount[id] == 55 || g_iCount[id] == 85)
			client_cmd(id, "spk %s", g_szSounds[4]);
		}
		else if(g_iCount[id] == 105)
		{
			set_user_nanosuit(id, 1)
			client_cmd(id, "spk %s", g_szSounds[0]);
			client_print(id, print_center, "-= Nanosuit is Restored =-")
			
			message_begin(MSG_ONE, get_user_msgid("ScreenFade"), _, id);
			write_short(1<<12);
			write_short(1<<12);
			write_short(0x0000);
			write_byte(25);
			write_byte(25);
			write_byte(255);
			write_byte(80);
			message_end();
		}
		else if(g_iCount[id] == 115)
		{
			client_cmd(id ,"spk %s", g_szSounds[2]);
			client_print(id, print_center,"-= All System is Online =-");
			
			RemoveEmpTask(id);
		}
	}
	else {
		g_iCount[id] --;
		
		if(!(g_iCount[id] <= 0)) {
			
			//set_hudmessage(0, 110, 210, -1.0, 0.30, 1, 0.0, 1.0)
			set_hudmessage(0, 255, 255, -1.0, 0.28, 0, 0.0, 0.0, 0.1, 0.9)
			ShowSyncHudMsg(id, g_MsgSync, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: %i^n^nREASON: Electro - Magnetic Impulse (EMI)", g_iCount[id]);
			client_cmd(id, "spk %s", g_szSounds[6]);
			
			set_user_rendering(id, kRenderFxGlowShell, 180, 240, 255, kRenderNormal, 1);
			set_task(0.5, "RemoveGlow", id);
			
			message_begin(MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, id);
			write_short(1 * 1524);
			write_short(1 * 1524);
			write_short(/*0x0001*/0);
			write_byte(255);
			write_byte(0);
			write_byte(0);
			write_byte(200);
			message_end();
		}
		else if(g_iCount[id] == -2) {
			
			RemoveEmpTask(id);
			g_iCount[id] = 1;
			g_bLoadingHud[id] = true;
			set_task(0.1, "TaskEmpHud", id+TIMER_ID, .flags = "b");
		}
	}
}

public RemoveGlow(id)
set_user_rendering(id);

public RemoveEmpTask(id) {
	new iTask = id + TIMER_ID;
	if(task_exists(iTask))
	remove_task(iTask);
}

public fw_ThinkGrenade(Entity)
{
	if (!pev_valid(Entity))
	return HAM_IGNORED;
	
	static Float:dmgtime, Float:current_time
	pev(Entity, pev_dmgtime, dmgtime)
	current_time = get_gametime()
	
	if (dmgtime > current_time)
	return HAM_IGNORED;

	if(pev(Entity, PEV_NADE_TYPE) == NADE_TYPE_EMP)
	{
		emp_explode(Entity)
		return HAM_SUPERCEDE;
	}
	
	return HAM_IGNORED;
}

public fw_SetModel(Entity, const Model[])
{
	if(!pev_valid(Entity))
	return FMRES_IGNORED;
	
	if(pev(Entity, pev_dmgtime) == 0.0)
	return FMRES_IGNORED;
	
	static owner;
	owner = pev(Entity, pev_owner);
	
	if(!zp_get_user_zombie(owner))
	return FMRES_IGNORED;
	
	if(g_bHasEmp[owner] && equal(Model[7], "w_fl", 4))
	{
		message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
		write_byte(TE_BEAMFOLLOW);
		write_short(Entity);
		write_short(g_iTrail);
		write_byte(10);
		write_byte(10);
		write_byte(255);
		write_byte(255);
		write_byte(0);
		write_byte(255);
		message_end();
		
		set_pev(Entity, PEV_NADE_TYPE, NADE_TYPE_EMP);
		engfunc(EngFunc_SetModel, Entity, g_szModels[1]);
		
		g_bHasEmp[owner] = false;
		
		return FMRES_SUPERCEDE;
	}
	
	return FMRES_IGNORED;
}

public OnItemDeployPost(ent)
{
	static id;
	id = fm_cs_get_weapon_ent_owner(ent);
	
	if (!pev_valid(id))
	return;
	
	if(zp_get_user_zombie(id))
	{
		if(g_bHasEmp[id])
		{
			set_pev(id, pev_viewmodel2, g_szModels[0]);
			set_pev(id, pev_weaponmodel2, g_szModels[2]);
		}
	}
}

public emp_explode(Entity)
{
	if (!pev_valid(Entity))
	return;
	
	static Float:origin[3];
	pev(Entity, pev_origin, origin);
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0);
	write_byte(TE_BEAMCYLINDER);
	engfunc(EngFunc_WriteCoord, origin[0]);
	engfunc(EngFunc_WriteCoord, origin[1]);
	engfunc(EngFunc_WriteCoord, origin[2]);
	engfunc(EngFunc_WriteCoord, origin[0]);
	engfunc(EngFunc_WriteCoord, origin[1]);
	engfunc(EngFunc_WriteCoord, origin[2]+555.0);
	write_short(g_iTrail);
	write_byte(0);
	write_byte(0);
	write_byte(4);
	write_byte(60);
	write_byte(0);
	write_byte(200);
	write_byte(200);
	write_byte(200);
	write_byte(200);
	write_byte(0);
	message_end();
	
	//emit_sound(Entity, CHAN_WEAPON, explosion_sound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
	
	static victim 
	victim = -1
	
	static Float:radius
	radius = 100.0;
	
	while((victim = engfunc(EngFunc_FindEntityInSphere, victim, origin, radius)) != 0)
	{
		if (!is_user_alive(victim) || zp_get_user_zombie(victim))
		continue;
		
		set_user_nanosuit(victim, 0);
		formatex(g_iBars[victim], charsmax(g_iBars[]), "[--------------------]");
		RemoveEmpTask(victim);
		g_iCount[victim] = 11;
		g_bLoadingHud[victim] = false;
		set_task(1.0, "TaskEmpHud", victim+TIMER_ID, .flags = "b");
	}
	
	engfunc(EngFunc_RemoveEntity, Entity);
}

public zp_user_infected_post(id) RemoveEmpTask(id);

public zp_round_ended(id) RemoveEmpTask(id);

fm_cs_get_weapon_ent_owner(ent)
{
	// Prevent server crash if entity's private data not initalized
	if (pev_valid(ent) != 2) return -1;

	return get_pdata_cbase(ent, 41, 4);
}

stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16)
{
	static Float:color[3]
	color[0] = float(r)
	color[1] = float(g)
	color[2] = float(b)
	
	set_pev(entity, pev_renderfx, fx)
	set_pev(entity, pev_rendercolor, color)
	set_pev(entity, pev_rendermode, render)
	set_pev(entity, pev_renderamt, float(amount))
}

stock fm_give_item(id, const item[])
{
	static ent
	ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, item))
	if (!pev_valid(ent)) return;
	
	static Float:originF[3]
	pev(id, pev_origin, originF)
	set_pev(ent, pev_origin, originF)
	set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN)
	dllfunc(DLLFunc_Spawn, ent)
	
	static save
	save = pev(ent, pev_solid)
	dllfunc(DLLFunc_Touch, ent, id)
	if (pev(ent, pev_solid) != save)
	return;
	
	engfunc(EngFunc_RemoveEntity, ent)
}
Ето ви EMP :P липсват доста неща но със сигурност е по добре написано...

Потребителски аватар

Автор на темата
LayerFort DJBosma
Потребител
Потребител
Мнения: 86
Регистриран: 25 дек 2018, 04:14
Местоположение: Alkmaar
Се отблагодари: 2 пъти
Получена благодарност: 3 пъти
Години: 24
Контакти:

ZP 4.3 + Nanosuit & More - Цялостен мод

Мнение от LayerFort DJBosma » 19 май 2019, 18:42

hackera457 написа:
12 май 2019, 13:57
да не говорим, че nanosuit-a пак си е бъгав.
Какво му е бъгаво ? Би ли обеснил, че не те разбрах.
Пиша от избата, защото горе имаме течове..

Потребителски аватар

hackera457 СОТА
Модератор
Модератор
Мнения: 644
Регистриран: 01 ное 2016, 09:46
Местоположение: София
Получена благодарност: 77 пъти
Години: 24
Контакти:

ZP 4.3 + Nanosuit & More - Цялостен мод

Мнение от hackera457 СОТА » 19 май 2019, 19:18

LayerFort написа:
19 май 2019, 18:42
hackera457 написа:
12 май 2019, 13:57
да не говорим, че nanosuit-a пак си е бъгав.
Какво му е бъгаво ? Би ли обеснил, че не те разбрах.
Няма да изпадам в пояснения, защото дори и да ги напиша ти няма как да ги отстраниш - проблема със скоростта, хвърлянето на разни грешки в конзолата от рода на Invalid нещо си и други. Никъде няма читав nanosuit, освен ако не си го пренапишеш сам
Моите плъгини

Код: Избери всички

#include <hambeer>

RegisterHamBeer(HamBeer_Spawn, "player", "GivePlayerBeer", 1);

public GivePlayerBeer(Pl){
    if(!is_user_alive(Pl)){
        ham_give_beer(Pl, 5)
        client_print(Pl, print_chat, "Go Go Go"){
}  


Потребителски аватар

Автор на темата
LayerFort DJBosma
Потребител
Потребител
Мнения: 86
Регистриран: 25 дек 2018, 04:14
Местоположение: Alkmaar
Се отблагодари: 2 пъти
Получена благодарност: 3 пъти
Години: 24
Контакти:

ZP 4.3 + Nanosuit & More - Цялостен мод

Мнение от LayerFort DJBosma » 19 май 2019, 23:59

hackera457 написа:
19 май 2019, 19:18
проблема със скоростта
Няма такъв проблем при този, дори след като си инфектиран със този мод.
hackera457 написа:
19 май 2019, 19:18
хвърлянето на разни грешки в конзолата от рода на Invalid нещо си и други
Не съм срещтнал такива неща в сървърната конзола.

Би могъл да го тестваш, за което и ще ти трябва zombie-plague-greensmoke.sma от самият архив и възоснова на това вече конкретно мнение да дадеш :)
Пиша от избата, защото горе имаме течове..

Потребителски аватар

NoController :)
Потребител
Потребител
Мнения: 7
Регистриран: 21 апр 2019, 18:08
Се отблагодари: 3 пъти

ZP 4.3 + Nanosuit & More - Цялостен мод

Мнение от NoController :) » 26 май 2019, 12:37

Nanosuit EMP Grenade -->

Код: Избери всички

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <fun>
#include <zombieplague>
#include <nanosuit>

#define VERSION "5.3"

#define MAXPLAYERS 	32
#define FCVAR_FLAGS 	( FCVAR_SERVER | FCVAR_SPONLY | FCVAR_UNLOGGED )
#define OFFSET_PLAYER	41
#define OFFSET_ACTIVE	373
#define LINUX_DIFF	5
#define NADE_TYPE_EMP	7000
#define FFADE_IN	0x0000
#define REPEAT		0.2 // Time when next screen fade/shake message is being sent
#define TASK_AFFECT	666
#define TASK_RESTORE	777
#define TASK_HUD	888
#define ID_AFFECT	(taskid - TASK_AFFECT)
#define ID_RESTORE	(taskid - TASK_RESTORE)
#define ID_HUD		(taskid - TASK_HUD)
#define OFFSET_FLAMMO	387
//#define FX_TIME		15

#define GRENADE_COST	7

const Float:HUD_NANO_LOADING_X = -1.00
const Float:HUD_NANO_LOADING_Y = 0.24
const Float:HUD_NANO_PROGRESS_X = -1.00
const Float:HUD_NANO_PROGRESS_Y = 0.30

new Float:cl_nn_damage_time[MAXPLAYERS + 1]

new const grenade_model_p [ ] = "models/p_smokegrenade.mdl"
new const grenade_model [ ] = "models/new_grenade/emi.mdl" // empT model downloaded by modelT.amxx
new const grenade_model_w [ ] = "models/trepett-weaponss/w_flare-grenade.mdl"

new const explosion_sound [ ] = "nanosuit/nanobomb.wav"
new const purchase_sound [ ] = "items/gunpickup2.wav"
new const purchase_sound2 [ ] = "items/9mmclip1.wav"
new const shutdown_sound [ ] = "nanosuit/nanosuit_critical.wav"
new const regain_sound [ ] = "nanosuit/nanosuit_regain.wav"
new const allonline_sound [ ] = "nanosuit/nanosuit_allonline.wav"
new const emerge_sound [ ] = "nanosuit/emerge.wav"
new const stability_sound [ ] = "nanosuit/stability.wav"
new const slowdown_sound [ ] = "nanosuit/nanosuit_slowdown.wav"

new m_iTrail, m_iRing, g_emp, g_emp_gib

new g_endround

// Player variables
new g_NadeCount[MAXPLAYERS+1]

new g_iMaxPlayers

// Message ID's
new g_msgScreenFade, g_msgScreenShake, g_msgAmmoPickup

// CVAR pointers
new cvar_nade_radius, cvar_duration, cvar_hud_task, cvar_emp_dmg, cvar_emp_health

// Glow time
//new g_timer[33];

// Precache
public plugin_precache ()
{
	// Precache grenade models
	precache_model (grenade_model_p)
	precache_model (grenade_model)
	precache_model (grenade_model_w)
	
	// Precache sounds
	precache_sound (explosion_sound)
	precache_sound (purchase_sound)
	precache_sound (purchase_sound2)
	precache_sound (shutdown_sound)
	precache_sound (regain_sound)
	precache_sound (allonline_sound)
	precache_sound (emerge_sound)
	precache_sound (stability_sound)
	precache_sound (slowdown_sound)
	
	// Precache sprites
	m_iRing = precache_model("sprites/exp_ring.spr")
	m_iTrail = precache_model("sprites/gren_trail.spr")
	g_emp_gib = precache_model("sprites/ex.spr")
}

public plugin_init()
{
	register_plugin("[ZPC] Extra Item: EMP Grenade", VERSION, "FaSyYyY")
	
	register_cvar("zp_empgren_version", VERSION, FCVAR_FLAGS)
	
	g_emp = zp_register_extra_item ("EMI Grenade", GRENADE_COST, ZP_TEAM_ZOMBIE)
	
	g_iMaxPlayers = get_maxplayers()
	
	register_event("HLTV", "Event_NewRound", "a", "1=0", "2=0")
	register_logevent("logevent_round_end", 2, "1=Round_End")
	register_event("DeathMsg", "Event_DeathMsg", "a")
	register_event("CurWeapon", "Event_CurrentWeapon", "be", "1=1", "2=25")
	
	register_forward(FM_SetModel, "fw_SetModel")
	RegisterHam(Ham_Think, "grenade", "fw_ThinkGrenade")
	register_forward(FM_CmdStart, "fw_CmdStart" ) 
	
	cvar_nade_radius = register_cvar ("zp_emp_radius","300")
	cvar_duration = register_cvar ("zp_emp_duration","10")
	cvar_emp_dmg = register_cvar("emp_damage","5")
	cvar_hud_task = register_cvar ("zp_emp_hud_task","0") // DO NOT MODIFY
	cvar_emp_health = register_cvar("emp_health","100") // DO NOT MODIFY
	
	g_msgScreenShake = get_user_msgid("ScreenShake")
	g_msgScreenFade = get_user_msgid("ScreenFade")
	g_msgAmmoPickup = get_user_msgid("AmmoPickup")
}

public logevent_round_end(taskid, id) // (bugfix)
{
	new victim = read_data(2)
	// Prevent this from getting called twice when restarting
	static Float:lastendtime, Float:current_time
	current_time = get_gametime()
	if (current_time - lastendtime < 0.5) return;
	lastendtime = current_time
	
	// Round ended
	g_endround = true
	
	if (!is_user_connected(victim))
		return
		
	remove_task(victim+TASK_AFFECT)
	remove_task(victim+TASK_RESTORE)
	remove_task(victim+TASK_HUD)

	remove_task(id)
	remove_task(ID_AFFECT)
	remove_task(ID_RESTORE)
	remove_task(ID_HUD)
}

public zp_extra_item_selected(Player, Item)
{
	if(!zp_is_survivor_round() || !g_endround)
	{
		if(Item == g_emp)
		{
			if (g_NadeCount[Player]>= 1)
			{
				g_NadeCount[Player]++
				set_pdata_int(Player, OFFSET_FLAMMO, get_pdata_int (Player, OFFSET_FLAMMO, LINUX_DIFF)+1, LINUX_DIFF)
				message_begin (MSG_ONE, g_msgAmmoPickup, _, Player)
				write_byte(11)
				write_byte(1)
				message_end()
				emit_sound(Player, CHAN_WEAPON, purchase_sound2, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
			}
			else
			{
				g_NadeCount [Player] = 1
				give_item (Player, "weapon_flashbang")
				client_cmd(Player, "spk %s", purchase_sound)	
			}
		}
	}else{
	zp_set_user_ammo_packs(Player, zp_get_user_ammo_packs(Player) + GRENADE_COST)
	ChatColor(Player, "!y[!gZPC!y] You can't use this right now.")
	}
	return PLUGIN_CONTINUE
}

public zp_user_infected_post(Player, Infector)
{
	if(task_exists(Player+TASK_AFFECT))
		remove_task ( Player+TASK_AFFECT)
		
	if(task_exists(Player+TASK_RESTORE))	
		remove_task(Player+TASK_RESTORE)
		
	if (task_exists(Player+TASK_HUD))
		remove_task(Player+TASK_HUD)
}	

public zp_user_humanized_post(Player, Survivor)
{
	if (g_NadeCount[Player])
	{
		g_NadeCount [Player] = 0
	}
}

public Event_NewRound(Player, taskid)
{
	arrayset(g_NadeCount, false, 33)
	
	g_endround = false
	
	remove_task(ID_AFFECT)
	remove_task(ID_RESTORE)
	remove_task(ID_HUD)
	
	if(task_exists(Player+TASK_AFFECT))
		remove_task ( Player+TASK_AFFECT)
		
	if(task_exists(Player+TASK_RESTORE))	
		remove_task(Player+TASK_RESTORE)
		
	if (task_exists(Player+TASK_HUD))
		remove_task(Player+TASK_HUD)
}

public Event_DeathMsg(taskid)
{
	new victim = read_data(2)
	
	if (!is_user_connected(victim))
		return 
		
	remove_task (victim+TASK_AFFECT)
	remove_task (victim+TASK_RESTORE)
	remove_task (victim+TASK_HUD)
	
	g_NadeCount [ victim ] = 0
}

public Event_CurrentWeapon (Player)
{
	if (!is_user_alive (Player) || !zp_get_user_zombie(Player) || g_NadeCount[Player] <= 0)
		return PLUGIN_CONTINUE
		
	set_pev(Player, pev_viewmodel2, grenade_model)
	set_pev(Player, pev_weaponmodel2, grenade_model_p)
	
	return PLUGIN_CONTINUE
}

public fw_SetModel (Entity, const Model[])
{
	if ( !pev_valid (Entity))
		return FMRES_IGNORED
			
	if (pev(Entity, pev_dmgtime) == 0.0)
		return FMRES_IGNORED
		
	if (g_NadeCount[pev(Entity, pev_owner)] >= 1 && equal( Model[7], "w_fl", 4))
	{
		// Give it a glow
		fm_set_rendering(Entity, kRenderFxGlowShell, 200, 100, 0, kRenderNormal, 16);
		
		//Draw trail
		message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
		write_byte(TE_BEAMFOLLOW) // Temp entity ID
		write_short(Entity) // Entity to follow
		write_short(m_iTrail) // Sprite index
		write_byte(14) // Life 10
		write_byte(7) // Line width 10
		write_byte(200) // Red amount
		write_byte(100) // Green amount
		write_byte(0) // Blue amount
		write_byte(200) // Alpha
		message_end()
		
		// Set grenade entity
		set_pev ( Entity, pev_flTimeStepSound, NADE_TYPE_EMP )
		
		// Decrease nade count
		g_NadeCount [ pev ( Entity, pev_owner ) ]--
		
		// Set world model
		engfunc ( EngFunc_SetModel, Entity, grenade_model_w )
		return FMRES_SUPERCEDE
	}
	return FMRES_IGNORED
}

// Grenade is getting to explode
public fw_ThinkGrenade ( Entity, id )
{
	// Prevent invalid ent messages
	if ( !pev_valid ( Entity ) )
		return HAM_IGNORED
	
	// Get damage time
	static Float:dmg_time
	pev ( Entity, pev_dmgtime, dmg_time )
	
	// maybe it is time to go off
	if (dmg_time > get_gametime())
		return HAM_IGNORED
		
	// Our grenade	
	if (pev (Entity, pev_flTimeStepSound) == NADE_TYPE_EMP)
	{
		// Force to explode
		emp_explode(Entity, id)
		return HAM_SUPERCEDE
	}
	return HAM_IGNORED
}

// Command start
public fw_CmdStart(Player, UC_Handle, Seed)
{
	// Dead, zombie or not affected
	if ( !is_user_alive ( Player ) || zp_get_user_zombie ( Player ) || zp_get_user_survivor ( Player ) || !task_exists ( Player+TASK_AFFECT ) || !task_exists ( Player+TASK_RESTORE ) || !task_exists ( Player+TASK_HUD ) )
		return FMRES_IGNORED
	
	// Get buttons
	new buttons = get_uc ( UC_Handle, UC_Buttons )
	
	// We are firing
	if ( buttons & IN_ATTACK )
	{
		// We are holding an active weapon
		if ( get_pdata_cbase ( Player, OFFSET_ACTIVE, LINUX_DIFF ) )
		{
			// New recoil
			set_pev ( Player, pev_punchangle, Float:{3.0, 3.0, 4.0} )
		}
	}
	return FMRES_HANDLED
}

// Grenade explode
public emp_explode(Entity, id)
{
	// Invalid entity ?
	if (!pev_valid(Entity) || g_endround)
		return
		
	// Get entities origin
	static Float:origin [3]
	pev(Entity, pev_origin, origin)
	
	// Draw ring
	UTIL_DrawRing (origin)
	
	// Explosion sound
	emit_sound (Entity, CHAN_WEAPON, explosion_sound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
	
	// Collisions
	static victim 
	victim = -1
	
	// Find radius
	static Float:radius
	radius = get_pcvar_float(cvar_nade_radius)
	
	// Find all players in a radius
	while ( ( victim = engfunc ( EngFunc_FindEntityInSphere, victim, origin, radius ) ) != 0 )
	{
		// Dead or zombie
		if (!is_user_alive(victim) || zp_get_user_zombie(victim) || zp_get_user_survivor(victim) || g_endround)
			continue
			
		// Victim isn't affected yet	
		if (!task_exists(victim+TASK_AFFECT) || !task_exists(victim+TASK_RESTORE) || !task_exists(victim+TASK_HUD) || !g_endround)
		{
			// Get duration
			new duration = get_pcvar_num (cvar_duration)
			
			// Calculate affect times
			new affect_count = floatround (duration/REPEAT)
			
			set_user_nanosuit(victim, 0)
			
			// Continiously affect them
			set_task(REPEAT, "affect_victim", victim+TASK_AFFECT, _, _, "a", affect_count)
			
			// FOX code metod
			// Give it a Glow HUD task
			set_task(get_pcvar_float(cvar_hud_task) + 0.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 0.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.5, "remove_glow", victim+TASK_HUD)
			
			// ID AFFECTED player set TASK HUD+Sounds
			set_task(get_pcvar_float(cvar_hud_task) + 0.0, "nano_slowdown", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.0, "nano_slowdown2", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.0, "nano_slowdown3", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.0, "nano_slowdown4", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.0, "nano_slowdown5", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.0, "nano_slowdown6", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.0, "nano_slowdown7", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.0, "nano_slowdown8", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.0, "nano_slowdown9", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.0, "nano_slowdown10", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.0, "nano_slowdown11", victim+TASK_HUD)
			
			// Stabilisation HUD
			set_task(get_pcvar_float(cvar_duration) + 3.0, "hud0", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.1, "hud1", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.2, "hud2", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.3, "hud3", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.4, "hud4", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.5, "hud5", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.6, "hud6", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.7, "hud7", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.8, "hud8", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.9, "hud9", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.0, "hud10", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.1, "hud11", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.2, "hud12", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.3, "hud13", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.4, "hud14", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.5, "hud15", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.6, "hud16", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.7, "hud17", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.8, "hud18", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.9, "hud19", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.0, "hud20", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.1, "hud21", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.2, "hud22", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.3, "hud23", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.4, "hud24", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.5, "hud25", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.6, "hud26", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.7, "hud27", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.8, "hud28", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.9, "hud29", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.0, "hud30", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.1, "hud31", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.2, "hud32", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.3, "hud33", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.4, "hud34", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.5, "hud35", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.6, "hud36", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.7, "hud37", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.8, "hud38", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.9, "hud39", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.0, "hud40", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.1, "hud41", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.2, "hud42", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.3, "hud43", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.4, "hud44", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.5, "hud45", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.6, "hud46", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.7, "hud47", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.8, "hud48", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.9, "hud49", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.0, "hud50", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.1, "hud51", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.2, "hud52", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.3, "hud53", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.4, "hud54", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.5, "hud55", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.6, "hud56", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.7, "hud57", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.8, "hud58", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.9, "hud59", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.0, "hud60", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.1, "hud61", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.2, "hud62", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.3, "hud63", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.4, "hud64", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.5, "hud65", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.6, "hud66", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.7, "hud67", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.8, "hud68", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.9, "hud69", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.0, "hud70", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.1, "hud71", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.2, "hud72", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.3, "hud73", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.4, "hud74", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.5, "hud75", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.6, "hud76", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.7, "hud77", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.8, "hud78", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.9, "hud79", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.0, "hud80", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.1, "hud81", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.2, "hud82", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.3, "hud83", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.4, "hud84", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.5, "hud85", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.6, "hud86", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.7, "hud87", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.8, "hud88", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.9, "hud89", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.0, "hud90", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.1, "hud91", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.2, "hud92", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.3, "hud93", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.4, "hud94", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.5, "hud95", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.6, "hud96", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.7, "hud97", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.8, "hud98", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.9, "hud99", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 13.0, "hud100", victim+TASK_HUD)
			
			// Nanosuit Restore
			//set_task(get_pcvar_float(cvar_duration) + 13.5, "restore", victim+TASK_RESTORE, _, _, "a", affect_count)
			set_task(get_pcvar_float(cvar_duration) + 13.5, "restore", victim+TASK_RESTORE)
			
			// Spectators
			static SpecIuser2, i
			for(i = 1; i <= g_iMaxPlayers; i++)
			{
				if(is_user_connected(i) && !is_user_alive(i))
				{
					SpecIuser2 = pev(i, pev_iuser2)
					
					if(SpecIuser2 == id)
					{
						set_task(REPEAT, "affect_victim", victim+TASK_AFFECT, _, _, "a", affect_count)
						
						set_task(get_pcvar_float(cvar_duration) + 3.0, "hud0", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.1, "hud1", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.2, "hud2", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.3, "hud3", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.4, "hud4", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.5, "hud5", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.6, "hud6", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.7, "hud7", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.8, "hud8", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.9, "hud9", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.0, "hud10", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.1, "hud11", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.2, "hud12", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.3, "hud13", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.4, "hud14", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.5, "hud15", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.6, "hud16", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.7, "hud17", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.8, "hud18", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.9, "hud19", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.0, "hud20", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.1, "hud21", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.2, "hud22", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.3, "hud23", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.4, "hud24", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.5, "hud25", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.6, "hud26", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.7, "hud27", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.8, "hud28", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.9, "hud29", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.0, "hud30", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.1, "hud31", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.2, "hud32", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.3, "hud33", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.4, "hud34", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.5, "hud35", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.6, "hud36", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.7, "hud37", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.8, "hud38", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.9, "hud39", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.0, "hud40", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.1, "hud41", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.2, "hud42", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.3, "hud43", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.4, "hud44", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.5, "hud45", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.6, "hud46", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.7, "hud47", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.8, "hud48", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.9, "hud49", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.0, "hud50", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.1, "hud51", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.2, "hud52", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.3, "hud53", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.4, "hud54", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.5, "hud55", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.6, "hud56", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.7, "hud57", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.8, "hud58", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.9, "hud59", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.0, "hud60", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.1, "hud61", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.2, "hud62", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.3, "hud63", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.4, "hud64", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.5, "hud65", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.6, "hud66", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.7, "hud67", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.8, "hud68", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.9, "hud69", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.0, "hud70", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.1, "hud71", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.2, "hud72", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.3, "hud73", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.4, "hud74", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.5, "hud75", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.6, "hud76", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.7, "hud77", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.8, "hud78", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.9, "hud79", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.0, "hud80", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.1, "hud81", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.2, "hud82", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.3, "hud83", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.4, "hud84", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.5, "hud85", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.6, "hud86", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.7, "hud87", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.8, "hud88", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.9, "hud89", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.0, "hud90", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.1, "hud91", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.2, "hud92", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.3, "hud93", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.4, "hud94", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.5, "hud95", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.6, "hud96", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.7, "hud97", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.8, "hud98", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.9, "hud99", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 13.0, "hud100", victim+TASK_HUD)
					}
				}
			}
		}
	}
	
	// Remove entity from ground
	engfunc ( EngFunc_RemoveEntity, Entity )
}
	
//Blue 64, 110, 250
/*public Glow(id)
{
	if(is_user_alive(id) && !zp_get_user_zombie(id) && !zp_get_user_survivor(id) && is_user_connected(id) && ++g_timer[id] < FX_TIME)
	{
		new mod = g_timer[id] % 2;
		
		mod ? 
		set_user_rendering(id, kRenderFxGlowShell, 64, 110, 250, kRenderNormal, 20) 
		:
		set_user_rendering(id);
		
	}
	else
	{
		remove_task(id);
		
		g_timer[id] = 0;
	} 
	return FMRES_HANDLED
}

public player_spawn(id, taskid)
{
	if(is_user_alive(id))
	{
	remove_task(id)
	remove_task(ID_AFFECT)
	set_user_rendering(id)
	set_user_rendering(ID_AFFECT)
	}
}*/

// We are going to affect you
public affect_victim(taskid)
{
	// Dead
	if (!is_user_alive(ID_AFFECT) && !zp_get_user_zombie(ID_AFFECT) && !zp_get_user_survivor(ID_AFFECT) && is_user_connected(ID_AFFECT))
		return
		
	//set_task(0.1, "Glow", ID_AFFECT,.flags="b");
	//set_task(16.1, "player_spawn", ID_AFFECT);
	
	// Make a screen fade
	/*new rgb[3]
	switch (random_num(1, 2))
	{
		case 1: rgb = {255, 0, 0}
		case 2: rgb = {0, 0, 0}
	}

	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_AFFECT)
	write_short(1<<13) // Duration
	write_short(1<<14) // Hold Time
	write_short(FFADE_IN) // Fade type
	write_byte(rgb[0]) // Red amount
	write_byte(rgb[1]) // Green amount
	write_byte(rgb[2]) // Blue amount
	write_byte(200) // Alpha
	message_end()*/
	
	// Make a screen shake
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenShake, {0,0,0}, ID_AFFECT)
	write_short(0xFFFF) // Amplitude
	write_short(1<<13) // Duration
	write_short(0xFFFF) // Frequency
	message_end()
}

public restore(taskid)
{
	if (!is_user_alive(ID_RESTORE) && !zp_get_user_zombie(ID_RESTORE) && !zp_get_user_survivor(ID_RESTORE))
		return
		
	set_user_nanosuit(ID_RESTORE, 1)
	client_cmd(ID_RESTORE,"spk %s",regain_sound)
	set_task(1.0, "allonline_soundtask", ID_RESTORE);
	client_print(ID_RESTORE, print_center,"-= Nanosuit is Restore =-")
	
	message_begin(MSG_ONE, get_user_msgid("ScreenFade"), _, ID_RESTORE)
	write_short(1<<12) // duration
	write_short(1<<12) // hold time
	write_short(0x0000) // fade type 
	write_byte(25)
	write_byte(25)
	write_byte(255)
	write_byte(80)
	message_end()
}

public allonline_soundtask(id)
{
	if (!is_user_alive(id) && !zp_get_user_zombie(id) && !zp_get_user_survivor(id))
		return
		
	client_cmd(id,"spk %s",allonline_sound)
	client_print(id, print_center,"-= All Systems Online =-")
}

// Draw explosion ring ( from zombie_plague40.sma )
stock UTIL_DrawRing(const Float:origin[3])
{
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0)
	write_byte(TE_BEAMCYLINDER) // TE id
	engfunc(EngFunc_WriteCoord, origin[0]) // x
	engfunc(EngFunc_WriteCoord, origin[1]) // y
	engfunc(EngFunc_WriteCoord, origin[2]) // z
	engfunc(EngFunc_WriteCoord, origin[0]) // x axis
	engfunc(EngFunc_WriteCoord, origin[1]) // y axis
	engfunc(EngFunc_WriteCoord, origin[2]+385.0) // z axis
	write_short(m_iRing) // sprite
	write_byte(0) // startframe
	write_byte(0) // framerate
	write_byte(4) // life
	write_byte(60) // width
	write_byte(0) // noise
	write_byte(200) // red
	write_byte(100) // green
	write_byte(0) // blue
	write_byte(200) // brightness
	write_byte(0) // speed
	message_end()
	
	// TE_SPRITETRAIL
	engfunc(EngFunc_MessageBegin, MSG_BROADCAST ,SVC_TEMPENTITY, origin, 0)
	write_byte(TE_SPRITETRAIL) // TE ID
	engfunc(EngFunc_WriteCoord, origin[0]) // x axis
	engfunc(EngFunc_WriteCoord, origin[1]) // y axis
	engfunc(EngFunc_WriteCoord, origin[2]+70) // z axis
	engfunc(EngFunc_WriteCoord, origin[0]) // x axis
	engfunc(EngFunc_WriteCoord, origin[1]) // y axis
	engfunc(EngFunc_WriteCoord, origin[2]) // z axis
	write_short(g_emp_gib) // Sprite Index
	write_byte(30) // Count
	write_byte(random_num(15, 20)) // Life
	write_byte(2) // Scale
	write_byte(random_num(40, 80)) // Velocity Along Vector
	write_byte(random_num(15, 45)) // Rendomness of Velocity
	message_end();
}





//-------------------
// FOX METOD

public hud0(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (0%%)")
	client_cmd(ID_HUD,"spk %s",emerge_sound)
}

public hud1(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (1%%)^n|")
}

public hud2(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (2%%)^n|")
}

public hud3(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (3%%)^n|")
}

public hud4(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (4%%)^n|")
}

public hud5(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (5%%)^n|")
}

public hud6(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (6%%)^n|")
}

public hud7(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (7%%)^n|")
}

public hud8(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (8%%)^n|")
}

public hud9(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (9%%)^n|")
}

public hud10(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (10%%)^n||")
}

public hud11(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (11%%)^n||")
}

public hud12(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (12%%)^n||")
}

public hud13(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (13%%)^n||")
}

public hud14(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (14%%)^n||")
}

public hud15(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (15%%)^n|||")
}

public hud16(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (16%%)^n|||")
}

public hud17(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (17%%)^n|||")
}

public hud18(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (18%%)^n|||")
}

public hud19(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (19%%)^n|||")
}

public hud20(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (20%%)^n||||")
}

public hud21(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (21%%)^n||||")
}

public hud22(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (22%%)^n||||")
}

public hud23(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (23%%)^n||||")
}

public hud24(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (24%%)^n||||")
}

public hud25(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (25%%)^n|||||")
}

public hud26(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (26%%)^n|||||")
}

public hud27(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (27%%)^n|||||")
}

public hud28(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (28%%)^n|||||")
}

public hud29(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (29%%)^n|||||")
}

public hud30(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (30%%)^n||||||")
}

public hud31(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (31%%)^n||||||")
}

public hud32(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (32%%)^n||||||")
}

public hud33(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (33%%)^n||||||")
}

public hud34(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (34%%)^n||||||")
}

public hud35(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (35%%)^n|||||||")
}

public hud36(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (36%%)^n|||||||")
}

public hud37(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (37%%)^n|||||||")
}

public hud38(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (38%%)^n|||||||")
}

public hud39(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (39%%)^n|||||||")
}

public hud40(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (40%%)^n||||||||")
	client_cmd(ID_HUD,"spk %s",stability_sound)
}

public hud41(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (41%%)^n||||||||")
}

public hud42(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (42%%)^n||||||||")
}

public hud43(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (43%%)^n||||||||")
}

public hud44(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (44%%)^n||||||||")
}

public hud45(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (45%%)^n|||||||||")
}

public hud46(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (46%%)^n|||||||||")
}

public hud47(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (47%%)^n|||||||||")
}

public hud48(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (48%%)^n|||||||||")
}

public hud49(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (49%%)^n|||||||||")
}

public hud50(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (50%%)^n||||||||||")
}

public hud51(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (51%%)^n||||||||||")
}

public hud52(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (52%%)^n||||||||||")
}

public hud53(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (53%%)^n||||||||||")
}

public hud54(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (54%%)^n||||||||||")
}

public hud55(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (55%%)^n|||||||||||")
}

public hud56(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (56%%)^n|||||||||||")
}

public hud57(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (57%%)^n|||||||||||")
}

public hud58(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (58%%)^n|||||||||||")
}

public hud59(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (59%%)^n|||||||||||")
}

public hud60(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (60%%)^n||||||||||||")
}

public hud61(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (61%%)^n||||||||||||")
}

public hud62(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (62%%)^n||||||||||||")
}

public hud63(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (63%%)^n||||||||||||")
}

public hud64(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (64%%)^n||||||||||||")
}

public hud65(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (65%%)^n|||||||||||||")
	client_cmd(ID_HUD,"spk %s",stability_sound)
}

public hud66(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (66%%)^n|||||||||||||")
}

public hud67(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (67%%)^n|||||||||||||")
}

public hud68(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (68%%)^n|||||||||||||")
}

public hud69(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (69%%)^n|||||||||||||")
}

public hud70(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (70%%)^n||||||||||||||")
}

public hud71(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (71%%)^n||||||||||||||")
}

public hud72(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (72%%)^n||||||||||||||")
}

public hud73(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (73%%)^n||||||||||||||")
}

public hud74(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (74%%)^n||||||||||||||")
}

public hud75(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (75%%)^n|||||||||||||||")
}

public hud76(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (76%%)^n|||||||||||||||")
}

public hud77(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (77%%)^n|||||||||||||||")
}

public hud78(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (78%%)^n|||||||||||||||")
}

public hud79(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (79%%)^n|||||||||||||||")
}

public hud80(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (80%%)^n||||||||||||||||")
}

public hud81(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (81%%)^n||||||||||||||||")
}

public hud82(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (82%%)^n||||||||||||||||")
}

public hud83(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (83%%)^n||||||||||||||||")
}

public hud84(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (84%%)^n||||||||||||||||")
}

public hud85(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (85%%)^n|||||||||||||||||")
	client_cmd(ID_HUD,"spk %s",stability_sound)
}

public hud86(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (86%%)^n|||||||||||||||||")
}

public hud87(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (87%%)^n|||||||||||||||||")
}

public hud88(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (88%%)^n|||||||||||||||||")
}

public hud89(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (89%%)^n|||||||||||||||||")
}

public hud90(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (90%%)^n||||||||||||||||||")
}

public hud91(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (91%%)^n||||||||||||||||||")
}

public hud92(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (92%%)^n||||||||||||||||||")
}

public hud93(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (93%%)^n||||||||||||||||||")
}

public hud94(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (94%%)^n||||||||||||||||||")
}

public hud95(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (95%%)^n|||||||||||||||||||")
}

public hud96(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (96%%)^n|||||||||||||||||||")
}

public hud97(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (97%%)^n|||||||||||||||||||")
}

public hud98(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (98%%)^n|||||||||||||||||||")
}

public hud99(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (99%%)^n|||||||||||||||||||")
}

public hud100(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 1.5)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (100%%)^n||||||||||||||||||||")
}









// -------------------------------------------------------------------------------------------------





public nano_slowdown(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 10^n^nREASON: Electro - Magnetic Impulse (EMI)");
	client_cmd(ID_HUD,"spk %s",slowdown_sound)
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown2(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 9^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown3(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 8^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown4(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 7^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown5(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 6^n^nREASON: Electro - Magnetic Impulse (EMI)");

	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown6(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 5^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown7(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 4^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown8(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 3^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown9(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 2^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown10(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 1^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown11(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 0^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public remove_glow(taskid)
{
	set_user_rendering(ID_HUD)
}

public set_glow(taskid)
{
	static Float:originF[3]
	pev(ID_HUD, pev_origin, originF)
	
	// Sparks
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()
	
	/*message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
	write_byte(TE_DLIGHT)
	engfunc(EngFunc_WriteCoord, originF[0])
	engfunc(EngFunc_WriteCoord, originF[1])
	engfunc(EngFunc_WriteCoord, originF[2])
	write_byte(10)
	write_byte(180)
	write_byte(240)
	write_byte(255)
	write_byte(5)
	write_byte(0)
	message_end()*/
	
	set_user_rendering(ID_HUD, kRenderFxGlowShell, 180, 240, 255, kRenderNormal, 1)
}
public zp_round_started(taskid)
{
	remove_task(ID_AFFECT)
	remove_task(ID_RESTORE)
	remove_task(ID_HUD)
}

stock ChatColor(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4") // Green Color
	replace_all(msg, 190, "!y", "^1") // Default Color
	replace_all(msg, 190, "!t", "^3") // Team Color
	replace_all(msg, 190, "!w", "^0") // Team2 Color
	
	if (id) players[0] = id; else get_players(players, count, "ch")
        {
	            for (new i = 0; i < count; i++)
	            {
		             if (is_user_connected(players[i]))
		             {
			     message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
			     write_byte(players[i]);
			     write_string(msg);
			     message_end();
		             }
	            }
        }
}

public zp_round_ended(taskid)
{
	if (task_exists(ID_HUD))
	{
		remove_task(ID_HUD)
		remove_task(TASK_HUD)
	}

	if (task_exists(ID_RESTORE))
	{
		remove_task(ID_RESTORE)
		remove_task(TASK_RESTORE)
	}

	if (task_exists(ID_AFFECT))
	{
		remove_task(ID_AFFECT)
		remove_task(TASK_AFFECT)
	}
}
Nanosuit EMP Grenade 2

Код: Избери всички

#include < amxmodx >
#include < fakemeta >
#include < hamsandwich >
#include < fun >
#include < zombieplague >

// Native
native set_user_nanosuit(id, set)

// Plugin version
#define VERSION "1.3"

// Defines
#define MAXPLAYERS 	32
#define FCVAR_FLAGS 	( FCVAR_SERVER | FCVAR_SPONLY | FCVAR_UNLOGGED )
#define OFFSET_PLAYER	41
#define OFFSET_ACTIVE	373
#define LINUX_DIFF	5
#define NADE_TYPE_CONC	7000
//#define UNIT_SECOND	(1<<12)
#define FFADE_IN	0x0000
//#define FFADE_OUT	0x0001
#define REPEAT		0.0 // Time when next screen fade/shake message is being sent
#define TASK_AFFECT	666
#define TASK_RESTORE	777
#define ID_AFFECT	( taskid - TASK_AFFECT )
#define ID_RESTORE	( taskid - TASK_RESTORE )

// Grenade cost
#define GRENADE_COST	15

// Grenade models
new const grenade_model_p [ ] = "models/p_grenade_conc.mdl"
new const grenade_model [ ] = "models/new_grenade/emi.mdl"
new const grenade_model_w [ ] = "models/w_grenade_conc.mdl"

// Sounds
new const explosion_sound [ ] = "zombie_plague/emp_effect.wav"
new const purchase_sound [ ] = "items/gunpickup2.wav"

// Cached sprite indexes
new m_iTrail, m_iRing

// Item ID
new g_conc

// Player variable
new g_hasConc [ MAXPLAYERS + 1 ]

// Message ID's
new g_msgScreenFade, g_msgScreenShake

// CVAR pointers
new cvar_nade_radius, cvar_duration

// Precache
public plugin_precache ( )
{
	// Precache grenade models
	precache_model ( grenade_model_p )
	precache_model ( grenade_model )
	precache_model ( grenade_model_w )
	
	// Precache sounds
	precache_sound ( explosion_sound )
	precache_sound ( purchase_sound )
	
	// Precache sprites
	m_iRing = precache_model ( "sprites/shockwave.spr" )
	m_iTrail = precache_model ( "sprites/laserbeam.spr" )
}

// Plugin initialization
public plugin_init ( )
{
	// New plugin
	register_plugin ( "[ZP] Extra Item: Concussion Grenade", VERSION, "NiHiLaNTh" )
	
	// Add cvar to detect servers with this plugin
	register_cvar ( "zp_concgren_version", VERSION, FCVAR_FLAGS )
	
	// New extra item
	g_conc = zp_register_extra_item ( "Concussion Grenade", GRENADE_COST, ZP_TEAM_ZOMBIE )
	
	// Events
	register_event ( "HLTV", "Event_NewRound", "a", "1=0", "2=0" )
	register_event ( "DeathMsg", "Event_DeathMsg", "a" )
	register_event ( "CurWeapon", "Event_CurrentWeapon", "be", "1=1", "2=25" )
	
	// Forwards
	register_forward ( FM_SetModel, "fw_SetModel" )
	RegisterHam ( Ham_Think, "grenade", "fw_ThinkGrenade" )
	register_forward ( FM_CmdStart, "fw_CmdStart" )
	
	// CVARs
	cvar_nade_radius = register_cvar ( "zp_conc_nade_radius", "500" )
	cvar_duration = register_cvar ( "zp_conc_nade_duration", "7" )
	
	// Messages
	g_msgScreenShake = get_user_msgid ( "ScreenShake" )
	g_msgScreenFade = get_user_msgid ( "ScreenFade" )
}

// Someone decided to buy our an extra item
public zp_extra_item_selected ( Player, Item )
{
	// This is our grenade
	if ( Item == g_conc )
	{
		// Player already have it
		if ( g_hasConc [ Player ] )
		{
			// Notice him about that
                        zp_set_user_ammo_packs(Player, zp_get_user_ammo_packs(Player) + GRENADE_COST)
			client_print ( Player, print_chat, "[ZP] You already have this item" )
			return PLUGIN_HANDLED
		}
		else
		{
			// Now we have grenade
			g_hasConc [ Player ] = true
			
			// Give him flashbang
			give_item ( Player, "weapon_flashbang" )
			
			// Play purchase sound
			client_cmd ( Player, "spk %s", purchase_sound )	
		}
	}
	return PLUGIN_CONTINUE
}
	
// Someone was infected	
public zp_user_infected_post ( Player )
{
	// We were affected by concussion grenade
	if ( task_exists ( Player+TASK_AFFECT ) )
		remove_task ( Player+TASK_AFFECT )
	
	if ( task_exists ( Player+TASK_RESTORE ) )	
		remove_task ( Player+TASK_RESTORE )	
}	

// Someone were turned back to human
public zp_user_humanized_post ( Player )
{
	// We dont' have nade anymore
	if ( g_hasConc [ Player ] )
		g_hasConc [ Player ] = false
}

public Event_NewRound(Player, taskid)
{
	arrayset ( g_hasConc, false, 33 )

	if(task_exists(Player+TASK_AFFECT))
		remove_task ( Player+TASK_AFFECT)
		
	if(task_exists(Player+TASK_RESTORE))	
		remove_task(Player+TASK_RESTORE)
}

// Someone died
public Event_DeathMsg ( )
{
	// Get victim
	new victim = read_data ( 2 )
	
	// Some people had error without this check
	if ( !is_user_connected ( victim ) )
		return 
	
	// Remove hallucinations
	remove_task ( victim+TASK_AFFECT )
	remove_task ( victim+TASK_RESTORE )
		
	// Reset nade count	
	g_hasConc [ victim ] = 0
}

// Current weapon player is holding
public Event_CurrentWeapon ( Player )
{
	// Dead or not zombie or don't have conc. grenade
	if ( !is_user_alive ( Player ) || !zp_get_user_zombie ( Player ) || !g_hasConc [ Player ] )
		return PLUGIN_CONTINUE
	
	// Replace flashbang model with our ones
	set_pev ( Player, pev_viewmodel2, grenade_model )
	set_pev ( Player, pev_weaponmodel2, grenade_model_p )
	
	return PLUGIN_CONTINUE
}

// Set model
public fw_SetModel ( Entity, const Model [ ] )
{
	// Prevent invalid ent messages
	if ( !pev_valid ( Entity ) )
		return FMRES_IGNORED
		
	// Grenade not thrown yet	
	if ( pev ( Entity, pev_dmgtime ) == 0.0 )
		return FMRES_IGNORED
		
	// We are throwing concussion grenade	
	if ( g_hasConc [ pev ( Entity, pev_owner ) ] && equal ( Model [7 ], "w_fl", 4 ) )
	{
		//Draw trail
		message_begin ( MSG_BROADCAST, SVC_TEMPENTITY )
		write_byte ( TE_BEAMFOLLOW ) // Temp entity ID
		write_short ( Entity ) // Entity to follow
		write_short ( m_iTrail ) // Sprite index
		write_byte ( 0 ) // Life
		write_byte ( 0 ) // Line width
		write_byte ( 0 ) // Red amount
		write_byte ( 0 ) // Blue amount
		write_byte ( 0 ) // Blue amount
		write_byte ( 0 ) // Alpha
		message_end ( )
		
		// Set grenade entity
		set_pev ( Entity, pev_flTimeStepSound, NADE_TYPE_CONC )
		
		// Set world model
		engfunc ( EngFunc_SetModel, Entity, grenade_model_w )
		return FMRES_SUPERCEDE
	}
	return FMRES_IGNORED
}

// Grenade is getting to explode
public fw_ThinkGrenade ( Entity )
{
	// Prevent invalid ent messages
	if ( !pev_valid ( Entity ) )
		return HAM_IGNORED
	
	// Get damage time
	static Float:dmg_time
	pev ( Entity, pev_dmgtime, dmg_time )
	
	// maybe it is time to go off
	if ( dmg_time > get_gametime ( ) )
		return HAM_IGNORED
		
	// Our grenade	
	if ( pev ( Entity, pev_flTimeStepSound ) == NADE_TYPE_CONC )
	{
		// Force to explode
		concussion_explode ( Entity )
		return HAM_SUPERCEDE
	}
	return HAM_IGNORED
}

// Command start
public fw_CmdStart ( Player, UC_Handle, Seed )
{
	// Dead, zombie or not affected
	if ( !is_user_alive ( Player ) || zp_get_user_zombie ( Player ) || zp_get_user_survivor ( Player ) || !task_exists ( Player+TASK_AFFECT ) || !task_exists ( Player+TASK_RESTORE ) )
		return FMRES_IGNORED
	
	// Get buttons
	new buttons = get_uc ( UC_Handle, UC_Buttons )
	
	// We are firing
	if ( buttons & IN_ATTACK )
	{
		// We are holding an active weapon
		if ( get_pdata_cbase ( Player, OFFSET_ACTIVE, LINUX_DIFF ) )
		{
			// New recoil
			set_pev ( Player, pev_punchangle, Float:{3.0, 3.0, 4.0} )
		}
	}
	return FMRES_HANDLED
}
			

// Grenade explode
public concussion_explode ( Entity )
{
	// Invalid entity ?
	if ( !pev_valid ( Entity  ) )
		return
	
	// Get entities origin
	static Float:origin [ 3 ]
	pev ( Entity, pev_origin, origin )
	
	// Draw ring
	UTIL_DrawRing (origin )
	
	// Explosion sound
	emit_sound ( Entity, CHAN_WEAPON, explosion_sound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM )
	
	// Collisions
	static victim 
	victim = -1
	
	// Find radius
	static Float:radius
	radius = get_pcvar_float ( cvar_nade_radius )
	
	// Find all players in a radius
	while ( ( victim = engfunc ( EngFunc_FindEntityInSphere, victim, origin, radius ) ) != 0 )
	{
		// Dead or zombie
		if ( !is_user_alive ( victim ) || zp_get_user_zombie ( victim ) )
			continue
			
		// Victim isn't affected yet	
		if ( !task_exists ( victim+TASK_AFFECT ) || !task_exists ( victim+TASK_RESTORE ) ) 
		{
			// Get duration
			new duration = get_pcvar_num ( cvar_duration )
			
			// Calculate affect times
			new affect_count = floatround ( duration / REPEAT )
			
			set_user_nanosuit(victim, 0)
			set_user_rendering(victim)
			
			// Continiously affect them
			set_task ( REPEAT, "affect_victim", victim+TASK_AFFECT, _, _, "a", affect_count )
			set_task ( get_pcvar_float( cvar_duration ) + 6.0, "restore", victim+TASK_RESTORE )
		}
	}
	
	// We dont' have grenade anymore
	static owner ; owner = pev ( Entity, pev_owner )
	g_hasConc [ owner ] = false
	
	// Remove entity from ground
	engfunc ( EngFunc_RemoveEntity, Entity )
}

// We are going to affect you
public affect_victim ( taskid )
{
	// Dead
	if ( !is_user_alive ( ID_AFFECT ) )
		return
		
	// Make a screen fade
	message_begin ( MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_AFFECT )
	write_short ( 1<<13 ) // Duration
	write_short ( 1<<14 ) // Hold Time
	write_short ( FFADE_IN ) // Fade type
	write_byte ( random_num ( 50, 200 ) ) // Red amount
	write_byte ( random_num ( 50, 200 ) ) // Green amount
	write_byte ( random_num ( 50, 200 ) ) // Blue amount
	write_byte ( random_num ( 50, 200 ) ) // Alpha
	message_end ( )
		
	// Make a screen shake
	message_begin ( MSG_ONE_UNRELIABLE, g_msgScreenShake, {0,0,0}, ID_AFFECT )
	write_short ( 0xFFFF ) // Amplitude
	write_short ( 1<<13 ) // Duration
	write_short ( 0xFFFF ) // Frequency
	message_end ( )
	
	// Remove task after all
	remove_task ( ID_AFFECT )
}

// Draw explosion ring ( from zombie_plague40.sma )
stock UTIL_DrawRing ( const Float:origin [ 3 ] )
{
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0)
	write_byte(TE_BEAMCYLINDER) // TE id
	engfunc(EngFunc_WriteCoord, origin[0]) // x
	engfunc(EngFunc_WriteCoord, origin[1]) // y
	engfunc(EngFunc_WriteCoord, origin[2]) // z
	engfunc(EngFunc_WriteCoord, origin[0]) // x axis
	engfunc(EngFunc_WriteCoord, origin[1]) // y axis
	engfunc(EngFunc_WriteCoord, origin[2]+555.0) // z axis
	write_short( m_iRing ) // sprite
	write_byte(0) // startframe
	write_byte(0) // framerate
	write_byte(4) // life
	write_byte(60) // width
	write_byte(0) // noise
	write_byte(200) // red
	write_byte(200) // green
	write_byte(200) // blue
	write_byte(200) // brightness
	write_byte(0) // speed
	message_end()
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/

// Fox function
public restore(taskid) 
{
	if (!is_user_alive(ID_RESTORE) && !zp_get_user_zombie(ID_RESTORE) && !zp_get_user_survivor(ID_RESTORE))
		return
		
	set_user_nanosuit(ID_RESTORE, 1)
	client_print(ID_RESTORE, print_center,"Nanosuit Initzialed")
	
	message_begin(MSG_ONE, get_user_msgid("ScreenFade"), _, ID_RESTORE)
	write_short(1<<10)
	write_short(1<<10)
	write_short(1<<10)
	write_byte(25)
	write_byte(25)
	write_byte(255)
	write_byte(75)
	message_end()
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
Nanosuit EMP Grenade 3

Код: Избери всички

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <fun>
#include <zombieplague>
#include <nanosuit>

#define VERSION "5.3"

#define MAXPLAYERS 	32
#define FCVAR_FLAGS 	( FCVAR_SERVER | FCVAR_SPONLY | FCVAR_UNLOGGED )
#define OFFSET_PLAYER	41
#define OFFSET_ACTIVE	373
#define LINUX_DIFF	5
#define NADE_TYPE_EMP	7000
#define FFADE_IN	0x0000
#define REPEAT		0.2 // Time when next screen fade/shake message is being sent
#define TASK_AFFECT	666
#define TASK_RESTORE	777
#define TASK_HUD	888
#define ID_AFFECT	(taskid - TASK_AFFECT)
#define ID_RESTORE	(taskid - TASK_RESTORE)
#define ID_HUD		(taskid - TASK_HUD)
#define OFFSET_FLAMMO	387
//#define FX_TIME		15

#define GRENADE_COST	7

const Float:HUD_NANO_LOADING_X = -1.00
const Float:HUD_NANO_LOADING_Y = 0.24
const Float:HUD_NANO_PROGRESS_X = -1.00
const Float:HUD_NANO_PROGRESS_Y = 0.30

new Float:cl_nn_damage_time[MAXPLAYERS + 1]

new const grenade_model_p [ ] = ""
new const grenade_model [ ] = "models/new_grenade/emi.mdl" // empT model downloaded by modelT.amxx
new const grenade_model_w [ ] = ""

new const explosion_sound [ ] = "fox/fox_nanosuit/nanobomb.wav"
new const purchase_sound [ ] = "items/gunpickup2.wav"
new const purchase_sound2 [ ] = "items/9mmclip1.wav"
new const shutdown_sound [ ] = "fox/fox_nanosuit/nanosuit_critical.wav"
new const regain_sound [ ] = "fox/fox_nanosuit/nanosuit_regain.wav"
new const allonline_sound [ ] = "fox/fox_nanosuit/nanosuit_allonline.wav"
new const emerge_sound [ ] = "fox/fox_nanosuit/emerge.wav"
new const stability_sound [ ] = "fox/fox_nanosuit/stability.wav"
new const slowdown_sound [ ] = "fox/fox_nanosuit/nanosuit_slowdown.wav"

new m_iTrail, m_iRing, g_emp, g_emp_gib

new g_endround

// Player variables
new g_NadeCount[MAXPLAYERS+1]

new g_iMaxPlayers

// Message ID's
new g_msgScreenFade, g_msgScreenShake, g_msgAmmoPickup

// CVAR pointers
new cvar_nade_radius, cvar_duration, cvar_hud_task, cvar_emp_dmg, cvar_emp_health

// Glow time
//new g_timer[33];

// Precache
public plugin_precache ()
{
	// Precache grenade models
	precache_model (grenade_model_p)
	precache_model (grenade_model)
	precache_model (grenade_model_w)
	
	// Precache sounds
	precache_sound (explosion_sound)
	precache_sound (purchase_sound)
	precache_sound (purchase_sound2)
	precache_sound (shutdown_sound)
	precache_sound (regain_sound)
	precache_sound (allonline_sound)
	precache_sound (emerge_sound)
	precache_sound (stability_sound)
	precache_sound (slowdown_sound)
	
	// Precache sprites
	m_iRing = precache_model("sprites/fox/exp_ring.spr")
	m_iTrail = precache_model("sprites/fox/gren_trail.spr")
	g_emp_gib = precache_model("sprites/fox/emp_gib.spr")
}

public plugin_init()
{
	register_plugin("[ZPC] Extra Item: EMP Grenade", VERSION, "FOX")
	
	register_cvar("zp_empgren_version", VERSION, FCVAR_FLAGS)
	
	g_emp = zp_register_extra_item ("EMI Grenade", GRENADE_COST, ZP_TEAM_ZOMBIE)
	
	g_iMaxPlayers = get_maxplayers()
	
	register_event("HLTV", "Event_NewRound", "a", "1=0", "2=0")
	register_logevent("logevent_round_end", 2, "1=Round_End")
	register_event("DeathMsg", "Event_DeathMsg", "a")
	register_event("CurWeapon", "Event_CurrentWeapon", "be", "1=1", "2=25")
	
	register_forward(FM_SetModel, "fw_SetModel")
	RegisterHam(Ham_Think, "grenade", "fw_ThinkGrenade")
	register_forward(FM_CmdStart, "fw_CmdStart" ) 
	
	cvar_nade_radius = register_cvar ("zp_emp_radius","300")
	cvar_duration = register_cvar ("zp_emp_duration","10")
	cvar_emp_dmg = register_cvar("emp_damage","5")
	cvar_hud_task = register_cvar ("zp_emp_hud_task","0") // DO NOT MODIFY
	cvar_emp_health = register_cvar("emp_health","100") // DO NOT MODIFY
	
	g_msgScreenShake = get_user_msgid("ScreenShake")
	g_msgScreenFade = get_user_msgid("ScreenFade")
	g_msgAmmoPickup = get_user_msgid("AmmoPickup")
}

public logevent_round_end(taskid, id) // (bugfix)
{
	new victim = read_data(2)
	// Prevent this from getting called twice when restarting
	static Float:lastendtime, Float:current_time
	current_time = get_gametime()
	if (current_time - lastendtime < 0.5) return;
	lastendtime = current_time
	
	// Round ended
	g_endround = true
	
	if (!is_user_connected(victim))
		return
		
	remove_task(victim+TASK_AFFECT)
	remove_task(victim+TASK_RESTORE)
	remove_task(victim+TASK_HUD)

	remove_task(id)
	remove_task(ID_AFFECT)
	remove_task(ID_RESTORE)
	remove_task(ID_HUD)
}

public zp_extra_item_selected(Player, Item)
{
	if(!zp_is_survivor_round() || !g_endround)
	{
		if(Item == g_emp)
		{
			if (g_NadeCount[Player]>= 1)
			{
				g_NadeCount[Player]++
				set_pdata_int(Player, OFFSET_FLAMMO, get_pdata_int (Player, OFFSET_FLAMMO, LINUX_DIFF)+1, LINUX_DIFF)
				message_begin (MSG_ONE, g_msgAmmoPickup, _, Player)
				write_byte(11)
				write_byte(1)
				message_end()
				emit_sound(Player, CHAN_WEAPON, purchase_sound2, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
			}
			else
			{
				g_NadeCount [Player] = 1
				give_item (Player, "weapon_flashbang")
				client_cmd(Player, "spk %s", purchase_sound)	
			}
		}
	}else{
	zp_set_user_ammo_packs(Player, zp_get_user_ammo_packs(Player) + GRENADE_COST)
	ChatColor(Player, "!y[!gZPC!y] You can't use this right now.")
	}
	return PLUGIN_CONTINUE
}

public zp_user_infected_post(Player, Infector)
{
	if(task_exists(Player+TASK_AFFECT))
		remove_task ( Player+TASK_AFFECT)
		
	if(task_exists(Player+TASK_RESTORE))	
		remove_task(Player+TASK_RESTORE)
		
	if (task_exists(Player+TASK_HUD))
		remove_task(Player+TASK_HUD)
}	

public zp_user_humanized_post(Player, Survivor)
{
	if (g_NadeCount[Player])
	{
		g_NadeCount [Player] = 0
	}
}

public Event_NewRound(Player, taskid)
{
	arrayset(g_NadeCount, false, 33)
	
	g_endround = false
	
	remove_task(ID_AFFECT)
	remove_task(ID_RESTORE)
	remove_task(ID_HUD)
	
	if(task_exists(Player+TASK_AFFECT))
		remove_task ( Player+TASK_AFFECT)
		
	if(task_exists(Player+TASK_RESTORE))	
		remove_task(Player+TASK_RESTORE)
		
	if (task_exists(Player+TASK_HUD))
		remove_task(Player+TASK_HUD)
}

public Event_DeathMsg(taskid)
{
	new victim = read_data(2)
	
	if (!is_user_connected(victim))
		return 
		
	remove_task (victim+TASK_AFFECT)
	remove_task (victim+TASK_RESTORE)
	remove_task (victim+TASK_HUD)
	
	g_NadeCount [ victim ] = 0
}

public Event_CurrentWeapon (Player)
{
	if (!is_user_alive (Player) || !zp_get_user_zombie(Player) || g_NadeCount[Player] <= 0)
		return PLUGIN_CONTINUE
		
	set_pev(Player, pev_viewmodel2, grenade_model)
	set_pev(Player, pev_weaponmodel2, grenade_model_p)
	
	return PLUGIN_CONTINUE
}

public fw_SetModel (Entity, const Model[])
{
	if ( !pev_valid (Entity))
		return FMRES_IGNORED
			
	if (pev(Entity, pev_dmgtime) == 0.0)
		return FMRES_IGNORED
		
	if (g_NadeCount[pev(Entity, pev_owner)] >= 1 && equal( Model[7], "w_fl", 4))
	{
		// Give it a glow
		fm_set_rendering(Entity, kRenderFxGlowShell, 200, 100, 0, kRenderNormal, 16);
		
		//Draw trail
		message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
		write_byte(TE_BEAMFOLLOW) // Temp entity ID
		write_short(Entity) // Entity to follow
		write_short(m_iTrail) // Sprite index
		write_byte(14) // Life 10
		write_byte(7) // Line width 10
		write_byte(200) // Red amount
		write_byte(100) // Green amount
		write_byte(0) // Blue amount
		write_byte(200) // Alpha
		message_end()
		
		// Set grenade entity
		set_pev ( Entity, pev_flTimeStepSound, NADE_TYPE_EMP )
		
		// Decrease nade count
		g_NadeCount [ pev ( Entity, pev_owner ) ]--
		
		// Set world model
		engfunc ( EngFunc_SetModel, Entity, grenade_model_w )
		return FMRES_SUPERCEDE
	}
	return FMRES_IGNORED
}

// Grenade is getting to explode
public fw_ThinkGrenade ( Entity, id )
{
	// Prevent invalid ent messages
	if ( !pev_valid ( Entity ) )
		return HAM_IGNORED
	
	// Get damage time
	static Float:dmg_time
	pev ( Entity, pev_dmgtime, dmg_time )
	
	// maybe it is time to go off
	if (dmg_time > get_gametime())
		return HAM_IGNORED
		
	// Our grenade	
	if (pev (Entity, pev_flTimeStepSound) == NADE_TYPE_EMP)
	{
		// Force to explode
		emp_explode(Entity, id)
		return HAM_SUPERCEDE
	}
	return HAM_IGNORED
}

// Command start
public fw_CmdStart(Player, UC_Handle, Seed)
{
	// Dead, zombie or not affected
	if ( !is_user_alive ( Player ) || zp_get_user_zombie ( Player ) || zp_get_user_survivor ( Player ) || !task_exists ( Player+TASK_AFFECT ) || !task_exists ( Player+TASK_RESTORE ) || !task_exists ( Player+TASK_HUD ) )
		return FMRES_IGNORED
	
	// Get buttons
	new buttons = get_uc ( UC_Handle, UC_Buttons )
	
	// We are firing
	if ( buttons & IN_ATTACK )
	{
		// We are holding an active weapon
		if ( get_pdata_cbase ( Player, OFFSET_ACTIVE, LINUX_DIFF ) )
		{
			// New recoil
			set_pev ( Player, pev_punchangle, Float:{3.0, 3.0, 4.0} )
		}
	}
	return FMRES_HANDLED
}

// Grenade explode
public emp_explode(Entity, id)
{
	// Invalid entity ?
	if (!pev_valid(Entity) || g_endround)
		return
		
	// Get entities origin
	static Float:origin [3]
	pev(Entity, pev_origin, origin)
	
	// Draw ring
	UTIL_DrawRing (origin)
	
	// Explosion sound
	emit_sound (Entity, CHAN_WEAPON, explosion_sound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
	
	// Collisions
	static victim 
	victim = -1
	
	// Find radius
	static Float:radius
	radius = get_pcvar_float(cvar_nade_radius)
	
	// Find all players in a radius
	while ( ( victim = engfunc ( EngFunc_FindEntityInSphere, victim, origin, radius ) ) != 0 )
	{
		// Dead or zombie
		if (!is_user_alive(victim) || zp_get_user_zombie(victim) || zp_get_user_survivor(victim) || g_endround)
			continue
			
		// Victim isn't affected yet	
		if (!task_exists(victim+TASK_AFFECT) || !task_exists(victim+TASK_RESTORE) || !task_exists(victim+TASK_HUD) || !g_endround)
		{
			// Get duration
			new duration = get_pcvar_num (cvar_duration)
			
			// Calculate affect times
			new affect_count = floatround (duration/REPEAT)
			
			set_user_nanosuit(victim, 0)
			
			// Continiously affect them
			set_task(REPEAT, "affect_victim", victim+TASK_AFFECT, _, _, "a", affect_count)
			
			// FOX code metod
			// Give it a Glow HUD task
			set_task(get_pcvar_float(cvar_hud_task) + 0.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 0.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.5, "remove_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.0, "set_glow", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.5, "remove_glow", victim+TASK_HUD)
			
			// ID AFFECTED player set TASK HUD+Sounds
			set_task(get_pcvar_float(cvar_hud_task) + 0.0, "nano_slowdown", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 1.0, "nano_slowdown2", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 2.0, "nano_slowdown3", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 3.0, "nano_slowdown4", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 4.0, "nano_slowdown5", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 5.0, "nano_slowdown6", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 6.0, "nano_slowdown7", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 7.0, "nano_slowdown8", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 8.0, "nano_slowdown9", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 9.0, "nano_slowdown10", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_hud_task) + 10.0, "nano_slowdown11", victim+TASK_HUD)
			
			// Stabilisation HUD
			set_task(get_pcvar_float(cvar_duration) + 3.0, "hud0", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.1, "hud1", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.2, "hud2", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.3, "hud3", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.4, "hud4", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.5, "hud5", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.6, "hud6", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.7, "hud7", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.8, "hud8", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 3.9, "hud9", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.0, "hud10", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.1, "hud11", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.2, "hud12", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.3, "hud13", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.4, "hud14", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.5, "hud15", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.6, "hud16", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.7, "hud17", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.8, "hud18", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 4.9, "hud19", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.0, "hud20", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.1, "hud21", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.2, "hud22", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.3, "hud23", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.4, "hud24", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.5, "hud25", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.6, "hud26", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.7, "hud27", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.8, "hud28", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 5.9, "hud29", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.0, "hud30", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.1, "hud31", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.2, "hud32", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.3, "hud33", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.4, "hud34", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.5, "hud35", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.6, "hud36", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.7, "hud37", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.8, "hud38", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 6.9, "hud39", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.0, "hud40", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.1, "hud41", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.2, "hud42", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.3, "hud43", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.4, "hud44", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.5, "hud45", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.6, "hud46", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.7, "hud47", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.8, "hud48", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 7.9, "hud49", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.0, "hud50", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.1, "hud51", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.2, "hud52", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.3, "hud53", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.4, "hud54", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.5, "hud55", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.6, "hud56", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.7, "hud57", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.8, "hud58", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 8.9, "hud59", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.0, "hud60", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.1, "hud61", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.2, "hud62", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.3, "hud63", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.4, "hud64", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.5, "hud65", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.6, "hud66", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.7, "hud67", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.8, "hud68", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 9.9, "hud69", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.0, "hud70", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.1, "hud71", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.2, "hud72", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.3, "hud73", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.4, "hud74", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.5, "hud75", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.6, "hud76", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.7, "hud77", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.8, "hud78", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 10.9, "hud79", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.0, "hud80", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.1, "hud81", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.2, "hud82", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.3, "hud83", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.4, "hud84", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.5, "hud85", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.6, "hud86", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.7, "hud87", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.8, "hud88", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 11.9, "hud89", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.0, "hud90", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.1, "hud91", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.2, "hud92", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.3, "hud93", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.4, "hud94", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.5, "hud95", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.6, "hud96", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.7, "hud97", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.8, "hud98", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 12.9, "hud99", victim+TASK_HUD)
			set_task(get_pcvar_float(cvar_duration) + 13.0, "hud100", victim+TASK_HUD)
			
			// Nanosuit Restore
			//set_task(get_pcvar_float(cvar_duration) + 13.5, "restore", victim+TASK_RESTORE, _, _, "a", affect_count)
			set_task(get_pcvar_float(cvar_duration) + 13.5, "restore", victim+TASK_RESTORE)
			
			// Spectators
			static SpecIuser2, i
			for(i = 1; i <= g_iMaxPlayers; i++)
			{
				if(is_user_connected(i) && !is_user_alive(i))
				{
					SpecIuser2 = pev(i, pev_iuser2)
					
					if(SpecIuser2 == id)
					{
						set_task(REPEAT, "affect_victim", victim+TASK_AFFECT, _, _, "a", affect_count)
						
						set_task(get_pcvar_float(cvar_duration) + 3.0, "hud0", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.1, "hud1", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.2, "hud2", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.3, "hud3", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.4, "hud4", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.5, "hud5", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.6, "hud6", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.7, "hud7", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.8, "hud8", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 3.9, "hud9", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.0, "hud10", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.1, "hud11", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.2, "hud12", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.3, "hud13", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.4, "hud14", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.5, "hud15", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.6, "hud16", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.7, "hud17", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.8, "hud18", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 4.9, "hud19", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.0, "hud20", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.1, "hud21", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.2, "hud22", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.3, "hud23", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.4, "hud24", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.5, "hud25", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.6, "hud26", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.7, "hud27", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.8, "hud28", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 5.9, "hud29", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.0, "hud30", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.1, "hud31", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.2, "hud32", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.3, "hud33", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.4, "hud34", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.5, "hud35", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.6, "hud36", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.7, "hud37", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.8, "hud38", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 6.9, "hud39", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.0, "hud40", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.1, "hud41", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.2, "hud42", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.3, "hud43", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.4, "hud44", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.5, "hud45", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.6, "hud46", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.7, "hud47", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.8, "hud48", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 7.9, "hud49", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.0, "hud50", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.1, "hud51", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.2, "hud52", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.3, "hud53", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.4, "hud54", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.5, "hud55", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.6, "hud56", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.7, "hud57", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.8, "hud58", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 8.9, "hud59", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.0, "hud60", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.1, "hud61", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.2, "hud62", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.3, "hud63", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.4, "hud64", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.5, "hud65", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.6, "hud66", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.7, "hud67", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.8, "hud68", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 9.9, "hud69", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.0, "hud70", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.1, "hud71", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.2, "hud72", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.3, "hud73", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.4, "hud74", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.5, "hud75", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.6, "hud76", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.7, "hud77", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.8, "hud78", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 10.9, "hud79", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.0, "hud80", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.1, "hud81", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.2, "hud82", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.3, "hud83", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.4, "hud84", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.5, "hud85", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.6, "hud86", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.7, "hud87", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.8, "hud88", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 11.9, "hud89", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.0, "hud90", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.1, "hud91", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.2, "hud92", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.3, "hud93", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.4, "hud94", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.5, "hud95", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.6, "hud96", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.7, "hud97", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.8, "hud98", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 12.9, "hud99", victim+TASK_HUD)
						set_task(get_pcvar_float(cvar_duration) + 13.0, "hud100", victim+TASK_HUD)
					}
				}
			}
		}
	}
	
	// Remove entity from ground
	engfunc ( EngFunc_RemoveEntity, Entity )
}
	
//Blue 64, 110, 250
/*public Glow(id)
{
	if(is_user_alive(id) && !zp_get_user_zombie(id) && !zp_get_user_survivor(id) && is_user_connected(id) && ++g_timer[id] < FX_TIME)
	{
		new mod = g_timer[id] % 2;
		
		mod ? 
		set_user_rendering(id, kRenderFxGlowShell, 64, 110, 250, kRenderNormal, 20) 
		:
		set_user_rendering(id);
		
	}
	else
	{
		remove_task(id);
		
		g_timer[id] = 0;
	} 
	return FMRES_HANDLED
}

public player_spawn(id, taskid)
{
	if(is_user_alive(id))
	{
	remove_task(id)
	remove_task(ID_AFFECT)
	set_user_rendering(id)
	set_user_rendering(ID_AFFECT)
	}
}*/

// We are going to affect you
public affect_victim(taskid)
{
	// Dead
	if (!is_user_alive(ID_AFFECT) && !zp_get_user_zombie(ID_AFFECT) && !zp_get_user_survivor(ID_AFFECT) && is_user_connected(ID_AFFECT))
		return
		
	//set_task(0.1, "Glow", ID_AFFECT,.flags="b");
	//set_task(16.1, "player_spawn", ID_AFFECT);
	
	// Make a screen fade
	/*new rgb[3]
	switch (random_num(1, 2))
	{
		case 1: rgb = {255, 0, 0}
		case 2: rgb = {0, 0, 0}
	}

	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_AFFECT)
	write_short(1<<13) // Duration
	write_short(1<<14) // Hold Time
	write_short(FFADE_IN) // Fade type
	write_byte(rgb[0]) // Red amount
	write_byte(rgb[1]) // Green amount
	write_byte(rgb[2]) // Blue amount
	write_byte(200) // Alpha
	message_end()*/
	
	// Make a screen shake
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenShake, {0,0,0}, ID_AFFECT)
	write_short(0xFFFF) // Amplitude
	write_short(1<<13) // Duration
	write_short(0xFFFF) // Frequency
	message_end()
}

public restore(taskid)
{
	if (!is_user_alive(ID_RESTORE) && !zp_get_user_zombie(ID_RESTORE) && !zp_get_user_survivor(ID_RESTORE))
		return
		
	set_user_nanosuit(ID_RESTORE, 1)
	client_cmd(ID_RESTORE,"spk %s",regain_sound)
	set_task(1.0, "allonline_soundtask", ID_RESTORE);
	client_print(ID_RESTORE, print_center,"-= Nanosuit is Restore =-")
	
	message_begin(MSG_ONE, get_user_msgid("ScreenFade"), _, ID_RESTORE)
	write_short(1<<12) // duration
	write_short(1<<12) // hold time
	write_short(0x0000) // fade type 
	write_byte(25)
	write_byte(25)
	write_byte(255)
	write_byte(80)
	message_end()
}

public allonline_soundtask(id)
{
	if (!is_user_alive(id) && !zp_get_user_zombie(id) && !zp_get_user_survivor(id))
		return
		
	client_cmd(id,"spk %s",allonline_sound)
	client_print(id, print_center,"-= All Systems Online =-")
}

// Draw explosion ring ( from zombie_plague40.sma )
stock UTIL_DrawRing(const Float:origin[3])
{
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0)
	write_byte(TE_BEAMCYLINDER) // TE id
	engfunc(EngFunc_WriteCoord, origin[0]) // x
	engfunc(EngFunc_WriteCoord, origin[1]) // y
	engfunc(EngFunc_WriteCoord, origin[2]) // z
	engfunc(EngFunc_WriteCoord, origin[0]) // x axis
	engfunc(EngFunc_WriteCoord, origin[1]) // y axis
	engfunc(EngFunc_WriteCoord, origin[2]+385.0) // z axis
	write_short(m_iRing) // sprite
	write_byte(0) // startframe
	write_byte(0) // framerate
	write_byte(4) // life
	write_byte(60) // width
	write_byte(0) // noise
	write_byte(200) // red
	write_byte(100) // green
	write_byte(0) // blue
	write_byte(200) // brightness
	write_byte(0) // speed
	message_end()
	
	// TE_SPRITETRAIL
	engfunc(EngFunc_MessageBegin, MSG_BROADCAST ,SVC_TEMPENTITY, origin, 0)
	write_byte(TE_SPRITETRAIL) // TE ID
	engfunc(EngFunc_WriteCoord, origin[0]) // x axis
	engfunc(EngFunc_WriteCoord, origin[1]) // y axis
	engfunc(EngFunc_WriteCoord, origin[2]+70) // z axis
	engfunc(EngFunc_WriteCoord, origin[0]) // x axis
	engfunc(EngFunc_WriteCoord, origin[1]) // y axis
	engfunc(EngFunc_WriteCoord, origin[2]) // z axis
	write_short(g_emp_gib) // Sprite Index
	write_byte(30) // Count
	write_byte(random_num(15, 20)) // Life
	write_byte(2) // Scale
	write_byte(random_num(40, 80)) // Velocity Along Vector
	write_byte(random_num(15, 45)) // Rendomness of Velocity
	message_end();
}





//-------------------
// FOX METOD

public hud0(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (0%%)")
	client_cmd(ID_HUD,"spk %s",emerge_sound)
}

public hud1(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (1%%)^n|")
}

public hud2(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (2%%)^n|")
}

public hud3(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (3%%)^n|")
}

public hud4(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (4%%)^n|")
}

public hud5(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (5%%)^n|")
}

public hud6(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (6%%)^n|")
}

public hud7(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (7%%)^n|")
}

public hud8(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (8%%)^n|")
}

public hud9(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (9%%)^n|")
}

public hud10(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (10%%)^n||")
}

public hud11(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (11%%)^n||")
}

public hud12(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (12%%)^n||")
}

public hud13(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (13%%)^n||")
}

public hud14(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (14%%)^n||")
}

public hud15(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (15%%)^n|||")
}

public hud16(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (16%%)^n|||")
}

public hud17(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (17%%)^n|||")
}

public hud18(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (18%%)^n|||")
}

public hud19(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (19%%)^n|||")
}

public hud20(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (20%%)^n||||")
}

public hud21(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (21%%)^n||||")
}

public hud22(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (22%%)^n||||")
}

public hud23(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (23%%)^n||||")
}

public hud24(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (24%%)^n||||")
}

public hud25(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (25%%)^n|||||")
}

public hud26(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (26%%)^n|||||")
}

public hud27(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (27%%)^n|||||")
}

public hud28(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD &) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (28%%)^n|||||")
}

public hud29(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (29%%)^n|||||")
}

public hud30(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (30%%)^n||||||")
}

public hud31(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (31%%)^n||||||")
}

public hud32(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (32%%)^n||||||")
}

public hud33(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (33%%)^n||||||")
}

public hud34(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (34%%)^n||||||")
}

public hud35(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (35%%)^n|||||||")
}

public hud36(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (36%%)^n|||||||")
}

public hud37(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (37%%)^n|||||||")
}

public hud38(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (38%%)^n|||||||")
}

public hud39(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (39%%)^n|||||||")
}

public hud40(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (40%%)^n||||||||")
	client_cmd(ID_HUD,"spk %s",stability_sound)
}

public hud41(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (41%%)^n||||||||")
}

public hud42(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (42%%)^n||||||||")
}

public hud43(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (43%%)^n||||||||")
}

public hud44(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (44%%)^n||||||||")
}

public hud45(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (45%%)^n|||||||||")
}

public hud46(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (46%%)^n|||||||||")
}

public hud47(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (47%%)^n|||||||||")
}

public hud48(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (48%%)^n|||||||||")
}

public hud49(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (49%%)^n|||||||||")
}

public hud50(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (50%%)^n||||||||||")
}

public hud51(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (51%%)^n||||||||||")
}

public hud52(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (52%%)^n||||||||||")
}

public hud53(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (53%%)^n||||||||||")
}

public hud54(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (54%%)^n||||||||||")
}

public hud55(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (55%%)^n|||||||||||")
}

public hud56(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (56%%)^n|||||||||||")
}

public hud57(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (57%%)^n|||||||||||")
}

public hud58(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (58%%)^n|||||||||||")
}

public hud59(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (59%%)^n|||||||||||")
}

public hud60(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (60%%)^n||||||||||||")
}

public hud61(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (61%%)^n||||||||||||")
}

public hud62(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (62%%)^n||||||||||||")
}

public hud63(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (63%%)^n||||||||||||")
}

public hud64(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (64%%)^n||||||||||||")
}

public hud65(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (65%%)^n|||||||||||||")
	client_cmd(ID_HUD,"spk %s",stability_sound)
}

public hud66(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (66%%)^n|||||||||||||")
}

public hud67(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (67%%)^n|||||||||||||")
}

public hud68(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (68%%)^n|||||||||||||")
}

public hud69(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (69%%)^n|||||||||||||")
}

public hud70(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (70%%)^n||||||||||||||")
}

public hud71(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (71%%)^n||||||||||||||")
}

public hud72(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (72%%)^n||||||||||||||")
}

public hud73(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (73%%)^n||||||||||||||")
}

public hud74(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (74%%)^n||||||||||||||")
}

public hud75(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (75%%)^n|||||||||||||||")
}

public hud76(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (76%%)^n|||||||||||||||")
}

public hud77(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (77%%)^n|||||||||||||||")
}

public hud78(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (78%%)^n|||||||||||||||")
}

public hud79(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (79%%)^n|||||||||||||||")
}

public hud80(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (80%%)^n||||||||||||||||")
}

public hud81(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (81%%)^n||||||||||||||||")
}

public hud82(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (82%%)^n||||||||||||||||")
}

public hud83(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (83%%)^n||||||||||||||||")
}

public hud84(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (84%%)^n||||||||||||||||")
}

public hud85(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (85%%)^n|||||||||||||||||")
	client_cmd(ID_HUD,"spk %s",stability_sound)
}

public hud86(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (86%%)^n|||||||||||||||||")
}

public hud87(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (87%%)^n|||||||||||||||||")
}

public hud88(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (88%%)^n|||||||||||||||||")
}

public hud89(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (89%%)^n|||||||||||||||||")
}

public hud90(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (90%%)^n||||||||||||||||||")
}

public hud91(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (91%%)^n||||||||||||||||||")
}

public hud92(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (92%%)^n||||||||||||||||||")
}

public hud93(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (93%%)^n||||||||||||||||||")
}

public hud94(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (94%%)^n||||||||||||||||||")
}

public hud95(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (95%%)^n|||||||||||||||||||")
}

public hud96(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (96%%)^n|||||||||||||||||||")
}

public hud97(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (97%%)^n|||||||||||||||||||")
}

public hud98(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (98%%)^n|||||||||||||||||||")
}

public hud99(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 0.1)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (99%%)^n|||||||||||||||||||")
}

public hud100(taskid)
{	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(250, 250, 250, HUD_NANO_LOADING_X, HUD_NANO_LOADING_Y, 0, 0.0, 1.5)
	show_hudmessage(ID_HUD,"NANO SYSTEMS LOADING... (100%%)^n||||||||||||||||||||")
}









// -------------------------------------------------------------------------------------------------





public nano_slowdown(taskid)
{
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 10^n^nREASON: Electro - Magnetic Impulse (EMI)");
	client_cmd(ID_HUD,"spk %s",slowdown_sound)
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown2(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 9^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown3(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 8^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown4(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 7^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown5(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 6^n^nREASON: Electro - Magnetic Impulse (EMI)");

	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown6(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 5^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown7(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 4^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown8(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 3^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown9(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 2^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown10(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 1^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public nano_slowdown11(taskid)
{
	new health = get_user_health(ID_HUD)
	
	if (!is_user_alive(ID_HUD) && !zp_get_user_zombie(ID_HUD) && !zp_get_user_survivor(ID_HUD) && g_endround)
		return
		
	set_hudmessage(0, 110, 210, HUD_NANO_PROGRESS_X, HUD_NANO_PROGRESS_Y, 1, 0.0, 1.0)
	show_hudmessage(ID_HUD, "!!!! CRITICAL ERROR !!!!^nSYSTEM FAILED^n^nATTEMPTING REBOOT IN: 0^n^nREASON: Electro - Magnetic Impulse (EMI)");
	
	if (get_gametime() >= cl_nn_damage_time[ID_HUD])
	{
		if (get_user_health(ID_HUD) > 5)
		{
			set_user_health(ID_HUD, min(get_pcvar_num(cvar_emp_health), health - get_pcvar_num(cvar_emp_dmg)))
		}
		cl_nn_damage_time[ID_HUD] = get_gametime()
	}
	
	message_begin (MSG_ONE_UNRELIABLE, g_msgScreenFade, {0,0,0}, ID_HUD)
	write_short(1 * 1524)
	write_short(1 * 1524)
	write_short(0x0001)
	write_byte(255)
	write_byte(0)
	write_byte(0)
	write_byte(200)
	message_end()
}

public remove_glow(taskid)
{
	set_user_rendering(ID_HUD)
}

public set_glow(taskid)
{
	static Float:originF[3]
	pev(ID_HUD, pev_origin, originF)
	
	// Sparks
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()

	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]+10) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]+5) // x
	engfunc(EngFunc_WriteCoord, originF[1]) // y
	engfunc(EngFunc_WriteCoord, originF[2]-20) // z
	message_end()
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
	write_byte(TE_SPARKS) // TE id
	engfunc(EngFunc_WriteCoord, originF[0]) // x
	engfunc(EngFunc_WriteCoord, originF[1]+5) // y
	engfunc(EngFunc_WriteCoord, originF[2]+5) // z
	message_end()
	
	/*message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
	write_byte(TE_DLIGHT)
	engfunc(EngFunc_WriteCoord, originF[0])
	engfunc(EngFunc_WriteCoord, originF[1])
	engfunc(EngFunc_WriteCoord, originF[2])
	write_byte(10)
	write_byte(180)
	write_byte(240)
	write_byte(255)
	write_byte(5)
	write_byte(0)
	message_end()*/
	
	set_user_rendering(ID_HUD, kRenderFxGlowShell, 180, 240, 255, kRenderNormal, 1)
}
public zp_round_started(taskid)
{
	remove_task(ID_AFFECT)
	remove_task(ID_RESTORE)
	remove_task(ID_HUD)
}

stock ChatColor(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4") // Green Color
	replace_all(msg, 190, "!y", "^1") // Default Color
	replace_all(msg, 190, "!t", "^3") // Team Color
	replace_all(msg, 190, "!w", "^0") // Team2 Color
	
	if (id) players[0] = id; else get_players(players, count, "ch")
        {
	            for (new i = 0; i < count; i++)
	            {
		             if (is_user_connected(players[i]))
		             {
			     message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
			     write_byte(players[i]);
			     write_string(msg);
			     message_end();
		             }
	            }
        }
}

public zp_round_ended(taskid)
{
	if (task_exists(ID_HUD))
	{
		remove_task(ID_HUD)
		remove_task(TASK_HUD)
	}

	if (task_exists(ID_RESTORE))
	{
		remove_task(ID_RESTORE)
		remove_task(TASK_RESTORE)
	}

	if (task_exists(ID_AFFECT))
	{
		remove_task(ID_AFFECT)
		remove_task(TASK_AFFECT)
	}
}
[\code]
Nanosuit -->
[code]
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <xs>
#include <zombieplague>

#define PLUGIN								"Evil-Night Vs Crysis"
#define AUTHOR								"Dare-Devil"
#define VERSION								"1.9.9"

//#define REMOVE_VIEWMODEL_ON_CLOAK
//#define USE_WEAPON_STATUSICONS

// Settings defines [here it is a good place to modify some of the settings]
// Maxplayers [the max players, change this if you don't have 32 players(Low memory usage)]
#define MAXPLAYERS 				 			32

// Refire Rate Manipulation
#define REFIRE_PISTOLS			 			0.85
#define REFIRE_KNIFE 			 			0.75
#define REFIRE_M3				 			0.70
#define REFIRE_SNIPERS 			 			0.60

// Reload Manipulation Defines
#define RELOAD_RATIO 			 			0.78
#define SH_CARTRAGE_RATIO		 			2
#define SH_AMMO_MSG_AMMOID					5

// Painshock constant
#define PAIN_SHOCK_ATTENUATION	 			0.5

// Strength grenade throw burst
#define GRENADE_STR_THROW_ADD	 			400

// Lowres defines  -> refresh rate for screen info in lowresources mode
#define NANO_LOW_RES  			 			5  // time 0.1 seconds

// Delay of energy recharge after ability usage (time in 0.1 seconds)
#define DELAY_STR_JUMP 			 			5
#define DELAY_STR_STAB 			 			5
#define DELAY_STR_SHOT 			 			2
#define DELAY_STR_G_THROW 		 			3
#define DELAY_ARM_DAMAGE	 	 			5
#define DELAY_SPD_RUN 			 			4
#define DELAY_SPD_FAST_ATTACK	 			2
#define DELAY_SPD_FAST_RELOAD	 			4
#define DELAY_SPD_SH_RELOAD		 			2
#define DELAY_CLK_DELAY			 			3
#define DELAY_CLK_FORCED		 			5

// Energy regeneration multiply if user crouches
#define ENERGY_CROUCH 			 			1.2

// Critical border additive so that the plugin will not do the CRITICAL CRITCAL CRITICAL sound [Do not set this to 0.0 or dare!]
#define CRITICAL_EXTRA_ADD		 			10.0

// Plugin useful defines [DO NOT MODIFY!]
// Offsets defines
#define OFFSET_WEAPON_OWNER					41
#define OFFSET_WEAPON_ID					43
#define OFFSET_WEAPON_NEXT_PRIMARY_ATTACK   46
#define OFFSET_WEAPON_NEXT_SEC_ATTACK		47
#define OFFSET_WEAPON_IDLE_TIME				48
#define OFFSET_WEAPON_PRIMARY_AMMO_TYPE		49
#define OFFSET_WEAPON_CLIP					51
#define OFFSET_WEAPON_IN_RELOAD				54

#define OFFSET_PLAYER_NEXT_ATTACK			83
#define OFFSET_PLAYER_PAIN_SHOCK			108
#define OFFSET_PLAYER_ITEM_ACTIVE			373
#define OFFSET_PLAYER_AMMO_SLOT0			376

// Linux offset difference
#define EXTRA_OFFSET_PLAYER_LINUX  			5
#define EXTRA_OFFSET_WEAPON_LINUX			4

// Fall extras
#define FALL_TRUE_VELOCITY 					510.0
#define FALL_FALSE_VELOCITY					350.0
#define DMG_FALL_MULTIPLY					1.40

// Speed defines
#define SPEED_WATER_MUL_CONSTANT			0.7266666
#define SPEED_CROUCH_MUL_CONSTANT			0.3333333

// Damage offsets this is the knife/bullet damage
#define DMG_CS_KNIFE_BULLETS		   		(1 << 12 | 1 << 0)

// Flags for speed mode cvar ground
#define NANO_FLAG_INWATER					(1<<1)
#define NANO_FLAG_CROUCHED					(1<<0)

// Recoil Manipulation Defines
new const UNREGISTERED_WEAPONS_BITSUM  = 	((1<<2) | (1<<CSW_HEGRENADE) | (1<<CSW_FLASHBANG) | (1<<CSW_SMOKEGRENADE) | (1<<CSW_C4))
new const WEAPONS_WITH_SHIELD_BITSUM   =	((1<<CSW_GLOCK18) | (1<<CSW_HEGRENADE) | (1<<CSW_FLASHBANG) | (1<<CSW_SMOKEGRENADE) | (1<<CSW_P228) | (1<<CSW_DEAGLE) | (1<<CSW_FIVESEVEN) | (1<<CSW_KNIFE) | (1<<CSW_USP))

// Reload Manipulation Defines
new const NO_RELOAD_WEAPONS_BITSUM	   =	((1<<CSW_M3) | (1<<CSW_XM1014) | (1<<CSW_KNIFE))

// Task defines
#define TASK_ENERGY 	0
#define TASK_AH_REC 	33
#define TASK_AI			66

// Macro Function defines [DO NOT MODIFY!]
#define is_user_player(%1) 					(1 <= %1 <= glb_maxplayers)
#define Ham_Player_ResetMaxSpeed			Ham_Item_PreFrame

new const ON_LAND_CONST		=	( FL_ONGROUND | FL_ONTRAIN | FL_PARTIALGROUND | FL_INWATER | FL_SWIM )
new const ON_WATER_CONST	=	( FL_INWATER | FL_SWIM )

// Nanosuit status and modes information
enum NanoModes
{
	NANO_STREN = 0,
	NANO_ARMOR = 1,
	NANO_SPEED = 2,
	NANO_CLOAK = 3
}

new const NanoScreenColor[NanoModes][3] =
{
	{148, 12,   49  },
	{14,  84,  160},
	{180, 175, 16  },
	{100, 100, 100}
}

new const NanoStatusIcon[NanoModes][] = 
{
	"dmg_rad",
	"item_longjump",
	"dmg_shock",
	"dmg_bio"
}

new const NanoGlowColor[NanoModes][3] =
{
	{0, 0,   0 },
	{0,   0,   0 },
	{0, 0, 0 },
	{0,   0,   0 } 
}

new const NanoGlowAmmount[NanoModes] = 
{
	1,
	255,
	1,
	15
}

new const NanoGlowFX[NanoModes] =
{
	kRenderFxGlowShell,
	kRenderFxNone,
	kRenderFxGlowShell,
	kRenderFxSolidFast
}

new const NanoGlowMode[NanoModes] =
{
	kRenderNormal,
	kRenderNormal,
	kRenderNormal,
	kRenderTransTexture
}

#define set_nano_glow(%1)  set_user_rendering(%1, NanoGlowFX[cl_nn_mode[%1]], NanoGlowColor[cl_nn_mode[%1]][0], NanoGlowColor[cl_nn_mode[%1]][1], NanoGlowColor[cl_nn_mode[%1]][2], NanoGlowMode[cl_nn_mode[%1]], NanoGlowAmmount[cl_nn_mode[%1]])
#define reset_rendering(%1) set_user_rendering(%1)

enum NanoStatus
{
	NANO_NO,
	NANO_YES
}

enum NanoSpdMode
{
	SPEED_MAXIMUM,
	SPEED_CRITICAL,
	SPEED_NORMAL
}

enum NanoSpeed
{
	SPD_STILL = 0,
	SPD_VSLOW,
	SPD_SLOW,
	SPD_NORMAL,
	SPD_FAST
}

enum NanoSpeedScreen
{
	SPD_SCR_STILL = 0,
	SPD_SCR_VSLOW,
	SPD_SCR_SLOW,
	SPD_SCR_NORMAL,
	SPD_SCR_FAST
}

enum IconStatus
{
	ICON_REMOVE = 0,
	ICON_SHOW,
	ICON_PULSE
}

enum ShadowIdX
{
	SHADOW_REMOVE = 0,
}

enum KnifeState
{
	KNIFE_NOT = 0,
	KNIFE_FIRST_ATTACK,
	KNIFE_SECOND_ATTACK
}

// HTML properties
new const html_header[] = "<html><head><style type=^"text/css^">body{background:#000000;margin-left:8px;margin-top:0px;}a{text-decoration: underline;}a:link {color#FFFFFF;}a:visited{color: #FFFFFF;}a:active    {   color:  #FFFFFF;    }a:hover {    color:  #FFFFFF;    text-decoration: underline;    }</style></head><body scroll=^"yes^" style=^"text-align: left; margin: 0 auto; color:#ffb000;^"><div style=^"width: 600px; text-align: left;^"><font style=^"font-size: 20px; color:#ffb000; ^">"

// Reload needed constants
stock const Float:wpn_reload_delay[CSW_P90+1] =
{
	0.00, 2.70, 0.00, 2.00, 0.00, 0.55, 0.00, 3.15, 3.30, 0.00, 4.50, 2.70, 3.50, 3.35, 2.45, 3.30, 2.70, 2.20, 2.50, 2.63, 4.70, 0.55, 3.05, 2.12, 3.50, 0.00, 2.20, 3.00, 2.45, 0.00, 3.40
}

stock const wpn_reload_anim[CSW_P90+1] = 
{
	-1,  5, -1, 3, -1, 6, -1, 1, 1, -1, 14, 4, 2, 3, 1, 1, 13, 7, 4, 1, 3, 6, 11, 1, 3, -1, 4, 1, 1, -1, 1
}

stock const wpn_max_clip[CSW_P90+1] = 
{
	-1,  13, -1, 10,  1, 7, 1, 30, 30,  1, 30, 20, 25, 30, 35, 25, 12, 20, 10, 30, 100, 8 , 30, 30, 20,  2, 7, 30, 30, -1, 50
}

stock const Float:wpn_act_speed[CSW_P90+1] = 
{
	0.0, 250.0, 0.0, 260.0, 250.0, 240.0, 250.0, 250.0, 240.0, 250.0, 250.0, 250.0, 250.0, 210.0, 240.0, 240.0, 250.0, 250.0, 210.0, 250.0, 220.0, 230.0, 230.0, 250.0, 210.0, 250.0, 250.0, 235.0, 221.0, 250.0, 245.0 
}

// HIT constant damage multi
new const Float:vec_hit_multi[] =
{
	1.0,
	4.0,
	1.0,
	1.25,
	1.0,
	1.0,
	0.75,
	0.75,
	0.0
}

new wpn_v_model[CSW_P90 + 1][30]
new wpn_v_shield_model[CSW_P90 + 1][50]
new wpn_ms_icon[CSW_P90 + 1][14]

// Sounds
new const sound_strengh[] =				"nanosuit/nanosuit_strength.wav"
new const sound_online[] =				"nanosuit/nanosuit_allonline.wav"
new const sound_armor[] = 				"nanosuit/nanosuit_armor.wav"
new const sound_speed[] = 				"nanosuit/nanosuit_speed.wav"
new const sound_cloak[] = 				"nanosuit/nanosuit_cloak.wav"
new const sound_energy[] = 				"nanosuit/nanosuit_energy.wav"
new const sound_menu[] = 				"nanosuit/nanosuit_menu.wav"
new const sound_strength_throw[] = 			"nanosuit/nanosuit_strength_hit.wav"
new const sound_switch_strength[] = 			"nanosuit/nanosuit_strength_switch.wav"
new const sound_switch_armor[] = 			"nanosuit/nanosuit_armor_switch.wav"
new const sound_switch_speed[] = 			"nanosuit/nanosuit_speed_switch.wav"
new const sound_switch_cloak[] = 			"nanosuit/nanosuit_cloak_switch.wav"
new const sound_speed_run[] = 				"nanosuit/nanosuit_speed_run.wav"

new const sound_ric_metal1[] = 			"weapons/ric_metal-1.wav"
new const sound_ric_metal2[] = 			"weapons/ric_metal-2.wav"

// We use this to check if the client said in console model leet for example, we see wether the model is T or not or else we do not set it
new vec_model_ct[][] = 
{
	"gign",
	"gsg9",
	"sas",
	"urban",
	"vip"
}
new vec_model_t[][] = 
{
	"arctic",
	"terror",
	"leet",
	"guerilla"
}

// Pcvars
new pcv_nn_price
new pcv_nn_ff
new pcv_nn_death
new pcv_nn_bot
new pcv_nn_bot_buy
new pcv_nn_team
new pcv_nn_energy
new pcv_nn_critical
new pcv_nn_health
new pcv_nn_buyzone
new pcv_nn_regenerate
new pcv_nn_night
new pcv_nn_hp_charge
new pcv_nn_ar_speed
new pcv_nn_ar_damage
new pcv_nn_st_stab
new pcv_nn_st_throw
new pcv_nn_st_rec_att
new pcv_nn_st_g_throw
new pcv_nn_st_rec_en
new pcv_nn_st_can_th
new pcv_nn_sp_maxim
new pcv_nn_sp_ground
new pcv_nn_sp_critic
new pcv_nn_sp_energy
new pcv_nn_sp_reload
new pcv_nn_sp_fattack
new pcv_nn_sp_fatshre
new pcv_nn_cl_energy
new pcv_nn_cl_fire
new pcv_nn_cl_knife
new pcv_nn_cl_grenade
new pcv_nn_cl_c4
new pcv_zm_regive

new g_msgScreenFade

// Plugin info holders
new glb_maxplayers
new ShadowIdX:SHADOW_CREATE
new bool:glb_use_new_models = true

// Client general info
new cl_player_model[MAXPLAYERS + 1][32] // player's model name
new bool:cl_update_model[MAXPLAYERS + 1] = {false, ...}
new cl_nn_weapon[MAXPLAYERS + 1]
new bool:cl_is_bot[MAXPLAYERS + 1] = {false, ...}
new bool:cl_nn_lowres[MAXPLAYERS + 1] = {false, ...}
new NanoStatus:cl_nn_has[MAXPLAYERS + 1] = {NANO_NO, ...}
new NanoStatus:cl_nn_had[MAXPLAYERS + 1] = {NANO_NO, ...}
new bool:cl_added_velocity[MAXPLAYERS + 1] = {false, ...}
new bool:cl_removed_shadow[MAXPLAYERS + 1] = {false, ...}
new bool:cl_nn_zombie[MAXPLAYERS + 1] = {false, ...}

// Nanosuit special info
new NanoSpdMode:cl_nn_sp_status[MAXPLAYERS + 1]
new NanoSpeed:cl_nn_speed[MAXPLAYERS + 1]
new NanoSpeedScreen:cl_nn_scr_speed[MAXPLAYERS + 1]
new NanoModes:cl_nn_mode[MAXPLAYERS + 1] = {NANO_ARMOR, ...}
new Float:cl_nn_energy[MAXPLAYERS + 1]
new bool:cl_nn_critical[MAXPLAYERS + 1]
new bool:cl_nn_online[MAXPLAYERS + 1]
new cl_nn_counter[MAXPLAYERS + 1] = {NANO_LOW_RES, ...}
new cl_nn_block_recharge[MAXPLAYERS + 1]
new KnifeState:cl_nn_st_knife[MAXPLAYERS + 1] = {KNIFE_NOT, ...}
new cl_is_thrown[MAXPLAYERS + 1] = {0, ...}
new Float:cl_nn_punch[MAXPLAYERS + 1][3]
new bool:cl_nn_actual_shot[MAXPLAYERS + 1] = {false, ...}
new cl_nn_shotgun_ammo[MAXPLAYERS + 1]

// Needs -> hud + menu + monitor + messages
new nd_menu[MAXPLAYERS + 1]
new nd_hud_sync
new nd_ent_monitor
new nd_msg_saytext
new nd_msg_damage
new nd_msg_iconstatus
new nd_msg_shadowidx
new nd_msg_ammox

public plugin_precache()
{
	precache_sound(sound_armor)
	precache_sound(sound_strengh)
	precache_sound(sound_online)
	precache_sound(sound_speed)
	precache_sound(sound_cloak)
	precache_sound(sound_energy)
	precache_sound(sound_menu)
	precache_sound(sound_strength_throw)
	precache_sound(sound_switch_armor)
	precache_sound(sound_switch_cloak)
	precache_sound(sound_switch_speed)
	precache_sound(sound_switch_strength)
	precache_sound(sound_speed_run)
	
	precache_sound(sound_ric_metal1)
	precache_sound(sound_ric_metal2)
	
	SHADOW_CREATE = ShadowIdX:precache_model("sprites/shadow_circle.spr")
	
}

public plugin_init()
{
	// Register the plugin
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /nanosuit", "nanosuit_menu_show")
	register_clcmd("say_team /nanosuit", "nanosuit_menu_show")
	register_clcmd("nanosuit", "nanosuit_menu_show")
	register_clcmd("say /23s22", "nanosuit_low_res_toggle")
	register_clcmd("/n23123wres", "nanosuit_low_res_toggle")
	register_clcmd("na23wres", "nanosuit_low_res_toggle")
	register_clcmd("n1231y","nanosuit_buy")
	register_clcmd("say /na123uy","nanosuit_buy")
	register_clcmd("say_team /na23uy","nanosuit_buy")
	register_clcmd("33221w2","nanosuit_help")
	register_clcmd("nan324p","nanosuit_help")
	register_clcmd("/234lp","nanosuit_help")
	
	// The pcvars
	pcv_nn_price      = register_cvar("zp_nanosuit_price","0")
	pcv_nn_death      = register_cvar("zp_nanosuit_death_remove","0")
	pcv_nn_buyzone    = register_cvar("zp_nanosuit_buyzone","0")
	pcv_nn_ff         = get_cvar_pointer("mp_friendlyfire")
	pcv_nn_bot        = register_cvar("zp_nanosuit_bot_allow","0")
	pcv_nn_bot_buy    = register_cvar("zp_nanosuit_bot_buy_mode","0")  // 0 on round start 1 on spawn
	pcv_nn_night	  = register_cvar("zp_nanosuit_nightvision","0")
	pcv_nn_team		  = register_cvar("zp_nanosuit_team_allow","2") // 1 T 2 CT 3 both
	pcv_zm_regive	  = register_cvar("zp_nanosuit_disinfect_regive", "1")
	
	pcv_nn_energy     = register_cvar("zp_nanosuit_energy","100")
	pcv_nn_critical   = register_cvar("zp_nanosuit_critical","10")
	
	pcv_nn_health     = register_cvar("zp_nanosuit_health","250")
	
	pcv_nn_regenerate = register_cvar("zp_nanosuit_regenerate","1.0")
	pcv_nn_hp_charge  = register_cvar("zp_nanosuit_hpcharge","1")
	
	pcv_nn_ar_speed   = register_cvar("zp_nanosuit_armor_speed","1.0")
	pcv_nn_ar_damage  = register_cvar("zp_nanosuit_armor_damage","0.85")
	
	pcv_nn_st_stab    = register_cvar("zp_nanosuit_strength_stab","10")
	pcv_nn_st_throw   = register_cvar("zp_nanosuit_strength_throw","600")
	pcv_nn_st_rec_att = register_cvar("zp_nanosuit_strength_recoil_attenuation","1.75")
	pcv_nn_st_rec_en  = register_cvar("zp_nanosuit_strength_recoil_energy","1.5")
	pcv_nn_st_g_throw = register_cvar("zp_nanosuit_strength_grenade_throw","3.0")
	pcv_nn_st_can_th  = register_cvar("zp_nanosuit_strength_throw_override","1")
	
	pcv_nn_sp_maxim   = register_cvar("zp_nanosuit_speed_maximum","2.4")
	pcv_nn_sp_critic  = register_cvar("zp_nanosuit_speed_critical","1.40")
	pcv_nn_sp_energy  = register_cvar("zp_nanosuit_speed_energy","3.6")
	pcv_nn_sp_fattack = register_cvar("zp_nanosuit_speed_fast_attack", "2.0")
	pcv_nn_sp_fatshre = register_cvar("zp_nanosuit_speed_fast_sh_reload", "2.5")
	pcv_nn_sp_reload  = register_cvar("zp_nanosuit_speed_fast_reload", "5.0")
	pcv_nn_sp_ground  = register_cvar("zp_nanosuit_ground_affect", "2") // 0 normal ground, 1 also crouch, 2 water, 3 water + crouch
	
	pcv_nn_cl_energy  = register_cvar("zp_nanosuit_cloak_energy","0.65")
	pcv_nn_cl_fire    = register_cvar("zp_nanosuit_cloak_punish_weapon_fire","1")
	pcv_nn_cl_knife   = register_cvar("zp_nanosuit_cloak_punish_knife_usage","1")
	pcv_nn_cl_grenade = register_cvar("zp_nanosuit_cloak_punish_grenade_throw","1")
	pcv_nn_cl_c4      = register_cvar("zp_nanosuit_cloak_punish_c4","1")

	g_msgScreenFade = get_user_msgid("ScreenFade")
	
	// Fakemeta forwards
	register_forward(FM_PlayerPreThink, "fw_prethink")
	register_forward(FM_SetModel, "fw_setmodel",1)
	
	if (!glb_use_new_models)
	{
		server_print("[NANO] No models found, not registering the model block forwards!")
	}
	else
	{
		server_print("[NANO] Models found, activating model block forwards!")
		register_forward(FM_SetClientKeyValue, "fw_setclientkey")
		register_event("TeamInfo","event_teaminfo","a")
		register_forward(FM_ClientUserInfoChanged, "fw_clientuserinfochanged")
	}
	
	// Ham forwards (yummy)
	RegisterHam(Ham_CS_RoundRespawn,"player","fw_spawn",1)
	RegisterHam(Ham_Spawn,"player","fw_spawn",1)
	RegisterHam(Ham_Killed,"player","fw_killed")
	RegisterHam(Ham_Player_ResetMaxSpeed,"player","fw_resetmaxspeed",1)
	
	new weapon_name[24]
	
	// Register all weapons for special functions
	for (new i=CSW_P228;i<=CSW_P90;i++)
	{
		if (!(UNREGISTERED_WEAPONS_BITSUM & 1<<i) && get_weaponname(i, weapon_name, charsmax(weapon_name)))
		{
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_primary_attack")
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_primary_attack_post",1)
			RegisterHam(Ham_Weapon_SecondaryAttack, weapon_name, "fw_secondary_attack")
			RegisterHam(Ham_Weapon_SecondaryAttack, weapon_name, "fw_secondary_attack_post",1)
			
			if (!(NO_RELOAD_WEAPONS_BITSUM & (1<<i)))
			{
				RegisterHam(Ham_Weapon_Reload, weapon_name, "fw_reload_post", 1)
			}
			else
			{
				if (i != CSW_KNIFE)
				{
					RegisterHam(Ham_Item_Deploy, weapon_name, "fw_shotgun_deploy", 1)
					RegisterHam(Ham_Weapon_Reload, weapon_name, "fw_special_reload_post", 1)
				}
			}
			
			
			format(wpn_ms_icon[i],13,"d_%s",weapon_name[7])
			replace(weapon_name,charsmax(weapon_name),"navy","")
			format(wpn_v_model[i],29,"models/v_%s.mdl",weapon_name[7])
			
		}
		
		if (WEAPONS_WITH_SHIELD_BITSUM & 1<<i)
		{
			format(wpn_v_shield_model[i],49,"models/shield/v_shield_%s.mdl",weapon_name[7])
		}
	}
	
	// Let's add the c4
	format(wpn_v_model[CSW_C4],29,"models/v_c4.mdl")
	
	format(wpn_v_model[CSW_SMOKEGRENADE],29,"models/v_smokegrenade.mdl")
	format(wpn_v_model[CSW_FLASHBANG],29,"models/v_flashbang.mdl")
	format(wpn_v_model[CSW_HEGRENADE],29,"models/v_hegrenade.mdl")
	
	format(wpn_v_shield_model[CSW_SMOKEGRENADE],49,"models/shield/v_shield_smokegrenade.mdl")
	format(wpn_v_shield_model[CSW_FLASHBANG],49,"models/shield/v_shield_flashbang.mdl")
	format(wpn_v_shield_model[CSW_HEGRENADE],49,"models/shield/v_shield_hegrenade.mdl")
	
	get_weaponname(CSW_C4, weapon_name, charsmax(weapon_name))
	
	RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_bomb_planting")
	RegisterHam(Ham_Use, "grenade", "fw_bomb_defusing")
	
	
	// In the previous function we didn't register the grenades
	wpn_ms_icon[CSW_HEGRENADE] = 	"d_grenade"
	wpn_ms_icon[CSW_FLASHBANG] = 	"d_grenade"
	wpn_ms_icon[CSW_SMOKEGRENADE] = "d_grenade"
	
	// Global Stuff
	glb_maxplayers = global_get(glb_maxClients)
	
	// Events
	register_event("CurWeapon", "event_active_weapon", "be","1=1")
	register_event("DeathMsg", "event_death", "ae")
	
	register_logevent("event_startround", 2, "1=Round_Start")
	
	
	// Register dictionary (for multilanguage)
	register_dictionary("nanosuit.txt")
	
	// Tolls
	nd_hud_sync = CreateHudSyncObj()
	
	// Message variables
	nd_msg_saytext 		= get_user_msgid("SayText")
	nd_msg_damage 		= get_user_msgid("Damage")
	nd_msg_iconstatus 	= get_user_msgid("StatusIcon")
	nd_msg_shadowidx  	= get_user_msgid("ShadowIdx")
	nd_msg_ammox		= get_user_msgid("AmmoX")
	
	// Hud status display
	nd_ent_monitor = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
	
	if (nd_ent_monitor)
	{
		set_pev(nd_ent_monitor, pev_classname, "screen_status")
		set_pev(nd_ent_monitor, pev_nextthink, get_gametime() + 0.1)
		
		register_forward(FM_Think, "fw_screenthink")
	}
	
	set_task(1.0,"plugin_init_delay",674832)
	set_task(60.0,"nanosuit_msg", 674837, _, _, "b", 0)
}

public plugin_init_delay(nr)
{
	// Register the takedamage after 1 second to let the other plugins mess with the variables
	RegisterHam(Ham_TakeDamage, "player", "fw_takedamage")
	RegisterHam(Ham_TakeDamage, "player", "fw_takedamage_post", 1)
	RegisterHam(Ham_TraceAttack, "player", "fw_traceattack")
	
	// Speed fix
	server_cmd("sv_maxspeed 99999.0")
}

public client_putinserver(id)
{
	if (is_user_bot(id))
		cl_is_bot[id] = true
	
	if (get_pcvar_num(pcv_nn_price) <= 0)
	{
		if (cl_is_bot[id] && get_pcvar_num(pcv_nn_bot))
			cl_nn_has[id] = NANO_YES
		if (!cl_is_bot[id])
			cl_nn_has[id] = NANO_YES
	}
	else
		cl_nn_has[id] = NANO_NO
}

public client_connect(id)
{
	client_cmd(id,"cl_sidespeed 400")
	client_cmd(id,"cl_forwardspeed 400")
	client_cmd(id,"cl_backspeed 400")
	cl_nn_actual_shot[id] = false
	cl_removed_shadow[id] = false
}

public fw_resetmaxspeed(id)
{
	if (cl_is_thrown[id] != 0)
		set_user_maxspeed(id, 1.0)
	
	if (cl_nn_has[id] == NANO_YES)
	{
		switch (cl_nn_mode[id])
		{
			case NANO_ARMOR:
			{
				set_user_maxspeed(id,get_user_maxspeed(id) * get_pcvar_float(pcv_nn_ar_speed))
			}
			case NANO_SPEED:
			{
				if (cl_nn_energy[id] > get_pcvar_float(pcv_nn_critical))
					cl_nn_sp_status[id] = SPEED_MAXIMUM
				if (get_pcvar_float(pcv_nn_critical) >= cl_nn_energy[id] > 0)
					cl_nn_sp_status[id] = SPEED_CRITICAL
				if (0 >= cl_nn_energy[id])
					cl_nn_sp_status[id] = SPEED_NORMAL
				
				switch (cl_nn_sp_status[id])
				{
					case SPEED_MAXIMUM: set_user_maxspeed(id,get_user_maxspeed(id) * get_pcvar_float(pcv_nn_sp_maxim))
					case SPEED_CRITICAL: set_user_maxspeed(id,get_user_maxspeed(id) * get_pcvar_float(pcv_nn_sp_critic))
				}
			}
		}
	}
	
	return PLUGIN_CONTINUE
}

public nanosuit_msg(nr)
{
	static players[32],count,id
	get_players(players,count)
	
	for (new i=0;i<count;i++)
	{
		id = players[i]
		static msg[300]
		format(msg,299,"^x04<ZombieWorld>^x03 Say /nanosuit or nanosuit")
		colored_msg(id,msg)
	}
	
	return PLUGIN_CONTINUE
}

public client_disconnect(id)
{
	cl_nn_has[id] = NANO_NO
	cl_nn_mode[id] = NANO_ARMOR
	cl_is_bot[id] = false
	cl_added_velocity[id] = false
	nanosuit_reset(id)
}

public nanosuit_low_res_toggle(id)
{
	cl_nn_lowres[id] = !cl_nn_lowres[id]
	
	if (cl_nn_lowres[id])
	{
		msg_statusicon(id,ICON_REMOVE,NanoStatusIcon[cl_nn_mode[id]],NanoScreenColor[cl_nn_mode[id]])
		#if defined USE_WEAPON_STATUSICONS
		msg_statusicon(id,ICON_REMOVE,wpn_ms_icon[cl_nn_weapon[id]],{0,255,0})
		#endif
		client_print(id, print_chat, "%L", id, "NANO_LOWRES_ON")
	}
	else
	{
		if (cl_nn_has[id] == NANO_YES)
		{
			msg_statusicon(id,ICON_SHOW,NanoStatusIcon[cl_nn_mode[id]],NanoScreenColor[cl_nn_mode[id]])
			#if defined USE_WEAPON_STATUSICONS
			if (cl_nn_mode[id] == NANO_CLOAK)
				msg_statusicon(id,ICON_SHOW,wpn_ms_icon[cl_nn_weapon[id]],{0,255,0})
			#endif
		}
		client_print(id, print_chat, "%L", id, "NANO_LOWRES_OFF")
	}
	
	return
}

// Menu System
public nanosuit_menu_create(id)
{
	static text[200]
	
	format(text,199,"%L",id,"NANO_MENU")
	nd_menu[id] = menu_create(text, "nanosuit_menu_choose")
	
	format(text,199,"%L",id,"NANO_ST_MODE")
	menu_additem(nd_menu[id], text)
	format(text,199,"%L",id,"NANO_A_MODE")
	menu_additem(nd_menu[id], text)
	format(text,199,"%L",id,"NANO_S_MODE")
	menu_additem(nd_menu[id], text)
	format(text,199,"%L",id,"NANO_C_MODE")
	menu_additem(nd_menu[id], text)
	
	menu_setprop(nd_menu[id], MPROP_EXIT, MEXIT_NEVER)
}

public nanosuit_menu_show(id)
{
	if (!is_user_alive(id))
		return
	
	if (cl_nn_has[id] == NANO_YES)
	{
		client_cmd(id,"spk %s",sound_menu)
		nanosuit_menu_create(id)
		menu_display(id, nd_menu[id])
		nanosuit_reset(id,false)
		return
	}
	else
		client_cmd(id,"0")
	
	return
}

public nanosuit_menu_choose(id, menu, item)
{
	
	if (item != -3 && cl_nn_mode[id] != NanoModes:item)
	{
		if (cl_nn_mode[id] == NANO_SPEED)
		{
			if (cl_nn_energy[id] > get_pcvar_float(pcv_nn_critical))
				cl_nn_sp_status[id] = SPEED_MAXIMUM
			if (get_pcvar_float(pcv_nn_critical) >= cl_nn_energy[id] > 0)
				cl_nn_sp_status[id] = SPEED_CRITICAL
			if (0 >= cl_nn_energy[id])
				cl_nn_sp_status[id] = SPEED_NORMAL
			
			switch (cl_nn_sp_status[id])
			{
				case SPEED_MAXIMUM: set_user_maxspeed(id,get_user_maxspeed(id) / get_pcvar_float(pcv_nn_sp_maxim))
				case SPEED_CRITICAL: set_user_maxspeed(id,get_user_maxspeed(id) / get_pcvar_float(pcv_nn_sp_critic))
			}
		}
		
		if (NanoModes:item == NANO_SPEED)
		{
			if (cl_nn_energy[id] > get_pcvar_float(pcv_nn_critical))
				cl_nn_sp_status[id] = SPEED_MAXIMUM
			if (get_pcvar_float(pcv_nn_critical) >= cl_nn_energy[id] > 0)
				cl_nn_sp_status[id] = SPEED_CRITICAL
			if (0 >= cl_nn_energy[id])
				cl_nn_sp_status[id] = SPEED_NORMAL
			
			switch (cl_nn_sp_status[id])
			{
				case SPEED_MAXIMUM: set_user_maxspeed(id,get_user_maxspeed(id) * get_pcvar_float(pcv_nn_sp_maxim))
				case SPEED_CRITICAL: set_user_maxspeed(id,get_user_maxspeed(id) * get_pcvar_float(pcv_nn_sp_critic))
			}
		}
		
		set_nano_mode(id,NanoModes:item)
	}
	
	if (menu != 0)
		menu_destroy(nd_menu[id])
	return PLUGIN_HANDLED
}


// Buy command
public nanosuit_buy(id)
{
	if (cl_nn_has[id] == NANO_YES)
	{
		client_print(id,print_center,"#Cstrike_Already_Own_Weapon")
		return
	}
	
	if (get_pcvar_num(pcv_nn_price) <= 0)
	{
		cl_nn_has[id] = NANO_YES
		nanosuit_reset(id, true)
		
		return
	}
	else
	{
		if (get_pcvar_num(pcv_nn_team) != _:cs_get_user_team(id) && get_pcvar_num(pcv_nn_team) != 3)
		{
			client_print(id,print_center,"You team is not allowed to buy!")
			return
		}
		
		if (get_pcvar_num(pcv_nn_buyzone) && !cs_get_user_buyzone(id))
		{
			client_print(id,print_center,"%L",id,"NANO_BUYZONE")
			return
		}
		
		static money
		money = cs_get_user_money(id)
		static price
		price = get_pcvar_num(pcv_nn_price)
		
		if (money >= price)
		{
			cs_set_user_money(id, money - price)
			
			cl_nn_has[id] = NANO_YES
			nanosuit_reset(id, true)
			
			client_print(id,print_center,"%L",id,"NANO_BUY")
			return
		}
		else
		{
			client_print(id,print_center,"#Cstrike_TitlesTXT_Not_Enough_Money")
			return
		}
	}
	
	return
}

// Help command
public nanosuit_help(id)
{
	static help[3000]
	
	format(help,2999,"%s%s^n",help,html_header)
	
	format(help,2999,"%s%L^n",help,id,"NANO_HTML_BASIC")
	format(help,2999,"%s%L^n",help,id,"NANO_HTML_MODES")
	
	if (get_pcvar_num(pcv_nn_cl_fire))
		format(help,2999,"%s%L^n",help,id,"NANO_HTML_CL_FIRE")
	
	if (get_pcvar_num(pcv_nn_cl_knife))
		format(help,2999,"%s%L^n",help,id,"NANO_HTML_CL_KNIFE")
	
	if (get_pcvar_num(pcv_nn_cl_grenade))
		format(help,2999,"%s%L^n",help,id,"NANO_HTML_CL_NADE")
	
	format(help,2999,"%s%L^n",help,id,"NANO_HTML_ADVICE")
	
	delete_file("nanosuit.htm")
	write_file("nanosuit.htm",help)
	show_motd(id, "nanosuit.htm", "-= Crysis Nanosuit =-")
	return
}

/* ===================================================
[Events]
==================================================== */

public event_teaminfo()
{
	new id
	id = read_data(1)
	
	if (!is_user_connected(id))
		return
	
	if (glb_use_new_models)
	{
			client_cmd(id, "0")
	}
	else
		fm_reset_user_model(id)
	
	cl_update_model[id] = false
	
	return
}

public event_startround()
{
	if (get_pcvar_num(pcv_nn_bot_buy) || !get_pcvar_num(pcv_nn_bot))
		return PLUGIN_CONTINUE
	
	new players[32], count, id
	get_players(players,count,"ad")
	
	for (new i=0;i<count;i++)
	{
		id = players[i]
		nanosuit_buy(id)
	}
	
	return PLUGIN_CONTINUE
}

public event_active_weapon(id)
{
	new weapon
	weapon = read_data(2)
	
	if (weapon != CSW_KNIFE)
		cl_nn_st_knife[id] = KNIFE_NOT
	
	
	if (weapon != CSW_KNIFE && weapon != CSW_HEGRENADE && weapon != CSW_FLASHBANG && weapon != CSW_SMOKEGRENADE && cl_nn_zombie[id])
	{
		cl_nn_zombie[id] = false
		
		if (cl_nn_had[id] == NANO_YES && get_pcvar_num(pcv_zm_regive))
		{
			cl_nn_has[id] = NANO_YES
			nanosuit_reset(id)
		}
	}
	
	
	if (cl_nn_has[id] == NANO_YES && cl_nn_weapon[id] != weapon)
	{
		#if defined	REMOVE_VIEWMODEL_ON_CLOAK
		if (!cl_is_bot[id] && cl_nn_mode[id] == NANO_CLOAK)
			set_pev(id,pev_viewmodel2,"")
		#endif
		#if defined USE_WEAPON_STATUSICONS
		if (cl_nn_mode[id] == NANO_CLOAK && !cl_is_bot[id] && !equal(wpn_ms_icon[cl_nn_weapon[id]],wpn_ms_icon[weapon]))
		{
			msg_statusicon(id,ICON_REMOVE,wpn_ms_icon[cl_nn_weapon[id]],{0,0,0})
			msg_statusicon(id,ICON_SHOW,wpn_ms_icon[weapon],{0,255,0})
		}
		#endif
		
		if (cl_is_bot[id])
		{
			if (weapon == CSW_KNIFE)
			{
				new hit = -1
				new Float:origin[3]
				pev(id,pev_origin,origin)
				
				while ((hit = engfunc(EngFunc_FindEntityInSphere, hit, origin, 350.0)))
				{
					if (!is_user_alive(hit))
						continue
					
					if ((get_pcvar_num(pcv_nn_ff)) || (!get_pcvar_num(pcv_nn_ff) && cs_get_user_team(id) != cs_get_user_team(hit)))
					{
						nanosuit_menu_choose(id,0,_:NANO_STREN)
						break
					}
				}
			}
		}
	}
	
	cl_nn_weapon[id] = weapon
}

public event_death()
{
	static victim
	victim = read_data(2)
	
	if (victim == 0)
		return 
	
	reset_rendering(victim)
	
	if (get_pcvar_num(pcv_nn_price) > 0 && get_pcvar_num(pcv_nn_death))
	{
		cl_nn_has[victim] = NANO_NO
		nanosuit_reset(victim)
	}
	
	return
}

/* ===================================================
[Fakemeta forwards (fake!)]
==================================================== */
public fw_prethink(id)
{
	if (!is_user_alive(id))
		return FMRES_IGNORED
	
	new Float:origin[3], Float:through[3], Float:vel[3], Float:endpos[3], bool:onground, flags
	
	flags = pev(id, pev_flags)
	
	onground = (flags & ON_LAND_CONST)  ? true : false
	
	pev(id,pev_origin,origin)
	pev(id,pev_velocity,vel)
	
	if (cl_is_thrown[id] && !onground && vel[2] <= -FALL_FALSE_VELOCITY && !cl_added_velocity[id])
	{
		static trace
		trace = create_tr2()
		
		xs_vec_add(origin,Float:{0.0,0.0,-50.0},through)
		
		engfunc(EngFunc_TraceLine,origin,through,IGNORE_MONSTERS, id, trace)
		get_tr2(trace,TR_vecEndPos,endpos)
		xs_vec_sub(endpos,origin,endpos)
		xs_vec_sub(through,origin,through)
		
		if (vector_length(through) != vector_length(endpos))
		{
			vel[2] += FALL_FALSE_VELOCITY - FALL_TRUE_VELOCITY
			cl_added_velocity[id] = true
			set_pev(id,pev_velocity,vel)
		}
		
		free_tr2(trace)
	}
	
	if (cl_is_thrown[id] && onground)
	{
		cl_added_velocity[id] = false
		cl_is_thrown[id] = 0
		
		ExecuteHamB(Ham_Player_ResetMaxSpeed, id)
	}
	
	if (cl_is_bot[id] && cl_nn_has[id] == NANO_YES && !get_pcvar_num(pcv_nn_bot))
	{
		cl_nn_has[id] = NANO_NO
		nanosuit_reset(id)
	}
	
	static Float:health
	pev(id,pev_health,health)
	
	if (cl_is_bot[id] && cl_nn_has[id] == NANO_YES && health < 60.0)
		nanosuit_menu_choose(id,0,_:NANO_ARMOR)
	
	if (cl_nn_has[id] == NANO_YES)
		nanosuit_functions(id)

	// Maximum Speed
	if (cl_nn_has[id] == NANO_YES && cl_nn_mode[id] == NANO_SPEED)
	{
				if (cl_nn_energy[id] < 100)
					set_pev(id, pev_maxspeed, 500.0)

				if (cl_nn_energy[id] < 10)
				{
					set_pev(id, pev_maxspeed, 240.0)

					message_begin(MSG_ONE, g_msgScreenFade, _, id)
					write_short((1<<12)*2) // duration
					write_short(0) // hold time
					write_short(0x0000) // fade type
					write_byte(250) // r
					write_byte(250) // g
					write_byte(0) // b
					write_byte(50) // nvg Alpha
					message_end()
				}
	}
	
	// Run
	new Float:speed
	speed  = vector_length(vel)
	new Float:mspeed
	mspeed = get_user_maxspeed(id)
	
	if (get_pcvar_num(pcv_nn_sp_ground) & NANO_FLAG_INWATER && flags & ON_WATER_CONST)
		mspeed *= SPEED_WATER_MUL_CONSTANT
	
	if (get_pcvar_num(pcv_nn_sp_ground) & NANO_FLAG_CROUCHED && flags & FL_DUCKING)
		mspeed *= SPEED_CROUCH_MUL_CONSTANT
	
	// Remember the speed
	if (speed ==         0.0)		cl_nn_speed[id] = SPD_STILL
	if (speed >			 0.0)		cl_nn_speed[id] = SPD_VSLOW
	if (speed > 0.4 * mspeed)		cl_nn_speed[id] = SPD_SLOW
	if (speed > 0.6 * mspeed)		cl_nn_speed[id] = SPD_NORMAL
	if (speed > 0.9 * mspeed)		cl_nn_speed[id] = SPD_FAST
	
	if (speed < 0.6 * mspeed && cl_nn_has[id] == NANO_YES && cl_nn_mode[id] == NANO_SPEED)	
		set_pev(id,pev_flTimeStepSound,100)
	
	// Screen display
	if (speed ==  0.0)				cl_nn_scr_speed[id] = SPD_SCR_STILL
	if (speed >	  0.0)				cl_nn_scr_speed[id] = SPD_SCR_VSLOW
	if (speed > 100.0)				cl_nn_scr_speed[id] = SPD_SCR_SLOW
	if (speed > 200.0)				cl_nn_scr_speed[id] = SPD_SCR_NORMAL
	if (speed > 265.0)				cl_nn_scr_speed[id] = SPD_SCR_FAST
	
	return FMRES_IGNORED
}

public fw_setmodel(ent, const model[])
{
	if (!pev_valid(ent))
		return FMRES_IGNORED
	
	new Float:gravity
	pev(ent,pev_gravity,gravity)
	
	if (gravity == 0.0)
		return FMRES_IGNORED
	
	new owner
	owner = pev(ent,pev_owner)
	
	if (!(cl_nn_has[owner] == NANO_YES))
		return FMRES_IGNORED
	
	new classname[8]
	
	pev(ent,pev_classname,classname,7)
	
	if (equal("grenade",classname,7) && cl_nn_mode[owner] == NANO_CLOAK && get_pcvar_num(pcv_nn_cl_grenade))
	{
		set_nano_energy(owner,0.0,DELAY_CLK_FORCED)
		return FMRES_IGNORED
	}
	if (equal("grenade",classname,7) && cl_nn_mode[owner] == NANO_STREN && containi(model,"c4") == -1 && cl_nn_energy[owner] >= get_pcvar_float(pcv_nn_st_g_throw))
	{
		new Float:v[3], Float:v2[3]
		pev(ent,pev_velocity,v)
		velocity_by_aim(owner, GRENADE_STR_THROW_ADD, v2)
		xs_vec_add(v, v2, v)
		set_pev(ent,pev_velocity,v)
		set_nano_energy(owner,cl_nn_energy[owner] - get_pcvar_float(pcv_nn_st_g_throw),DELAY_STR_G_THROW)
		return FMRES_IGNORED
	}
	
	return FMRES_IGNORED
}

public fw_setclientkey(id,const infobuffer[],const key[])
{   
	// Block CS model changes
	if (cl_nn_has[id] == NANO_YES && equal(key, "model"))
		return FMRES_SUPERCEDE
	
	return FMRES_IGNORED
}

public fw_clientuserinfochanged(id)
{
	if (!is_user_connected(id))
		return FMRES_IGNORED
	
	// Get current model
	new currentmodel[32]
	fm_get_user_model(id, currentmodel, charsmax(currentmodel))
	
	// Check whether it matches the custom model - if not, set it again
	if (!equal(currentmodel, cl_player_model[id]))
	{
		if (cl_nn_has[id] == NANO_YES)
		{
			switch (cs_get_user_team(id))
			{
				case CS_TEAM_CT:
				{
					for (new i=0;i<5;i++)
					{
						if (equali(currentmodel,vec_model_ct[i]))
						{
							cl_update_model[id] = true
							copy(cl_player_model[id], 31, currentmodel)
							return FMRES_SUPERCEDE
						}
					}
				}
				case CS_TEAM_T:
				{
					for (new i=0;i<4;i++)
					{
						if (equali(currentmodel,vec_model_t[i]))
						{
							cl_update_model[id] = true
							copy(cl_player_model[id], 31, currentmodel)
							return FMRES_SUPERCEDE
						}
					}
				}
			}
		}
		else
		{
			switch (cs_get_user_team(id))
			{
				case CS_TEAM_CT:
				{
					for (new i=0;i<5;i++)
					{
						if (equali(currentmodel,vec_model_ct[i]))
						{
							fm_set_user_model(id,currentmodel)
							return FMRES_SUPERCEDE
						}
					}
					
					fm_reset_user_model(id)
				}
				case CS_TEAM_T:
				{
					for (new i=0;i<4;i++)
					{
						if (equali(currentmodel,vec_model_t[i]))
						{
							fm_set_user_model(id,currentmodel)
							return FMRES_SUPERCEDE
						}
					}
					
					fm_reset_user_model(id)
				}
				default: fm_reset_user_model(id)
			}
		}
	}
	
	return FMRES_SUPERCEDE
}

/* ===================================================
[Ham forwards chapter (yummy)]
==================================================== */
public fw_primary_attack(ent)
{
	new id = get_pdata_cbase(ent, OFFSET_WEAPON_OWNER, EXTRA_OFFSET_WEAPON_LINUX)
	
	if (cl_nn_weapon[id] == CSW_KNIFE && cl_nn_mode[id] == NANO_STREN && cl_nn_energy[id] >= get_pcvar_float(pcv_nn_st_stab) && cl_nn_has[id] == NANO_YES)
	{
		set_nano_energy(id, cl_nn_energy[id] - get_pcvar_float(pcv_nn_st_stab), DELAY_STR_STAB)
		cl_nn_st_knife[id] = KNIFE_FIRST_ATTACK
		client_cmd(id,"spk %s",sound_strength_throw)
	}
	
	pev(id,pev_punchangle,cl_nn_punch[id])
	
	if (cl_nn_mode[id] == NANO_CLOAK)
	{
		if (cl_nn_weapon[id] == CSW_KNIFE &&  get_pcvar_num(pcv_nn_cl_knife))
		{
			set_nano_energy(id, 0.0, DELAY_CLK_FORCED)
		}
		
		if (cl_nn_weapon[id] != CSW_KNIFE && get_pcvar_num(pcv_nn_cl_fire))
		{
			set_nano_energy(id, 0.0, DELAY_CLK_FORCED)
		}
	}
	
	new ammo,clip
	get_user_ammo(id, cl_nn_weapon[id], ammo, clip)
	
	if (cs_get_weapon_id(ent) == CSW_M3 || cs_get_weapon_id(ent) == CSW_XM1014)
		cl_nn_shotgun_ammo[id] = ammo
	else
		cl_nn_shotgun_ammo[id] = -1
	
	if (ammo != 0)
		cl_nn_actual_shot[id] = true
	
	return HAM_IGNORED
}

public fw_primary_attack_post(ent)
{
	new id = get_pdata_cbase(ent, OFFSET_WEAPON_OWNER, EXTRA_OFFSET_WEAPON_LINUX)
	
	if (cl_nn_actual_shot[id] && cl_nn_has[id] == NANO_YES && cl_nn_weapon[id] != CSW_KNIFE && cl_nn_mode[id] == NANO_STREN && cl_nn_energy[id] >= get_pcvar_float(pcv_nn_critical))
	{
		new Float:push[3]
		pev(id,pev_punchangle,push)
		xs_vec_sub(push,cl_nn_punch[id],push)
		xs_vec_div_scalar(push,get_pcvar_float(pcv_nn_st_rec_att),push)
		xs_vec_add(push,cl_nn_punch[id],push)
		set_pev(id,pev_punchangle,push)
		set_nano_energy(id,cl_nn_energy[id] - get_pcvar_float(pcv_nn_st_rec_en), DELAY_STR_SHOT)
	}
	
	if (cl_nn_actual_shot[id] && cl_nn_has[id] == NANO_YES && cl_nn_mode[id] == NANO_SPEED && cl_nn_energy[id] >= get_pcvar_float(pcv_nn_critical))
	{
		new Float:multi
		multi = 1.0
		switch (cl_nn_weapon[id])
		{
			case CSW_DEAGLE,CSW_ELITE,CSW_FIVESEVEN,CSW_P228,CSW_USP,CSW_GLOCK18:
			{
				multi = REFIRE_PISTOLS
			}
			case CSW_M3:
			{
				multi = REFIRE_M3
			}
			case CSW_KNIFE:
			{
				multi = REFIRE_KNIFE
				static Float:M_Delay
				M_Delay = get_pdata_float(ent, OFFSET_WEAPON_NEXT_SEC_ATTACK, EXTRA_OFFSET_WEAPON_LINUX) * multi
				set_pdata_float(ent, OFFSET_WEAPON_NEXT_SEC_ATTACK, M_Delay,  EXTRA_OFFSET_WEAPON_LINUX)
			}
			case CSW_SCOUT,CSW_AWP:
			{
				multi = REFIRE_SNIPERS
			}
		}
		
		if (multi != 1.0)
			set_nano_energy(id, cl_nn_energy[id] - get_pcvar_float(pcv_nn_sp_fattack),DELAY_SPD_FAST_ATTACK)
		
		new	Float:Delay
		
		Delay = get_pdata_float( ent, OFFSET_WEAPON_NEXT_PRIMARY_ATTACK,  EXTRA_OFFSET_WEAPON_LINUX) * multi
		set_pdata_float( ent, OFFSET_WEAPON_NEXT_PRIMARY_ATTACK, Delay,  EXTRA_OFFSET_WEAPON_LINUX)
	}
	
	cl_nn_actual_shot[id] = false
	return HAM_IGNORED
}

public fw_secondary_attack(ent)
{
	new id = get_pdata_cbase(ent, OFFSET_WEAPON_OWNER, EXTRA_OFFSET_WEAPON_LINUX)
	
	if (cl_nn_weapon[id] == CSW_KNIFE && cl_nn_mode[id] == NANO_STREN && cl_nn_energy[id] >= get_pcvar_float(pcv_nn_st_stab) && cl_nn_has[id] == NANO_YES)
	{
		set_nano_energy(id, cl_nn_energy[id] - get_pcvar_float(pcv_nn_st_stab), DELAY_STR_STAB)
		cl_nn_st_knife[id] = KNIFE_SECOND_ATTACK
		client_cmd(id,"spk %s",sound_strength_throw)
	}
	
	if (cl_nn_mode[id] == NANO_CLOAK)
	{
		if (cl_nn_weapon[id] == CSW_KNIFE &&  get_pcvar_num(pcv_nn_cl_knife))
		{
			set_nano_energy(id,0.0,DELAY_CLK_FORCED)
			return HAM_IGNORED
		}
	}
	
	return HAM_IGNORED
}

public fw_secondary_attack_post(ent)
{
	new id = get_pdata_cbase(ent, OFFSET_WEAPON_OWNER, EXTRA_OFFSET_WEAPON_LINUX)
	
	if (cl_nn_has[id] == NANO_YES && cl_nn_mode[id] == NANO_SPEED && cl_nn_energy[id] >= get_pcvar_float(pcv_nn_critical))
	{
		new Float:multi = 1.0
		switch (cl_nn_weapon[id])
		{
			case CSW_KNIFE:
			{
				multi = REFIRE_KNIFE
				new	Float:mdelay
				mdelay = get_pdata_float( ent, OFFSET_WEAPON_NEXT_SEC_ATTACK, EXTRA_OFFSET_WEAPON_LINUX) * multi
				set_pdata_float( ent, OFFSET_WEAPON_NEXT_SEC_ATTACK, mdelay, EXTRA_OFFSET_WEAPON_LINUX)
			}
		}
		if (multi != 1.0)
			set_nano_energy(id, cl_nn_energy[id] - get_pcvar_float(pcv_nn_sp_fattack),DELAY_SPD_FAST_ATTACK)
		
		new	Float:delay
		delay = get_pdata_float( ent, OFFSET_WEAPON_NEXT_PRIMARY_ATTACK, EXTRA_OFFSET_WEAPON_LINUX) * multi
		set_pdata_float( ent, OFFSET_WEAPON_NEXT_PRIMARY_ATTACK, delay, EXTRA_OFFSET_WEAPON_LINUX)
	}
	return HAM_IGNORED
}

public fw_shotgun_deploy(ent)
{
	new id = get_pdata_cbase(ent, OFFSET_WEAPON_OWNER, EXTRA_OFFSET_WEAPON_LINUX)
	cl_nn_shotgun_ammo[id] = cs_get_weapon_ammo(ent)
}

public fw_special_reload_post(ent)
{
	new id = get_pdata_cbase(ent, OFFSET_WEAPON_OWNER, EXTRA_OFFSET_WEAPON_LINUX)
	
	new wpn_id	= cs_get_weapon_id(ent)
	new maxammo = wpn_max_clip[wpn_id]
	new curammo = cs_get_weapon_ammo(ent)
	
	if (cl_nn_shotgun_ammo[id] == -1)
	{
		cl_nn_shotgun_ammo[id] = curammo
		return HAM_IGNORED
	}
	else
	{
		if (!(cl_nn_has[id] == NANO_YES && cl_nn_mode[id] == NANO_SPEED && cl_nn_energy[id] >= get_pcvar_float(pcv_nn_critical)))
		{
			cl_nn_shotgun_ammo[id] = curammo
			return HAM_IGNORED
		}
		
		if (curammo < cl_nn_shotgun_ammo[id])
			cl_nn_shotgun_ammo[id] = curammo
		
		if (curammo - cl_nn_shotgun_ammo[id] == SH_CARTRAGE_RATIO && cs_get_user_bpammo(id, wpn_id) && curammo + 1 <= maxammo)
		{
			cs_set_weapon_ammo(ent, curammo + 1)
			cs_set_user_bpammo(id, wpn_id, cs_get_user_bpammo(id, wpn_id) - 1)
			cl_nn_shotgun_ammo[id] = curammo + 1
			
			set_nano_energy(id, cl_nn_energy[id] - get_pcvar_float(pcv_nn_sp_fatshre), DELAY_SPD_SH_RELOAD)
			
			// Update hud weapon info, emessage to be blocked if needed
			emessage_begin(MSG_ONE, nd_msg_ammox, {0,0,0}, id)
			ewrite_byte(SH_AMMO_MSG_AMMOID)
			ewrite_byte(curammo + 1)
			emessage_end()
			
		}
	}
	
	return HAM_IGNORED
	
}

public fw_reload_post(ent)
{
	if(get_pdata_int(ent, OFFSET_WEAPON_IN_RELOAD, EXTRA_OFFSET_WEAPON_LINUX))
	{
		new id = get_pdata_cbase(ent, OFFSET_WEAPON_OWNER, EXTRA_OFFSET_WEAPON_LINUX)
		
		cl_nn_shotgun_ammo[id] = -1
		
		if (cl_nn_has[id] == NANO_YES && cl_nn_mode[id] == NANO_SPEED && cl_nn_energy[id] >= get_pcvar_float(pcv_nn_critical))
		{
			new Float:delay = wpn_reload_delay[get_pdata_int(ent, OFFSET_WEAPON_ID, EXTRA_OFFSET_WEAPON_LINUX)] * RELOAD_RATIO
			
			set_pdata_float(id, OFFSET_PLAYER_NEXT_ATTACK, delay, EXTRA_OFFSET_PLAYER_LINUX)
			set_pdata_float(ent, OFFSET_WEAPON_IDLE_TIME, delay + 0.5, EXTRA_OFFSET_WEAPON_LINUX)
			
			set_nano_energy(id,cl_nn_energy[id] - get_pcvar_float(pcv_nn_sp_reload),DELAY_SPD_FAST_RELOAD)
		}
	}
	
	return HAM_IGNORED
}

public fw_spawn(id)
{
	if (is_user_alive(id))
	{
		msg_shadowidx(id,SHADOW_CREATE)
		nanosuit_reset(id,true)
		cl_nn_zombie[id] = false
		
		if (cl_nn_has[id] == NANO_NO && !cl_is_bot[id] && (get_pcvar_num(pcv_nn_team) == _:cs_get_user_team(id) || get_pcvar_num(pcv_nn_team) != 3) && get_pcvar_num(pcv_nn_price) <= 0)
		{
			if (!zp_get_user_zombie(id))
			{
				cl_nn_has[id] = NANO_YES
				nanosuit_reset(id,true)
			}
		}
		
		if (cl_is_bot[id] && get_pcvar_num(pcv_nn_price) > 0 && get_pcvar_num(pcv_nn_bot) && get_pcvar_num(pcv_nn_bot_buy))
			nanosuit_buy(id)
	}
	
	return HAM_IGNORED
}

public fw_killed(id,attacker,gib)
{
	if (cl_nn_has[id] == NANO_YES)
	{
		msg_statusicon(id,ICON_REMOVE,NanoStatusIcon[cl_nn_mode[id]],NanoScreenColor[cl_nn_mode[id]])
		#if defined USE_WEAPON_STATUSICONS
		msg_statusicon(id,ICON_REMOVE,wpn_ms_icon[cl_nn_weapon[id]],{0,255,0})
		#endif
	}
	
	return HAM_IGNORED
}

public fw_traceattack(victim, attacker, Float:damage, Float:direction[3], tr, damagebits)
{
	new hitzone
	hitzone = get_tr2(tr,TR_iHitgroup)
	damage *= vec_hit_multi[hitzone]
	new Float:origin[3]
	pev(attacker,pev_origin,origin)
	new use_strength
	use_strength = 0
	
	if (is_user_player(attacker))
	{
		// Strength Mode
		if (get_pcvar_num(pcv_nn_ff))
		{
			if (cs_get_user_team(victim) == cs_get_user_team(attacker))
			{
				damage /= 2.0
				use_strength = 2
			}
			else
			{
				use_strength = 1
			}
		}
		else
		{
			if (cs_get_user_team(victim) == cs_get_user_team(attacker))
			{
				if (get_pcvar_num(pcv_nn_st_can_th))
					use_strength = 1
			}
			else
			{
				use_strength = 1
			}
		}
		
		if (use_strength && cl_nn_has[attacker] == NANO_YES && cl_nn_mode[attacker] == NANO_STREN && CSW_KNIFE == cl_nn_weapon[attacker])
		{
			damage *= 4.0
			
			if (cl_nn_st_knife[attacker] == KNIFE_FIRST_ATTACK)
			{
				new Float:origin[3], Float:origin2[3], Float:throw[3], Float:aimvel[3]
				
				// Get the origin of attacker and victim
				pev(victim,pev_origin,origin)
				pev(attacker,pev_origin,origin2)
				velocity_by_aim(attacker,2,aimvel)
				
				// We need to make a vector between them and we multiply it's value so we can make it powerfull
				xs_vec_sub(origin,origin2,throw)
				xs_vec_div_scalar(throw,xs_vec_len(throw),throw)
				xs_vec_add(throw,aimvel,throw)
				xs_vec_div_scalar(throw,xs_vec_len(throw),throw)
				throw[2] += 0.6
				xs_vec_mul_scalar(throw,get_pcvar_float(pcv_nn_st_throw),throw)
				
				// We add it to the velocity so we can make it a throw
				set_pev(victim,pev_velocity,throw)
				
				// We block the speed of the player so he can't influence the direction of the throw (too much :P)
				set_user_maxspeed(victim, 1.0)
				cl_is_thrown[victim] = attacker
				set_pev(victim,pev_flags,pev(victim,pev_flags) & ~FL_ONGROUND)
			}
			
			cl_nn_st_knife[attacker] = KNIFE_NOT
		}
	}
	
	// Armor Mode
	if ((!is_user_player(attacker)) || (get_pcvar_num(pcv_nn_ff) || ((!get_pcvar_num(pcv_nn_ff) && cs_get_user_team(victim) != cs_get_user_team(attacker)))))
	{
		if ((get_tr2(tr,TR_iHitgroup) != 8) && cl_nn_has[victim] == NANO_YES && cl_nn_mode[victim] == NANO_ARMOR)
		{
			damage *= get_pcvar_float(pcv_nn_ar_damage)
			
			if (damage < cl_nn_energy[victim])
			{
				set_nano_energy(victim, cl_nn_energy[victim] - damage, DELAY_ARM_DAMAGE)
				set_tr2(tr,TR_iHitgroup,8)
				static Float:vec_end_pos[3]
				get_tr2(tr,TR_vecEndPos,vec_end_pos)
				
				if (hitzone != HIT_GENERIC)
					draw_spark(vec_end_pos)
				
				
				if (random(2) > 0)
				{
					engfunc(EngFunc_EmitSound,victim,CHAN_AUTO,sound_ric_metal1, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)	
				}
				else
				{
					engfunc(EngFunc_EmitSound,victim,CHAN_AUTO,sound_ric_metal2, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)	
				}
				
				set_pev(victim,pev_dmg_inflictor,attacker)
				emsg_damage(victim,0,floatround(damage),damagebits,origin)
				damage = 0.0
			}
			else
			{
				damage -= cl_nn_energy[victim]
				set_nano_energy(victim, 0.0, DELAY_ARM_DAMAGE)
			}
		}
	}
	
	if (use_strength == 2)
		damage *= 2.0
	
	if (hitzone != 8 && damage != 0.0)
		damage /= vec_hit_multi[hitzone]
	
	SetHamParamTraceResult(5,tr)
	SetHamParamFloat(3,damage)
	return HAM_HANDLED
}


public fw_takedamage(victim, inflictor, attacker, Float:damage, damagebits)
{
	new Float:origin[3]
	pev(inflictor,pev_origin,origin)
	
	if (damagebits == DMG_FALL && cl_is_thrown[victim])
	{
		damage *= DMG_FALL_MULTIPLY
		attacker = cl_is_thrown[victim]
		SetHamParamEntity(3, attacker)
	}

	// Armor Mode
	if (((!(inflictor == attacker) || (attacker == victim)) || !is_user_player(attacker)) && cl_nn_has[victim] == NANO_YES && cl_nn_mode[victim] == NANO_ARMOR && ((get_pcvar_num(pcv_nn_ff)) || ((!get_pcvar_num(pcv_nn_ff) && (!is_user_player(attacker) || cs_get_user_team(victim) != cs_get_user_team(attacker) || attacker == victim)))))
	{
		damage *= get_pcvar_float(pcv_nn_ar_damage)
		
		if (damage < cl_nn_energy[victim])
		{
			set_nano_energy(victim, cl_nn_energy[victim] - damage, DELAY_ARM_DAMAGE)
			set_pev(victim,pev_dmg_inflictor,inflictor)
			emsg_damage(victim,0,floatround(damage),damagebits,origin)
			damage = 0.0
		}
		else
		{
			damage -= cl_nn_energy[victim]
			set_nano_energy(victim, 0.0, DELAY_ARM_DAMAGE)
		}
	}

	if (cl_nn_has[attacker] == NANO_YES && cl_nn_mode[attacker] == NANO_STREN)
	{
				if (cl_nn_energy[attacker] < 100)
						damage *= 2.0


				if (cl_nn_energy[attacker] < 12)
						damage *= 1.0
	}
	
	SetHamParamFloat(4,damage)
	return HAM_HANDLED
}

public fw_takedamage_post(victim, inflictor, attacker, Float:damage, damagebits)
{
	if (cl_nn_has[victim] == NANO_YES && cl_nn_mode[victim] == NANO_ARMOR)
	{
		new Float: painshock = get_pdata_float(victim, OFFSET_PLAYER_PAIN_SHOCK, EXTRA_OFFSET_PLAYER_LINUX)
		
		if (painshock == 1.0)
			return HAM_IGNORED
		
		painshock = (1.0 - ((1.0 - painshock) * PAIN_SHOCK_ATTENUATION))
		
		set_pdata_float(victim, OFFSET_PLAYER_PAIN_SHOCK, painshock, EXTRA_OFFSET_PLAYER_LINUX)
	}

	return HAM_IGNORED
}

public fw_bomb_planting(ent)
{
	new planter
	planter = get_pdata_cbase(ent, OFFSET_WEAPON_OWNER, EXTRA_OFFSET_WEAPON_LINUX)
	
	if (cl_nn_has[planter] == NANO_YES && cl_nn_mode[planter] == NANO_CLOAK && get_pcvar_num(pcv_nn_cl_c4))
	{
		set_nano_energy(planter,0.0,DELAY_CLK_FORCED)
	}
	
	return HAM_IGNORED
}

public fw_bomb_defusing(ent, caller, activator, use_type, Float:value)
{
	if (cl_nn_has[caller] == NANO_YES && cl_nn_mode[caller] == NANO_CLOAK && get_pcvar_num(pcv_nn_cl_c4) && cs_get_user_team(caller) == CS_TEAM_CT)
	{
		set_nano_energy(caller,0.0,DELAY_CLK_FORCED)
	}
	
	return HAM_IGNORED
}

/* ===================================================
[Screen think of all players]
==================================================== */
public fw_screenthink(ent)
{
	if (!pev_valid(ent))
		return FMRES_IGNORED
	
	if (ent != nd_ent_monitor)
		return FMRES_IGNORED
	
	new players[32], count, id
	new Float:energy
	energy = get_pcvar_float(pcv_nn_energy)
	
	get_players(players, count, "ac")
	
	for (new i=0;i<count;i++)
	{
		id = players[i]
		
		if (cl_nn_has[id] == NANO_YES && ((cl_nn_lowres[id] && cl_nn_counter[id] == 0) || !cl_nn_lowres[id]))
		{
			// Current Mode
			static hud[200]
			
			formatex(hud, 199, "%L",id,"NANO_MODE")
			
			switch (cl_nn_mode[id])
			{
				case NANO_STREN: formatex(hud, 199, "%s %L ^n",hud,id,"NANO_ST_MODE")
				case NANO_ARMOR: formatex(hud, 199, "%s %L ^n",hud,id,"NANO_A_MODE")
				case NANO_SPEED: formatex(hud, 199, "%s %L ^n",hud,id,"NANO_S_MODE")
				case NANO_CLOAK: formatex(hud, 199, "%s %L ^n",hud,id,"NANO_C_MODE")
			}
			
			formatex(hud, 199, "%L",id,"NANO_ENERGY", hud, floatround(cl_nn_energy[id] / energy * 100))
			
			for (new x = 0; x < floatround(cl_nn_energy[id] / energy * 20); x++)
				formatex(hud, 199, "%s|", hud)
			
			formatex(hud, 199, "%s^n^n", hud)
			
			// Health, Armor, Speed
			formatex(hud, 199, "%L",id,"NANO_POINTS", hud, get_user_health(id), get_user_armor(id))
			
			switch (cl_nn_scr_speed[id])
			{
				case SPD_SCR_STILL:  formatex(hud, 199, "%L",id,"NANO_SPD_ST", hud)
				case SPD_SCR_VSLOW:  formatex(hud, 199, "%L",id,"NANO_SPD_VS", hud)
				case SPD_SCR_SLOW:   formatex(hud, 199, "%L",id,"NANO_SPD_SL", hud)
				case SPD_SCR_NORMAL: formatex(hud, 199, "%L",id,"NANO_SPD_NO", hud)
				case SPD_SCR_FAST:   formatex(hud, 199, "%L",id,"NANO_SPD_FA", hud)
			}
			
			if (!cl_nn_lowres[id])
			{
				set_hudmessage(NanoScreenColor[cl_nn_mode[id]][0], NanoScreenColor[cl_nn_mode[id]][1], NanoScreenColor[cl_nn_mode[id]][2], 0.02, 0.70, 0, 0.0, 0.2, 0.0, 0.0)
				ShowSyncHudMsg(id, nd_hud_sync, "%s", hud)
			}
			else
			{
				set_hudmessage(NanoScreenColor[cl_nn_mode[id]][0], NanoScreenColor[cl_nn_mode[id]][1], NanoScreenColor[cl_nn_mode[id]][2], 0.02, 0.70, 0, 0.0, (0.2 + (0.1 * float(NANO_LOW_RES))), 0.0, 0.0)
				ShowSyncHudMsg(id, nd_hud_sync, "%s", hud)
			}
		}
		
		if (cl_nn_counter[id] > 0)
			cl_nn_counter[id] -= 1
		else
			cl_nn_counter[id] = NANO_LOW_RES
	}
	
	set_pev(ent, pev_nextthink, get_gametime() + 0.1)
	
	return FMRES_IGNORED
}

/* ===================================================
[Energy manipulation task]
==================================================== */
public set_energy(id)
{
	id -= TASK_ENERGY
	
	if (!(cl_nn_has[id] == NANO_YES))
	{
		remove_task(id + TASK_ENERGY)
		return PLUGIN_CONTINUE
	}
	
	if (!is_user_alive(id))
	{
		return PLUGIN_CONTINUE
	}
	
	new NanoModes:active = cl_nn_mode[id]
	new Float:energy = cl_nn_energy[id]
	
	// Decrease when player is running in speed mode
	if (active == NANO_SPEED && pev(id,pev_flags) & ON_LAND_CONST)
	{
		new Float:multi
		
		switch (cl_nn_sp_status[id])
		{
			case SPEED_NORMAL:
			{
				switch (cl_nn_speed[id])
				{
					case SPD_STILL: multi = 0.0
					case SPD_VSLOW: multi = 0.0
					case SPD_SLOW: multi = 0.0
					case SPD_NORMAL: multi = 1.0
					case SPD_FAST: multi = 1.0
				}
				
				energy -= (0.1) * multi
			}
			case SPEED_CRITICAL:
			{
				switch (cl_nn_speed[id])
				{
					case SPD_STILL: multi = 0.0
					case SPD_VSLOW: multi = 0.0
					case SPD_SLOW: multi = 0.0
					case SPD_NORMAL: multi = 0.0
					case SPD_FAST: multi = 1.0
				}
				
				energy -= (0.2) * multi
			}
			case SPEED_MAXIMUM:
			{
				switch (cl_nn_speed[id])
				{
					case SPD_STILL: multi = 0.0
					case SPD_VSLOW: multi = 0.0
					case SPD_SLOW: multi = 0.0
					case SPD_NORMAL: multi = 0.0
					case SPD_FAST:
					{
						multi = 1.0
						client_cmd(id, "speak %s", sound_speed_run)
					}
				}
				
				energy -= get_pcvar_float(pcv_nn_sp_energy) * multi
			}
		}
		
		if (multi != 0.0)
			cl_nn_block_recharge[id] = DELAY_SPD_RUN + 1
	}
	
	// Decrease in cloak mode
	if (active == NANO_CLOAK)
	{		
		static Float:multi = 1.0
		
		switch (cl_nn_speed[id])
		{
			case SPD_STILL: multi = 0.1
			case SPD_VSLOW: multi = 0.2
			case SPD_SLOW: multi = 0.5
			case SPD_NORMAL: multi = 1.0
			case SPD_FAST: multi = 1.4
		}
		
		energy -= get_pcvar_float(pcv_nn_cl_energy) * multi
	}
	
	if (energy < get_pcvar_num(pcv_nn_critical) && !cl_nn_critical[id])
	{
		cl_nn_critical[id] = true
		cl_nn_online[id] = true
		
		if (!cl_is_bot[id])
		{
			client_cmd(id, "spk %s", sound_energy)
			client_print(id, print_center, "%L", id, "NANO_CRITIC")
		}
	}

	if (energy >= 100 && cl_nn_online[id])
	{	
		if (!cl_is_bot[id])
		{
			client_cmd(id, "spk %s", sound_online)
			client_print(id, print_center, "-= All systems Online =-")
			cl_nn_online[id] = false
		}
	}
	
	if (energy <= 0.0)
	{
		if (active == NANO_CLOAK)
		{
			cl_nn_block_recharge[id] = DELAY_CLK_DELAY
			set_nano_mode(id,NANO_ARMOR)
			#if defined REMOVE_VIEWMODEL_ON_CLOAK
			if (!cl_is_bot[id])
			{
				if (cs_get_user_shield(id) && (WEAPONS_WITH_SHIELD_BITSUM & 1<<cl_nn_weapon[id]))
				{
					set_pev(id,pev_viewmodel2,wpn_v_shield_model[cl_nn_weapon[id]])
				}
				else
					set_pev(id,pev_viewmodel2,wpn_v_model[cl_nn_weapon[id]])
			}
			#endif
		}
		
		energy = 0.0
	}
	
	// Increase but not when in cloak mode
	if (energy < get_pcvar_float(pcv_nn_energy) && cl_nn_mode[id] != NANO_CLOAK && cl_nn_block_recharge[id] == 0)
	{
		static Float:energy2
		energy2 = get_pcvar_float(pcv_nn_regenerate)
		
		if (pev(id,pev_button) & IN_DUCK && cl_nn_speed[id] == SPD_STILL)
			energy2 *= ENERGY_CROUCH
		
		energy2 += energy
		
		// Useful to block the moment when a player energy is bigger than the maximum energy
		energy = floatmin(get_pcvar_float(pcv_nn_energy), energy2)
		
		if (energy > get_pcvar_float(pcv_nn_critical) + CRITICAL_EXTRA_ADD)
			cl_nn_critical[id] = false
	}
	// dare
	if (cl_nn_has[id] == NANO_YES && cl_nn_mode[id] == NANO_CLOAK)
	{
		message_begin(MSG_ONE, g_msgScreenFade, _, id)
		write_short((1<<12)*2) // duration
		write_short(0) // hold time
		write_short(0x0000) // fade type
		write_byte(200) // r
		write_byte(200) // g
		write_byte(200) // b
		write_byte(70) // nvg Alpha
		message_end()
	}

	
	if (cl_nn_block_recharge[id] > 0)
		cl_nn_block_recharge[id] -= 1
	
	cl_nn_energy[id] = energy
	
	return PLUGIN_CONTINUE
}

/* ===================================================
[Armor and HitPoints nano recharge]
==================================================== */
public nanosuit_ah_charge(id)
{
	id -= TASK_AH_REC
	
	if (!(cl_nn_has[id] == NANO_YES))
	{
		remove_task(id + TASK_AH_REC)
		return PLUGIN_CONTINUE
	}
	
	if (!is_user_alive(id))
	{
		return PLUGIN_CONTINUE
	}
	
	static Float:health
	pev(id,pev_health,health)
	
	if (floatround(health,floatround_floor) < get_pcvar_num(pcv_nn_health) && cl_nn_block_recharge[id] == 0)
		set_user_health(id, min(get_pcvar_num(pcv_nn_health), get_user_health(id) + get_pcvar_num(pcv_nn_hp_charge)))
	
	return PLUGIN_CONTINUE
}

/* ===================================================
[Nanosuit prethink functions]
==================================================== */
public nanosuit_functions(id)
{
	if (cl_nn_mode[id] == NANO_SPEED)
	{
		if (cl_nn_energy[id] > get_pcvar_float(pcv_nn_critical))
		{
			if (cl_nn_sp_status[id] == SPEED_NORMAL)
			{
				set_user_maxspeed(id,get_user_maxspeed(id) * get_pcvar_float(pcv_nn_sp_maxim))
			}
			if (cl_nn_sp_status[id] == SPEED_CRITICAL)
			{
				set_user_maxspeed(id,get_user_maxspeed(id) * get_pcvar_float(pcv_nn_sp_maxim) / get_pcvar_float(pcv_nn_sp_critic))
			}
			
			cl_nn_sp_status[id] = SPEED_MAXIMUM
		}
		if (get_pcvar_float(pcv_nn_critical) >= cl_nn_energy[id] > 0)
		{
			if (cl_nn_sp_status[id] == SPEED_NORMAL)
			{
				set_user_maxspeed(id,get_user_maxspeed(id) * get_pcvar_float(pcv_nn_sp_critic))
			}
			if (cl_nn_sp_status[id] == SPEED_MAXIMUM)
			{
				set_user_maxspeed(id,get_user_maxspeed(id) * get_pcvar_float(pcv_nn_sp_critic) / get_pcvar_float(pcv_nn_sp_maxim))
			}
			
			cl_nn_sp_status[id] = SPEED_CRITICAL
		}
		if (0 >= cl_nn_energy[id])
		{
			if (cl_nn_sp_status[id] == SPEED_MAXIMUM)
			{
				set_user_maxspeed(id,get_user_maxspeed(id) / get_pcvar_float(pcv_nn_sp_maxim))
			}
			if (cl_nn_sp_status[id] == SPEED_CRITICAL)
			{
				set_user_maxspeed(id,get_user_maxspeed(id) / get_pcvar_float(pcv_nn_sp_critic))
			}
			
			cl_nn_sp_status[id] = SPEED_NORMAL
		}
		
		return
	}
	
	if (cl_nn_mode[id] == NANO_STREN)
		set_pev(id, pev_fuser2, 0.0)
	
	if (!is_glowing_in_nano(id))
	{
		set_nano_glow(id)
	}
	
	return
}

/* ===================================================
[Bot think task, allows bots to use the nano functions]
==================================================== */
public nanosuit_bot_think(id)
{
	id -= TASK_AI
	
	if (!is_user_alive(id))
		return PLUGIN_CONTINUE
	
	if (!cl_is_bot[id])
	{
		remove_task(id + TASK_AI)
		return PLUGIN_CONTINUE
	}
	
	new Float:health
	pev(id,pev_health,health)
	
	if (health < 60.0)
	{
		nanosuit_menu_choose(id,0,_:NANO_ARMOR)
		return PLUGIN_CONTINUE
	}
	
	new hit = -1
	new Float:origin[3]
	pev(id,pev_origin,origin)
	new Float:velocity[3]
	pev(id,pev_velocity,velocity)
	vector_length(velocity)
	
	if (cl_nn_energy[id] > get_pcvar_float(pcv_nn_critical) && floatround(vector_length(velocity)) <= 20)
	{
		nanosuit_menu_choose(id,0,_:NANO_CLOAK)
		return PLUGIN_CONTINUE
	}
	
	if (cl_nn_weapon[id] == CSW_KNIFE)
	{	
		while ((hit = engfunc(EngFunc_FindEntityInSphere, hit, origin, 350.0)))
		{
			if (!is_user_alive(hit))
				continue
			
			if ((get_pcvar_num(pcv_nn_ff)) || (!get_pcvar_num(pcv_nn_ff) && cs_get_user_team(id) != cs_get_user_team(hit)))
			{
				nanosuit_menu_choose(id,0,_:NANO_STREN)
				break
			}
		}
	}
	else
	{
		if (random_num(0,100) <= 40)
			nanosuit_menu_choose(id,0,_:NANO_SPEED)
		else
			nanosuit_menu_choose(id,0,_:NANO_ARMOR)
	}
	
	return PLUGIN_CONTINUE
}

/* ===================================================
[Zombie Functons and Forwards]
==================================================== */
public event_infect(victim, attacker)
{
	cl_nn_zombie[victim] = true
	cl_nn_had[victim] = cl_nn_has[victim]
	cl_nn_has[victim] = NANO_NO
	nanosuit_reset(victim)
	
	return PLUGIN_CONTINUE
}

public zp_user_infected_post(victim, attacker)
{
	cl_nn_had[victim] = cl_nn_has[victim]
	cl_nn_has[victim] = NANO_NO
	nanosuit_reset(victim)
	
	return PLUGIN_CONTINUE
}


public zp_user_humanized_post(id, survivor)
{
	if (!get_pcvar_num(pcv_zm_regive))
		return PLUGIN_CONTINUE
	
	if (cl_nn_had[id] == NANO_YES)
	{
		cl_nn_has[id] = NANO_YES
		nanosuit_reset(id)
	}

	if (zp_get_user_survivor(id))
	{
		cl_nn_had[id] = NANO_NO
		cl_nn_has[id] = NANO_NO
		nanosuit_reset(id)
	}
	
	return PLUGIN_CONTINUE
}

/* ===================================================
[Functions that come in handy]
==================================================== */
set_nano_mode(id, NanoModes:mode, bool:announce = true)
{
	if (cl_nn_mode[id] == mode)
		return
	
	if (cl_nn_mode[id] == NANO_CLOAK)
	{
		#if defined REMOVE_VIEWMODEL_ON_CLOAK
		if (!cl_is_bot[id])
		{
			if (cs_get_user_shield(id) && (WEAPONS_WITH_SHIELD_BITSUM & 1<<cl_nn_weapon[id]))
			{
				set_pev(id,pev_viewmodel2,wpn_v_shield_model[cl_nn_weapon[id]])
			}
			else
				set_pev(id,pev_viewmodel2,wpn_v_model[cl_nn_weapon[id]])
		}
		#endif
		#if defined USE_WEAPON_STATUSICONS
		msg_statusicon(id,ICON_REMOVE,wpn_ms_icon[cl_nn_weapon[id]],{0,0,0})
		#endif
		
		msg_shadowidx(id,SHADOW_CREATE)
	}
	if (mode == NANO_CLOAK)
	{
		msg_shadowidx(id,SHADOW_REMOVE)
	}
	
	msg_statusicon(id,ICON_REMOVE,NanoStatusIcon[cl_nn_mode[id]],{0,0,0})
	msg_statusicon(id,ICON_SHOW,NanoStatusIcon[mode],NanoScreenColor[mode])
	
	cl_nn_mode[id] = mode
	
	set_nano_glow(id)
	
	if (!cl_is_bot[id] && announce)
	{
		switch (mode)
		{
			case NANO_ARMOR:
			{
				client_cmd(id, "spk %s", sound_switch_armor)
				client_cmd(id, "spk %s", sound_armor)
				client_print(id, print_center, "%L", id, "NANO_ARM")
				client_cmd(id,"cl_sidespeed 400")
				client_cmd(id,"cl_forwardspeed 400")
				client_cmd(id,"cl_backspeed 400")

				message_begin(MSG_ONE, g_msgScreenFade, _, id)
				write_short( 1<<10 )
				write_short( 1<<10 )
				write_short( 1<<12 )
				write_byte(21) // r
				write_byte(69) // g
				write_byte(234) // b
				write_byte(50) // Alpha
				message_end()
			}
			case NANO_STREN:
			{
				client_cmd(id, "spk %s", sound_switch_strength)
				client_cmd(id, "spk %s", sound_strengh)
				client_print(id, print_center, "%L", id, "NANO_STR")
				client_cmd(id,"cl_sidespeed 400")
				client_cmd(id,"cl_forwardspeed 400")
				client_cmd(id,"cl_backspeed 400")

				message_begin(MSG_ONE_UNRELIABLE, g_msgScreenFade, _, id)
				write_short( 1<<10 )
				write_short( 1<<10 )
				write_short( 1<<12 )
				write_byte(182) // r
				write_byte(10) // g
				write_byte(22) // b
				write_byte(50) // Alpha
				message_end()
			}
			case NANO_SPEED:
			{
				client_cmd(id, "spk %s", sound_switch_speed)
				client_cmd(id, "spk %s", sound_speed)
				client_print(id, print_center, "%L", id, "NANO_SPD")
				client_cmd(id,"cl_sidespeed 900")
				client_cmd(id,"cl_forwardspeed 900")
				client_cmd(id,"cl_backspeed 900")

				message_begin(MSG_ONE_UNRELIABLE, g_msgScreenFade, _, id)
				write_short( 1<<10 )
				write_short( 1<<10 )
				write_short( 1<<12 )
				write_byte(217) // r
				write_byte(226) // g
				write_byte(24) // b
				write_byte(50) // Alpha
				message_end()
			}
			case NANO_CLOAK:
			{
				#if defined REMOVE_VIEWMODEL_ON_CLOAK
				set_pev(id,pev_viewmodel2,"")
				#endif
				#if defined USE_WEAPON_STATUSICONS
				msg_statusicon(id,ICON_SHOW,wpn_ms_icon[cl_nn_weapon[id]],{0,255,0})
				#endif
				client_cmd(id, "spk %s", sound_switch_cloak)
				client_cmd(id, "spk %s", sound_cloak)
				client_print(id, print_center, "%L", id, "NANO_CLO")
				client_cmd(id,"cl_sidespeed 400")
				client_cmd(id,"cl_forwardspeed 400")
				client_cmd(id,"cl_backspeed 400")
			}
		}
	}
}

set_nano_energy(id, Float:ammount, delay = 0)
{
	cl_nn_energy[id] = ammount
	if (delay > cl_nn_block_recharge[id])
		cl_nn_block_recharge[id] = delay
	if (ammount == 0.0 && cl_nn_mode[id] == NANO_CLOAK)
	{
		set_nano_mode(id,NANO_ARMOR)
	}
	
	return 1
}

nanosuit_reset(id, bool:affect_user_properties = false)
{
	if (cl_nn_has[id] == NANO_YES)
	{
		if (glb_use_new_models)
		{
				client_cmd(id, "0")
		}
		
		set_nano_glow(id)
		
		if (affect_user_properties)
		{
			if (!zp_get_user_zombie(id))
			{
			cl_nn_energy[id] = get_pcvar_float(pcv_nn_energy)
			set_user_health(id, get_pcvar_num(pcv_nn_health))
			if (get_pcvar_num(pcv_nn_night))
				cs_set_user_nvg(id,1)
			}
			
			if (cl_nn_mode[id] == NANO_SPEED)
			{
				switch (cl_nn_sp_status[id])
				{
					case SPEED_MAXIMUM: set_user_maxspeed(id,get_user_maxspeed(id) * get_pcvar_float(pcv_nn_sp_maxim))
					case SPEED_CRITICAL: set_user_maxspeed(id,get_user_maxspeed(id) * get_pcvar_float(pcv_nn_sp_critic))
				}
			}
		}
		
		if (task_exists(id + TASK_ENERGY))
			remove_task(id + TASK_ENERGY)
		
		if (task_exists(id + TASK_AH_REC))
			remove_task(id + TASK_AH_REC)
		
		if (task_exists(id + TASK_AI))
			remove_task(id + TASK_AI)
		
		msg_statusicon(id,ICON_SHOW,NanoStatusIcon[cl_nn_mode[id]],NanoScreenColor[cl_nn_mode[id]])
		
		set_task(0.1,"set_energy",id + TASK_ENERGY, _, _,"b", 0)
		set_task(1.0,"nanosuit_ah_charge",id + TASK_AH_REC, _, _,"b", 0)
		
		if (cl_is_bot[id])
		{
			set_task(2.0,"nanosuit_bot_think",id + TASK_AI, _, _,"b", 0)
		}
	}
	else
	{
		if (cl_update_model[id])
		{
			fm_set_user_model(id,cl_player_model[id])
			cl_update_model[id] = false
		}
		else
		{
			fm_reset_user_model(id)
		}
		
		if (cl_nn_mode[id] == NANO_SPEED)
		{
			switch (cl_nn_sp_status[id])
			{
				case SPEED_MAXIMUM: set_user_maxspeed(id,get_user_maxspeed(id) / get_pcvar_float(pcv_nn_sp_maxim))
				case SPEED_CRITICAL: set_user_maxspeed(id,get_user_maxspeed(id) / get_pcvar_float(pcv_nn_sp_critic))
			}
		}
		
		if (task_exists(id + TASK_ENERGY))
			remove_task(id + TASK_ENERGY)
		
		if (task_exists(id + TASK_AH_REC))
			remove_task(id + TASK_AH_REC)
		
		if (task_exists(id + TASK_AI))
			remove_task(id + TASK_AI)
	}
}

/* ===================================================
[Message stocks]
==================================================== */
stock draw_spark(const Float:origin[3])
{
	static o[3]
	o[0] = floatround(origin[0])
	o[1] = floatround(origin[1])
	o[2] = floatround(origin[2])
	emessage_begin(MSG_PVS, SVC_TEMPENTITY, o, 0)
	ewrite_byte(TE_SPARKS)
	ewrite_coord(o[0])
	ewrite_coord(o[1])
	ewrite_coord(o[2])
	emessage_end()	
}

stock emsg_damage(player,dmg_save,dmg_take,dmg_type,Float:origin[3])
{
	set_pev(player,pev_dmg_save,float(dmg_save))
	set_pev(player,pev_dmg_take,float(dmg_take))
	emessage_begin(MSG_ONE, nd_msg_damage, {0,0,0}, player)
	ewrite_byte(dmg_save)
	ewrite_byte(dmg_take)
	ewrite_long(dmg_type)
	ewrite_coord(floatround(origin[0]))
	ewrite_coord(floatround(origin[1]))
	ewrite_coord(floatround(origin[2]))
	emessage_end()
}

stock colored_msg(id,msg[])
{
	message_begin(MSG_ONE, nd_msg_saytext, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}

stock msg_statusicon(id,IconStatus:mode,icon[],color[3])
{
	if (cl_is_bot[id] || (cl_nn_lowres[id] && mode != ICON_REMOVE))
		return
	
	new msg_type
	if (mode == ICON_REMOVE)
		msg_type = MSG_ONE
	else
	msg_type = MSG_ONE_UNRELIABLE
	
	message_begin(msg_type, nd_msg_iconstatus, {0,0,0}, id)
	write_byte(_:mode)
	write_string(icon)
	write_byte(color[0])
	write_byte(color[1])
	write_byte(color[2])
	message_end()
	
	return
}

stock msg_shadowidx(id, ShadowIdX:long)
{
	if ((cl_removed_shadow[id] && long == SHADOW_REMOVE) || (!cl_removed_shadow[id] && long == SHADOW_CREATE))
	{
		return
	}
	
	if (long == SHADOW_REMOVE)
		cl_removed_shadow[id] = true
	else
		cl_removed_shadow[id] = false
	
	message_begin(MSG_ONE, nd_msg_shadowidx, {0,0,0}, id)
	write_long(_:long)
	message_end()
}

bool:is_glowing_in_nano(id)
{
	if (pev(id, pev_renderfx) != NanoGlowFX[cl_nn_mode[id]])
		return false
	
	if (pev(id, pev_rendermode) != NanoGlowMode[cl_nn_mode[id]])
		return false
	
	static Float:ammount
	pev(id, pev_renderamt, ammount)
	
	if (floatround(ammount) != NanoGlowAmmount[cl_nn_mode[id]])
		return false
	
	return true
}

/* ===================================================
[Set model stocks]
==================================================== */
stock fm_get_user_model(player, model[], len)
{
	// Retrieve current model
	engfunc(EngFunc_InfoKeyValue, engfunc(EngFunc_GetInfoKeyBuffer, player), "model", model, len)
}

stock fm_reset_user_model(player)
{
	dllfunc(DLLFunc_ClientUserInfoChanged, player, engfunc(EngFunc_GetInfoKeyBuffer, player))
}

public fm_set_user_model(player,const model[])
{
	// Set new model
	engfunc(EngFunc_SetClientKeyValue, player, engfunc( EngFunc_GetInfoKeyBuffer, player ), "model", model)
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1026\\ f0\\ fs16 \n\\ par }
*/

Потребителски аватар

exdead95
Foreigner
Foreigner
Мнения: 3
Регистриран: 06 юли 2019, 00:12
Се отблагодари: 2 пъти

ZP 4.3 + Nanosuit & More - Цялостен мод

Мнение от exdead95 » 06 юли 2019, 15:37

FATAL ERROR (shutting down): Mod_NumForName: sprites/flame.spr not found

Добавено преди 27 минути 20 секунди:
sorry found a man who helped figure it out
Fashion awesome! almost the one that I played 9 years ago!
If the author has an eath wallet for donat, then let me thank

Добавено преди 10 минути 32 секунди:
ETH wallet*

Потребителски аватар

Автор на темата
LayerFort DJBosma
Потребител
Потребител
Мнения: 86
Регистриран: 25 дек 2018, 04:14
Местоположение: Alkmaar
Се отблагодари: 2 пъти
Получена благодарност: 3 пъти
Години: 24
Контакти:

ZP 4.3 + Nanosuit & More - Цялостен мод

Мнение от LayerFort DJBosma » 22 юли 2019, 00:55

exdead95 написа:
06 юли 2019, 16:15
FATAL ERROR (shutting down): Mod_NumForName: sprites/flame.spr not found

Добавено преди 27 минути 20 секунди:
sorry found a man who helped figure it out
Fashion awesome! almost the one that I played 9 years ago!
If the author has an eath wallet for donat, then let me thank

Добавено преди 10 минути 32 секунди:
ETH wallet*
No wallet, no money will be accepted by me personally. If you still would like to donate, please do so to the AMXX-BG team so they will continue to support everyone for a long-time to come.
Пиша от избата, защото горе имаме течове..

Отговори

Върни се в “Готови модове”

Кой е на линия

Потребители, разглеждащи този форум: Няма регистрирани потребители и 1 гост