public cod_class_skill_used(id) { if (!ilosc_apteczek_gracza[id]) { client_print(id, print_center, "Masz tylko 2 apteczki na runde!"); return PLUGIN_CONTINUE; } if (get_user_button(id) & IN_ATTACK) { client_print(id, print_center, "Przestan strzelac aby postawic apteczke!"); return PLUGIN_CONTINUE; } else ilosc_apteczek_gracza[id]--; new Float:origin[3]; entity_get_vector(id, EV_VEC_origin, origin); new ent = create_entity("info_target"); entity_set_string(ent, EV_SZ_classname, "medkit"); entity_set_edict(ent, EV_ENT_owner, id); entity_set_int(ent, EV_INT_solid, SOLID_NOT); entity_set_vector(ent, EV_VEC_origin, origin); entity_set_float(ent, EV_FL_ltime, halflife_time() + 7 + 0.1); entity_set_model(ent, "models/w_medkit.mdl"); set_rendering ( ent, kRenderFxGlowShell, 255,0,0, kRenderFxNone, 255 ) ; drop_to_floor(ent); entity_set_float(ent, EV_FL_nextthink, halflife_time() + 0.1); return PLUGIN_CONTINUE; }
W ten sposób wszystko działa .