Jump to content

Comando con espacio


Recommended Posts

  • 3 weeks later...

debes ponerle los argumentos a la funcion..

por ejemplo

function comando(player,comand,state) 
if (state=abrir) then 
moveObje.. 
elseif (state = cerrar ) then 
moveObject 
else 
outputChatBox("Syntaxis: /comando (abrir/cerrar)",player,255,255,255) 
end 
end 
addCommandHanlder("puerto",comando) 

lo ise a la rapida.. modelalo

Link to comment

Si, eso es una manera.

P.D: Tenes un par de errores:

function comando ( player, comand, state ) 
    if ( state == "abrir" ) then 
        moveObject ( ) 
    elseif ( state == "cerrar" ) then 
        moveObject ( ) 
    else 
        outputChatBox ( "Syntaxis: /comando (abrir/cerrar)", player, 255, 0, 0 ) 
    end 
end 
addCommandHandler ( "puerto", comando ) 

Link to comment
  • 4 weeks later...
  • Recently Browsing   0 members

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