OnPlayerText

From SA-MP Wiki

Jump to: navigation, search

OnPlayerText


This callback is called when a player types some chat text (any text not starting with /).


Parameters:
(playerid, text)
playeridID of the player who typed the text.
text[]The text the player sent.


Returns0 - Don't display the text the player typed.
Returns1 - Display the text the player typed.


public OnPlayerText(playerid, text[])
{
    // for example, if the variable mute[playerid] is set to 1, it will
    // stop the text from processing, otherwise it allows it to be sent.
    if(mute[playerid] == 1) return 0;
    return 1;
}

Related Callbacks

The following callbacks might be useful as well, as they're related to this callback in one way or another.


Related Functions

The following functions might be useful, as they're related to this callback in one way or another.