/Sys Problem

05/12/2013 16:00 Rhyder`#1
How to make my notice have a ign? because i cnt find it :(

example: /sys HELLO!
the notice must be like this (jayjei14): HELLO!

How to do it? that have in game name?
05/12/2013 16:12 Jopsi332#2
Code:
BOOL TextCmd_System( CScanner & scanner )
{
#ifdef __WORLDSERVER
    CHAR szString[512] = "";
    CUser* pUser    = (CUser*)scanner.dwValue;
    CString strName;
    strName = pUser->GetName();

    scanner.GetLastFull();
    if( strlen( scanner.token ) >= 512 )
        return TRUE;
    strcpy( szString, scanner.token );
    StringTrimRight( szString );

    g_DPCoreClient.SendSystem( "[" + strName + "]" +  szString );

#endif    // __WORLDSERVER
    return TRUE;
}
credits: Cross
05/12/2013 23:23 tangia1426#3
Quote:
Originally Posted by Jopsi332 View Post
Code:
BOOL TextCmd_System( CScanner & scanner )
{
#ifdef __WORLDSERVER
    CHAR szString[512] = "";
    CUser* pUser    = (CUser*)scanner.dwValue;
    CString strName;
    strName = pUser->GetName();

    scanner.GetLastFull();
    if( strlen( scanner.token ) >= 512 )
        return TRUE;
    strcpy( szString, scanner.token );
    StringTrimRight( szString );

    g_DPCoreClient.SendSystem( "[" + strName + "]" +  szString );

#endif    // __WORLDSERVER
    return TRUE;
}
credits: Cross

What file .h or .ccp file?
05/12/2013 23:41 Velmore#4
Quote:
Originally Posted by tangia1426 View Post
What file .h or .ccp file?

cpp
05/12/2013 23:45 tangia1426#5
Quote:
Originally Posted by Jopsi332 View Post
Code:
BOOL TextCmd_System( CScanner & scanner )
{
#ifdef __WORLDSERVER
    CHAR szString[512] = "";
    CUser* pUser    = (CUser*)scanner.dwValue;
    CString strName;
    strName = pUser->GetName();

    scanner.GetLastFull();
    if( strlen( scanner.token ) >= 512 )
        return TRUE;
    strcpy( szString, scanner.token );
    StringTrimRight( szString );

    g_DPCoreClient.SendSystem( "[" + strName + "]" +  szString );

#endif    // __WORLDSERVER
    return TRUE;
}
credits: Cross
Quote:
Originally Posted by Velmore View Post
cpp
i mean what name of .h or .ccp

i mean what name of .h or .ccp
05/12/2013 23:49 Jopsi332#6
functextcmd.cpp

you must replace the whole func