Arsilex Posted July 7, 2012 Share Posted July 7, 2012 Hello im have one problem in my script Mision1 = createMarker ( 2788.11, -2409.87, 12.63, "cylinder", 1.5, 255, 255, 0, 170 ) function Tren( hitElement ) if ( exports.exp_system:getPlayerLevel ( source ) >= 7 ) then Estacion = createMarker( 1762.55, -1945.46, 12.24, "cylinder", 5, 255, 255, 0, 170 ) Puto1 = createBlip ( 1762.55, -1945.46, 12.24, 56, 0, 0, 0, 255,thePlayer ) coche1 = createVehicle ( 542, 2788.33, -2418.6, 13.63 ) destroyElement ( Mision1 ) outputChatBox ( "James:Hola tienes que ir hasta la estacion de tren y recoje a mi hermano de alli", getRootElement(), 255, 255, 255, true,thePlayer ) else outputChatBox ( "No eres el nivel apropiado para ello", getRootElement(), 255, 255, 255, true ) end end addEventHandler("onPlayerMarkerHit",getRootElement(),Tren) function Volver( hitElement ) Casa = createMarker( 2788.33, -2418.6, 12.63, "cylinder", 5, 255, 255, 0, 170 ) Puto1 = createBlip ( 2788.33, -2418.6, 13.63, 56, 0, 0, 0, 255,thePlayer ) destroyElement ( Estacion ) outputChatBox ( "Javier: Hola soy el hermano de James puedes llevarme a casa porfavor.!", getRootElement(), 255, 255, 255, true,thePlayer ) end addEventHandler( "onMarkerHit", Estacion, Volver ) onhitmarker (function Volver..... the script create vehicles form marker 1 Link to comment
TAPL Posted July 7, 2012 Share Posted July 7, 2012 Could you explain what you want do exactly? You must know this: 1- in event onPlayerMarkerHit the source is the player that hit the marker. 2- in event onPlayerMarkerHit the hitElement is the marker that got hit by player. 3- in event onMarkerHit the hitElement is the player that hit the marker. 4- in event onMarkerHit the source is the marker that got hit. also you attach event onPlayerMarkerHit to getRootElement() this will trigger the event whenever you hit any marker. also in event onMarkerHit you have attached an marker that haven't created yet and that will give you error bad argument. also i don't know what the hell is this: outputChatBox ( "James:Hola tienes que ir hasta la estacion de tren y recoje a mi hermano de alli", getRootElement(), 255, 255, 255, true,thePlayer ) from where did thePlayer come from? and what is doing in outputChatBox? also this: Puto1 = createBlip ( 1762.55, -1945.46, 12.24, 56, 0, 0, 0, 255,thePlayer ) and this: Puto1 = createBlip ( 2788.33, -2418.6, 13.63, 56, 0, 0, 0, 255,thePlayer ) from where did thePlayer come from? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now