- 30
- 0
- Версия MoonLoader
- .027.0-preview
Lua:
function main()
while not isSampAvailable() do wait(0) end
sampAddChatMessage("{FF4500}[CarFind] {FFF101}Use /cfind [id/off]")
sampRegisterChatCommand("cfind",function(arg)
if arg == "off" then
removeWaypoint()
sampAddChatMessage("{FF4500}[CarFind] {FFF101} Waypoint is removed")
end
local id = tonumber(arg)
while true do
wait(0)
local result, handle = sampGetCarHandleBySampVehicleId(id)
if result then
local x, y, z = getCarCoordinates(handle)
sampAddChatMessage("{FF4500}[CarFind] {FFF101} Car is found! Waypoint is placed!")
placeWaypoint(x, y, z)
end
end
wait(-1)
end)
end
Не работает, при загрузке в логах сразу терминатед