Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- jail addon
- RegisterNetEvent('jail:teleportPlayer')
- AddEventHandler('jail:teleportPlayer', function(amount)
- if IsHandcuffed then
- TriggerEvent('esx_policejob:handcuff')
- TriggerServerEvent('jail:removeInventaire', amount)
- Wait(500)
- SetEntityCoords(GetPlayerPed(-1), tonumber("1680.07"), tonumber("2512.8"), tonumber("45.4649"))
- RemoveAllPedWeapons(GetPlayerPed(-1))
- TriggerEvent('chatMessage', '^4[VEZENI]', {0,0,0}, "Byl jsi uveznen : ^1".. (tonumber(amount)/60) .." minutes !")
- clearPed()
- Wait(500)
- local hashSkin = GetHashKey("mp_m_freemode_01")
- Citizen.CreateThread(function()
- if(GetEntityModel(GetPlayerPed(-1)) == hashSkin) then
- SetPedComponentVariation(GetPlayerPed(-1), 4, 7, 15, 0)--Pantalon
- SetPedComponentVariation(GetPlayerPed(-1), 11, 5, 0, 0)--Debardeur
- SetPedComponentVariation(GetPlayerPed(-1), 8, 15, 0, 0)--Tshirt
- SetPedComponentVariation(GetPlayerPed(-1), 3, 5, 0, 0)--Bras
- SetPedComponentVariation(GetPlayerPed(-1), 6, 34, 0, 0)--Pied
- c_options.undershirt = 0
- c_options.undershirt_txt = 240
- SetPedComponentVariation(GetPlayerPed(-1), 8, tonumber(c_options.undershirt), tonumber(c_options.undershirt_txt), 0)
- else
- SetPedComponentVariation(GetPlayerPed(-1), 4, 3, 15, 0)--Pantalon
- SetPedComponentVariation(GetPlayerPed(-1), 11, 14, 6, 0)--Debardeur
- SetPedComponentVariation(GetPlayerPed(-1), 8, 15, 0, 0)--Tshirt
- SetPedComponentVariation(GetPlayerPed(-1), 3, 4, 0, 0)--Bras
- SetPedComponentVariation(GetPlayerPed(-1), 6, 5, 0, 0)--Pied
- c_options.undershirt = 0
- c_options.undershirt_txt = 240
- SetPedComponentVariation(GetPlayerPed(-1), 8, tonumber(c_options.undershirt), tonumber(c_options.undershirt_txt), 0)
- end
- end)
- Citizen.CreateThread(function()
- while (amount > 0) do
- if amount == 240 then
- TriggerEvent('chatMessage', '^4[VEZENI]', {0,0,0}, "Zbyvajici cas : ^1".. (tonumber(amount)/60) .." minut !")
- elseif amount == 180 then
- TriggerEvent('chatMessage', '^4[VEZENI]', {0,0,0}, "Zbyvajici cas : ^1".. (tonumber(amount)/60) .." minuty !")
- elseif amount == 120 then
- TriggerEvent('chatMessage', '^4[VEZENI]', {0,0,0}, "Zbyvajici cas : ^1".. (tonumber(amount)/60) .." minuty !")
- elseif amount == 60 then
- TriggerEvent('chatMessage', '^4[VEZENI]', {0,0,0}, "Zbyvajici cas : ^1".. (tonumber(amount)/60) .." minuta !")
- else
- end
- RemoveAllPedWeapons(GetPlayerPed(-1))
- LastPosX, LastPosY, LastPosZ = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
- 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[VEZENI]', {0,0,0}, "Nezkousej utikat !")
- end
- Citizen.Wait(1000)
- amount = amount - 1
- end
- SetEntityCoords(GetPlayerPed(-1), tonumber("1847.39"), tonumber("2602.78"), tonumber("45.5987"))
- clearPed()
- end)
- else
- TriggerEvent('chatMessage', source,'^4[VEZENI]', {0,0,0}, "Vezen musi mit pouta !")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement