I teraz mam pytanie bo na końcu przy kompilacji wyskoczyło mi to:
codclass_Zwinnyzolnierz.sma(67) : warning 217: loose indentation
Header size: 776 bytes
Code size: 4356 bytes
Data size: 1340 bytes
Stack/heap size: 16384 bytes; max. usage is unknown, due to recursion
Total requirements: 22856 bytes
1 Warning.
Done.
Oczywiście się skompilowało.Proszę mi powiedzieć co to za błąd
Proszę oto klasa
#include <amxmodx>
#include <codmod>
#include <cstrike>
#include <fakemeta>
#include <colorchat>
new bool:ma_klase[33];new CT_Skins[4][] = {"sas","gsg9","urban","gign"};
new Terro_Skins[4][] = {"arctic","leet","guerilla","terror"};
new const max_clip[31] = { -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 };new const nazwa[] = "Zwinny Zolnierz";
new const opis[] = "Natychmiastowe przeladowanie oraz ubranie wroga";
new const bronie = (1<<CSW_M4A1)|(1<<CSW_DEAGLE);
new const zdrowie = 37;
new const kondycja = 60;
new const inteligencja = 5;
new const wytrzymalosc = 0;
public plugin_init()
{
register_plugin(nazwa, "1.0", "MynDoS");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_forward(FM_CmdStart, "CmdStart");
register_forward(FM_Spawn, "Spawn", 1);
}public cod_class_enabled(id)
{
ColorChat(id, GREEN, "Klasa %s zostala stworzona przez MynDoS", nazwa);
ZmienUbranie(id, 0);
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
set_pev(id, pev_gravity, 1.0);
ZmienUbranie(id, 1);
ma_klase[id] = false;
}public CmdStart(id, uc_handle)
{
if(!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]
set_user_clip(id, new_ammo);
}
return FMRES_IGNORED;
}
public ZmienUbranie(id,reset)
{
if (!is_user_connected(id))
return PLUGIN_CONTINUE;
if (reset)
cs_reset_user_model(id);
else
{
new num = random_num(0,3);
cs_set_user_model(id, (get_user_team(id) == 1)? CT_Skins[num]: Terro_Skins[num]);
}
return PLUGIN_CONTINUE;
}public Spawn(id)
{
if(!is_user_connected(id)) return;
if(ma_klase[id])
{
ZmienUbranie(id, 0);
set_pev(id, pev_gravity, 0.8);
}
}
stock set_user_clip(id, ammo)
{
new weaponname[32], weaponid = -1, weapon = get_user_weapon(id, _, _);
get_weaponname(weapon, weaponname, 31);
while ((weaponid = engfunc(EngFunc_FindEntityByString, weaponid, "classname", weaponname)) != 0)
if (pev(weaponid, pev_owner) == id) {
set_pdata_int(weaponid, 51, ammo, 4);
return weaponid;
}
return 0;
}