leobi96 Posted November 28, 2012 Posted November 28, 2012 Disculpen mi Ignorancia pero queria saber como puedo crear una marca (( cilindro )) y que cuando entre en el cilindro me lleve a un interior de una casa o un centro de comidas
Castillo Posted November 28, 2012 Posted November 28, 2012 Funciones: createMarker setElementInterior Evento: onMarkerHit San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
leobi96 Posted November 28, 2012 Author Posted November 28, 2012 GRACIAS y para poner la marca y salir de nuevo al mapa o donde estabas
NodZen Posted November 28, 2012 Posted November 28, 2012 GRACIAS y para poner la marca y salir de nuevo al mapa o donde estabas Es lo mismo pero al revez. Creas un maker en el interior y lo llevas a la entrada del lugar. ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
leobi96 Posted November 28, 2012 Author Posted November 28, 2012 Discupa que numero tengo que poner para que el valla ala calle
Xperia Posted November 28, 2012 Posted November 28, 2012 En dimension pon 0, y luego pon las coordenadas que quieras.
leobi96 Posted November 28, 2012 Author Posted November 28, 2012 Como reparo esto me sale error cuando trato de inicarlo local theMarker = createMarker (2290.21240, 2431.08228, 8.3, "cylinder", 1.5, 255, 0, 0, 170) setElementInterior ( 3 , 238.66371, 139.28282, 1003.02344 ) else setElementInterior ( 0 ) end end
Xperia Posted November 28, 2012 Posted November 28, 2012 Prueba esto: local theMarker = createMarker (2290.21240, 2431.08228, 8.3, "cylinder", 1.5, 255, 0, 0, 170) addEventHandler("onMarkerHit",root, function(hitPlayer) if theMarker then setElementInterior ( theMarker, 3 , 238.66371, 139.28282, 1003.02344 ) else setElementInterior ( theMarker, 0,2290.21240, 2431.08228, 8.3 ) end end )
Arsilex Posted November 28, 2012 Posted November 28, 2012 local theMarker = createMarker (2290.21240, 2431.08228, 8.3, "cylinder", 1.5, 255, 0, 0, 170) function teleport (hitPlayer) if theMarker then setElementInterior ( theMarker, 3 , 238.66371, 139.28282, 1003.02344 ) else setElementInterior ( theMarker, 0,2290.21240, 2431.08228, 8.3 ) end end addEventHandler( "onMarkerHit", theMarker , teleport )
Xperia Posted November 29, 2012 Posted November 29, 2012 Postea el meta.xml y dime el nombre del script.
leobi96 Posted December 1, 2012 Author Posted December 1, 2012 ok esque mira "!!!_Sicario_!!!" name="lugares" version="7" type="script" description="Move" /> ese es el meta.xml y el .lua es este local theMarker = createMarker (2290.21240, 2431.08228, 8.3, "cylinder", 1.5, 255, 0, 0, 170) function teleport (hitPlayer) if theMarker then setElementInterior ( theMarker, 3 , 238.66371, 139.28282, 1003.02344 ) else setElementInterior ( theMarker, 0,2290.21240, 2431.08228, 8.3 ) end end addEventHandler( "onMarkerHit", theMarker , teleport )
Arsilex Posted December 1, 2012 Posted December 1, 2012 estas seguro que tu archivo lua no se llama interiores.lua.lua porque hay gente que lo pone asi pensando el sistema operativo lo cambia por ti a ese tipo de archivo
Castillo Posted December 1, 2012 Posted December 1, 2012 local theMarker = createMarker ( 2290.21240, 2431.08228, 8.3, "cylinder", 1.5, 255, 0, 0, 170 ) function teleport ( hitPlayer ) if ( getElementType ( hitPlayer ) == "player" ) then setElementInterior ( hitPlayer, 3, 238.66371, 139.28282, 1003.02344 ) end end addEventHandler ( "onMarkerHit", theMarker, teleport ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
leobi96 Posted December 2, 2012 Author Posted December 2, 2012 men gracias si funciono ahora como creo una marca o lo mismo para ir al exterior en el mismo lugar donde entro
Castillo Posted December 2, 2012 Posted December 2, 2012 Si la creas en el mismo lugar donde es teleportado, entonces volvera al instante que aparezca en el lugar, porque estaria tocando el marcador para salir. Podes hacer una de dos: crear el marcador de salida mas atras de donde lo teleportas, o podrias crear una tabla y hacer una restriccion para que no pase lo que mencione arriba. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
leobi96 Posted December 2, 2012 Author Posted December 2, 2012 men ya corregi todo para que no tenga ningun problema, pero no me crea la marca en el interior
Castillo Posted December 2, 2012 Posted December 2, 2012 Lo cambiaste de interior al marcador? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
leobi96 Posted December 2, 2012 Author Posted December 2, 2012 como como esque ya puse las cordenadas y eso pero no la crea
Castillo Posted December 2, 2012 Posted December 2, 2012 Asi: local theMarker = createMarker ( 2290.21240, 2431.08228, 8.3, "cylinder", 1.5, 255, 0, 0, 170 ) setElementInterior ( theMarker, 3 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts