NotAvailable Posted July 26, 2010 Share 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 Link to comment
NotAvailable Posted July 26, 2010 Author Share 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 Link to comment
dzek (varez) Posted July 26, 2010 Share Posted July 26, 2010 what doesnt work? i edited it this is not an answer for question above o_O Link to comment
50p Posted July 26, 2010 Share 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 Link to comment
NotAvailable Posted July 26, 2010 Author Share 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 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