maauroo Posted August 7, 2013 Posted August 7, 2013 Hola.. Como hago puertas automaticas y/o con cmd pero q el propio dueño pueda abrirlo ? Osea yo solo puedo abrir las puerta y nadie mas. O ponerlo a su nombre. Se entiende? Se los agradesco.
FraN-724 Posted August 7, 2013 Posted August 7, 2013 createObject addCommandHandler Y si solo lo quieres abrir tu deverias añadir estas lineas mas getAccountName getPlayerAccount
EstrategiaGTA Posted August 8, 2013 Posted August 8, 2013 createObject --Crear el objeto addCommandHandler --El comando moveObject --Mover el objeto Y para hacerlo solo para ti, usa: if then getPlayerAccount getAccountName
maauroo Posted August 8, 2013 Author Posted August 8, 2013 como puedo hacerlo que se abran automatico y se cierran sola??
Chaz-CR Posted August 8, 2013 Posted August 8, 2013 createColCircle - Para crear el area donde se movera el objeto onColShapeHit - Como evento para que haga la accion onColShapeLeave - para que se cierre EDIT: olvide el onColShapeLeave ||Age Of Battles|WarLife|RPG|DM|FR|24/7|Custom Skins|Cars|Weapons|| http://facebook.com/AoBMTA - Fanpage
maauroo Posted August 9, 2013 Author Posted August 9, 2013 Como Agrupo Estas Funciones En 1 solo ? PuertaCol1 = createColCircle (955.22998046875, -1546.4072265625, 14.765999794006, 10) PuertaCol2 = createColCircle(955.90002441406, -1519.58203125, 14.765999794006, 10) Osea Quiero ponerlo en 1 sola funcion.
Julian09123 Posted August 9, 2013 Posted August 9, 2013 Como Agrupo Estas Funciones En 1 solo ? PuertaCol1 = createColCircle (955.22998046875, -1546.4072265625, 14.765999794006, 10) PuertaCol2 = createColCircle(955.90002441406, -1519.58203125, 14.765999794006, 10) Osea Quiero ponerlo en 1 sola funcion. Creo que no puedes hacerlo porque Las 2 funciones son necesarias como estan asi.. Skype: Juliang09123
maauroo Posted August 9, 2013 Author Posted August 9, 2013 U.u Pues Mira el Script Puerta1 = createObject(8957, 955.22998046875, -1546.4072265625, 14.765999794006, 0, 0, 90) Puerta2 = createObject(8957,955.90002441406, -1519.58203125, 14.765999794006, 0, 0, 270) PuertaCol1 = createColCircle (955.22998046875, -1546.4072265625, 14.765999794006, 10) PuertaCol2 = createColCircle(955.90002441406, -1519.58203125, 14.765999794006, 10) --Y haces el colshape en las coordenadas de esa puerta... --Haces una funcion que va a manejar todas las puertas con el mismo comando: function abrirLaPuertaCercana(jugador) if isElementWithinColShape(jugador, PuertaCol1) then --Si el jugador esta en el colshape de la primer puerta entonces: moveObject(Puerta1, 3000, 955.22998046875, -1546.4072265625, 6.765999794006) --movemos la primer puerta... elseif isElementWithinColShape(jugador, PuertaCol2) then --Pero si el jugador esta en el segundo colshape entonces: moveObject(Puerta2, 3000, 955.90002441406, -1519.58203125, 6.765999794006) -- movemos la segunda puerta... -- Y asi vamos agreagando mas elseif para ver en cual colshape esta y dependiendo de ese colshape se movera una puerta en especifico. end end addEventHandler ( "onColShapeHit" ,PuertaCol2,abrirLaPuertaCercana) No es mio, en realidad es viejo. bueno la onda es q quiero agregar la funcion PuertaCol1 y PuertaCol2 en addEventHandler ( "onColShapeHit" ,abrirLaPuertaCercana) Para q funcione bien, Como se puede poner la funciones ?
Chaz-CR Posted August 9, 2013 Posted August 9, 2013 usa onColShapeLeave Para mover el objeto de vuelta al lugar inicial donde creaste el objeto! En mi opinion es mas sencillo! ||Age Of Battles|WarLife|RPG|DM|FR|24/7|Custom Skins|Cars|Weapons|| http://facebook.com/AoBMTA - Fanpage
maauroo Posted August 9, 2013 Author Posted August 9, 2013 Listo Gracias ya esta.. Ahora quiero solamente ponerlo a mi nombre y q nadie mas pueda entrar. Osea q yo solo lo pueda abrir. function puertaJ1abrir(jugador) if isElementWithinColShape(jugador, PuertaCol1) then --Si el jugador esta en el colshape de la primer puerta entonces: moveObject(Puerta1, 3000, 955.22998046875, -1546.4072265625, 6.765999794006) setTimer (moveObject, 3000, 1, Puerta1, 3000, 955.22998046875, -1546.4072265625, 14.765999794006) --movemos la primer puerta... -- Y asi vamos agreagando mas elseif para ver en cual colshape esta y dependiendo de ese colshape se movera una puerta en especifico. end end addEventHandler ( "onColShapeHit",PuertaCol1,puertaJ1abrir) Como lo puedo hacer a Mi nombre?
Sasu Posted August 9, 2013 Posted August 9, 2013 function puertaJ1abrir(jugador) if isElementWithinColShape(jugador, PuertaCol1) and getPlayerName(jugador) == "TUNOMBRE" then --Si el jugador esta en el colshape de la primer puerta entonces: moveObject(Puerta1, 3000, 955.22998046875, -1546.4072265625, 6.765999794006) setTimer (moveObject, 3000, 1, Puerta1, 3000, 955.22998046875, -1546.4072265625, 14.765999794006) --movemos la primer puerta... -- Y asi vamos agreagando mas elseif para ver en cual colshape esta y dependiendo de ese colshape se movera una puerta en especifico. end end addEventHandler ( "onColShapeHit",PuertaCol1,puertaJ1abrir) State: Inactive
Recommended Posts