这个是突然想出来的,有错请炮轰 -------------
所需材料:
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的劝告