Mam wielki problem z klasa... Mianowicie chodzi o to ze 1 runde jest nie widzialna potem gdy ktos mnie zabije staje sie widzialny... proszę o pomoc tutaj jest plik .sma
#include <amxmodx> #include <amxmisc> #include <codmod> #include <engine> #include <hamsandwich> #include <cstrike> #include <fun> new const nazwa[] = "Kapitan (Premium)"; new const opis[] = "Calkowicie niewidzilany,mniejsza grawitacja 1/4 z awp "; new const bronie = (1<<CSW_SCOUT)|(1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_AWP)|(1<<CSW_FLASHBANG)|(1<<CSW_DEAGLE); new const zdrowie = 50; new const kondycja = 20; new const inteligencja = 10; new const wytrzymalosc = 10; new ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); RegisterHam(Ham_Spawn, "player", "fwSpawn_Grawitacja", 1); RegisterHam(Ham_TakeDamage, "player", "fwTakeDamage_JedenZ"); } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_CVAR)) { client_print(id, print_chat, "[Kapitan] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 1); entity_set_float(id, EV_FL_gravity, 300.0/800.0); give_item(id, "weapon_hegrenade"); give_item(id, "weapon_flashbang"); give_item(id, "weapon_smokegrenade"); ma_klase[id] = true; return COD_CONTINUE; } public cod_class_disabled(id) { set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255); entity_set_float(id, EV_FL_gravity, 1.0); ma_klase[id] = false; } public fwSpawn_Grawitacja(id) { if(ma_klase[id]) entity_set_float(id, EV_FL_gravity, 300.0/800.0); } public fwTakeDamage_JedenZ(this, idInf, idAtt, Float:fDmg, dmgBits){ if(!is_user_alive(idAtt) || !ma_klase[idAtt] || !(dmgBits & (1<<1) ) || random_num(1, 4) != 1 ) return HAM_IGNORED; cs_set_user_armor(this, 0, CS_ARMOR_NONE); SetHamParamFloat(4, float(get_user_health(this) + 1)); return HAM_HANDLED; }