require "lib.moonloader"
require "lib.sampfuncs"
local coordinates =
{
-- {x1, y1, z1, x2, y2, z2, false/true}
{-1334, 455, 28 , -1482, 340, 36},
}
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
wait(0)
sampRegisterChatCommand('coord', coord_check)
thread = lua_thread.create_suspended(thread_function)
while true do wait(0)
end
end
function checkArea()
local en = false
for i = 1, #coordinates do
if isCharInArea3d(PLAYER_PED, coordinates[i][1], coordinates[i][2], coordinates[i][3], coordinates[i][4], coordinates[i][5], coordinates[i][6], false) then en = true end
end
return en;
end
function coord_check ()
if checkArea() then
sampAddChatMessage('Игрок в зоне', -1)
else
sampAddChatMessage('Игрок вне зоны', -1)
end
end