I did like this
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
DrawText2(0.70, 1.449, 1.0,1.0,0.45, "POLITI Online: " .. policeonline , 0 ,119, 255, 150)
DrawText2(0.70, 1.42, 1.0,1.0,0.45, "Læger online : " .. emsonline , 246 ,56, 56, 150)
DrawText2(0.70, 1.391, 1.0,1.0,0.45, "Taxa Fører: " .. taxionline , 239 ,255, 0, 150)
DrawText2(0.70, 1.391, 1.0,1.0,0.45, "arbejdsløs:" .. unemployedonline , 239 ,255, 0, 150)
DrawText2(0.70, 1.391, 1.0,1.0,0.45, "Taxi on duty:" .. mafiaonline , 239 ,255, 0, 150)
end
end)
and this
local xPlayers = ESX.GetPlayers()
EMSConnected = 0
PoliceConnected = 0
TaxiConnected = 0
unemployedConnected = 0
mafiaConnected = 0
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'ambulance' then
EMSConnected = EMSConnected + 1
end
if xPlayer.job.name == 'unemployed' then
unemployedConnected = unemployedConnected + 1
end
if xPlayer.job.name == 'police' then
PoliceConnected = PoliceConnected + 1
end
if xPlayer.job.name == 'mafia' then
mafiaConnected = mafiaConnected + 1
end
if xPlayer.job.name == 'taxi' then
TaxiConnected = TaxiConnected + 1
end
end
cb(EMSConnected, PoliceConnected, TaxiConnected,unemployedConnected,mafiaConnected)
end)
what did i do wrong? :s i get the error "Couldnt load recourse esx_jobsonline