Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1. local X, Y, W; H = 0.0125
  2. local Duration = 7500
  3. local timer = GetGameTimer()
  4.  
  5. if not HasStreamedTextureDictLoaded('timerbars') then
  6.     RequestStreamedTextureDict('timerbars')
  7.     while not HasStreamedTextureDictLoaded('timerbars') do
  8.         Citizen.Wait(0)
  9.     end
  10. end
  11.  
  12. if GetTimeDifference(GetGameTimer(), timer) < Duration then
  13.     W = (GetTimeDifference(GetGameTimer(), timer) * (0.085 / Duration))
  14. end
  15.  
  16. local correction = ((1.0 - round(GetSafeZoneSize(), 2)) * 100) * 0.005
  17. X, Y = 0.9255 - correction, 0.94 - correction
  18.  
  19. Set_2dLayer(0)
  20. DrawSprite('timerbars', 'all_black_bg', X, Y, 0.15, 0.0325, 0.0, 255, 255, 255, 180)
  21.  
  22. Set_2dLayer(1)
  23. DrawRect(X + 0.0275, Y, 0.085, 0.0125, 100, 0, 0, 180)
  24.  
  25. Set_2dLayer(2)
  26. DrawRect(X - 0.015 + (W / 2), Y, W, H, 150, 0, 0, 180)
  27.  
  28. SetTextColour(255, 255, 255, 180)
  29. SetTextFont(0)
  30. SetTextScale(0.3, 0.3)
  31. SetTextCentre(true)
  32. SetTextEntry('STRING')
  33. AddTextComponentString(GetLabelText('KS_RESPAWN_B'))
  34. Set_2dLayer(3)
  35. DrawText(X - 0.06, Y - 0.012)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement