Hi Guys,
Currently I am busy with setting up a server where I have imported some custom cars. When I try to Lock them with esx_vehiclelock I am getting: no vehicles nearby. But with somecars I didn’t import my self, it works. I am missing something and I dont know what. Does anyone have any tips where I can look?
Thanks in advance!
You’re asking about a custom resource not a FiveM issue. I’d ask on the original resource post or the [Release][ESX] Base thread. I don’t know what esx_vehiclelock uses to identify if a vehicle is close by, if they’re using a raycast or the janky nearby vehicle native which does not work with a lot of vehicles. There could also be something screwy with the vehicles in question.
The only tip I can give you is to use this native to find any entity in a certain radius
https://runtime.fivem.net/doc/natives/#_0x28579D1B8F8AAC80
int START_SHAPE_TEST_CAPSULE(float x1, float y1, float z1, float x2, float y2, float z2, float radius, int flags, Entity entity, int p9);
At least that’s how I’d do it.