SetNPCLocation: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|SetNPCLocation(npc, x, y, z)}} {{FuncParameters}} {{FuncParam|npc|__EDIT_ME__}} {{FuncParam|x|__ED..." |
No edit summary |
||
Line 6: | Line 6: | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|npc| | {{FuncParam|npc|NPC which you want to teleport}} | ||
{{FuncParam|x| | {{FuncParam|x|X coordinate}} | ||
{{FuncParam|y| | {{FuncParam|y|Y coordinate}} | ||
{{FuncParam|z| | {{FuncParam|z|Z coordinate}} | ||
{{FuncReturnValue|__EDIT_ME__}} | {{FuncReturnValue|__EDIT_ME__}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
function bringNPC(player, npc) | |||
local x,y,z = GetPlayerLocation(player) | |||
SetNPCLocation(tonumber(npc), x,y,z) | |||
end | |||
AddCommand('bringnpc', bringNPC) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
__EDIT_ME__ | __EDIT_ME__ |
Revision as of 19:51, 13 November 2019
Description
__EDIT_ME__
Syntax
SetNPCLocation(npc, x, y, z)
Parameters
- npc
NPC which you want to teleport - x
X coordinate - y
Y coordinate - z
Z coordinate
Return Value
- __EDIT_ME__
Example
function bringNPC(player, npc)
local x,y,z = GetPlayerLocation(player)
SetNPCLocation(tonumber(npc), x,y,z)
end
AddCommand('bringnpc', bringNPC)
See also
__EDIT_ME__