Jump to content

Barbatosfer1278

Members
  • Posts

    1
  • Joined

  • Last visited

Details

  • Gang
    groove street
  • Location
    Los santos
  • Occupation
    Jefe
  • Interests
    ayuda

Barbatosfer1278's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. hola necesito ayuda este script lo hize yo pero por alguna razon no es detectado en el servidor de mta este es el .lua local marker = nil -- Variable para almacenar el marcador del garage local vehiclePositions = {} -- Almacena las posiciones de los vehículos en el garage -- Función para guardar el tuning del vehículo local function saveTuning(vehicle) local tuning = getVehicleUpgrades(vehicle) -- Obtiene el tuning del vehículo vehiclePositions[vehicle] = {tuning = tuning, position = {getElementPosition(vehicle)}} -- Guarda el tuning y la posición del vehículo end -- Función para restaurar el tuning del vehículo local function restoreTuning(vehicle) local data = vehiclePositions[vehicle] -- Obtiene los datos guardados del vehículo if data then setVehicleUpgrades(vehicle, data.tuning) -- Restaura el tuning del vehículo setElementPosition(vehicle, unpack(data.position)) -- Restaura la posición del vehículo end end -- Función para crear el marcador en un lugar aleatorio local function createRandomMarker() if marker then destroyElement(marker) -- Destruye el marcador existente end local x, y, z = math.random(-2000, 2000), math.random(-2000, 2000), math.random(0, 200) -- Genera coordenadas aleatorias marker = createMarker(x, y, z, "cylinder", 1.5, 255, 0, 0, 150) -- Crea el marcador en la ubicación aleatoria con color rojo setMarkerColor(marker, 0, 0, 0, 255) -- Establece el color de los bordes a negro end -- Evento al entrar al marcador del garage addEventHandler("onMarkerHit", marker, function(hitElement, matchingDimension) if matchingDimension and getElementType(hitElement) == "vehicle" then saveTuning(hitElement) -- Guarda el tuning del vehículo al entrar al garage end end) -- Evento al salir del marcador del garage addEventHandler("onMarkerLeave", marker, function(leftElement, matchingDimension) if matchingDimension and getElementType(leftElement) == "vehicle" then restoreTuning(leftElement) -- Restaura el tuning del vehículo al salir del garage end end) -- Crea el marcador aleatorio al iniciar el recurso addEventHandler("onResourceStart", resourceRoot, function() createRandomMarker() end) -- Crea un nuevo marcador aleatorio cada 30 minutos (1800000 milisegundos) setTimer(createRandomMarker, 1800000, 0) este el .xml <meta> <info author="ThomasShelby" description="Script de garage para MTA" /> <script src="garage_script.lua" /> </meta>
×
×
  • Create New...