GTA V version? Latest Up to date? yes Legit or Pirate copy? Legit Steam/CD/Social Club? Social Club Windows version? 10 Did you try to delete caches.xml and try again? yeah Error screenshot (if any) – at the end System specifications amd fx 8320e, 12gb ram, 128ssd + 5 (1tb) HDD, Nvidia GTX980 What did you do to get this issue? used function native “GetClosestObjectOfType” What server did you get this issue on? every server CitizenFX.log file not needed i think .dmp files/report IDs not crash errors
Did you try to disable/uninstall your Anti-virus? always
Like honestly… do you really need to check 20 times per second to see if a player is close to a door…
There is a lot weird things that are happening in esx_celldoors:
It checks at default 100x per second if someone is close to a door. Multiply that by the number of door you have configured (default 23).
Why is it even asking for the closest object when the player could be no where near the door. Easy fix is to do the distance check first before asking the closest object.
Why is all of this in a loop in the first place, you only want this to happen when the players is pressing the E key…
As I said earlier, the GetClosestObjectOfType native probably is a heavy function in itself, when you combine it with a loop and unnecessary calls, then yes your resource will become slow. I suggest reading up on my topic I made a while back:
Also, I can review the allavacciavostramodder script/resource for you to see why it’s slow. Just post it here if you are willing to.
i fixed it ^^ is my anticheat since the native to check for all vehicles GetClosestVehicle works for cars and doesn’t recognize planes and copters and boats i added the CastRayPointToPoint to despawn forbidden vehicles… now i get 0.29ms.
i’ll check better the esx_celldoors and try to fix it myself thanks for the help