GetNPCLocation: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Function|Server & Client|1.0}} | {{Info|Function|Server & Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Get the NPC's location vectors.}} | ||
{{FuncSyntax|GetNPCLocation(npc)}} | {{FuncSyntax|GetNPCLocation(npc)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|npc| | {{FuncParam|npc|The NPC identifier.}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns the XYZ vectors of the NPC's location.}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
local x, y, z = GetNPCLocation(npcid) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:NPCFunctions}} |
Latest revision as of 13:03, 19 November 2019
Description
Get the NPC's location vectors.
Syntax
GetNPCLocation(npc)
Parameters
- npc
The NPC identifier.
Return Value
- Returns the XYZ vectors of the NPC's location.
Example
local x, y, z = GetNPCLocation(npcid)
See also
- GetStreamedNPC
- GetNPCLocation
- SetNPCOutline
- SetNPCPropertyValue
- GetNPCPropertyValue
- CreateNPC
- DestroyNPC
- IsValidNPC
- GetAllNPC
- GetNPCCount
- IsNPCStreamedIn
- SetNPCLocation
- GetNPCLocation
- SetNPCHealth
- GetNPCHealth
- SetNPCAnimation
- SetNPCHeading
- GetNPCHeading
- SetNPCTargetLocation
- SetNPCFollowPlayer
- SetNPCFollowVehicle
- SetNPCRagdoll
- SetNPCRespawnTime