Witam
Chciałem zrobić klase do CodModa lecz mi to nie wychodzi, robię to sam bez poradników bo kiedyś to robiłem i szło jak burza teraz po kilku miesiącach przerwy coś nie chce iść ![]()
daję tutaj klase :
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <hamsandwich>
#define DMG_BULLET (1<<1)
#define DMG_HEGRENADE (1<<24)
new bool:ma_klase[33];
new const nazwa[] = "Fighter";
new const opis[] = "Ma 1/8 z XM1014";
new const bronie = 1<<CSW_XM1014 | 1<<CSW_HEGRENADE ;
new const zdrowie = 0;
new const kondycja = 0;
new const inteligencja = 0;
new const wytrzymalosc = 0;
public plugin_init()
{
register_plugin(nazwa, "1.0", "sCerR*!");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
}
public cod_class_enabled(id)
{
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
ma_klase[id] = false;
}
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_BULLET))
return HAM_IGNORED;
if(get_user_weapon(idattacker) == CSW_XM1014 && random_num(1,8) == 1)
if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_HEGRENADE && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
Ogólnie klasa ma mieć :
1/8 zabicia z shotgana
1/1 z granata
co mogę robić zle ?


Dodatki SourceMod



Temat jest zamknięty


codclass_Fighter.amxx








