- Work With ESX
- Police and Ambulance Job Supported
- Works Only Driver Seat
- Kicking Player From Server (Optional)
- 0.00 ms Resmon
Showcase
Download
Showcase
Download
Some things you should change
You don’t need this anymore on the newer esx versions
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(0)
end
PlayerData = ESX.GetPlayerData()
end)
And the biggest Issue is that a modder can just run the Kickevent and put the PlayerID of a different Player in it, since you let the client choose what player to kick TriggerServerEvent('kickplayer', PlayerId)
.
To fix this you should remove the PlayerId / target
and just Kick the Player using the sourceID like this on the Serverside:
RegisterServerEvent('kickplayer')
AddEventHandler('kickplayer', function()
DropPlayer(source, 'You Have Been Kicked Server Because Thiefing Emergency Cars')
end)
thank you I fixed this and there may still be people like me who have to use an old esx version.
Yeah just saw that your code technically doesn’t even need it i created two pull requests accidently but in both fix some errors
any one can make for qbcore ?
Nice, also one more thing, any chance you know who created the speedometer? It looks very good
Nice, just a few things to fix up and it would be really clean
Very great script ! But I’m trying to make it vehicle dependent all the time. Could anyone help me with the line: if GetVehicleClass(veh) == 18 or GetVehicleClass(veh) == 15 then
and why does this not work? :
if GetDisplayNameFromVehicleModel(vehicleProps.model) == ‘police’ then