#include <amxmodx>
#include <hamsandwich>
#include <amxmisc>
#include <codmod_frakcje>
#include <fun>
#define DMG_HEGRENADE (1<<24)
new const nazwa[] = "General [Premium]";
new const opis[] = "1/1 z he";
new const bronie = (1<<CSW_HEGRENADE)|(1<<CSW_DEAGLE)|(1<<CSW_AK47);
new const zdrowie = 30;
new const kondycja = 30;
new const inteligencja = 0;
new const wytrzymalosc = 0;
new bool: ma_klase[33];
new const frakcja[] = "Klasy premium";
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc, frakcja);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[General [Premium]] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
give_item(id, "weapon_hegrenade");
return COD_CONTINUE;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(damagebits & DMG_HEGRENADE && random_num(1, 2) == 1)
{
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
}
return HAM_IGNORED;
}
Wyżej dałem .sma klasy która, która ma 1/1 z he, sam to robiłem, więc mam pytanie czy to jest dobrze??? Daję ++++++++za sprawdzenie!