Jump to content

Ayuda con freeroam ;)


nikolassx

Recommended Posts

Buenos Dias :D Necesito una ayudita >.< tengo un server play, y e visto en otros servidores que al crear el auto... con el panel del f1 es como si lo isieran con el comando /sv , el vehiculo te sale automaticamente, no tienes que subirte.. ni nada de eso... e.e Mi pregunta.. es como puedo lograr eso.. de ante manos, gracias

Link to comment

Busca la funcion llamada "giveMeVehicles" y remplaza toda con esto:

function giveMeVehicles(vehicles) 
    if type(vehicles) == 'number' then 
        vehicles = { vehicles } 
    end 
  
    local px, py, pz, prot 
    local radius = 3 
    local playerVehicle = getPedOccupiedVehicle(source) 
    if playerVehicle then 
        px, py, pz = getElementPosition(playerVehicle) 
        prot, prot, prot = getVehicleRotation(playerVehicle) 
    else 
        px, py, pz = getElementPosition(source) 
        prot = getPedRotation(source) 
    end 
    local offsetRot = math.rad(prot) 
    local vx = px + radius * math.cos(offsetRot) 
    local vy = py + radius * math.sin(offsetRot) 
    local vz = pz + 2 
    local vrot = prot 
  
    local vehicleList = g_PlayerData[source].vehicles 
    local vehicle 
    for i,vehID in ipairs(vehicles) do 
        if vehID < 400 or vehID > 611 then 
            errMsg(vehID ..' is incorrect vehicle model', source) 
        elseif not table.find(getOption('vehicles.disallowed'), vehID) then 
            if #vehicleList >= getOption('vehicles.maxperplayer') then 
                unloadVehicle(vehicleList[1]) 
            end 
            vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) 
                        if not isPedInVehicle(source) then 
                              warpPedIntoVehicle(source, vehicle) 
                        end 
            table.insert(vehicleList, vehicle) 
            g_VehicleData[vehicle] = { creator = source, timers = {} } 
            if vehID == 464 then 
                warpPedIntoVehicle(source, vehicle) 
            elseif not g_Trailers[vehID] then 
                if getOption('vehicles.idleexplode') then 
                    g_VehicleData[vehicle].timers.fire = setTimer(commitArsonOnVehicle, getOption('vehicles.maxidletime'), 1, vehicle) 
                end 
                g_VehicleData[vehicle].timers.destroy = setTimer(unloadVehicle, getOption('vehicles.maxidletime') + (getOption('vehicles.idleexplode') and 10000 or 0), 1, vehicle) 
            end 
            vx = vx + 4 
            vz = vz + 4 
        else 
            errMsg(getVehicleNameFromModel(vehID):gsub('y$', 'ie') .. 's are not allowed', source) 
        end 
    end 
end 

Espero que tengas por lo menos algo de experiencia con esto.

Link to comment
Busca la funcion llamada "giveMeVehicles" y remplaza toda con esto:
function giveMeVehicles(vehicles) 
    if type(vehicles) == 'number' then 
        vehicles = { vehicles } 
    end 
  
    local px, py, pz, prot 
    local radius = 3 
    local playerVehicle = getPedOccupiedVehicle(source) 
    if playerVehicle then 
        px, py, pz = getElementPosition(playerVehicle) 
        prot, prot, prot = getVehicleRotation(playerVehicle) 
    else 
        px, py, pz = getElementPosition(source) 
        prot = getPedRotation(source) 
    end 
    local offsetRot = math.rad(prot) 
    local vx = px + radius * math.cos(offsetRot) 
    local vy = py + radius * math.sin(offsetRot) 
    local vz = pz + 2 
    local vrot = prot 
  
    local vehicleList = g_PlayerData[source].vehicles 
    local vehicle 
    for i,vehID in ipairs(vehicles) do 
        if vehID < 400 or vehID > 611 then 
            errMsg(vehID ..' is incorrect vehicle model', source) 
        elseif not table.find(getOption('vehicles.disallowed'), vehID) then 
            if #vehicleList >= getOption('vehicles.maxperplayer') then 
                unloadVehicle(vehicleList[1]) 
            end 
            vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) 
                        if not isPedInVehicle(source) then 
                              warpPedIntoVehicle(source, vehicle) 
                        end 
            table.insert(vehicleList, vehicle) 
            g_VehicleData[vehicle] = { creator = source, timers = {} } 
            if vehID == 464 then 
                warpPedIntoVehicle(source, vehicle) 
            elseif not g_Trailers[vehID] then 
                if getOption('vehicles.idleexplode') then 
                    g_VehicleData[vehicle].timers.fire = setTimer(commitArsonOnVehicle, getOption('vehicles.maxidletime'), 1, vehicle) 
                end 
                g_VehicleData[vehicle].timers.destroy = setTimer(unloadVehicle, getOption('vehicles.maxidletime') + (getOption('vehicles.idleexplode') and 10000 or 0), 1, vehicle) 
            end 
            vx = vx + 4 
            vz = vz + 4 
        else 
            errMsg(getVehicleNameFromModel(vehID):gsub('y$', 'ie') .. 's are not allowed', source) 
        end 
    end 
end 

Espero que tengas por lo menos algo de experiencia con esto.

:o Me salvaste laa vidaaaaaaaaaaaaaaa!!!! Mil mil mil gracias ñ_ñ

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...