Ok I have added these to parts to the code...
Code:
switch(Action[id]) {
case 1: {
iKeys |= (1<<iCurrKey++)
iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n8. Tryout")
}
case 2: {
iKeys |= (1<<iCurrKey++)
format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n8. Accept")
}
default: {
Action[id] = ACTION_TRYOUT
iKeys |= (1<<iCurrKey++)
iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n8. Tryout")
}
}
Code:
case 7: {
client_print(id, print_chat, "***CASE 7 ACTIVATED! ********" )
switch(Action[id]) {
case 1: {
Action[id] = ACTION_ACCEPT
ShowtryoutSelMenu(id, g_iMenuPosition)
}
case 2: {
Action[id] = ACTION_TRYOUT
ShowtryoutSelMenu(id, g_iMenuPosition)
}
}
}
Code:
public ShowtryoutSelMenu( id, pos ) {
if( pos < 0 ) return
new i, j
new szMenuBody[MENU_SIZE]
new iCurrKey = 0
new szUserName[32]
new iStart = pos * MENU_PLAYERS
new iNum
get_players( g_iMenuPlayers, iNum )
if( iStart >= iNum )
iStart = pos = g_iMenuPosition = 0
new iLen = format( szMenuBody, MENU_SIZE-1, "\rTryout | Accept Menu \R%d/%d^n\w^n", pos+1, (iNum / MENU_PLAYERS + ((iNum % MENU_PLAYERS) ? 1 : 0 )) )
new iEnd = iStart + MENU_PLAYERS
new iKeys = (1<<9|1<<7)
if( iEnd > iNum )
iEnd = iNum
for( i = iStart; i < iEnd; i++ )
{
j = g_iMenuPlayers[i]
get_user_name( j, szUserName, 31 )
if( is_user_admin(j) )
{
iCurrKey++
iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "\d%d. %s^n\w", iCurrKey, szUserName )
}else
{
iKeys |= (1<<iCurrKey++)
iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "%d. %s^n", iCurrKey, szUserName )
}
}
switch(Action[id]) {
case 1: {
iKeys |= (1<<iCurrKey++)
iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n8. Tryout")
}
case 2: {
iKeys |= (1<<iCurrKey++)
format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n8. Accept")
}
default: {
Action[id] = ACTION_TRYOUT
iKeys |= (1<<iCurrKey++)
iLen += format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n8. Tryout")
}
}
if( iEnd != iNum )
{
format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n9. More...^n0. %s", pos ? "Back" : "Exit" )
iKeys |= (1<<8)
}
else
format( szMenuBody[iLen], (MENU_SIZE-1-iLen), "^n0. %s", pos ? "Back" : "Exit" )
show_menu( id, iKeys, szMenuBody, -1 )
return
}
public PressedtryoutSelMenu( id, key ) {
switch( key ) {
case 8: ShowtryoutSelMenu( id, ++g_iMenuPosition ) // More Option
case 9: ShowtryoutSelMenu( id, --g_iMenuPosition ) // Back Option
case 7: {
client_print(id, print_chat, "***CASE 7 ACTIVATED! ********" )
switch(Action[id]) {
case 1: {
Action[id] = ACTION_ACCEPT
ShowtryoutSelMenu(id, g_iMenuPosition)
}
case 2: {
Action[id] = ACTION_TRYOUT
ShowtryoutSelMenu(id, g_iMenuPosition)
}
}
}
// Chose a Player
default:
{
new iPlayerID = g_iMenuPlayers[g_iMenuPosition * MENU_PLAYERS + key]
switch(Action[id]) {
case 1: ShowTryOutMenu(iPlayerID)
case 2: AcceptTarget(id, iPlayerID)
}
}
}
return PLUGIN_HANDLED
}
But when i press 8 nothing happens, i mean nothing, the menu just sits there, it doesnt even exit? Anybody have any idea why ?