are you using the standalone version?
Yes, and i would like it to trigger an event from on use
just use TriggerEvent or TriggerServerEvent since the use is triggered client sided
I was not able to trigger an event from the shared file where the items use are placed. I tried trigger serverside and clientside but nothing worked.
Thats weird, can you share a screenshot?
I can write the code here, i attempted ALOT of diffrent things This is the last attempted code:
[‘PISTOL’] = {
label = ‘Pistol’,
weight = 15000,
unique = true,
Close = false,
Decaytime = false,
Use = function(item)
local playerPed = GetPlayerPed(-1)
TriggerServerEvent(“zinze:checkpistol”, playerPed, item)
–print('Pistol Brugt: ',json.encode(item))
end,
i attempt to do so it checks serverside if the player has the pistol in their inventory, if they do then it triggers clientside: SetCurrentPedWeapon(PlayerPedId(), GetHashKey(“weapon_pistol”), true)
When is the ESX version comming ?