client/main.lua
line 100 if i’m not mistaken.
It’s hard coded to 45. I intended to have it as a config variable but i guess i forgot. Increasing / decreasing this number will have the desired effect on the restrain radius.
if GetDistanceBetweenCoords(GetEntityCoords(playerPed), Config.ServiceLocation.x, Config.ServiceLocation.y, Config.ServiceLocation.z) > 45 then
ESX.Game.Teleport(playerPed, Config.ServiceLocation)
Are you sure you are using esx_policejob? You should be able to find that piece of code unless you modified it or downloaded a modified version.
As about the function, you can place it right after the end of another function. Try to get someone familiar with Lua or programming to give you a hand if you can’t figure it out yourself
You are somehow modifying closestPlayer to your player id i guess. You can verify this by trying to sentence someone through command window. /comserv <player_id> <amount_of_services>
There is no such thing as bail in my script. You probably have a conflict with another one. Plus there is anit combat log system which means even if a player leaves and joins the game again, continues his service
hi, im having a problem… the blips to do the work is not showing up. The command is working but when the player is teleported there, there’s no blips. Can someone help me with that?
Function for adding to police menu does not work though.
Everything added, no errors, but nothing happends when clicking the button in the menu.
If not close it says “no player nearby”, if a player is close for example police, machanic, medic, unemployed etc, it does nothing.