maauroo Posted February 23, 2012 Posted February 23, 2012 Hola.. Nesesito Ayuda Con Esta Funcion: "isObjectInACLGroup" Quisiera Saber En Que Parte Coloco Esta Funcion? local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then En Que Parte Lo Ubico En Este Script? Puerta = createObject ( 2957, -1665, 1025.0999755859, 18.5, 0, 90, 270) function abrirPuerta(player)) ) moveObject(Puerta,5000 ,-1665, 1022.265625, 18.5) -- mueve el objeto end -- fin de la funcion addCommandHandler("abrir", abrirPuerta) Y Quisiera Saber CoOMO Lo Uso? Porque No Entendi En Wiki.. Desde Ya Se Los Agradesco..
Castillo Posted February 23, 2012 Posted February 23, 2012 Puerta = createObject ( 2957, -1665, 1025.0999755859, 18.5, 0, 90, 270) function abrirPuerta(player) local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then moveObject(Puerta,5000 ,-1665, 1022.265625, 18.5) -- mueve el objeto end end -- fin de la funcion addCommandHandler("abrir", abrirPuerta) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
maauroo Posted February 23, 2012 Author Posted February 23, 2012 Amigo.. Alparecer No Me Funciona.. Intento Poner /abrir pero no se abre... Que Puede Ser?
maauroo Posted February 23, 2012 Author Posted February 23, 2012 Osea yo Le Coloque la funcion isObjectInACLGroup Para Que Se Solamente Los Admin Puedan Abrir La Puerta Pero No Funciona.. Y Ademas Me Sale Un Error En La Cosola.. ERROR: Error saving C:/program File/Mta San Andreas 1.3/Server/mods/Deathmach/acl.xml ¿Como Lo Puedo Arreglar? Desde Ya Se Los Agradesco...
Castillo Posted February 24, 2012 Posted February 24, 2012 Lo tenes definido como server side en el meta.xml, verdad? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
maauroo Posted February 24, 2012 Author Posted February 24, 2012 Al Meta.xml Lo Tengo Asi: <meta> <info author="mauro" name="Puertas" version="1.6.9" type="script" description="Puertas /> <script src="PuertaBase.lua" type="client" /> </meta> Esta Bien O Esta Map ??
Castillo Posted February 24, 2012 Posted February 24, 2012 No, esta mal. type="client" deberia ser type="server". "mauro" name="Puertas" version="1.6.9" type="script" description="Puertas" /> San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
maauroo Posted February 24, 2012 Author Posted February 24, 2012 Hay Funciona.. Pero Lo Malo Que Lo Abren Todos.. Y Yo Quiero Solamente Los Admin... Puerta = createObject ( 2957, -1665, 1025.0999755859, 18.5, 0, 90, 270) function abrirPuerta(player) local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Everyone" ) ) then moveObject(Puerta,5000 ,-1665, 1022.265625, 18.5) -- mueve el objeto end end -- fin de la funcion addCommandHandler("abrir", abrirPuerta) Algo Que Esta Mal ? Alguna Funcion?
Castillo Posted February 24, 2012 Posted February 24, 2012 Pues si, cambiaste "Admin" por "Everyone" que es el grupo donde estan todos los jugadores. Puerta = createObject ( 2957, -1665, 1025.0999755859, 18.5, 0, 90, 270) function abrirPuerta(player) local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then -- Aca pusiste "Everyone". moveObject(Puerta,5000 ,-1665, 1022.265625, 18.5) -- mueve el objeto end end -- fin de la funcion addCommandHandler("abrir", abrirPuerta) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
maauroo Posted February 24, 2012 Author Posted February 24, 2012 (edited) xDD Funciono.. Ultima Cosa.. Es Posible Crear Otro Grupo En El acl.xml? "LO EDITE 3 VECES POR DESESPERADO.. DISCULPEN" Edited February 24, 2012 by Guest
Castillo Posted February 24, 2012 Posted February 24, 2012 Claro, fijate como estan los otros grupos y creas uno nuevo. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
maauroo Posted February 24, 2012 Author Posted February 24, 2012 Ok Dale.. Mira Disculpame Por Pedirte Otra Cosa.. Me Olvide De Otra Duda.. Quisiera Saber Si Me Puedes Ayudar Con La Funcion Que Tu Me Diste En El Tema Anterior. Estos: createColSphere y markers. No Se Usarlo Y Ubicarlo En La .Lua. Te Agradesco La Ultima Ayuda.. Te Lo Prometo Por Si Te Molesta..
Castillo Posted February 24, 2012 Posted February 24, 2012 No hay problema de cuantas preguntas hagas. Hay un ejemplos en la wiki: https://wiki.multitheftauto.com/wiki/CreateColRectangle https://wiki.multitheftauto.com/wiki/CreateMarker San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
maauroo Posted February 24, 2012 Author Posted February 24, 2012 Si Pero No Lo Entiendo Bien. Mira: Puerta = createObject ( 2957, -1665, 1025.0999755859, 18.5, 0, 90, 270) function abrirPuerta(player) local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then moveObject(Puerta,5000 ,-1665, 1022.265625, 18.5) setTimer (moveObject, 5000, 1, Puerta, 5000, -1665, 1025.0999755859, 18.5) -- mueve el objeto end end -- fin de la funcion createColRectangle ( float fX, flotador fY, flotador fWidth, flotador fHeight ) Esta Bien? Me Falta Algo?
iFoReX Posted February 24, 2012 Posted February 24, 2012 mmm. amigos me pueden ayudar ? quiero aser una reja o puerta para la comisaria subterranea de los polis en LS pero Soy Nuevo en esto del moveObject y el createObject Porfas ayudenme . Gracias de antemano elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted February 24, 2012 Posted February 24, 2012 Si Pero No Lo Entiendo Bien. Mira: Puerta = createObject ( 2957, -1665, 1025.0999755859, 18.5, 0, 90, 270) function abrirPuerta(player) local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then moveObject(Puerta,5000 ,-1665, 1022.265625, 18.5) setTimer (moveObject, 5000, 1, Puerta, 5000, -1665, 1025.0999755859, 18.5) -- mueve el objeto end end -- fin de la funcion createColRectangle ( float fX, flotador fY, flotador fWidth, flotador fHeight ) Esta Bien? Me Falta Algo? Esta mal, si entendi bien queres que cuando el jugador entre en el colshape y sea un admin se abra la puerta, si es asi: Puerta = createObject ( 2957, -1665, 1025.0999755859, 18.5, 0, 90, 270) colshape = createColCuboid(-1666.5, 1021.0999755859, 16.5, 3, 8, 4) function abrirPuerta(player) local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) then moveObject(Puerta,5000 ,-1665, 1022.265625, 18.5) setTimer (moveObject, 5000, 1, Puerta, 5000, -1665, 1025.0999755859, 18.5) -- mueve el objeto end end addEventHandler("onColShapeHit",colshape,abrirPuerta) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted February 24, 2012 Posted February 24, 2012 (edited) please ayudenme u.u Edited February 24, 2012 by Guest elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted February 24, 2012 Posted February 24, 2012 @ElMota: Mira mas arriva, esta el script que usa un comando para abrir la puerta. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted February 24, 2012 Posted February 24, 2012 Odio que las funciones y todo el .lua este en ingles deberia estar en español asi seria re facil y gracias man ya le ise ai lo pruebo luego ahora mappeo me podrias ayudar con esto viewtopic.php?f=145&t=40619 ? elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
iFoReX Posted February 24, 2012 Posted February 24, 2012 mmm... no me funciono D: lo puse en las posY posX y posZ que quiero y ya no me aparecen D: Edit: mmm... es que ise eso del admin y me funciono muy bien pero luego para bajarlo no puedo D: elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted February 24, 2012 Posted February 24, 2012 No entiendo de que estas hablando, el script que funciona con comando anda perfectamente. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted February 24, 2012 Posted February 24, 2012 le ise asi man :B : = Puerta = createObject ( 2669, 2492.69921875, -1671.19921875, 13.699999809265, 0, 0, 0) function abrirPuerta(player) local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) 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 ( "Admin" ) ) then moveObject(Puerta,5000 , 2492.69921875, -1671.19921875, 13.699999809265) end end addCommandHandler("subir", abrirPuerta) addCommandHandler("bajar", cerrarPuerta) elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted February 24, 2012 Posted February 24, 2012 Y cual es el problema? que es lo que funciona. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted February 24, 2012 Posted February 24, 2012 Muchas gracias ahora ise elevadores puertas y todo eso mira asi me esta quedando : Puerta = createObject ( 2669, 2492.69921875, -1671.19921875, 13.699999809265, 0, 0, 0) Puerta2 = createObject ( 2933, 1588.4000244141, -1638, 14, 0, 0, 0) Elevador = createObject ( 2669, 1560.7674560547, -1324.4055175781, 17, 0, 0, 0) function subirElevador(player) local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) 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 ( "Admin" ) ) then -- Aca pusiste "Everyone". moveObject(Elevador,5000 , 1560.7674560547, -1324.4055175781, 17) end end function abrirPuerta2(player) local accName = getAccountName ( getPlayerAccount ( player ) ) -- get his account name if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "Admin" ) ) 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 ( "Admin" ) ) 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 ( "Admin" ) ) 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 ( "Admin" ) ) 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) elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Recommended Posts