|
new const g_item_name[] = { "魔導器-獅鷲之羽" }; //特殊道具名稱
new g_itemid_Griffin_Feather
new g_has_Griffin_Feather[33], g_item_cost , g_jump_force , g_jump_height
public plugin_init()
{
register_plugin("魔導器-獅鷲之羽", "0.0", "ChaosX")
g_item_cost = register_cvar("zp_Griffin_Feather_cost", "10") //購買"魔導器-獅鷲之羽"要花多少子彈包
g_jump_force = register_cvar("zp_Griffin_Feather_force", "300.0") //高跳的前進距離
g_jump_height = register_cvar("zp_Griffin_Feather_height", "1000.0") //高跳的跳躍高度
g_itemid_Griffin_Feather = zp_register_extra_item(g_item_name, get_pcvar_num(g_item_cost), ZP_TEAM_HUMAN)
register_forward(FM_CmdStart, "fw_CmdStart")
}
public zp_extra_item_selected(id, itemid)
{
if (itemid == g_itemid_Griffin_Feather)
{
if (g_has_Griffin_Feather[id])
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + get_pcvar_num(g_item_cost))
client_print(id, print_chat, "你已經有獅鷲之羽了.")
return PLUGIN_CONTINUE;
}
g_has_Griffin_Feather[id] = true
client_print(id, print_chat, "你得到了獅鷲之羽!")
client_print(id, print_chat, "在空中時按蹲下鍵即可高跳!")
|
|