[ESX] (Optimized)Drug Dealer Script 0.00-0.02 Idle

Installing The Drug Dealer Script

  • Download the latest version from GitHub - oCursee/Dealer: Simple yet complex way of selling things within your server
  • Made on a Legacy test server. Has not been tested on any other Versions of ESX.
  • Extract into your resource folder.
    *Insert the .sql file into your server’s database. (Based on which version of ESX you may have to alter the SQL.)
  • Add the images of the items into your inventory system.
  • Start the server

Things to know

  • Easy to add more locations.
  • When inside of a marker the highest the script went was 0.09ms.
  • Was about 0.00 to 0.02 when Idle. (Mostly 0.01ms)
  • Planning on adding more to the script in the future, but this is it for now.

Showcase

Video - Dealer Video Preview - YouTube

2 Likes

I can see there is a good job, but how is it working in multiplayer, if you are with a friend, can you do the mission ? Can your friend see the car etc etc ?

A lot of Wait(0) and vdist in this, might wanna look at using #(location1 - location2) for distance checking and probably work on them waits.

Can use a wait of 500 to 1000 when idle and once near reduce it to 5.

1 Like

I do not think it is synced with surrounding players, and I haven’t tested it. I will have to do some reading about how to do that. But as of right now I am unsure, sorry.

Thank you for the tip, but how exactly do I use the #(location1 - location2). Is there a reference for it anywhere?

  local ped = PlayerPedId()
  local pCrds = GetEntityCoords(ped)
  -- local dist = Vdist(pCrds.x, pCrds.y, pCrds.z, 1218.14, 2398.12, 66.1)
  local dist = #(pCrds - vector3(1218.14, 2398.12, 66.1))
1 Like