Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Pedkill = {}
- toggle = false
- timer = 0
- function Pedkill.tick()
- if(get_key_pressed(Keys.Subtract)) and timer == 0 then
- toggle = false
- end
- if(get_key_pressed(Keys.Subtract)) then
- pedkiller()
- timer = timer +1
- if timer == 20 then
- toggle = true
- end
- else
- timer = 0
- end
- if toggle then
- pedkiller()
- UI.SET_TEXT_FONT(0)
- UI.SET_TEXT_SCALE(0.1, 0.35)
- UI.SET_TEXT_COLOUR(255, 255, 255, 255)
- UI.SET_TEXT_CENTRE(true)
- UI.SET_TEXT_DROPSHADOW(0, 0, 0, 0, 0)
- UI.SET_TEXT_EDGE(0, 0, 0, 0, 0)
- UI._SET_TEXT_ENTRY("STRING")
- UI._ADD_TEXT_COMPONENT_STRING("Dead")
- UI._DRAW_TEXT(0.05,0.10)
- end
- end
- function pedkiller()
- local player = PLAYER.PLAYER_PED_ID()
- local PedTab,PedCount = PED.GET_PED_NEARBY_PEDS(player, 1, 1)
- for k,d in ipairs(PedTab)do
- 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
- --FIRE.START_ENTITY_FIRE(d)
- ENTITY.SET_ENTITY_HEALTH(d,0)
- end
- end
- end
- return Pedkill
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement