#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Zamiana druzyn" #define VERSION "1.0" #define AUTHOR "NewaX" new roundnumber = 0; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_clcmd( "say /runda", "KtoraRunda" ); register_logevent("Koniec_Rundy", 2, "1=Round_End") } public KtoraRunda( id ) { client_print( id, print_chat, "Obecnie jest %i runda.", ( roundnumber+1 ) ); return PLUGIN_HANDLED; } public Koniec_Rundy() { roundnumber = roundnumber+1 if( roundnumber >4 ) { for(new i = 1; i<33; i++) { switch( cs_get_user_team( i ) ) { case CS_TEAM_CT: cs_set_user_team( i, CS_TEAM_T ); case CS_TEAM_T: cs_set_user_team( i, CS_TEAM_CT ); } roundnumber = 0; client_print( i, print_chat, "Nastapila zamiana teamow roundnumber wynosci: %i.", roundnumber ); } } else { set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 2.0) show_hudmessage(0, "Nie ma wymaganych 5 rund. Zakonczyla sie dopiero runda: %i!",roundnumber) } return PLUGIN_CONTINUE }
Użytkownik NewaX edytował ten post 07.01.2012 19:27