I don't really know where the fault is, with the edited one, if I press any key, nothing happens. I just added \r, \w before the numbers and changed the header of menu:
Original:
PHP Code:
public ShowExtraMenu( id, pos )
{
if( pos < 0 ) return
new i, j = 0, nStart, nEnd, nLen, nKeys = (1<<9)
new szMenuBody[512]
nStart = pos * MAX_DISPLAY
if( nStart >= MO_MAX_EXTRA )
nStart = pos = g_nMenuPosition[id-1] = 0
nLen = format( szMenuBody, 511, "\yExtras Menu:\R%d/2^n\w^n", pos + 1 )
nEnd = nStart + MAX_DISPLAY
if( nEnd > MO_MAX_EXTRA ) nEnd = MO_MAX_EXTRA
for( i = nStart; i < nEnd; i++ )
{
nKeys |= (1<<j++)
nLen += format( szMenuBody[nLen], (511-nLen), "%d. %s^n", j, g_szExtraMenuTxt[i] )
}
if( nEnd != MO_MAX_EXTRA )
{
format( szMenuBody[nLen], (511-nLen), "^n9. More...^n0. Back" )
nKeys |= (1<<8)
}
else format( szMenuBody[nLen], (511-nLen), "^n0. Back" )
show_menu( id, nKeys, szMenuBody, -1 )
return
}
Edited:
PHP Code:
public ShowExtraMenu( id, pos )
{
if( pos < 0 ) return
new i, j = 0, nStart, nEnd, nLen, nKeys = (1<<9)
new szMenuBody[512]
nStart = pos * MAX_DISPLAY
if( nStart >= MO_MAX_EXTRA )
nStart = pos = g_nMenuPosition[id-1] = 0
nLen = format( szMenuBody, 511, "\yExtra Menu: %d/2^n\w^n^n", pos + 1 )
nEnd = nStart + MAX_DISPLAY
if( nEnd > MO_MAX_EXTRA ) nEnd = MO_MAX_EXTRA
for( i = nStart; i < nEnd; i++ )
{
nKeys |= (1<<j++)
nLen += format( szMenuBody[nLen], (511-nLen), "\r%d. \w%s^n", j, g_szExtraMenuTxt[i] )
}
if( nEnd != MO_MAX_EXTRA )
{
format( szMenuBody[nLen], (511-nLen), "^n\r9. \wMore...^n\r0. \wBack" )
nKeys |= (1<<8)
}
else format( szMenuBody[nLen], (511-nLen), "^n\r0. \wBack" )
show_menu( id, nKeys, szMenuBody, -1 )
return
}