Brolis Posted August 12, 2012 Share Posted August 12, 2012 (edited) Hi, someone help me to fix this script... .lua opening/closing gates area51 script local nonOpenables = { --this is easier [287]=true, [285]=true, [193]=true, [192]=true, [191]=true, [294]=true, [82]=true, [83]=true, [84]=true; } base_area69gate1 = createObject ( 2929, 215.99548339844, 1875.40234375, 13.938992500305, 0, 0, 0 ) base_area69gate2 = createObject ( 2929, 211.94564819336, 1875.40234375, 13.938992500305, 0, 0, 0 ) base_area69col = createColCircle ( 213.94564819336, 1875.40234375, 13.938992500305, 7 ) function openbase_area69gates(thePlayer) local skin = getElementModel (hitPlayer) if nonOpenables[skin] then moveObject (base_area69gate1, 5000, 218.99548339844, 1875.40234375, 13.938992500305 ) moveObject (base_area69gate2, 5000, 208.94564819336, 1875.40234375, 13.938992500305 ) end end addEventHandler( "onColShapeHit", base_area69col, openbase_area69gates ) function closebase_area69gates(thePlayer) local skin = getElementModel (hitPlayer) if nonOpenables[skin] then moveObject (base_area69gate1, 5000, 215.99548339844, 1875.40234375, 13.938992500305 ) moveObject (base_area69gate2, 5000, 211.94564819336, 1875.40234375, 13.938992500305 ) end end addEventHandler( "onColShapeLeave", base_area69col, closebase_area69gates ) .map file <map edf:definitions="editor_main"> <object id="object (a51_blastdoorL) (2)" model="2929" interior="0" dimension="0" posX="246" posY="1863.435546875" posZ="19.253965377808" rotX="90" rotY="0" rotZ="35.955078125" /> <object id="object (a51_jetdoor) (1)" model="3095" interior="0" dimension="0" posX="268.93524169922" posY="1883.916015625" posZ="16.048067092896" rotX="0" rotY="0" rotZ="0" /> </map> My gates not opening/closing then I am with that skins, please fix that. Thanks a lot! Edited August 13, 2012 by Guest Link to comment
Vision Posted August 12, 2012 Share Posted August 12, 2012 try this local nonOpenables = { --this is easier [287]=true, [285]=true, [193]=true, [192]=true, [191]=true, [294]=true, [82]=true, [83]=true, [84]=true; } base_area69gate1 = createObject ( 2929, 215.99548339844, 1875.40234375, 13.938992500305, 0, 0, 0 ) base_area69gate2 = createObject ( 2929, 211.94564819336, 1875.40234375, 13.938992500305, 0, 0, 0 ) base_area69col = createColCircle ( 213.94564819336, 1875.40234375, 13.938992500305, 7 ) function openbase_area69gates(thePlayer) local skin = getElementModel (thePlayer) if nonOpenables[skin] then moveObject (base_area69gate1, 5000, 218.99548339844, 1875.40234375, 13.938992500305 ) moveObject (base_area69gate2, 5000, 208.94564819336, 1875.40234375, 13.938992500305 ) end end addEventHandler( "onColShapeHit", base_area69col, openbase_area69gates ) function closebase_area69gates(thePlayer) local skin = getElementModel (thePlayer) if nonOpenables[skin] then moveObject (base_area69gate1, 5000, 215.99548339844, 1875.40234375, 13.938992500305 ) moveObject (base_area69gate2, 5000, 211.94564819336, 1875.40234375, 13.938992500305 ) end end addEventHandler( "onColShapeLeave", base_area69col, closebase_area69gates ) Link to comment
Brolis Posted August 12, 2012 Author Share Posted August 12, 2012 thanks, everything is working just fine! 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