SendCommand: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
(Created page with "{{Welcome| desc=This will send a command to the server as though the NPC typed /command.| params=<syntaxhighlight lang="lua">(commandtext)</syntaxhighlight> <poem>::commandtex...")
 
No edit summary
 
Line 4: Line 4:
<poem>::commandtext: The text to be send as command.</poem>|
<poem>::commandtext: The text to be send as command.</poem>|
example=<source lang="lua">
example=<source lang="lua">
//This will send the command '/givemeweapon 27' to the server.
SendCommand("givemeweapon 27");
</source>|
</source>|
relfuncs=*[[SendChat]]
relfuncs=*[[SendChat]]
}}
}}

Latest revision as of 17:45, 7 December 2022


Description:
This will send a command to the server as though the NPC typed /command.


Parameters:

(commandtext)

commandtext: The text to be send as command.


Return Values:
This function does not return any specific values.


Example

//This will send the command '/givemeweapon 27' to the server.
SendCommand("givemeweapon 27");

Related Functions

The following functions may be helpful as they relate to this function in one way or another.