|
发表于 2006-8-19 17:44:58
|
显示全部楼层
来自 中国–广东–深圳–南山区
回复: 求第一局刀,第二局手雷的插件
只要能理解这段,相信不难 。
[PHP]public switchweapon(id)
{
if (round<1 || !KnifeEnabled)
return PLUGIN_CONTINUE
new wpn = read_data(2)
if (wpn == CSW_C4 && round != get_cvar_num("amx_kniferound"))
return PLUGIN_CONTINUE
if (round < get_cvar_num("amx_kniferound") && (wpn == CSW_HEGRENADE || wpn == CSW_SMOKEGRENADE || wpn == CSW_FLASHBANG))
return PLUGIN_CONTINUE
engclient_cmd(id,"weapon_knife")
return PLUGIN_CONTINUE
}
[/PHP] |
|