GetDoorLocation: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server & Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetDoorLocation(door)}} {{FuncParameters}} {{FuncParam|door|__EDIT_ME__}} {{FuncReturnVa..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Function|Server & Client|1.0}} | {{Info|Function|Server & Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Gets the XYZ vector of the specified door created earlier with [[CreateDoor]].}} | ||
{{FuncSyntax|GetDoorLocation(door)}} | {{FuncSyntax|GetDoorLocation(door)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|door| | {{FuncParam|door|The door specifier}} | ||
{{FuncReturnValue| | {{FuncReturnValue|the x, y, z vectors of the door location.}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
AddCommand("doorlocation", function(playerid) | |||
local X, Y, Z = GetDoorLocation(doorid) | |||
AddPlayerChat(player, "Door location: "..X..", "..Y..", "..Z) | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
* [[CreateDoor]] | |||
* [[DestroyDoor]] | |||
* [[SetDoorOpen]] | |||
* [[IsDoorOpen]] | |||
* [[GetAllDoors]] | |||
* [[GetDoorCount]] | |||
* [[GetDoorModel]] | |||
* [[SetDoorLocation]] | |||
* [[GetDoorLocation]] | |||
* [[SetDoorDimension]] | |||
* [[GetDoorDimension]] |
Revision as of 14:29, 16 November 2019
Description
Gets the XYZ vector of the specified door created earlier with CreateDoor.
Syntax
GetDoorLocation(door)
Parameters
- door
The door specifier
Return Value
- the x, y, z vectors of the door location.
Example
AddCommand("doorlocation", function(playerid)
local X, Y, Z = GetDoorLocation(doorid)
AddPlayerChat(player, "Door location: "..X..", "..Y..", "..Z)
end)