Public Transport AI - Version 2.0

NEW VERSION HERE

Old post ## **FEATUERS** - ***No ESX*** : it requires only the default *spawnmanager* resource - ***Network***: from a model *stop-migration* to a model *migration-aware*. That means that there should not be more problems when more than one person is online - ***Configurability***: Create every route you want (everything explained in the config.lua)

LINK TO GITHUB

:arrow_forward: Download :arrow_backward:

Here’s a preview (old but pretty much the same)


Other resources

[ESX] Hitman (PvP)
[ESX] Pet Store

22 Likes

This is super nice, great release :slight_smile:

2 Likes

Hey, thanks for the release.
I am also since a few weeks in the process of writing a new bus AI that will be much more complex. Unfortunately I can’t find a way to make the vehicles run stable, server-side the PED and bus is deleted as soon as I leave the server. On the client side the spawn has the effect that the driver is missing and the bus ends the journey but stops.

Did you get the problem under OneSync under control? What do you do differently compared to the previous version that the despawn no longer takes place when I leave the server?

Sorry for asking, but I’m sitting on it for weeks now and could imagine to give parts of my driving logic to others, if I just get the problem fixed.

To speak briefly about it, I’m working on an AI with depot, integrated player job and timetable, these areas already work quite wonderfully except for the job that I want to write on top. Only the Despawn prepares me just worry.

It took months of try and error to reach this point and it’s not that good anyway. The main problem is that the server can’t run code like tasks because it’s routed to a client. So no clients no code executed.
I saw this video about predicting server-side what should happend on a client but I didn’t find out more about it.
About despawning there are some trick I found but I still got problems specailly when restarting the resource and being out of scope of the entity, even setting SetPlayerCullingRadius and SetEntityDistanceCullingRadius sometimes the ped just don’t start the task.
As suggested from the devs we should spawn entities server side even if it’s quite hard to make it work right. I heard about CREATE_AUTOMOBILE native which should be better but it’s not documented and as far as I now not even invokable. I noticed also that spawning vehicles server side is easier then spawning peds, in fact they require like 3 to 8 attempts to get spawned.

If you need anything else just pm me :grinning:

1 Like

looks amazaing :ok_hand:

1 Like

Nice work, but too bad it’s not compatible with one sync :wink:

It does, I have it set to ‘on’ on my server. If nothing happends try look at the first lines of client.lua or just disconnect and connect again to the server

So for my case, no problem everything is going but at least 50 spawn buses: D, I have to stay around for it to work (I’m in infinity)

Same for me if this is still valid

very nice

1 Like

I rly love this. Is it allowed to make an esx system with your code?

Sure! Use this resource as you want. Just don’t sell it

Beautiful resource

1 Like

Really nice, thank you, will definitely check how it works :slight_smile:

1 Like

perfect, thank you

2 Likes

its spwaning about 10 bus at same spot needs fixing

Using QBCore. All bus are locked.

Mmm… For sure not QBCore fault but not sure what’s the problem

Thank you! Nice release. :slightly_smiling_face:

Nice work :partying_face: