Jump to content

Ayuda.. Es Posible?


maauroo

Recommended Posts

Hola.. Hace Unos Dias Me Ayudaron A Crear Puertas Automaticas... Y Ahora Para Terminar Con Mi Script De Puertas, Quisiera Saber Si Es Posible Tener Un Solo Comando En Varias Puertas. Osea Usar Solamente /Cerrar Y /Abrir En Varias Puertas..¿Se Entiende? Desde Ya Se Los Agradesco...

Link to comment

Claro que es posible.

function cerrarPuertas() 
    moveObject(puerta1,argumentos..) 
    moveObject(puerta2,argumentos..) 
    moveObject(puerta3,argumentos..) 
    moveObject(puerta4,argumentos..) 
    moveObject(puerta5,argumentos..) 
end 
addCommandHandler("cerrar",cerrarPuertas) 

Link to comment

mmm... man para no aser spam yo e echo muchos elevadores y puertas en 1 solo .lua y en el console me dice esto mira :

[2012-02-26 11:20:49] WARNING: rejas\gates_client.lua:121: Bad argument @ 'addCommandHandler' [Expected function at argument 2, got nil] 
[2012-02-26 11:20:49] WARNING: rejas\gates_client.lua:122: Bad argument @ 'addCommandHandler' [Expected function at argument 2, got nil] 

Link to comment

asi es man :D gracias de antemano

Puerta = createObject ( 2669, 2492.69921875, -1671.19921875, 13.699999809265, 0, 0, 0) 
PuertaBar = createObject ( 3036, 2584.3994140625, -1414.599609375, 25, 0, 353.99597167969, 90) 
Puerta2 = createObject ( 2933, 1588.4000244141, -1638, 14, 0, 0, 0) 
Elevador = createObject ( 2669, 1560.7674560547, -1324.4055175781, 17, 0, 0, 0) 
Base = createObject ( 980, 3060, -705, 13.199999809265, 0, 0, 90) 
Base2 = createObject ( 980, 3060, -716.59997558594, 13.199999809265, 0, 0, 90) 
Basef = createObject ( 3115, -1770.3000488281, 982.09997558594, 31, 90, 0, 270) 
BaseR = createObject ( 8673, 997.20001220703, 2133.3999023438, 11.5, 0, 0, 90) 
BaseM = createObject ( 8673, -2438.1999511719, 1542, 16.200000762939, 90, 0, 90) 
  
function abrirBaseM(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseM,5000 , -2438.1999511719, 1560, 16.200000762939) 
    end 
end 
function cerrarBaseM(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseM,5000 , -2438.1999511719, 1542, 16.200000762939) 
    end 
end 
function abrirBaseR(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseR,5000 , 997.20001220703, 2113.3, 11.300000190735) 
    end 
end 
function cerrarBaseR(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseR,5000 , 997.20001220703, 2133.3999023438, 11.300000190735) 
    end 
end 
function abrirBasef(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Basef,5000 , -1770.3000488281, 982.09997558594, 13) 
    end 
end 
function cerrarBasef(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Basef,5000 , -1770.3000488281, 982.09997558594, 31)     
    end 
end 
  
function abrirBase(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Base,5000 , 3060, -705, 18) 
        moveObject(Base2,5000 , 3060, -716.59997558594, 18) 
    end 
end 
function cerrarBase(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Base,5000 , 3060, -705, 13.199999809265) 
        moveObject(Base2,5000 , 3060, -716.59997558594, 13.199999809265) 
    end 
end 
  
