/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <jailbreak>
#include <ColorChat>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "Wielkie Jol"
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd("say /oznacz", "ColorMenu");
}
public ColorMenu(id) {
	if(!is_user_alive(id))
        return PLUGIN_HANDLED;
if( jail_get_prowadzacy() != id){
	ColorChat(id, GREEN, "[Informacja]^x01 Nie jestes prowadzacym, wiec nie mozesz tego uzywac.");
	return PLUGIN_HANDLED
}
	new sub = menu_create("\rWybierz kolor", "ColorMenu_Handle")
	menu_additem(sub, "Czerwony")
	menu_additem(sub, "Niebieski")
	menu_additem(sub, "Bialy")
	menu_additem(sub, "Zielony")
	menu_additem(sub, "Zolty")
	menu_additem(sub, "Rozowy")
	menu_additem(sub, "Blekitny")
	menu_additem(sub, "Usun kolor")
	menu_setprop(sub, MPROP_EXITNAME, "Wyjdz")
	menu_setprop(sub, MPROP_EXIT, MEXIT_ALL)
	menu_display(id, sub)
	return PLUGIN_HANDLED
}
public ColorMenu_Handle(id, sub, item) {
	if(!is_user_connected(id) || !is_user_alive(id))
	return PLUGIN_HANDLED
	if(item != MENU_EXIT && item != MENU_BACK && item != MENU_MORE) {
		new kogo[33]; new body; new nick[64];
		switch(item) {
			case 0: {
				get_user_aiming(id, kogo[id], body)
				if(!is_user_alive(kogo[id]) || get_user_team(kogo[id]) != 1) {
					client_print(id, print_center, "Musisz nacelowac na wieznia!")
					return PLUGIN_HANDLED
				}
				set_user_rendering(kogo[id], kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 25)
				get_user_name(kogo[id], nick, 31)
				client_print(kogo[id], print_center, "%s masz kolor CZERWONY", nick)
				ColorMenu(id)
			}
			case 1: {
				get_user_aiming(id, kogo[id], body)
				if(!is_user_alive(kogo[id]) || get_user_team(kogo[id]) != 1) {
					client_print(id, print_center, "Musisz nacelowac na wieznia!")
					return PLUGIN_HANDLED
				}
				set_user_rendering(kogo[id], kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 25)
				get_user_name(kogo[id], nick, 31)
				client_print(kogo[id], print_center, "%s masz kolor NIEBIESKI", nick)
				ColorMenu(id)
			}
			case 2: {
				get_user_aiming(id, kogo[id], body)
				if(!is_user_alive(kogo[id]) || get_user_team(kogo[id]) != 1) {
					client_print(id, print_center, "Musisz nacelowac na wieznia!")
					return PLUGIN_HANDLED
				}
				set_user_rendering(kogo[id], kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 25)
				get_user_name(kogo[id], nick, 31)
				client_print(kogo[id], print_center, "%s masz kolor BIALY", nick)
				ColorMenu(id)
			}
			case 3: {
				get_user_aiming(id, kogo[id], body)
				if(!is_user_alive(kogo[id]) || get_user_team(kogo[id]) != 1) {
					client_print(id, print_center, "Musisz nacelowac na wieznia!")
					return PLUGIN_HANDLED
				}
				set_user_rendering(kogo[id], kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 25)
				get_user_name(kogo[id], nick, 31)
				client_print(kogo[id], print_center, "%s masz kolor ZIELONY", nick)
				ColorMenu(id)
			}
			case 4: {
				get_user_aiming(id, kogo[id], body)
				if(!is_user_alive(kogo[id]) || get_user_team(kogo[id]) != 1) {
					client_print(id, print_center, "Musisz nacelowac na wieznia!")
					return PLUGIN_HANDLED
				}
				set_user_rendering(kogo[id], kRenderFxGlowShell, 255, 255, 0, kRenderNormal, 25)
				get_user_name(kogo[id], nick, 31)
				client_print(kogo[id], print_center, "%s masz kolor ZOLTY", nick)
				ColorMenu(id)
			}
			case 5: {
				get_user_aiming(id, kogo[id], body)
				if(!is_user_alive(kogo[id]) || get_user_team(kogo[id]) != 1) {
					client_print(id, print_center, "Musisz nacelowac na wieznia!")
					return PLUGIN_HANDLED
				}
				set_user_rendering(kogo[id], kRenderFxGlowShell, 255, 0, 180, kRenderNormal, 25)
				get_user_name(kogo[id], nick, 31)
				client_print(kogo[id], print_center, "%s masz kolor ROZOWY", nick)
				ColorMenu(id)
			}
			case 6: {
				get_user_aiming(id, kogo[id], body)
				if(!is_user_alive(kogo[id]) || get_user_team(kogo[id]) != 1) {
					client_print(id, print_center, "Musisz nacelowac na wieznia!")
					return PLUGIN_HANDLED
				}
				set_user_rendering(kogo[id], kRenderFxGlowShell, 0, 255, 255, kRenderNormal, 25)
				get_user_name(kogo[id], nick, 31)
				client_print(kogo[id], print_center, "%s masz kolor BLEKITNY/AQUA", nick)
				ColorMenu(id)
			}
			case 7: {
				get_user_aiming(id, kogo[id], body)
				if(!is_user_alive(kogo[id]) || get_user_team(kogo[id]) != 1) {					
					client_print(id, print_center, "Musisz nacelowac na wieznia!")
					return PLUGIN_HANDLED							
				}
				set_user_rendering(kogo[id], kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 0)
				get_user_name(kogo[id], nick, 31)
				client_print(kogo[id], print_center, "%s prowadzacy usunal ci kolor", nick)
				ColorMenu(id)
			}
			case 9: return PLUGIN_HANDLED
			}		
	}
	return PLUGIN_HANDLED
}