Hello,
I'm trying to check the players area, and run a script, but it's not working. I made this function to check the player's position, but it doesn't return anything.
I would like to understand how can I do this. I'm using TFS 1.4.
I'm trying to check the players area, and run a script, but it's not working. I made this function to check the player's position, but it doesn't return anything.
Lua:
function isInArea(player)
local pos = player:getPosition()
if pos.z == 9 then
if pos.x >= 2039 and pos.y >= 2005 then
if pos.x <= 2045 and pos.y <= 2012 then
return true
end
end
end
return false
end
I would like to understand how can I do this. I'm using TFS 1.4.