Jump to content

Poner elevador conn comando


Recommended Posts

Bueno tengo esto:

function onstartup () 
   gate = createObject ( 3885, -1498.2347412109, 805.29083251953, 5.7079048156738, 0, 0, 74.915008544922) 
end 
addEventHandler ( "onResourceStart", getRootElement(), onstartup ) 
  
function move () 
  moveObject ( gate, 2200, -1497.6064453125, 805.119140625, 50.178058624268) 
end 
addCommandHandler("1", move) 
  
function move () 
  moveObject ( gate, 2450, -1498.2347412109, 805.29083251953, 5.7079048156738) 
end 
addCommandHandler("2", move) 

pero no sé ke es lo que esta subrayado , cuando le pongo un numero me manda el elevador al mar super rapido Porfavor Ayuda

Donde dice : gate , 2200 y gate , 2450

Link to comment

Those are both triggering the same function, try this:

function onstartup () 
   gate = createObject ( 3885, -1498.2347412109, 805.29083251953, 5.7079048156738, 0, 0, 74.915008544922) 
end 
addEventHandler ( "onResourceStart", getRootElement(), onstartup ) 
  
function move(_,cmd) 
    if cmd=="1" then 
        moveObject ( gate, 2200, -1497.6064453125, 805.119140625, 50.178058624268) 
    elseif cmd=="2" then 
        moveObject ( gate, 2450, -1498.2347412109, 805.29083251953, 5.7079048156738) 
    end 
end 
addCommandHandler("1", move) 
addCommandHandler("2", move) 

Link to comment

the problem is:

this number is?

----------▼ (2200)

( gate, 2200, -1497.6064453125, 805.119140625, 50.178058624268)

this number is?

-----------▼

( gate, 2450, -1498.2347412109, 805.29083251953, 5.7079048156738)

time? , Height? , or what is?

please help

Link to comment
the problem is:

this number is?

----------▼ (2200)

( gate, 2200, -1497.6064453125, 805.119140625, 50.178058624268)

this number is?

-----------▼

( gate, 2450, -1498.2347412109, 805.29083251953, 5.7079048156738)

time? , Height? , or what is?

please help

That's the time.

Link to comment
  • Recently Browsing   0 members

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