#include <amxmodx> #include <fakemeta> #include <zombieplague> #include <xs> enum CsTeams { CS_TEAM_UNASSIGNED = 0, CS_TEAM_T = 1, CS_TEAM_CT = 2, CS_TEAM_SPECTATOR = 3 } #define OFFSET_TEAM 114 #define cs_get_user_team(%1) CsTeams:get_pdata_int(%1, OFFSET_TEAM) new cvar_antiblock, Float:g_lasttimetouched[33] // lol public plugin_init() { register_plugin("anti block", "0.1", "cheap_suit") register_forward(FM_Touch, "fwd_touch") register_forward(FM_PlayerPreThink, "fwd_playerprethink") cvar_antiblock = register_cvar("zp_antiblock", "1") } public fwd_playerprethink(id) { if(!is_user_alive(id)) return FMRES_IGNORED static solid; solid = pev(id, pev_solid) if(solid == SOLID_NOT && (get_gametime() - g_lasttimetouched[id]) > 0.34) set_pev(id, pev_solid, SOLID_BBOX) return FMRES_IGNORED } public fwd_touch(blocker, id) { if(!is_user_alive(blocker) || !is_user_alive(id) || !get_pcvar_num(cvar_antiblock)) return FMRES_IGNORED static button[2] button[0] = pev(id, pev_button), button[1] = pev(blocker, pev_button) if(button[0] & IN_USE || button[1] & IN_USE) { static CsTeams:team[2] team[0] = cs_get_user_team(id), team[1] = cs_get_user_team(blocker) if(team[0] != team[1]) return FMRES_IGNORED set_pev(blocker, pev_solid, SOLID_NOT), set_pev(id, pev_solid, SOLID_NOT) static Float:gametime; gametime = get_gametime() g_lasttimetouched[id] = gametime, g_lasttimetouched[blocker] = gametime } return FMRES_IGNORED }
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
przenikanie tylko dla ct
Temat rozp. toxic, 25.06.2012 14:08
1 odpowiedź w tym temacie
#1
Napisano 25.06.2012 14:08
czy w pluginie zp_antiblock można zrobić albo ustawić jakiś cvar żeby przenikanie było tylko dla ct ?
#2 Gość_21977_*
Napisano 25.06.2012 15:02
if(team[0] != team[1])zamiań na
if(team[0] != 2 || team[1] != 2)
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych