Guest User

Untitled

a guest
Sep 2nd, 2013
113
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Serverside --
  2. local ped = createPed(0, 1531.603515625,-1677.1000976563,13.3828125)
  3. setElementFrozen(ped, true)
  4. setElementData(ped, "fwped", true)
  5.  
  6. function letPedBurning(player)
  7.     setPedOnFire(ped, true)
  8.     isPedBurning(player)
  9. end
  10. addCommandHandler("burn", letPedBurning)
  11.  
  12. function isPedBurning(player)
  13.     if isPedOnFire(ped) then
  14.         outputChatBox("Ped is Burning!", player)
  15.     else
  16.         outputChatBox("Ped is NOT Burning!", player)
  17.     end
  18.     setTimer(isPedBurning, 1000, 1, player)
  19. end
  20.  
  21.  
  22.  
  23.  
  24. -- Clientside --
  25. function cancelPedDamage()
  26.     if getElementData(source, "fwped") then
  27.         cancelEvent()
  28.     end
  29. end
  30. addEventHandler("onClientPedDamage", getRootElement(), cancelPedDamage)
RAW Paste Data