Daniel Koppes wrote:
>
> >This is using MESSAGE_BEGIN() and MESSAGE_END() with gmsgShowMenu....
> >
> >Is there anyway I can up the 192 limit? Or is it an engine limit?
You can split it into two messages and send them in a row.
Lazy copy-n-paste following:
---8<------------------------------------------------------------------
#define MAX_MENU_CHUNK 176
// Send menu in chunks (max. 512 chars for menu and 176 for one chunk)
void ShowMenu_Large (edict_t* pev, int bitsValidSlots, int nDisplayTime,
char pszText[]) {
int msgShowMenu = 0;
if ( (msgShowMenu = GET_USER_MSG_ID(PLID, "ShowMenu", 0)) == 0 ) {
msgShowMenu = REG_USER_MSG( "ShowMenu", -1 );
} // if
char *pMenuList = pszText;
char *aMenuList = pszText;
char szChunk[MAX_MENU_CHUNK+1];
int iCharCount = 0;
while ( pMenuList && *pMenuList )
{
am_strncpy( szChunk, pMenuList, MAX_MENU_CHUNK );
iCharCount += strlen( szChunk );//Move text to next chunk
pMenuList = aMenuList + iCharCount;
MESSAGE_BEGIN( MSG_ONE, msgShowMenu, NULL, pev );
WRITE_SHORT( bitsValidSlots );
WRITE_CHAR( nDisplayTime );
WRITE_BYTE(*pMenuList ? TRUE : FALSE); //Need more menu?
WRITE_STRING(szChunk);
MESSAGE_END();
}
}
------------------------------------------------------------------>8----
Florian.
--
Want to produce professional emails and Usenet postings?
http://www.netmeister.org/news/learn2quote.html
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders