glitchdetector / fivem-aerial-tramway

An implementation of the Pala Springs Aerial Tramway for FiveM
GNU General Public License v3.0
41 stars 35 forks source link

Exit from cab #2

Open zek0 opened 5 years ago

zek0 commented 5 years ago

Hello! In OneSync the isssue with exit from cab in last station. Infinite attached to entity. It is possible fix this.

Thank you for script.

ArMaTeC commented 5 years ago

yep same issue

phiomet commented 4 years ago

I change the cablecar.state from ‘IDLE’ to ‘MOVE_TO_IDLE_BOTTOM’ Line 360.

 -- Check if we've reached the bottom again
            if cablecar.gradient <= 1 then
                -- Set to raw idle to do nothing and ask the server to sync cars
                cablecar.state = "MOVE_TO_IDLE_BOTTOM"
                cablecar.gradient_distance = 0.0 
                TriggerServerEvent("omni:cablecar:host:sync", cablecar.index, "IDLE_BOTTOM")
                return
            end
SlugTeamSix commented 3 years ago

I change the cablecar.state from ‘IDLE’ to ‘MOVE_TO_IDLE_BOTTOM’ Line 360.

 -- Check if we've reached the bottom again
            if cablecar.gradient <= 1 then
                -- Set to raw idle to do nothing and ask the server to sync cars
                cablecar.state = "MOVE_TO_IDLE_BOTTOM"
                cablecar.gradient_distance = 0.0 
              TriggerServerEvent("omni:cablecar:host:sync", cablecar.index, "IDLE_BOTTOM")
                return
            end

this worked, thank you for posting