Witam posiadam klasę zombie i chciałbym ustawić ją np na flagę x, czytałem na temat dorzucaja fragmentu gdzie ustala się na jaką flage ale jak to robię to robię źle. Może mi ktoś to przerobić i podesłać gotowe ? Byłbym bardzo wdzięczny.
I jeszcze żeby w opisie tej klasy był na czerwono napis [PREMIUM]
#include <amxmodx> #include <fakemeta> #include <hamsandwich> #include <zombieplague> #define DMG_BULLET (1<<1) new const zclass_name[] = "Kuloodporny Zombie" new const zclass_info[] = "Zabic go mozna tylko z pistoletow" new const zclass_model[] = "zombie_source" new const zclass_clawmodel[] = "v_knife_zombie.mdl" const zclass_health = 1800 const zclass_speed = 190 const Float:zclass_gravity = 1.0 const Float:zclass_knockback = 1.0 new g_zmpistolshot public plugin_init() { register_plugin("[ZP] Klasa Zombie - obrazenia wylacznie z pistoletow", "0.0.3", "Dr@goN") RegisterHam(Ham_TakeDamage, "player", "TakeDamage") } public plugin_precache() g_zmpistolshot = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if (!is_user_alive(this) || !zp_get_user_zombie(this) || zp_get_user_nemesis(this)) return HAM_IGNORED if(!is_user_connected(idattacker)) return HAM_IGNORED if (zp_get_user_zombie_class(this) != g_zmpistolshot) return HAM_IGNORED if(!(damagebits & DMG_BULLET)) return HAM_IGNORED; new weapon = get_user_weapon(idattacker); if(weapon != CSW_SCOUT && weapon != CSW_XM1014 && weapon != CSW_MAC10 && weapon != CSW_AUG && weapon != CSW_UMP45 && weapon != CSW_SG550 && weapon != CSW_GALIL && weapon != CSW_FAMAS && weapon != CSW_AWP && weapon != CSW_MP5NAVY && weapon != CSW_M249 && weapon != CSW_M4A1 && weapon != CSW_TMP && weapon != CSW_G3SG1 && weapon != CSW_SG552 && weapon != CSW_AK47 && weapon != CSW_P90) return HAM_IGNORED SetHamParamFloat(4, 0.0) return HAM_SUPERCEDE }
Użytkownik MegatrOn edytował ten post 28.09.2014 18:02