To kod klasy :
#include <amxmodx> #include <amxmisc> #include <codmod> #include <fakemeta> #include <fun> #include <engine> new const nazwa[] = "Skoczek"; new const opis[] = "Klasa Testowa Posiada LongJumpa Co x Sekund"; new const bronie = 0; new const zdrowie = 0; new const kondycja = 0; new const inteligencja = 0; new const wytrzymalosc = 0; new player_b_froglegs[33]; new ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "Amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_forward(FM_PlayerPreThink, "Prethink_froglegs"); } public cod_class_enabled(id) { ma_klase[id] = true; } public cod_class_disabled(id) { ma_klase[id] = false; } public Prethink_froglegs(id) { if(!ma_klase[id]) return PLUGIN_CONTINUE if (get_user_button(id) & IN_DUCK) { //start holding down button here, set to halflife time if (player_b_froglegs[id] == 1) { player_b_froglegs[id] = floatround(halflife_time()) } else { if (floatround(halflife_time())-player_b_froglegs[id] >= 3.0) { new Float:fl_iNewVelocity[3] VelocityByAim(id, 1000, fl_iNewVelocity) fl_iNewVelocity[2] = 210.0 entity_set_vector(id, EV_VEC_velocity, fl_iNewVelocity) player_b_froglegs[id] = 1 } } } else { player_b_froglegs[id] = 1 } }