OnPlayerText

From SA-MP Wiki

Jump to: navigation, search

OnPlayerText


Called when a player sends a chat message.


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


ReturnsReturning 0 in this callback will stop the text from being sent


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.

Personal tools