0

在我的控制台中它说

预期“)”(在“结束”附近关闭“(”在第 13 行))

这是代码

   Citizen.CreateThread(function()
    while true do
        Citizen.Wait(1)
        if GetDistanceBetweenCoords(GetEntityCoords(PlayerPedId()), 1690.6492919922,4886.8735351563,42.034355163574, true) <= 3 then
            DrawMarker(21, 1690.6492919922,4886.8735351563,42.034355163574, 1.0, 1.0, 0.5, 0, 0, 0, 0.7, 0.7, 0.5, 2, 250, 250, 250, 0.2, true, 3, 2, false, false, false)
            if GetDistanceBetweenCoords(GetEntityCoords(PlayerPedId()), 1690.6492919922,4886.8735351563,42.034355163574, true) <= 0.8 then
                DrawText3Ds(1690.6492919922,4886.8735351563,42.034355163574, "[~g~E~w~] Find Job")
                if IsControlJustReleased(1, 38) then
                    FreezeEntityPosition(player, true)
                    TaskStartScenarioInPlace(PlayerPedId(), "PROP_HUMAN_BUM:BIN", 0, true)
                    exports["progressBars"]:startUI(5000, "Finder job")
                    Citizen.Wait(5000)
                    print("Du fandt et job")
                    local hash = GetHashKey("rumpo")
                    RequestModel("rumpo")
                    CreateVehicle(rumpo, 1699.3465576172, 4878.8359375, 42.029155731201, 186.6162109375, true, false)
                    ClearPedTasksImmediately(GetPlayerPed(-1))
                    SetNewWaypoint(14.034358978271, 3703.9914550781)
                    FreezeEntityPosition(player, true)
                    TriggerServerEvent("MarlotDrugVan:vehspawner")
                       
                    end
                end
            end
        end
    end
end)
4

1 回答 1

2

你有end一对多。

1 function 1 while 3if秒 ->end需要 5 秒

6end

于 2021-02-16T11:17:12.627 回答