function abrirPuertaBar(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(PuertaBar,5000 , 2584.3994140625, -1414.599609375, 20) 
    end 
end 
function cerrarPuertaBar(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(PuertaBar,5000 , 2584.3994140625, -1414.599609375, 25) 
    end 
end 
function subirElevador(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Elevador,5000 , 1560.7674560547, -1324.4055175781, 330.39999389648) 
    end 
end 
function bajarElevador(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Elevador,5000 , 1560.7674560547, -1324.4055175781, 0) 
    end 
end   
function abrirPuerta2(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Puerta2,5000 , 1588.4000244141, -1638, 20) 
    end 
end  
function abrirPuerta(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Puerta,5000 , 2492.69921875, -1671.19921875, 40) 
    end 
end  
function cerrarPuerta(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then 
        moveObject(Puerta,5000 , 2492.69921875, -1671.19921875, 13.699999809265) 
    end 
end  
function cerrarPuerta2(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Puerta2,5000 , 1588.4000244141, -1638, 14) 
    end 
end  
addCommandHandler("subir", abrirPuerta) 
addCommandHandler("bajar", cerrarPuerta) 
addCommandHandler("abrirls", abrirPuerta2) 
addCommandHandler("cerrarls", cerrarPuerta2) 
addCommandHandler("subirT", subirElevador) 
addCommandHandler("bajarT", bajarElevador) 
addCommandHandler("abrirbar", abrirPuertaBar) 
addCommandHandler("cerrarbar", cerrarPuertaBar) 
addCommandHandler("abrirbasels", abrirBase) 
addCommandHandler("cerrarbasels", cerrarBase) 
addCommandHandler("abrirf", abrirBase2) 
addCommandHandler("cerrarf", cerrarBase2) 
addCommandHandler("abrirr", abrirBaseR) 
addCommandHandler("cerrarr", cerrarBaseR) 
addCommandHandler("abrirmt", abrirBaseM) 
addCommandHandler("cerrarmt", cerrarBaseM) 
addCommandHandler("abrirf", abrirBasef) 
addCommandHandler("cerrarf", cerrarBasef) 

Link to comment
Puerta = createObject ( 2669, 2492.69921875, -1671.19921875, 13.699999809265, 0, 0, 0) 
PuertaBar = createObject ( 3036, 2584.3994140625, -1414.599609375, 25, 0, 353.99597167969, 90) 
Puerta2 = createObject ( 2933, 1588.4000244141, -1638, 14, 0, 0, 0) 
Elevador = createObject ( 2669, 1560.7674560547, -1324.4055175781, 17, 0, 0, 0) 
Base = createObject ( 980, 3060, -705, 13.199999809265, 0, 0, 90) 
Base2 = createObject ( 980, 3060, -716.59997558594, 13.199999809265, 0, 0, 90) 
Basef = createObject ( 3115, -1770.3000488281, 982.09997558594, 31, 90, 0, 270) 
BaseR = createObject ( 8673, 997.20001220703, 2133.3999023438, 11.5, 0, 0, 90) 
BaseM = createObject ( 8673, -2438.1999511719, 1542, 16.200000762939, 90, 0, 90) 
  
function abrirBaseM(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseM,5000 , -2438.1999511719, 1560, 16.200000762939) 
    end 
end 
addCommandHandler("abrirmt", abrirBaseM) 
  
function cerrarBaseM(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseM,5000 , -2438.1999511719, 1542, 16.200000762939) 
    end 
end 
addCommandHandler("cerrarmt", cerrarBaseM) 
  
function abrirBaseR(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseR,5000 , 997.20001220703, 2113.3, 11.300000190735) 
    end 
end 
addCommandHandler("abrirr", abrirBaseR) 
  
function cerrarBaseR(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseR,5000 , 997.20001220703, 2133.3999023438, 11.300000190735) 
    end 
end 
addCommandHandler("cerrarr", cerrarBaseR) 
  
function abrirBasef(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Basef,5000 , -1770.3000488281, 982.09997558594, 13) 
    end 
end 
addCommandHandler("abrirf", abrirBasef) 
  
function cerrarBasef(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Basef,5000 , -1770.3000488281, 982.09997558594, 31)     
    end 
end 
addCommandHandler("cerrarf", cerrarBasef) 
  
function abrirBase(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Base,5000 , 3060, -705, 18) 
        moveObject(Base2,5000 , 3060, -716.59997558594, 18) 
    end 
end 
addCommandHandler("abrirbasels", abrirBase) 
  
function cerrarBase(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Base,5000 , 3060, -705, 13.199999809265) 
        moveObject(Base2,5000 , 3060, -716.59997558594, 13.199999809265) 
    end 
end 
addCommandHandler("cerrarbasels", cerrarBase) 
  
function abrirPuertaBar(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(PuertaBar,5000 , 2584.3994140625, -1414.599609375, 20) 
    end 
end 
addCommandHandler("abrirbar", abrirPuertaBar) 
  
function cerrarPuertaBar(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(PuertaBar,5000 , 2584.3994140625, -1414.599609375, 25) 
    end 
end 
addCommandHandler("cerrarbar", cerrarPuertaBar) 
  
function subirElevador(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Elevador,5000 , 1560.7674560547, -1324.4055175781, 330.39999389648) 
    end 
end 
addCommandHandler("subirT", subirElevador) 
  
function bajarElevador(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Elevador,5000 , 1560.7674560547, -1324.4055175781, 0) 
    end 
end 
addCommandHandler("bajarT", bajarElevador) 
  
function abrirPuerta2(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Puerta2,5000 , 1588.4000244141, -1638, 20) 
    end 
end 
addCommandHandler("abrirls", abrirPuerta2) 
  
function abrirPuerta(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Puerta,5000 , 2492.69921875, -1671.19921875, 40) 
    end 
end 
addCommandHandler("subir", abrirPuerta) 
  
function cerrarPuerta(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then 
        moveObject(Puerta,5000 , 2492.69921875, -1671.19921875, 13.699999809265) 
    end 
end 
addCommandHandler("bajar", cerrarPuerta) 
  
function cerrarPuerta2(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Puerta2,5000 , 1588.4000244141, -1638, 14) 
    end 
end 
addCommandHandler("cerrarls", cerrarPuerta2) 

Link to comment
Argumentos requeridos: 
elObjeto: El objeto que va a moverse. 
tiempo: El tiempo en milisegundos para que el objeto llegue a su destino. 
destinoX: El valor X value de la posicion del destino. 
destinoY: El valor Y value de la posicion del destino. 
destinoZ: El valor Z value de la posicion del destino. 
  
Argumentos opcionales: 
moverx: La rotación a lo largo del eje X con respecto a su rotación actual, que es su ángulo de partida. 
movery: La rotación a lo largo del eje Y con relación a su rotación actual, que es su ángulo de partida. 
moverz: La rotación a lo largo del eje Z en relación con su rotación actual, que es su ángulo de partida. 

Link to comment

Mira Ise Lo Que Tu Me Dijiste Pero No Funciona y Lo Que Yo Quiero Es Que Al Esta Ensima De La Posicion De Las Puertas Correcta Para Abrir Y Cerrar Con El Mismo Comando /Abrir y /Cerrar Por Ejemplo:

Puerta1: /Abrir y /Cerrar

Puerta2 :/Abrir y /Cerrar Siempre Con El Mismo Cmd Pero Que No Se abran Juntas Y Se Cierren Juntas. Se Entiende?

Link to comment

mmm... tu intentas decir que sea con el mismo objeto los comandos pero que no se abran los 2 con ese comando ? ejemplo

puerta1: addCommandHandler("abrir1",  abrirPuerta1) 
              addCommandHandler("cerrar1", cerrarPuerta1) 
puerta2: addCommandHandler("abrir2", abrirPuerta2) 
              addCommandHandler("cerrar2", cerrarPuerta2) 

algo asi dices tu ?

Link to comment

Claro que es posible.

Puerta = createObject ( 2669, 2492.69921875, -1671.19921875, 13.699999809265, 0, 0, 0) 
PuertaBar = createObject ( 3036, 2584.3994140625, -1414.599609375, 25, 0, 353.99597167969, 90) 
Puerta2 = createObject ( 2933, 1588.4000244141, -1638, 14, 0, 0, 0) 
Elevador = createObject ( 2669, 1560.7674560547, -1324.4055175781, 17, 0, 0, 0) 
Base = createObject ( 980, 3060, -705, 13.199999809265, 0, 0, 90) 
Base2 = createObject ( 980, 3060, -716.59997558594, 13.199999809265, 0, 0, 90) 
Basef = createObject ( 3115, -1770.3000488281, 982.09997558594, 31, 90, 0, 270) 
BaseR = createObject ( 8673, 997.20001220703, 2133.3999023438, 11.5, 0, 0, 90) 
BaseM = createObject ( 8673, -2438.1999511719, 1542, 16.200000762939, 90, 0, 90) 
  
function abrirBaseM(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseM,5000 , -2438.1999511719, 1560, 16.200000762939) 
    end 
end 
addCommandHandler("abrirmt", abrirBaseM) 
  
function cerrarBaseM(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseM,5000 , -2438.1999511719, 1542, 16.200000762939) 
    end 
end 
addCommandHandler("cerrarmt", cerrarBaseM) 
  
function abrirBaseR(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseR,5000 , 997.20001220703, 2113.3, 11.300000190735) 
    end 
end 
addCommandHandler("abrirr", abrirBaseR) 
  
function cerrarBaseR(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(BaseR,5000 , 997.20001220703, 2133.3999023438, 11.300000190735) 
    end 
end 
addCommandHandler("cerrarr", cerrarBaseR) 
  
function abrirBasef(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Basef,5000 , -1770.3000488281, 982.09997558594, 13) 
    end 
end 
addCommandHandler("abrirf", abrirBasef) 
  
function cerrarBasef(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Basef,5000 , -1770.3000488281, 982.09997558594, 31)     
    end 
end 
addCommandHandler("cerrarf", cerrarBasef) 
  
function abrirBase(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Base,5000 , 3060, -705, 18) 
        moveObject(Base2,5000 , 3060, -716.59997558594, 18) 
    end 
end 
addCommandHandler("abrirbasels", abrirBase) 
  
function cerrarBase(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Base,5000 , 3060, -705, 13.199999809265) 
        moveObject(Base2,5000 , 3060, -716.59997558594, 13.199999809265) 
    end 
end 
addCommandHandler("cerrarbasels", cerrarBase) 
  
function abrirPuertaBar(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(PuertaBar,5000 , 2584.3994140625, -1414.599609375, 20) 
    end 
end 
addCommandHandler("abrirbar", abrirPuertaBar) 
  
function cerrarPuertaBar(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(PuertaBar,5000 , 2584.3994140625, -1414.599609375, 25) 
    end 
end 
addCommandHandler("cerrarbar", cerrarPuertaBar) 
  
function subirElevador(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Elevador,5000 , 1560.7674560547, -1324.4055175781, 330.39999389648) 
    end 
end 
addCommandHandler("subirT", subirElevador) 
  
function bajarElevador(player) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then -- Aca pusiste "Everyone". 
        moveObject(Elevador,5000 , 1560.7674560547, -1324.4055175781, 0) 
    end 
end 
addCommandHandler("bajarT", bajarElevador) 
  
function abrirPuerta(player, cmd, ID) 
    local ID = tonumber(ID) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if (ID and type(ID) == "number" and isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) )) then 
        if (ID == 1) then 
            moveObject(Puerta,5000 , 2492.69921875, -1671.19921875, 40) 
        elseif (ID == 2) then 
            moveObject(Puerta2,5000 , 1588.4000244141, -1638, 20) 
        end 
    end 
end 
addCommandHandler("abrir",abrirPuerta) 
  
function cerrarPuerta(player, cmd, ID) 
    local ID = tonumber(ID) 
    local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name 
    if (ID and type(ID) == "number" and isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) )) then 
        if (ID == 1) then 
            moveObject(Puerta,5000 , 2492.69921875, -1671.19921875, 13.699999809265) 
        elseif (ID == 2) then 
            moveObject(Puerta2,5000 , 1588.4000244141, -1638, 14) 
        end 
    end 
end 
addCommandHandler("cerrar",cerrarPuerta) 

Comandos:

/abrir

/cerrar

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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