NotAvailable Posted July 26, 2010 Posted July 26, 2010 (edited) This is my anti zombie zone But when i enter with skin 285 i die to? While i did: if skin == 115 or 285 then Here is the code: a51gate1 = createObject ( 980, 1500.7756347656, -1441.1220703125, 9.4062042236328, 0, 0, 272 ) a51col = createColCuboid ( -66.439483642578, 1479.7907714844, 12.388235092163, 150, 150, 100 ) function opena51gates(hitPlayer,thePlayer) local skin = getElementModel (hitPlayer) if skin == 115 or 285 then moveObject (a51gate1, 1000, 1500.7756347656, -1441.1220703125, 9.4062042236328 ) else killPed (hitPlayer) end end addEventHandler( "onColShapeHit", a51col, opena51gates ) function closea51gates(hitPlayer,thePlayer) local skin = getElementModel (hitPlayer) if not skin == 115 or 285 then killPed (hitPlayer) moveObject (a51gate1, 1000, 1500.7756347656, -1441.1220703125, 9.4062042236328 ) end end addEventHandler( "onColShapeLeave", a51col, closea51gates ) ] Regards, Jesseunit Edited July 26, 2010 by Guest
NotAvailable Posted July 26, 2010 Author Posted July 26, 2010 (edited) what doesnt work? When i enter the anti zombie zone with skin 285. I still die while i did so skin 285 CAN enter Edited July 26, 2010 by Guest
dzek (varez) Posted July 26, 2010 Posted July 26, 2010 what doesnt work? i edited it this is not an answer for question above o_O 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)!
50p Posted July 26, 2010 Posted July 26, 2010 JasseUnit, you can't do an if statement like this because 285 is a number and will pass as true. You have to check if skin is 285 again. if ( skin == 115 ) or ( skin == 285 ) then - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
NotAvailable Posted July 26, 2010 Author Posted July 26, 2010 JasseUnit, you can't do an if statement like this because 285 is a number and will pass as true. You have to check if skin is 285 again. if ( skin == 115 ) or ( skin == 285 ) then k thanks
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