UTIL SayText: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Category.)
m (Cleanup)
Line 2: Line 2:


==Usage==
==Usage==
void UTIL_SayText(const char *pText, CBasePlayer *pToPlayer)
<source lang=cpp>
void UTIL_SayText( const char *pText, CBasePlayer *pToPlayer )
</source>


==Examples==
==Examples==
CON_COMMAND( say_self, "Sends message to self in chat")
<source lang=cpp>
{
    CON_COMMAND( say_self, "Sends message to self in chat" )
    UTIL_SayText(args, ToBasePlayer(UTIL_GetCommandClientIndex()));
    {
}
        UTIL_SayText( args, ToBasePlayer( UTIL_GetCommandClientIndex() ) );
    }
</source>


[[Category:UTIL]]
[[Category:UTIL]]

Revision as of 13:21, 29 July 2021

UTIL wrapper function for UTIL_SayTextFilter that sends a message to a player.

Usage

void UTIL_SayText( const char *pText, CBasePlayer *pToPlayer )

Examples

    CON_COMMAND( say_self, "Sends message to self in chat" )
    {
        UTIL_SayText( args, ToBasePlayer( UTIL_GetCommandClientIndex() ) );
    }