#include <amxmodx> #include <fakemeta> #define m_flNextAttack 83 new pCvarCzas, CzasBlokady; public plugin_init() { register_plugin("Blokada HE", "9", "QTM. Peyote"); register_logevent("PoczatekRundy", 2, "1=Round_Start"); register_forward(FM_PlayerPreThink, "client_PreThink"); pCvarCzas = register_cvar("cod_czasblokady", "15"); } public client_PreThink(id) { if(task_exists(-44) && get_user_weapon(id) == CSW_HEGRENADE) { client_print(id, print_center, "Granaty zostana odblokowane za %i sekund.", CzasBlokady); set_pdata_float(id, m_flNextAttack, 0.1 , 5); } } public PoczatekRundy() set_task(1.0, "Odblokuj", -44, _, _, "a", CzasBlokady = get_pcvar_num(pCvarCzas)); public Odblokuj() CzasBlokady--;
Dodano 07 lipiec 2011 - 17:24:
Widze nikt nie potrafi zrobic ;]