Cześć doda mi ktoś do tej klasy sma. 1/1 ze scouta i pełen magazynek za zabójstwo ? niżej daje sma
#include <amxmodx> #include <amxmisc> #include <codmod> #include <fakemeta> #include <hamsandwich> #include <cstrike> #include <engine> #include <fun> new const nazwa[] = "Tropiciel"; new const opis[] = "Klasa posiada złote M4A1,1/1 z kosy po 4skok oraz 1/1 ze scouta ,pełen magazynek za zabójstwo "; new const bronie = (1<<CSW_SCOUT)|(1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_M4A1)|(1<<CSW_FLASHBANG)|(1<<CSW_DEAGLE); new const zdrowie = 30; new const kondycja = 25; new const inteligencja = 10; new const wytrzymalosc = 10; new skoki[33]; new ostatnio_prawym[33]; new ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_forward(FM_CmdStart, "fwCmdStart_MultiJump"); RegisterHam(Ham_TakeDamage, "player", "fwTakeDamage_JedenCios"); RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_knife", "fwPrimaryAttack_JedenCios"); RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fwSecondaryAttack_JedenCios"); register_event("CurWeapon", "ModelBroni_CurWeapon", "be", "1=1"); register_forward(FM_SetModel, "ModelBroni_fw_SetModel"); } public plugin_precache() { precache_model(""); precache_model("models/cod/v_m4a1a.mdl"); precache_model("models/cod/w_m4a1a.mdl"); } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_G)) { client_print(id, print_chat, "[Tropiciel] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } 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) { ma_klase[id] = false; } public fwCmdStart_MultiJump(id, uc_handle) { if(!is_user_alive(id) || !ma_klase[id]) return FMRES_IGNORED; new flags = pev(id, pev_flags); if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]) { skoki[id]--; new Float:velocity[3]; pev(id, pev_velocity,velocity); velocity[2] = random_float(265.0,285.0); set_pev(id, pev_velocity,velocity); } else if(flags & FL_ONGROUND) skoki[id] = 4; return FMRES_IGNORED; } public fwTakeDamage_JedenCios(id, ent, attacker) { if(is_user_alive(attacker) && ma_klase[attacker] && get_user_weapon(attacker) == CSW_KNIFE && ostatnio_prawym[id]) { cs_set_user_armor(id, 0, CS_ARMOR_NONE); SetHamParamFloat(4, float(get_user_health(id) + 1)); return HAM_HANDLED; } return HAM_IGNORED; } public fwPrimaryAttack_JedenCios(ent) { new id = pev(ent, pev_owner); ostatnio_prawym[id] = 1; } public fwSecondaryAttack_JedenCios(ent) { new id = pev(ent, pev_owner); ostatnio_prawym[id] = 0; } public ModelBroni_CurWeapon(id) { new weapon = read_data(2); if(ma_klase[id]) { if(weapon == CSW_M4A1) { set_pev(id, pev_viewmodel2, "models/cod/v_m4a1a.mdl") set_pev(id, pev_weaponmodel2, "") } } } public ModelBroni_fw_SetModel(entity, model[]) { if(!pev_valid(entity)) return FMRES_IGNORED if(!equali(model, "models/w_m4a1.mdl")) return FMRES_IGNORED; new entityowner = pev(entity, pev_owner); if(!ma_klase[entityowner]) return FMRES_IGNORED; engfunc(EngFunc_SetModel, entity, "models/cod/w_m4a1a.mdl") return FMRES_SUPERCEDE }