This bug or something I just cant figured it out how to solve this what is the problem when I sendnuimessage it just saying SEND_NUI_MESSAGE : invalid JSON passed in frame This This why
Here is a code part
function StartMeter()
SendNuiMessage({show = true})
InRoute = true
local Player = PlayerPedId()
local Sec = 0
local TotalDistace = 0
Citizen.CreateThread(function()
while InRoute and InTaxi do
local Dist2 = GetEntityCoords(Player)
Citizen.Wait(1000)
local Dist1 = GetEntityCoords(Player)
local DistanceTravelin1sec =
math.floor(GetDistanceBetweenCoords(Dist2, Dist1, true))
TotalDistace = TotalDistace + DistanceTravelin1sec
Sec = Sec + 1
local Fare = math.floor(TotalDistace / 100) * 35
local Minutes = math.floor(Sec / 60)
SendNUIMessage({
Fare = Fare,
Sec = Minutes,
TotalDistace = 0,
data = true
})
end
end)
end

