Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. local cooldown = 0
  2.  
  3. local ped = GetPlayerPedId()
  4.  
  5.  
  6.  
  7. RegisterNetEvent('useweed')
  8.  
  9. AddEventHandler('useweed', function()
  10.  
  11.    if cooldown ~= 0 then
  12.  
  13.      SetEntityHealth(ped, 0)
  14.  
  15.      ShowNotification('u ded)
  16.  
  17.    elseif
  18.  
  19.       if GetEntityHealth(ped) == GetEntityMaxHealth(ped) then
  20.  
  21.          SetEntityHealth(ped, 0)
  22.  
  23.          ShowNotification('u ded')
  24.  
  25.       else
  26.  
  27.          SetEntityHealth(ped, GetEntityMaxHealth(ped))
  28.  
  29.          cooldown = 30
  30.  
  31.          while cooldown ~= 0 do
  32.  
  33.              cooldown = cooldown - 1
  34.  
  35.              Wait(1000)
  36.  
  37.          end
  38.      end
  39.     end  
  40. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement