#if defined _msg_included
  #endinput
#endif
#define _msg_included

native SendMessage(obj:target,id,param1=0,param2=0,param3=0,param4=0);
native bool:RecvMessage(&id,&param1=0,&param2=0,&param3=0,&param4=0);
native bool:PeekMessage(&id,&param1=0,&param2=0,&param3=0,&param4=0);
native bool:FindMessage(id,&param1=0,&param2=0,&param3=0,&param4=0);

native SendMessageStr( obj:target,id, const param[] );
native bool:RecvMessageStr( &id, param[], bufsize = sizeof param );
native bool:PeekMessageStr( &id, param[], bufsize = sizeof param );
native bool:FindMessageStr( id, param[], bufsize = sizeof param );

stock WaitMessage(id,&param1=0,&param2=0,&param3=0,&param4=0)
{
	while( ! FindMessage(id,param1,param2,param3,param4) ) sleep;
}

stock WaitMessageStr( id, param[], bufsize = sizeof param )
{
	while( ! FindMessageStr(id,param,bufsize) ) sleep;
}

enum
{
    SYSMSG_POP_NAVIMENU		= -100,

    SYSMSG_NEW_WINDOW_MAIN	= -200,
    SYSMSG_NEW_WINDOW_BG    = -201,

    SYSMSG_DESTROY_WINDOW_MAIN	= -300,
    SYSMSG_DESTROY_WINDOW_BG    = -301,
};
