12p Posted September 24, 2010 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
dzek (varez) Posted September 24, 2010 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 Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
12p Posted September 24, 2010 Author Posted September 24, 2010 I just used another way and it works. Thanks anyway .
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