Chaos Posted December 28, 2013 Share Posted December 28, 2013 Hello, I want to spawn like 50 zombies in specific area and if 30 zombies are death then it's will respawn the zombies again how can i do that? Link to comment
justn Posted December 29, 2013 Share Posted December 29, 2013 (edited) Use these. createRadarArea createPed Edited March 8, 2014 by Guest Link to comment
Chaos Posted December 30, 2013 Author Share Posted December 30, 2013 Should I use timer? Link to comment
Drakath Posted December 30, 2013 Share Posted December 30, 2013 You could use event handler: 'onPedWasted' to count how many zombies are dead. After 30 are dead use: createPed to spawn them back. Link to comment
Chaos Posted December 31, 2013 Author Share Posted December 31, 2013 I want to make it with createzombie but how can they respawn if I used event onZombieWasted? Link to comment
manawydan Posted December 31, 2013 Share Posted December 31, 2013 try (example) ZombieKill = 0 function teste() for i=1,50 do exports [ "zombies" ]:createZombie(x+math.random(-4,4),y+math.random(-4,4),z) end end addEventHandler("onZombieWasted",root, function() if (ZombieKill ~= 30) then ZombieKill = ZombieKill+1 else ZombieKill = 0 teste() end end) Link to comment
Chaos Posted December 31, 2013 Author Share Posted December 31, 2013 Damn I like you man Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now