VORPCORE / VORP-Hunting

Selling Animals & Skins script
GNU General Public License v3.0
6 stars 21 forks source link

Job got nil #39

Closed TWWarof closed 2 years ago

TWWarof commented 2 years ago

RegisterServerEvent("vorp_hunting:getJob") AddEventHandler("vorp_hunting:getJob", function() local _source = source local Character = VorpCore.getUser(source).getUsedCharacter local job = Character.job -- character table TriggerClientEvent("vorp_hunting:findJob", source, job)

end)

Remove the source from the event, because u get the source nil!

TWWarof commented 2 years ago

From the event brackets.

TWWarof commented 2 years ago

If u still wanna keep _source

RegisterServerEvent("vorp_hunting:getJob") AddEventHandler("vorp_hunting:getJob", function() local _source = source local Character = VorpCore.getUser(_source).getUsedCharacter local job = Character.job -- character table TriggerClientEvent("vorp_hunting:findJob", _source, job)

end)