12p Posted September 24, 2010 Share Posted September 24, 2010 (edited) Well, I have modify the "zombies" resource, and I want to have a Safe Zone... But I don't want to use interiors, or the EDF or the "spawnZombie" function... So I just added these lines, but doesn't work: safeZoneShape = createColCuboid (2720.1, -2565.81, 0, 90.65, 255.16, 1000) setTimer ( function () if isElementWithinColShape (zomb, safeZoneShape) then destroyElement (zomb) end end,50,0) I have no debug errors or warnings, and zombies spawn in the colshape anyway. What's the bad thing here? Edited September 24, 2010 by Guest Link to comment
dzek (varez) Posted September 24, 2010 Share Posted September 24, 2010 Much things are not okay in this. I Suggest you to get back to lua basics. Oh, i think i got your way of thinking. Use get elements within col shape (check wiki list of available functions for exact name) then loop with for key, val in ipairs do -- action here end And in loop check if element is ped ( you don't want to destroy the players) and if it is - destroy. Use get element type. Search Wiki again Link to comment
12p Posted September 24, 2010 Author Share Posted September 24, 2010 I just used another way and it works. Thanks anyway . 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