|
发表于 2006-12-1 20:48:48
|
显示全部楼层
来自 中国–北京–北京
回复: 请问哪位高手可以给份AMXX下的手雷竞技场插件!
[PHP]/* Unlimit Grenade v1.0.0 */
/*
[简介]:
使用该插件可以让玩家只需购买各种手雷一次,即可无限扔手雷.
[参数]:
amx_unlimitgrenade 1; 为0时,关闭无限手雷
[需要模块]:
娱乐模块(Fun)
反恐精英统计模块(CSX)
*/
// 如果想在AMXx 1.70以下版本中使用,去掉下面一行的注释标示符.
//#define FOR_OLD_AMXX
#include <amxmodx>
#include <fun>
#include <csx>
#if !defined (FOR_OLD_AMXX)
new g_unlimitgrenade
#endif
public plugin_init()
{
register_plugin("Unlimit Grenade", "1.0.0", "KinSprite")
#if !defined (FOR_OLD_AMXX)
g_unlimitgrenade = register_cvar("amx_unlimitgrenade", "1")
#else
register_cvar("amx_unlimitgrenade", "1")
#endif
}
public grenade_throw(plIndex, greIndex, wpnID)
{
#if !defined (FOR_OLD_AMXX)
if (get_pcvar_num(g_unlimitgrenade) == 0)
{
#else
if (get_cvar_num("amx_unlimitgrenade") == 0)
{
#endif
return PLUGIN_CONTINUE
}
new param[2]
param[0] = plIndex
param[1] = wpnID
set_task(0.2, "give_grenade", 13265 + plIndex, param, 2)
return PLUGIN_CONTINUE
}
public give_grenade(param[2])
{
new plIndex = param[0]
new wpnID = param[1]
if (!is_user_alive(plIndex))
return PLUGIN_CONTINUE
if (wpnID == CSW_HEGRENADE)
{
give_item(plIndex, "weapon_hegrenade")
}
else
{
if (wpnID == CSW_SMOKEGRENADE)
{
give_item(plIndex, "weapon_smokegrenade")
}
else
{
give_item(plIndex, "weapon_flashbang")
}
}
return PLUGIN_CONTINUE
}[/PHP] |
|