[Release]drugs to npc's [ESX]

wow u dont have to be rude, i was just asking.

Look in the outlaw script and check how it works with everything else man just figure it out Ez peezy :smiley:

If you ever get bored and need a release just add Animation for selling of drugs lmao :stuck_out_tongue: Its litterly 1 line that people should already know how to do

Math Random is not random when you are Selling its just get an Another price when you restart the whole resource.

Should now be fixed.

Awesome script bro, gonna try this out to see if it lives up to the hopes

it should let me know if you have any problems

Will do man (20 characters)

Very nice script, it would be good to have reports to police, but still great work !! If anyone have police reports done it would be nice !

Added

3/26/18
Added a animation on a successful sale
Added an alert to cops if the npc calls the cops(the alert doesn’t give an exact location so cops actually have to look for them can be changed fairly easy)

police alert

1 Like

You are the man !! Thanks og.

Np

(20Characterslong)

cant get it to work :frowning:

Im not sure if

RegisterNetEvent(‘getjob’)
AddEventHandler(‘getjob’, function(jobName)
myJob = jobName
end)
&
RegisterServerEvent(‘fetchjob’)
AddEventHandler(‘fetchjob’, function()
local xPlayer = ESX.GetPlayerFromId(source)
TriggerClientEvent(‘getjob’, source, xPlayer.job.name)
end)

Are working on my end, I sold to some NPC’s and it stated that “They’re calling the police” and my job is police but no notification shows up for some reason

sell 2 times first sell it will fetch the job

what wont work?

20characters

Its not notifying the police I’m attempting to test it so I am selling while my job title is “police” so I can see if it alerts 911 but even when Im not a cop it wont alert 911

hmm idk it works for me

ohh might have to trigger on the server the notifaction

I’ve modified the file, for testing purpose I’ve made both “Not interested” and “calling the cops”
both have the trigger to notifyc
which is here

  	TriggerClientEvent("animation", source)
  	xPlayer.removeInventoryItem('opium_pooch', 1)
  		xPlayer.addAccountMoney('black_money', paymento)
  		selling = false
  	elseif selling == true and success == false and notintrested == true then
  		TriggerClientEvent("pNotify:SetQueueMax", source, "lmao", 5)
  		TriggerClientEvent("pNotify:SendNotification", source, {
  			text = "They are not interested",
  			type = "error",
  			progressBar = false,
  			queue = "lmao",
  			timeout = 2000,
  			layout = "CenterLeft"
  	})
  	TriggerClientEvent("notifyc", source)
  		selling = false

But as you can see in the screenshot… nothing gets displayed for myself (On duty officer) to see

hmm very strange did you sell once then again?