#include <amxmodx> #include <amxmisc> #include <codmod> #include <fakemeta> #include <hamsandwich> #include <fun> #include <colorchat> #include <engine> new const nazwa[] = "[Premium] IndiosBravos"; new const opis[] = "5replik, 1/3 Deagle, elite 15dmg+int, new const bronie = (1<<CSW_SMOKEGRENADE)|(1<<CSW_ELITE)|(1<<CSW_FLASHBANG)|(1<<CSW_DEAGLE); new const zdrowie = 0; new const kondycja = 0; new const inteligencja = 0; new const wytrzymalosc = 0; new ma_klase[33]; new pcvar_ilosc_replik, pcvar_hp_replik; new ilosc_kukiel[33]; new sprite_blast; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); RegisterHam( Ham_TakeDamage, "player", "Fw_HamPlayerTakeDamage", 0) RegisterHam( Ham_Spawn, "player", "fwSpawn_ModelGracza" ); pcvar_ilosc_replik = register_cvar("ilosc_replik", "5"); pcvar_hp_replik = register_cvar("hp_replik", "350"); } public plugin_precache() { static szModel[ ] = "models/player/ib/ib.mdl"; precache_model( szModel ); sprite_blast = precache_model("sprites/dexplo.spr"); precache_model("models/cod/w_d.mdl"); precache_model("models/cod/p_d.mdl"); precache_model("models/cod/v_d.mdl"); } public cod_class_enabled(id) { public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_G)) { ColorChat(id, GREY, "[%s] Nie masz uprawnien, aby uzywac tej klasy.", nazwa); return COD_STOP; } ColorChat(id, GREY, "[COD:1500] Klasa %s stworzona przez IndiosBravos.", nazwa); ma_klase[id] = true; } give_item(id, "weapon_flashbang"); give_item(id, "weapon_flashbang"); give_item(id, "weapon_smokegrenade"); ma_klase[id] = true; { if(ilosc_kukiel[id] < 1) { client_print(id, print_center, "Wykorzystales wszystkie repliki!"); return; } new Float:OriginGracza[3], Float:OriginKukly[3], Float:VBA[3]; entity_get_vector(id, EV_VEC_origin, OriginGracza); VelocityByAim(id, 50, VBA); VBA[2] = 0.0; for(new i=0; i < 3; i++) OriginKukly[i] = OriginGracza[i]+VBA[i]; if(get_distance_f(OriginKukly, OriginGracza) < 40.0) { client_print(id, print_center, "Muszisz postawic replike dalej!"); return; } new model[55], Float:AngleKukly[3], SekwencjaKukly = entity_get_int(id, EV_INT_gaitsequence); SekwencjaKukly = SekwencjaKukly == 3 || SekwencjaKukly == 4? 1: SekwencjaKukly; entity_get_string(id, EV_SZ_model, model, 54); entity_get_vector(id, EV_VEC_angles, AngleKukly); AngleKukly[0] = 0.0; new ent = create_entity("info_target"); entity_set_string(ent, EV_SZ_classname, "Kukla"); entity_set_model(ent, model); entity_set_vector(ent, EV_VEC_origin, OriginKukly); entity_set_vector(ent, EV_VEC_angles, AngleKukly); entity_set_vector(ent, EV_VEC_v_angle, AngleKukly); entity_set_int(ent, EV_INT_sequence, SekwencjaKukly); entity_set_int(ent, EV_INT_solid, SOLID_BBOX); entity_set_float(ent, EV_FL_health, get_pcvar_float(pcvar_hp_replik)); entity_set_float(ent, EV_FL_takedamage, DAMAGE_YES); entity_set_size(ent, Float:{-16.0,-16.0, -36.0}, Float:{16.0,16.0, 40.0}); entity_set_int(ent, EV_INT_iuser1, id); ilosc_kukiel[id]--; } public cod_class_disabled(id) { ma_klase[id] = false; } public fwSpawn_ModelGracza( id ) { if( !is_user_alive( id ) || !ma_klase[ id ] ) return; engfunc( EngFunc_SetClientKeyValue, id, engfunc( EngFunc_GetInfoKeyBuffer, id ), "model", "ib" ); } public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_connected(idattacker)) return HAM_IGNORED; if(!ma_klase[idattacker]) return HAM_IGNORED; if(get_user_weapon(idattacker) == CSW_ELITE && damagebits & DMG_BULLET) cod_inflict_damage(idattacker, this, 15.0, 0.5, idinflictor, damagebits); if(get_user_weapon(idattacker) == CSW_DEAGLE && !random(3) && damagebits & DMG_BULLET) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); return HAM_IGNORED; } public CurWeapon(id) { new weapon = read_data(2); if(ma_klase[id]) //tutaj wstawiamy ma_klase lub ma_perk { if(weapon == CSW_DEAGLE) //tutaj ustawiamy broń, jakiej model będziemy zmieniać { set_pev(id, pev_viewmodel2, "models/cod/v_d.mdl") //tu dajemy ścieżkę do nowego modeli v_ set_pev(id, pev_weaponmodel2, "models/cod/p_d.mdl") //tu dajemy ścieżkę do nowego modeli p_ } } } public fw_SetModel(entity, model[]) { if(!pev_valid(entity)) return FMRES_IGNORED if(!equali(model, "models/w_deagle.mdl")) //tutaj wpisujemy ścieżkę do STAREGO modelu w_, czyli tego który chcemy podmienić return FMRES_IGNORED; new entityowner = pev(entity, pev_owner); if(!ma_klase[entityowner]) //tutaj wpisujemy ma_perk lub ma_klase return FMRES_IGNORED; engfunc(EngFunc_SetModel, entity, "models/cod/w_d.mdl") return FMRES_SUPERCEDE }
ib.sma(12) : error 037: invalid string (possibly non-terminated string) ib.sma(54) : error 029: invalid expression, assumed zero ib.sma(54) : error 088: number of arguments does not match definition ib.sma(55) : warning 217: loose indentation ib.sma(64) : warning 217: loose indentation ib.sma(72) : warning 209: function "cod_class_enabled" should return a value ib.sma(87) : warning 209: function "cod_class_enabled" should return a value ib.sma(118) : warning 217: loose indentation ib.sma(118) : error 029: invalid expression, assumed zero ib.sma(118) : error 004: function "cod_class_disabled" is not implemented ib.sma(123) : error 029: invalid expression, assumed zero ib.sma(123) : error 017: undefined symbol "fwSpawn_ModelGracza" ib.sma(126) : warning 209: function "cod_class_enabled" should return a value ib.sma(130) : error 029: invalid expression, assumed zero ib.sma(130) : error 017: undefined symbol "TakeDamage" ib.sma(130) : error 017: undefined symbol "idinflictor" ib.sma(130) : fatal error 107: too many error messages on one line
Chcę zrobic premke, 1/3 z deagl, 5 przyrodnikow, nowy model postaci, nowy model gracza oraz obrazenia z inta do elite.
proszę o pomoc