NIKO_19997 Posted January 26, 2014 Posted January 26, 2014 hola, como dice el titulo, como puedo hacer que al pasar por un marker me salga un mensaje?....esto es lo que tengo pero nose como tendría que ir el outputChatBox : function marker() local markerr = createMarker ( 2056.27, 1532.05, 10.194, 0, 255, 255) end addEventHandler ( "onResourceStart", marker ) el mensaje: outputChatBox ( "bla bla y mas bla",thePlayer, 255, 0, 0, false) Saludos y espero que me puedan ayudar
MTA Team 0xCiBeR Posted January 26, 2014 MTA Team Posted January 26, 2014 markerr = createMarker ( 2056.27, 1532.05, 10.194, 0, 255, 255) function golpe( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" or getElementType( hitElement ) == "vehicle" then outputChatBox( "bla bla y mas bla", hitElement, 255, 255, 0 ) end end addEventHandler( "onMarkerHit", markerr, golpe )
Alexs Posted January 26, 2014 Posted January 26, 2014 (edited) markerr = createMarker ( 2056.27, 1532.05, 10.194, 0, 255, 255) function golpe( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" or getElementType( hitElement ) == "vehicle" then outputChatBox( "bla bla y mas bla", hitElement, 255, 255, 0 ) end end addEventHandler( "onMarkerHit", markerr, golpe ) No le puedes mostrar un mensaje a un vehículo. marker = createMarker ( 2056.27, 1532.05, 10.194, 'checkpoint', 4, 0, 255, 255) function golpe( hitElement, matchingDimension ) local hitPlayer = getElementType( hitElement ) == 'player' and hitElement or getElementType( hitElement ) == 'vehicle' and getVehicleController( hitElement ) if hitPlayer then outputChatBox( "bla bla y mas bla", hitPlayer, 255, 255, 0 ) end end addEventHandler( "onMarkerHit", marker, golpe ) Edited January 26, 2014 by Guest
NIKO_19997 Posted January 26, 2014 Author Posted January 26, 2014 Ninguno de los 2 me funciona ....solo me aparece el mensaje, ni siquiera el marker.
Alexs Posted January 26, 2014 Posted January 26, 2014 Ninguno de los 2 me funciona ....solo me aparece el mensaje, ni siquiera el marker. Copia el mio de nuevo, hace un momento le cambie algo.
NIKO_19997 Posted January 26, 2014 Author Posted January 26, 2014 Ninguno de los 2 me funciona ....solo me aparece el mensaje, ni siquiera el marker. Copia el mio de nuevo, hace un momento le cambie algo. Ahora si me funciona muchas gracias
Alexs Posted January 26, 2014 Posted January 26, 2014 No hay problema, si tienes Skype puedes agregarme como contacto para resolver estas cosas sencillas mas prontamente.
Recommended Posts