错误正在讨论的代码行是下面的一行(它们是第4行到第22行),我无法理解问题的所在,所以我来这里寻求帮助。如果你能帮忙,我会非常感激的。
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(最后)
发布于 2022-05-08 21:43:53
while true do
...
elseif not IsPedInAnyPoliceVehicle(playerPed) and not IsPauseMenuActive() then
TriggerServerEvent("mdt:hotKeyOpen")
end循环没有其他分支/其他分支。
https://stackoverflow.com/questions/72164641
复制相似问题