I only get one error relating to the script which comes in F8 menu only once when i join the server, no other errors even when pressing “9”, the button which is supposed to open it.
The error i get is this
This is the whole line of code where the error is
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local playerPed = PlayerPedId()
local playerVeh = GetVehiclePedIsIn(playerPed, false)
if not isVisible and IsPedInAnyPoliceVehicle(playerPed) and IsControlJustPressed(0, 311) and GetEntitySpeed(playerVeh) < 10.0 then
if GetVehicleNumberPlateText(getVehicleInFront()) then
TriggerServerEvent("mdt:performVehicleSearchInFront", GetVehicleNumberPlateText(getVehicleInFront()))
end
elseif IsControlJustPressed(0, 163) then
TriggerServerEvent("mdt:hotKeyOpen")
end
elseif not IsPedInAnyPoliceVehicle(playerPed) and not IsPauseMenuActive() then
TriggerServerEvent("mdt:hotKeyOpen")
end
if DoesEntityExist(playerPed) and IsPedUsingActionMode(playerPed) then -- disable action mode/combat stance when engaged in combat (thing which makes you run around like an idiot when shooting)
SetPedUsingActionMode(playerPed, -1, -1, 1)
end
end)
and this is what it looks like in visual code studio
I really can´t figure this out, i would really appreciate if someone helped out. Thank you in advance.