DeathMta Posted September 26, 2015 Share Posted September 26, 2015 marcador = createMarker(2855.3896484375,-1696.1273193359,10, 'cylinder', 2.0, 255, 0, 0, 150) marcador1 = createMarker(193.96853637695,2078.2717285156,10, 'cylinder', 2.0, 255, 0, 0, 150) marcador2 = createMarker(1380.8928222656,1425.5935058594,10, 'cylinder', 2.0, 255, 0, 0, 150) marcador3 = createMarker(2629.71484375,795.16357421875,-24.73281288147, "corona", 1.5, 255, 0, 0, 255, getRootElement() ) warp = createMarker(220.08317565918,1907.2315673828,16, 'cylinder', 2.0, 255, 0, 0, 150) function Markers(thePlayer) ------------------------------------------------------------------------------------------------------------ if isElementWithinMarker(thePlayer, marcador) and getElementData(thePlayer,"level") >= 10 then setElementData(thePlayer,"blood",30000) outputChatBox("#FF0000[Marker]:#FFFFFFTienes 50 Mil De Sangre", thePlayer, 255, 0, 0,true) ------------------------------------------------------------------------------------------------------------ elseif isElementWithinMarker(thePlayer, marcador1) and getElementData(thePlayer,"level") >= 10 then setElementData(thePlayer,"blood",30000) outputChatBox("#FF0000[Marker]:#FFFFFFTienes 50 Mil De Sangre", thePlayer, 255, 0, 0,true) ------------------------------------------------------------------------------------------------------------ elseif isElementWithinMarker(thePlayer, marcador2) and getElementData(thePlayer,"level") >= 10 then setElementData(thePlayer,"blood",30000) outputChatBox("#FF0000[Marker]:#FFFFFFTienes 50 Mil De Sangre", thePlayer, 255, 0, 0,true) ------------------------------------------------------------------------------------------------------------ elseif isElementWithinMarker(thePlayer, marcador3) and getElementData(thePlayer, "gang" ) == "test" then setElementData(thePlayer,"blood",50000) outputChatBox("#FF0000[Marker]:#FFFFFFTienes 50 Mil De Sangre", thePlayer, 255, 0, 0,true) ------------------------------------------------------------------------------------------------------------ elseif isElementWithinMarker(thePlayer, warp) and getElementData(thePlayer, "gang" ) == "test" then setElementPosition(thePlayer,210.63455200195,1906.3947753906,17.640625) outputChatBox("#FF0000[Marker]:#FFFFFFEstas En Base", thePlayer, 255, 0, 0,true) ------------------------------------------------------------------------------------------------------------ end end addEventHandler ( "onMarkerHit", getRootElement(), Markers ) 1 Link to comment
Kilfwan Posted September 27, 2015 Share Posted September 27, 2015 mytable = { {2855.3896484375,-1696.1273193359,10, 'cylinder', 2.0, 255, 0, 0, 150}, {193.96853637695,2078.2717285156,10, 'cylinder', 2.0, 255, 0, 0, 150}, {1380.8928222656,1425.5935058594,10, 'cylinder', 2.0, 255, 0, 0, 150}, {2629.71484375,795.16357421875,-24.73281288147, "corona", 1.5, 255, 0, 0, 255}, {220.08317565918,1907.2315673828,16, 'cylinder', 2.0, 255, 0, 0, 150}, } --loop marker = {} for i,v in ipairs(mytable) do marker.markers = createMarker ( v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9] ) end function Markers(hitElement) if getElementData(hitElement,"level") >= 10 then setElementData(hitElement,"blood",50000) outputChatBox("#FF0000[Marker]:#FFFFFFTienes 50 Mil De Sangre", hitElement, 255, 0, 0,true) else outputChatBox("No tienes nivel suficiente", hitElement, 255, 0, 0,true) end end addEventHandler ( "onMarkerHit", getRootElement(), Markers ) Link to comment
Tomas Posted September 27, 2015 Share Posted September 27, 2015 mytable = { {2855.3896484375,-1696.1273193359,10, 'cylinder', 2.0, 255, 0, 0, 150}, {193.96853637695,2078.2717285156,10, 'cylinder', 2.0, 255, 0, 0, 150}, {1380.8928222656,1425.5935058594,10, 'cylinder', 2.0, 255, 0, 0, 150}, {2629.71484375,795.16357421875,-24.73281288147, "corona", 1.5, 255, 0, 0, 255}, {220.08317565918,1907.2315673828,16, 'cylinder', 2.0, 255, 0, 0, 150}, } --loop marker = {} for i,v in ipairs(mytable) do marker.markers = createMarker ( v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9] ) end function Markers(hitElement) if getElementData(hitElement,"level") >= 10 then setElementData(hitElement,"blood",50000) outputChatBox("#FF0000[Marker]:#FFFFFFTienes 50 Mil De Sangre", hitElement, 255, 0, 0,true) else outputChatBox("No tienes nivel suficiente", hitElement, 255, 0, 0,true) end end addEventHandler ( "onMarkerHit", getRootElement(), Markers ) Al tocar cualquier marker del servidor se ejecutaría la función Link to comment
DeathMta Posted September 27, 2015 Author Share Posted September 27, 2015 mytable = { {2855.3896484375,-1696.1273193359,10, 'cylinder', 2.0, 255, 0, 0, 150}, {193.96853637695,2078.2717285156,10, 'cylinder', 2.0, 255, 0, 0, 150}, {1380.8928222656,1425.5935058594,10, 'cylinder', 2.0, 255, 0, 0, 150}, {2629.71484375,795.16357421875,-24.73281288147, "corona", 1.5, 255, 0, 0, 255}, {220.08317565918,1907.2315673828,16, 'cylinder', 2.0, 255, 0, 0, 150}, } --loop marker = {} for i,v in ipairs(mytable) do marker.markers = createMarker ( v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9] ) end function Markers(hitElement) if getElementData(hitElement,"level") >= 10 then setElementData(hitElement,"blood",50000) outputChatBox("#FF0000[Marker]:#FFFFFFTienes 50 Mil De Sangre", hitElement, 255, 0, 0,true) else outputChatBox("No tienes nivel suficiente", hitElement, 255, 0, 0,true) end end addEventHandler ( "onMarkerHit", getRootElement(), Markers ) eso es para un marker global .-. yo lo que hago es darle a cada marker una funcion especifica Link to comment
Kilfwan Posted September 27, 2015 Share Posted September 27, 2015 Yo opino que si vas a comenzar a hacer aportes sobre scripts de dayz juntalos en 1 solo post, y no hagas tantos, seria mejor. Link to comment
Tomas Posted September 28, 2015 Share Posted September 28, 2015 @Death, yo te recomiendo no seguir sus recomendaciones Link to comment
aka Blue Posted September 28, 2015 Share Posted September 28, 2015 @Death, yo te recomiendo no seguir sus recomendaciones Todo mi respeto. Buen aporte, me podría servir, estoy haciendo un minijuego para mi servidor Link to comment
DeathMta Posted September 28, 2015 Author Share Posted September 28, 2015 ando creando un hud de autos muy simple para mta dayz en unos dias lo subo para todos Link to comment
Recommended Posts