Witam ma problem pisałem ręcznie tą klasę:
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <fakemeta>
new const nazwa[] = "[Premium] Kapitan";
new const opis[] = "Jest niewidoczny podczas kucania, posiada M4A1 1/7 i Deagle 1/4";
new const bronie = (7<<CSW_M4A1)|(2<<CSW_AWP);
new const zdrowie = 0;
new const kondycja = 0;
new const inteligencja = 0;
new const wytrzymalosc = 0;
new ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "Nigdy");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_forward(FM_PlayerPreThink, "fwPrethink_Niewidzialnosc", 255);
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, " Przykro nam, Niestety nie masz dostepu do tej klasy. ")
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 70);
ma_klase[id] = false;
}
//Przy kucaniu
public fwPrethink_Niewidzialnosc(id)
{
if(!ma_klase[id])
return;
new button = get_user_button(id);
if( button & IN_DUCK )
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 0);
}
else
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 70);
}
}
Użytkownik Nigdy edytował ten post 25.07.2013 09:51


Dodatki SourceMod






codclass_kapitan.amxx







