OnPlayerText

From NPC for VCMP 0.4 Servers
Revision as of 15:51, 9 March 2022 by 157.46.138.66 (talk) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Description:
This function is called when any player text something to server using console.


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);
	}
}