Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. -- jail addon
  2. RegisterNetEvent('jail:teleportPlayer')
  3. AddEventHandler('jail:teleportPlayer', function(amount)
  4. if IsHandcuffed then
  5. TriggerEvent('esx_policejob:handcuff')
  6. TriggerServerEvent('jail:removeInventaire', amount)
  7. Wait(500)
  8. SetEntityCoords(GetPlayerPed(-1), tonumber("1680.07"), tonumber("2512.8"), tonumber("45.4649"))
  9. RemoveAllPedWeapons(GetPlayerPed(-1))
  10. TriggerEvent('chatMessage', '^4[VEZENI]', {0,0,0}, "Byl jsi uveznen : ^1".. (tonumber(amount)/60) .." minutes !")
  11. clearPed()
  12. Wait(500)
  13. local hashSkin = GetHashKey("mp_m_freemode_01")
  14. Citizen.CreateThread(function()
  15. if(GetEntityModel(GetPlayerPed(-1)) == hashSkin) then
  16. SetPedComponentVariation(GetPlayerPed(-1), 4, 7, 15, 0)--Pantalon
  17. SetPedComponentVariation(GetPlayerPed(-1), 11, 5, 0, 0)--Debardeur
  18. SetPedComponentVariation(GetPlayerPed(-1), 8, 15, 0, 0)--Tshirt
  19. SetPedComponentVariation(GetPlayerPed(-1), 3, 5, 0, 0)--Bras
  20. SetPedComponentVariation(GetPlayerPed(-1), 6, 34, 0, 0)--Pied
  21. c_options.undershirt = 0
  22. c_options.undershirt_txt = 240
  23. SetPedComponentVariation(GetPlayerPed(-1), 8, tonumber(c_options.undershirt), tonumber(c_options.undershirt_txt), 0)
  24. else
  25. SetPedComponentVariation(GetPlayerPed(-1), 4, 3, 15, 0)--Pantalon
  26. SetPedComponentVariation(GetPlayerPed(-1), 11, 14, 6, 0)--Debardeur
  27. SetPedComponentVariation(GetPlayerPed(-1), 8, 15, 0, 0)--Tshirt
  28. SetPedComponentVariation(GetPlayerPed(-1), 3, 4, 0, 0)--Bras
  29. SetPedComponentVariation(GetPlayerPed(-1), 6, 5, 0, 0)--Pied
  30. c_options.undershirt = 0
  31. c_options.undershirt_txt = 240
  32. SetPedComponentVariation(GetPlayerPed(-1), 8, tonumber(c_options.undershirt), tonumber(c_options.undershirt_txt), 0)
  33. end
  34. end)
  35. Citizen.CreateThread(function()
  36. while (amount > 0) do
  37. if amount == 240 then
  38. TriggerEvent('chatMessage', '^4[VEZENI]', {0,0,0}, "Zbyvajici cas : ^1".. (tonumber(amount)/60) .." minut !")
  39. elseif amount == 180 then
  40. TriggerEvent('chatMessage', '^4[VEZENI]', {0,0,0}, "Zbyvajici cas : ^1".. (tonumber(amount)/60) .." minuty !")
  41. elseif amount == 120 then
  42. TriggerEvent('chatMessage', '^4[VEZENI]', {0,0,0}, "Zbyvajici cas : ^1".. (tonumber(amount)/60) .." minuty !")
  43. elseif amount == 60 then
  44. TriggerEvent('chatMessage', '^4[VEZENI]', {0,0,0}, "Zbyvajici cas : ^1".. (tonumber(amount)/60) .." minuta !")
  45. else
  46.  
  47. end
  48.  
  49.  
  50. RemoveAllPedWeapons(GetPlayerPed(-1))
  51. LastPosX, LastPosY, LastPosZ = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
  52. if (GetDistanceBetweenCoords(LastPosX, LastPosY, LastPosZ, 1680.06994628906,2512.80004882813,46.2684020996094, true) > 100.0001) then
  53. SetEntityCoords(GetPlayerPed(-1), tonumber("1680.07"), tonumber("2512.8"), tonumber("45.4649"))
  54. TriggerEvent('chatMessage', '^4[VEZENI]', {0,0,0}, "Nezkousej utikat !")
  55. end
  56. Citizen.Wait(1000)
  57. amount = amount - 1
  58.  
  59. end
  60.  
  61. SetEntityCoords(GetPlayerPed(-1), tonumber("1847.39"), tonumber("2602.78"), tonumber("45.5987"))
  62. clearPed()
  63.  
  64. end)
  65. else
  66. TriggerEvent('chatMessage', source,'^4[VEZENI]', {0,0,0}, "Vezen musi mit pouta !")
  67. end
  68. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement