This is a mobile optimized page that loads fast, if you want to load the real page, click this text.

[Продам] CEF Speedometer HUD — RAGE MP 1.1 | Single Sale

PercyBerkeley

Активный участник
BackEnd developer
16 Ноя 2024
255
26
77
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. What I'm selling
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
A fully custom Speedometer HUD built from scratch for RAGE MP 1.1, designed to fit both cars and motorcycles. Includes an integrated fuel system.

—Features:
— Speed LED bar with color gradient (customizable)
— RPM and fuel gauges with animated needles
— Gear indicator (N / R / 1–6+)
— Status icons: seatbelt, low/high beams, hood, trunk, door lock, engine status
— Engine-off mode: full HUD goes dark with visual effect
— Fuel consumption system based on distance traveled + idle consumption
— Server sync via variables and events
— Auto-hides when leaving the vehicle, opening the smartphone, etc.
— production-ready

— Code sample — vehicle state sync:

JavaScript:
function updateVehicleStates(vehicle) {
    const seatbelt = typeof seatbeltOn !== 'undefined' ? seatbeltOn : false;
    if (seatbelt !== lastSeatbeltState) {
        safeExecute(`window.updateSeatbelt(${seatbelt});`);
        lastSeatbeltState = seatbelt;
    }


    const engineRunning = vehicle.getVariable('engine') === 1;
    const engineHealth  = vehicle.getEngineHealth();
    if (engineRunning !== lastEngineState) {
        safeExecute(`window.updateEngine(${engineRunning}, ${engineHealth});`);
        lastEngineState = engineRunning;
    }


    const locked = vehicle.getVariable('locked') === true
        || vehicle.getDoorsLockedForPlayer(player);
    if (locked !== lastLockState) {
        safeExecute(`window.updateLock(${locked});`);
        lastLockState = locked;
    }
}

—Code sample — fuel consumption (distance + idle):

JavaScript:
fuelInterval = setInterval(() => {
    if (!currentPlayer.vehicle) { stopDistanceTracking(); return; }


    const newPosition = currentPlayer.position;
    const currentSpeed = currentPlayer.vehicle.getSpeed();


    if (lastPosition) {
        const distance = calculateDistance(lastPosition, newPosition);


        if (distance < 0.5) {
            accumulatedDistance += IDLE_CONSUMPTION_RATE * (0.3 / FUEL_CONSTANTS.CONSUMPTION_RATE);
        } else {
            accumulatedDistance += distance;
        }

        if (accumulatedDistance >= 5) {
            mp.events.callRemote('updateFuelConsumption', accumulatedDistance, currentSpeed);
            accumulatedDistance = 0;
        }
    }
    lastPosition = newPosition;
}, 500);

—Demo video (From second 23, I zoom in on the speedometer for better visibility):

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2. Price
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$30 USD — single sale. Once sold, it will not be sold to anyone else.
Payment: crypto / PayPal

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3. File origin
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built entirely by me from scratch. Not a modification of any public script or existing forum release.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4. Built with: Vue 3 + JS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

━━━━━━━━━━━━━━━━━━━━━━━━━━━━

5. Contact
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DS: perritomalvado#5833 or DM

If any admin asks me for it, I'll give them the complete code without any problem.
 
Реакции: m0v1l3

Inoi

/dev/null
Команда форума
Moderator
VIP
15 Окт 2020
5,023
2,587
208
36
Реакции: m0v1l3 и PercyBerkeley

sonnyk

Участник портала
26 Ноя 2022
118
16
73

расширь границы, а то у тебя вот такое безобразие получается
 
Реакции: Mikhayloff