#include <amxmodx> #include <amxmisc> #include <codmod> #include <fakemeta> #include <engine> #include <fakemeta> #define DMG_BULLET (1<<1) new bool:ma_klase[33]; new const nazwa[] = "Strzelec | Super Premium"; new const opis[] = "Ma AK47 | + 65DMG | Brak Rozrzutu | Nieskonczone Ammo"; new const bronie = 1<<CSW_AK47; new const zdrowie = 100; new const kondycja = 100; new const inteligencja = 100; new const wytrzymalosc = 100; 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_PlayerPreThink, "fwPrethink_AutoBH"); register_event("CurWeapon","CurWeapon","be", "1=1"); RegisterHam(Ham_TakeDamage, "player", "TakeDamage") register_forward(FM_PlayerPreThink, "PreThink"); register_forward(FM_UpdateClientData, "UpdateClientData", 1) } public cod_class_enabled(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_A)) { client_print(id, print_chat, "[Strzelec | Super Premium] Nie masz uprawnien, aby uzywac tej klasy.") return COD_STOP; } ma_klase[id] = true; return COD_CONTINUE; } public cod_class_disabled(id) { ma_klase[id] = false; } public fwPrethink_AutoBH(id) { if(!ma_klase[id]) return PLUGIN_CONTINUE if (pev(id, pev_button) & IN_JUMP) { new flags = pev(id, pev_flags) if (flags & FL_WATERJUMP) return FMRES_IGNORED; if ( pev(id, pev_waterlevel) >= 2 ) return FMRES_IGNORED; if ( !(flags & FL_ONGROUND) ) return FMRES_IGNORED; new Float:velocity[3]; pev(id, pev_velocity, velocity); velocity[2] += 250.0; set_pev(id, pev_velocity, velocity); set_pev(id, pev_gaitsequence, 6); } return FMRES_IGNORED; } public CurWeapon(id) { if(!is_user_connected(id)) return; if(!ma_klase[id]) return; set_user_clip(id, 2); } stock set_user_clip(id, ammo) { new weaponname[32], weaponid = -1, weapon = get_user_weapon(id, _, _); get_weaponname(weapon, weaponname, 31); while ((weaponid = engfunc(EngFunc_FindEntityByString, weaponid, "classname", weaponname)) != 0) if (pev(weaponid, pev_owner) == id) { set_pdata_int(weaponid, 51, ammo, 4); return weaponid; } return 0; } public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_connected(idattacker)) return HAM_IGNORED; if(!ma_perk[idattacker]) return HAM_IGNORED; if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_AK47 && damagebits & DMG_BULLET) cod_inflict_damage(idattacker, this, 65.0, 0.0, idinflictor, damagebits); return HAM_IGNORED; } public PreThink(id) { if(ma_klase[id]) set_pev(id, pev_punchangle, {0.0,0.0,0.0}) } public UpdateClientData(id, sw, cd_handle) { if(ma_klase[id]) set_cd(cd_handle, CD_PunchAngle, {0.0,0.0,0.0}) }
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse

Prosba o kompilacje klasy
Temat rozp. HaRdCoRe!, 20.06.2014 21:41
1 odpowiedź w tym temacie
#1
Napisano 20.06.2014 21:41
proszę o skompilowanie tego, beda plusy (+)
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych