Advertisement
Guest User

Untitled

a guest
May 24th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. local Pedkill = {}
  2. toggle = false
  3. timer = 0
  4. function Pedkill.tick()
  5. if(get_key_pressed(Keys.Subtract)) and timer == 0 then
  6. toggle = false
  7. end
  8. if(get_key_pressed(Keys.Subtract)) then
  9. pedkiller()
  10. timer = timer +1
  11. if timer == 20 then
  12. toggle = true
  13. end
  14. else
  15. timer = 0
  16. end
  17. if toggle then
  18. pedkiller()
  19. UI.SET_TEXT_FONT(0)
  20. UI.SET_TEXT_SCALE(0.1, 0.35)
  21. UI.SET_TEXT_COLOUR(255, 255, 255, 255)
  22. UI.SET_TEXT_CENTRE(true)
  23. UI.SET_TEXT_DROPSHADOW(0, 0, 0, 0, 0)
  24. UI.SET_TEXT_EDGE(0, 0, 0, 0, 0)
  25. UI._SET_TEXT_ENTRY("STRING")
  26. UI._ADD_TEXT_COMPONENT_STRING("Dead")
  27. UI._DRAW_TEXT(0.05,0.10)
  28. end
  29. end
  30. function pedkiller()
  31. local player = PLAYER.PLAYER_PED_ID()
  32. local PedTab,PedCount = PED.GET_PED_NEARBY_PEDS(player, 1, 1)
  33. for k,d in ipairs(PedTab)do
  34. if ((PED.IS_PED_MODEL(d, 0x9B810FA2) == false) and (PED.IS_PED_IN_GROUP(d) == false) and (PED.IS_PED_A_PLAYER(d) == false)) then
  35. --FIRE.START_ENTITY_FIRE(d)
  36. ENTITY.SET_ENTITY_HEALTH(d,0)
  37. end
  38. end
  39. end
  40. return Pedkill
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement