#include #include #define PLUGIN "Losowanie" #define VERSION "1.0" #define AUTHOR ">>Maniek<<(Maniek974)" #define POWLOKA // zakomentuj zeby usunac powloke dla gracza (dodaj // przed #define) new nick[32]; new bool:losowaniee = false; public plugin_init(){ register_plugin(PLUGIN, VERSION, AUTHOR); register_clcmd("say /losuj", "losowanie", 0); register_event("TextMsg","res","a","2&#Game_C"); } public res() losowaniee = false; public losowanie(id) { if(!is_user_alive(id) || get_user_team(id) != 2 || losowaniee || get_playersnum() < 3) { client_print(id, print_chat, "[Losowanie] Niestety wystapil blad. (Jestes niezywy/nie jestes CT/gracz juz zostal wylosowany/za malo graczy)"); return PLUGIN_HANDLED; } new players[32], num get_players(players, num, "ae", "TERRORIST"); new rand = random_num(1,num) if(is_user_alive(rand) && 1 < num && get_user_team(rand) == 1) { losowaniee = true; get_user_name(rand, nick, 31) #if defined POWLOKA fm_set_user_rendering(rand,kRenderFxGlowShell,0,255,0,kRenderNormal,8) #endif set_task(10.0, "kolor", rand); client_print(id, print_chat, "[Losowanie] Wylosowano %s !", nick); set_hudmessage(255, 255, 255, 0.03, 0.60, 0, 6.0, 5.0, _, _, 21) show_hudmessage(0, "Wylosowany zostal: %s", nick) } return PLUGIN_HANDLED } public kolor(rand) { #if defined POWLOKA if(is_user_alive(rand)) fm_set_user_rendering(rand,kRenderFxGlowShell,0,0,0,kRenderNormal,8) #endif losowaniee = false; }