Joeb_19 | Дата: Пятница, 2012-09-28, 19:23 | Сообщение # 1 |
Сообщений: 190
| Народ срочно нужен плагин ,которий при ударе кт → терориста , задержует кт на3 сек! СРОЧНО P.S. этот плагин на HNS
|
|
| |
Luxury | Дата: Вторник, 2012-10-02, 16:31 | Сообщение # 2 |
Сообщений: 82
| Если чесно - не проверял:
#include <amxmodx> #include <cstrike> #include <fakemeta> #include <hamsandwich>
new bool:stoped[33] = false new Float:weap_speed[] = { 0.0, //0 250.0, //p228 0.0, //shield 260.0, //scout 250.0, //hegrenade 240.0, //xm1014 250.0, //c4 250.0, //mac10 240.0, //aug 250.0, //smokegrenade 250.0, //elite 250.0, //fiveseven 210.0, //sg550 240.0, //galil 240.0, //famas 250.0, //usp 250.0, //glock18 210.0, //awp 250.0, //mp5navy 220.0, //m429 230.0, //m3 230.0, //m4a1 250.0, //tmp 210.0, //g3sg1 250.0, //flashbang 250.0, //deagle 235.0, //sg552 221.0, //ak47 250.0, //knife 245.0 //p90 };
public plugin_init() { register_plugin("name", "version", "author"); register_event("CurWeapon", "event_curweap", "b") RegisterHam(Ham_TakeDamage, "player", "post_PlayerTakeDamage", 1); }
public client_putinserver(id) { stoped[id] = false; }
public client_disconnect(id) { stoped[id] = false; }
public post_PlayerTakeDamage(victim, weapon, attacker, Float:damage, damage_type) { if(weapon != CSW_KNIFE || !is_user_connected(attacker) || !is_user_connected(victim)) { return HAM_IGNORED; } if(cs_get_user_team(attacker) == CS_TEAM_CT && cs_get_user_team(victim) == CS_TEAM_CT) { engfunc(EngFunc_SetClientMaxspeed, attacker, 0.0); set_pev(attacker, pev_maxspeed, 0.0); set_task(3.0, "unspeed", attacker+212329); stoped[attacker] = true return HAM_HANDLED; } return HAM_IGNORED; }
public event_curweap(id) { if(stoped[id]) { engfunc(EngFunc_SetClientMaxspeed, id, 0.0); set_pev(id, pev_maxspeed, 0.0); } }
public unspeed(id) { if(id>212329) id-=212329; if(is_user_connected(id)) { stoped[id] = false; engfunc(EngFunc_SetClientMaxspeed, id, weap_speed[get_user_weapon(id)]); set_pev(id, pev_maxspeed, weap_speed[get_user_weapon(id)]); } }Добавлено (2012-10-02, 16:31) --------------------------------------------- Только замени
if(cs_get_user_team(attacker) == CS_TEAM_CT && cs_get_user_team(victim) == CS_TEAM_CT)
на
if(cs_get_user_team(attacker) == CS_TEAM_CT && cs_get_user_team(victim) == CS_TEAM_T)
|
|
| |