No categories assigned

LUA:GetX

Revision as of 19:35, 11 September 2013 by Jabantiz (talk | contribs) (Created page with "= LUA Functions: GetX() = Gets the current X location for the given spawn ==== Syntax ==== var = GetX(param1) ==== Parameters ==== ; Required - ''param1'' (Spawn) : ''param1'...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: GetX()

Gets the current X location for the given spawn


Syntax

var = GetX(param1)


Parameters

Required - param1 (Spawn)
param1 is the spawn who's X location we want to get


Usage

function hailed(NPC, Spawn)
    Say(NPC, "Your location is: " .. GetX(Spawn) .. ", " .. GetY(Spawn) .. ", " .. GetZ(Spawn))
end

The NPC will respond with the players position

Notes

Returns a float