- Documentation
- Shared functions
- getCityName
Function
getCityName
Returns the map region name at a point ("Los Santos", "San Fierro", "Las Venturas", "Red County", "Flint County", "Whetstone", "Bone County", "Tierra Robada"); the same as getZoneName(x, y, z, true).
Syntax
string getCityName(float x, float y [, float z = 0])Arguments
xfloat- X coordinate (or a vector).
yfloat- Y coordinate.
zfloat, optional = 0- Z height.
Returns
The region name, or "Unknown".
Example
addEventHandler("onPlayerSpawn", root, function()
local x, y, z = getElementPosition(source)
outputChatBox("Witaj w " .. getCityName(x, y, z), source)
end)