OnPlayerText: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Welcome| desc=This function is called when any player text something to server using console.| params=<syntaxhighlight lang="lua">(playerid, message)</syntaxhighlight> <poem...") |
No edit summary |
||
| Line 1: | Line 1: | ||
{{Welcome| | {{Welcome| | ||
desc=This function is called when any player text something to server using console.| | desc=This function is called when any player text something to server using console. The function is called even if NPC sends a text to server using [[SendChat]]| | ||
params=<syntaxhighlight lang="lua">(playerid, message)</syntaxhighlight> | params=<syntaxhighlight lang="lua">(playerid, message)</syntaxhighlight> | ||
<poem>::playerid: The player who send the text to server. | <poem>::playerid: The player who send the text to server. | ||
Latest revision as of 15:52, 9 March 2022
Description:
This function is called when any player text something to server using console. The function is called even if NPC sends a text to server using SendChat
Parameters:
(playerid, message)
playerid: The player who send the text to server.
message: The message the player send to server.
Return Values:
This function does not return any specific values.
Example
function OnPlayerText(playerid, message)
{
if(message=="come")
{
print("Going to player: "+playerid+"\n");
SendCommand("goto "+playerid);
}
}