sckatchof Posted December 8, 2011 Share Posted December 8, 2011 Hello. Is there a problem in this Script , when Police get near the gate the gate move with rotation I dont understand why ! local MarkerSWAT = createMarker( 1542.9000244141, -1628.1999511719, 13.39999961853, 'corona', 12.0, 0, 0, 255, 0) local swatgate1 = createObject(968, 1544.6999511719, -1630.8000488281, 13.10000038147, 0, 269, 271) function MarkerHit1 ( hitElement, matchingDimension ) if getPlayerTeam(hitElement) == teampolice then moveObject(swatgate1, 3000, 1544.6999511719, -1630.8000488281, 13.10000038147, 0, 269) end end function MarkerLeave1( leaveElement, matchingDimension ) if getPlayerTeam(leaveElement) == teampolice then moveObject(swatgate1, 3000, 1544.6999511719, -1630.8000488281, 13.10000038147, 0, 271) end end addEventHandler( "onMarkerHit", MarkerSWAT, MarkerHit1 ) addEventHandler( "onMarkerLeave", MarkerSWAT, MarkerLeave1 ) Link to comment
Xeno Posted December 8, 2011 Share Posted December 8, 2011 I don't think I fully understand what you mean, but if I do, this will fix your problem: moveObject(swatgate1, 3000, 1544.6999511719, -1630.8000488281, 13.10000038147, 0, 0) Link to comment
Aibo Posted December 8, 2011 Share Posted December 8, 2011 rotation parameters in moveObject function are relative. so if you don't want to rotate your object - dont use them, or put 0,0,0. Link to comment
sckatchof Posted December 8, 2011 Author Share Posted December 8, 2011 I don't think I fully understand what you mean, but if I do, this will fix your problem: moveObject(swatgate1, 3000, 1544.6999511719, -1630.8000488281, 13.10000038147, 0, 0) I want to move the barrier with Rotasiton posX="1544.6999511719" posY="-1630.8000488281" posZ="13.10000038147" rotX="0" rotY="360" rotZ="271" To posX="1544.6999511719" posY="-1630.8000488281" posZ="13.10000038147" rotX="0" rotY="269" rotZ="271" just change rotY (Barrier LSPD) like this [url=http://www.jmorris4.pwp.blueyonder.co.uk/PICTURES%20FOR%20SAMP/BGopen.jpg]http://www.jmorris4.pwp.blueyonder.co.u ... BGopen.jpg[/url] Link to comment
Xeno Posted December 8, 2011 Share Posted December 8, 2011 Oh... Try changing around the rotY abit intill it goes upward. 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