下面是引用 史来姆 于 2010-09-13 17:41 发表的 : 哈哈 楼主果然是同志 我在3个月前已经问过了 其实使用clcmd就行了吧...keke
register_clcmd("nvgg","give_nvg")
public give_nvg(id) { if (!is_user_bot(id)) { g_nvision[id] = true g_nvisionenabled[id] = true // Custom nvg? if (get_pcvar_num(cvar_cnvg)) { remove_task(id+TASK_NVISION) set_task(0.1, "set_user_nvision", id+TASK_NVISION, _, _, "b") } else set_user_gnvision(id, 1) } else fm_set_bot_nvg(id, 1) }
下面是引用 史来姆 于 2010-09-13 20:32 发表的 : 先在zombieplague40.sma// Client commands加入 复制程式 register_clcmd("nvgg","give_nvg") 然后再加 [code]public give_nvg(id) { .......
case 1: // 范例 编号 1 { if(zp_get_user_survivor(id)) ←加上这行1 return PLUGIN_CONTINUE; ←加上这行2 drop_weapons(id, 1) // 丢弃枪枝 1为主枪 2为小枪 fm_give_item(id, "weapon_mp5navy") // 捡取枪枝为 MP5 fm_give_item(id, "ammo_9mm") // 子弹类型 9mm fm_give_item(id, "ammo_9mm") fm_give_item(id, "ammo_9mm") fm_give_item(id, "ammo_9mm") client_print(0, print_center, "%s 捡到一把MP5 冲锋枪", name) // 捡取后的提示 }
default: //预设 { client_print(0, print_center, "%s 真是倒楣,箱子里没有任何东西", name) } } return PLUGIN_CONTINUE; ←加上这个 }