I would like to put a limit on the area not to go into jail.
if the person crosses this area and respwner at a certain place …
help me please
RegisterNetEvent('jail:teleportPlayer')
if (GetDistanceBetweenCoords(LastPosX, LastPosY, LastPosZ, 1680.06994628906,2512.80004882813,46.2684020996094, true) > 100.0001) then
SetEntityCoords(GetPlayerPed(-1), tonumber("1680.07"), tonumber("2512.8"), tonumber("45.4649"))
TriggerEvent('chatMessage', '^4[JAILER]', {0,0,0}, "On ne s'échappe pas de la prison comme ça !")
end
end)
RegisterNetEvent('jail:teleportPlayer')
if (GetDistanceBetweenCoords(LastPosX, LastPosY, LastPosZ, 1680.06994628906,2512.80004882813,46.2684020996094, true) > 100.0001) then
SetEntityCoords(GetPlayerPed(-1), 1680.07, 2512.8, 45.4649)
TriggerEvent('chatMessage', '^4[JAILER]', {0,0,0}, "On ne s'échappe pas de la prison comme ça !")
end