Quote:
Originally Posted by Ehabz
Can u be more specific since im newbie @!Morte
|
First, go to this function:
PHP Code:
// Buy Menu 1
public show_menu_buy1(taskid)
{
// Get player's id
static id
(taskid > g_maxplayers) ? (id = ID_SPAWN) : (id = taskid);
// Player dead?
if (!g_isalive[id])
return;
// Zombies or survivors get no guns
if (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)
// Title
len += formatex(menu[len], charsmax(menu) - len, "\y%L \r[%d-%d]^n^n", id, "MENU_BUY1_TITLE", WPN_STARTID+1, min(WPN_STARTID+7, WPN_MAXIDS))
// 1-7. Weapon List
for (weap = WPN_STARTID; weap < maxloops; weap++)
len += formatex(menu[len], charsmax(menu) - len, "\r%d.\w %s^n", weap-WPN_STARTID+1, WEAPONNAMES[ArrayGetCell(g_primary_weaponids, weap)])
// 8. Auto Select
len += formatex(menu[len], charsmax(menu) - len, "^n\r8.\w %L \y[%L]", id, "MENU_AUTOSELECT", id, (WPN_AUTO_ON) ? "MOTD_ENABLED" : "MOTD_DISABLED")
// 9. Next/Back - 0. Exit
len += formatex(menu[len], charsmax(menu) - len, "^n^n\r9.\w %L/%L^n^n\r0.\w %L", id, "MENU_NEXT", id, "MENU_BACK", id, "MENU_EXIT")
// Fix for AMXX custom menus
if (pev_valid(id) == PDATA_SAFE)
set_pdata_int(id, OFFSET_CSMENUCODE, 0, OFFSET_LINUX)
show_menu(id, KEYSMENU, menu, -1, "Buy Menu 1")
}
Then, in this line
PHP Code:
// Zombies or survivors get no guns
if (g_zombie[id] || g_survivor[id])
return;
Add this:
PHP Code:
// Zombiesm survivors and snipers get no guns
if (g_zombie[id] || g_survivor[id] || g_sniper[id])
return;
And thats it. I recommend you to go to the
Code Snippets/Tutorials section to understand the basic things of programming.
__________________