Jump to content

Help with open doors with commands


Takerd

Recommended Posts

Hi everyone!

I have one scripth wich is for open doors (The object moves and go up) with commands. So, I need to add other door to this script, but I dont know how to do it (The other doors were added by a friend).

The object which I want to move / go up using a command is:

This is the script:

p2 = createObject ( 968, 93.75, 1188.09, 18.4, 0, 270, 0)

function poli1 ( thePlayer )

if exports.factions:isPlayerInFaction ( thePlayer, 1) then

if (getElementData(p2, "abierta") == false) then

moveObject ( p2, 2000, 93.75, 1188.09, 18.4, 0, 85, 0, "InOutQuad" )

setElementData(p2, "abierta", true)

setTimer (

function ( )

moveObject ( p2, 2000, 93.75, 1188.09, 18.4, 0, -85, 0, "OutInQuad" )

setTimer(function() setElementData(p2, "abierta", false) end, 2000, 1)

setTimer (

function ()

end, 10000, 1)

end

,6000,1

)

end

end

end

addCommandHandler("policia",poli1)

depozitouo = createObject ( 980, 142.89999389648, 1099.1999511719, 15.39999961853, 0, 0, 91 )

function dep ( thePlayer )

if exports.factions:isPlayerInFaction ( thePlayer, 1) then

moveObject ( depozitouo, 2000, 142.89999389648, 1099.1999511719, 9.83, 0, 0, 0 )

setTimer (

function ( )

moveObject ( depozitouo, 2000, 142.89999389648, 1099.1999511719, 15.39999961853, 0, 0, 0 )

setTimer (

function ()

x, y, z = getElementPosition(depozitouo)

if y ~= 1099.1999511719 then

setElementPosition (depozitouo, 142.89999389648, 1099.1999511719, 15.39999961853)

end

end, 10000, 1)

end

,6000,1

)

end

end

addCommandHandler("deposito",dep)

function garajemeca(thePlayer)

if exports.factions:isPlayerInFaction ( thePlayer, 3) then

if (isGarageOpen(41)) then

setGarageOpen ( 41, false )

exports.chat:me( thePlayer, "presiona el botón del mando y cierra el portón del taller." )

else

setGarageOpen ( 41, true )

exports.chat:me( thePlayer, "presiona el botón del mando y abre el portón del taller." )

end

else

outputChatBox("No tienes el mando del portón del taller.", thePlayer, 255, 0, 0)

end

end

addCommandHandler("mecag", garajemeca)

How can I move the object for go up?

thanks for your time!

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