[RELEASE] Advanced Illegal Tablet [PAID] [Standalone] [ESX] [VRP]

It’s just for “good practice” it’s like using CamelCase and snake_case all in the same project, it’s not “ideal”

1 Like

I was so close!!! SO VERY CLOSE! The playerID portion in the server side is all I was missing. I just had source and no local xPlayer=. Can you tell I’m not a dev :grinning_face_with_smiling_eyes:

Thanks again my friend, you are awesome!

1 Like

We are VERY happy that you liked it :slight_smile:

Minor issue :grinning_face_with_smiling_eyes: I was able to figure this out myself, but zero clue if it’s the right way to do things. The error was attempt to index nil value ESX.

I added the following line above the Esx.RegisterUsableItem in the server file and now it works:

TriggerEvent(‘esx:getSharedObject’, function(obj) ESX = obj end)

Yes, you need to get the ESX object to work, so it is necessary to call the event you made, tell me if it works correctly

It does, the server code I added is just this for anyone who comes along with the same request.

ESX.RegisterUsableItem(‘tablet’, function(playerId)
local xPlayer = ESX.GetPlayerFromId(playerId)
TriggerClientEvent(‘lg: openTablet’, playerId)
end)

1 Like

So is everything alright? haha

Yes :grinning_face_with_smiling_eyes:

1 Like

Perfect ! if you need it, we are here!