Usiłuję wbudować w klasę perk Zwinne Palce, kompiluje się ale nie działa, mógłby ktoś pomóc?
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <codmod>
#include <fun>
new const nazwa[] = "Plutonowy";
new const opis[] = "Wbudowane zwinne palce";
new const bronie = 1<<CSW_UMP45;
new const zdrowie = 15;
new const kondycja = 65;
new const inteligencja = 0;
new const wytrzymalosc = 5;
new bool:ma_klase[33];
new bool:max_clip[33]; = { -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20,
10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 };
public plugin_init() {
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_forward(FM_CmdStart, "CmdStart");
}
public cod_class_enabled(id)
ma_klase[id] = true;
public cod_class_disabled(id)
ma_klase[id] = false;
public CmdStart(id, uc_handle)
{
if(!is_user_alive(id) || !ma_klase[id])
return FMRES_IGNORED;
new buttons = get_uc(uc_handle, UC_Buttons);
new oldbuttons = pev(id, pev_oldbuttons);
new clip, ammo, weapon = get_user_weapon(id, clip, ammo);
if(max_clip[weapon] == -1 || !ammo)
return FMRES_IGNORED;
if((buttons & IN_RELOAD && !(oldbuttons & IN_RELOAD) && !(buttons & IN_ATTACK)) || !clip)
{
cs_set_user_bpammo(id, weapon, ammo-(max_clip[weapon]-clip));
new new_ammo = (max_clip[weapon] > ammo)? clip+ammo: max_clip[weapon]
}
return FMRES_IGNORED;
}
Użytkownik Hajto edytował ten post 06.01.2011 16:20