描述
当玩家发送聊天消息时会调用此回调。| 姓名 | 描述 |
|---|---|
| playerid | 输入文本的玩家的 ID。 |
| text[] | 玩家输入的文本。 |
返回
它总是在过滤器脚本中首先被调用,因此返回 0 会阻止其他脚本看到它。例子
public OnPlayerText(playerid, text[]){new pText[144];format(pText, sizeof (pText), "(%d) %s", playerid, text);SendPlayerMessageToAll(playerid, pText);return 0; // ignore the default text and send the custom one}
