這個是突然想出來的,有錯請炮轟 -------------
所需材料:
zombie_plague40.sma
EmEditor或WordPad (這個不知道好不好用)
Counter-Strike (廢話)
能正常使用的鍵盤和滑鼠 (廢話)
-------------
首先,當然要禁止彈出選槍選單吧,不然自己都按到槍,買槍有啥用…
1.用EmEditor開啟『zombie_plague40.sma』(不要跟我說不會開啟
)
2.首先禁止主槍選單
找尋
// Buy Menu 1// Buy Menu 1
public show_menu_buy1(taskid)
{
// Get player's id
static id
(taskid > g_maxplayers) ? (id = ID_SPAWN) : (id = taskid);
// Zombies or survivors get no guns
if (!g_isalive[id] || g_zombie[id] || g_survivor[id])
return;
// Bots pick their weapons randomly / Random weapons setting enabled
if (get_pcvar_num(cvar_randweapons) || g_isbot[id])
{
buy_primary_weapon(id, random_num(0, ArraySize(g_primary_items) - 1))
menu_buy2(id, random_num(0, ArraySize(g_secondary_items) - 1))
return;
}
// Automatic selection enabled for player and menu called on spawn event
if (WPN_AUTO_ON && taskid > g_maxplayers)
{
buy_primary_weapon(id, WPN_AUTO_PRI)
menu_buy2(id, WPN_AUTO_SEC)
return;
}
static menu[300], len, weap, maxloops
len = 0
maxloops = min(WPN_STARTID+7, WPN_MAXIDS)
3.把
len = 0 改成 len = 1,那主槍菜單就乖乖的回家了
4.再來
禁止手槍選單找尋
// Buy Menu 2// Buy Menu 2
show_menu_buy2(id)
{
static menu[250], len, weap, maxloops
len = 0
maxloops = ArraySize(g_secondary_items)
// Title
len += formatex(menu[len], charsmax(menu) - len, "\y%L^n", id, "MENU_BUY2_TITLE")
// 1-6. Weapon List
for (weap = 0; weap < maxloops; weap++)
len += formatex(menu[len], charsmax(menu) - len, "^n\r%d.\w %s", weap+1, WEAPONNAMES[ArrayGetCell(g_secondary_weaponids, weap)])
// 8. Auto Select
len += formatex(menu[len], charsmax(menu) - len, "^n^n\r8.\w %L \y[%L]", id, "MENU_AUTOSELECT", id, (WPN_AUTO_ON) ? "MOTD_ENABLED" : "MOTD_DISABLED")
// 0. Exit
len += formatex(menu[len], charsmax(menu) - len, "^n^n\r0.\w %L", id, "MENU_EXIT")
show_menu(id, KEYSMENU, menu, -1, "Buy Menu 2")
5.把
len = 0 改成 len = 1,那手槍菜單也乖乖的回家了
6.禁止了選槍選單,再到『addon/amxmodx/config/zombie_plague.cfg』
7.找zp_remove_money 1 // Remove player's money
8.把zp_remove_money 1 改成 0
9.那就完成了…
10.話說不能用的話,回個貼吧
第二次發教學文,算不錯吧
2009/12/16 21:31:
反省過後,發現自己原來是在強人所難
感謝AykinDalike的勸告