Jump to content

Move gate with rotation !


sckatchof

Recommended Posts

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...