Substitute for TaskVehicleDriveToCoord on Server?

Hello,

Trying to get a NPC to drive a vehicle to player position from out of the 400m+ scope so can’t do it client sided due to the vehicle/ped entities not existing out of scope.

Was scrolling through the RPC Natives but no tasks there seemed suitable aside from maybe TaskDriveBy but couldn’t get that working.

Any help would be appreciated,
Thanks.

EDIT: On Legacy OneSync if it matters*

1 Like

Do it client side and put SetEntityAsMissionEntity to make sure the car and driver would not vanish.
TaskVehicleDriveToCoordLongrange
https://runtime.fivem.net/doc/natives/?_0x158BB33F920D360C

Car and driver are both created server side.

I was told however that what i’m trying is impossible since when the entities are out of scope and owned by the server there’s no way to control them.

If anyone else could confirm that’d be great.

Use SET_ENTITY_DISTANCE_CULLING_RADIUS?

3 Likes

That works - entities no longer get culled from a distance using that so i can do what i wanted on client side.

Much appreciated,
Thanks.

Thank you so much, this indeed fixed the issue.