
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <biohazard>
#include <xs>
#include <levelsql>
#define PLUGIN_NAME "New Plug-In"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "weiji"
const WEAPONS = (1<<CSW_KNIFE)|(1<<CSW_HEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_SMOKEGRENADE)
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
RegisterHam(Ham_TakeDamage, "player", "fw_Player_TakeDamage")
}
public fw_Player_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
if(!is_user_connected(attacker) || !is_user_connected(victim) || attacker == victim || !attacker)
return HAM_IGNORED
if(is_user_zombie(attacker) && !is_user_zombie(victim))
{
set_pev(victim, pev_punchangle, 90.0)
if ( damage >= random_num(0, 100))
{
static weapon_ent
weapon_ent = fm_cs_get_current_weapon_ent(victim)
static weaponid
weaponid = cs_get_weapon_id(weapon_ent)
if (!((1<<weaponid) & WEAPONS))
{
new name[32],name2[32]
get_user_name(victim,name,31)
get_user_name(attacker,name2,31)
client_color(0, print_chat, "^x04【^x03提示^x04】:^x04玩家:^x03%s 的^x04枪^x01被僵尸给^x03扔掉了",name)
client_color(0, print_chat, "^x03%s : ^x01被打晕了还敢用^x04枪^x03装逼", name2)
client_cmd(victim, "drop")
}
}
}
return HAM_HANDLED
}
public client_color(playerid, colorid, const msg[], any:...)
{
static buffer[512]
vformat(buffer, charsmax(buffer), msg, 4)
message_begin(playerid?MSG_ONE:MSG_ALL,get_user_msgid("SayText"),{0,0,0},playerid)
write_byte(colorid)
write_string(buffer)
message_end()
}
stock fm_cs_get_current_weapon_ent(id)
{
return get_pdata_cbase(id, 373);
}
僵尸打人 人会出现眩晕状态,如果人类手中切换的武器是枪并有几率强制丢弃武器,僵尸还会发出嘲讽 被打晕了还敢拿枪装逼
我写的是biohazard模式的,可自行修改ZP
PS:此插件是怀旧以前的sorpack丧尸服的击晕系统,今天在电脑上无意中找到了当年的dem就写了这么一个插件来怀旧






当年的小伙伴已经只能用BOT来代替。