I am making a resource in C# and i would like to get the job from the player. I saw some code in lua, but i need in C#.
Thanks
I am making a resource in C# and i would like to get the job from the player. I saw some code in lua, but i need in C#.
Thanks
What framework are you using
I use esx
PlayerData = {}
local done = false
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(10)
end
PlayerData = ESX.GetPlayerData()
done = true
end)
--==============ESX^^^^^^No TOUCHING!================---```
And this is how you define the job =
```if PlayerData.job.name == 'police' then ```
that is in lua i need the same in C#
Thanks
found anything? In the same spot
Look At My Old Guide about ESX in C#
Click me