Chcialbym oczywiscie dowiedziec się Gdzie zrobilem bląd , ewentualnie Co zostalo i gdzie dodane. Jestem w tym na razie amatorem, ale chetnie sie nauczę. Proszę o pomoc
Zrobiona przezemnie klasa.
Spoiler
#include <amxmodx> #include <amxmisc> #include <codmod_frakcje> #include <engine> #include <hamsandwich> #include <fakemeta> #include <fun> #include <cstrike> #define DMG_BULLET (1<<1) new const nazwa[] = "Tsuchikage (Premium)"; new const opis[] = "Dostaje Ak47 i M4A1 + Deagle + WSZYSTKIE GRANATY Bonusy: Grawitacja : 400 MultiJump 1/12 na natychumiastowe zabojstwo z AK47 i M4A1 1/3 na natychmiastowe zabojstwo z HE"; new const bronie = (1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_M4A1)|(1<<CSW_FLASHBANG)|(1<<CSW_DEAGLE)|(1<<CSW_AK47); new const zdrowie = 30; new const kondycja = 10; new const inteligencja = 5; new const wytrzymalosc = 10; new const frakcja[] = "Klasy Premium"; new skoki[33]; new bool:ma_klase[33]; public plugin_init() { register_plugin(nazwa, "1.0", "amxx.pl"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc, frakcja); RegisterHam(Ham_Spawn, "player", "fwSpawn_Grawitacja", 1); register_forward(FM_CmdStart, "fwCmdStart_MultiJump"); RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_F)) { client_print(id, print_chat, "[Tsuchikage (Premium)] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } entity_set_float(id, EV_FL_gravity, 400.0/800.0); give_item(id, "weapon_hegrenade"); give_item(id, "weapon_flashbang"); give_item(id, "weapon_flashbang"); give_item(id, "weapon_smokegrenade"); cs_set_user_defuse(id, 1); ma_klase[id] = true; return COD_CONTINUE; } public cod_class_disabled(id) { 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, 400.0/800.0); } 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] = 1; return FMRES_IGNORED; } 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) { new weapon = get_user_weapon(idattacker); if(weapon == CSW_HEGRENADE && damage > 20.0 && random_num(1,3) == 1) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); } { new weapon = get_user_weapon(idattacker); if(weapon == CSW_AK47 && damage > 20.0 && random_num(1,12) == 1) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); } { new weapon = get_user_weapon(idattacker); if(weapon == CSW_M4A1 && damage > 20.0 && random_num(1,12) == 1) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); }
Błędy:
Spoiler
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team codclass_Tsuchikage.sma(123) : error 001: expected token: "}", but found "-end of file-" 1 Error. Could not locate output file codclass_Tsuchikage.amxx (compile failed).
Użytkownik Sherry edytował ten post 17.02.2015 22:49