minelabi

make this Vmenu for my own fivem server the some vMenu

5 images attached
Kodari AI
KodariJul 24 at 1:19 am 7
KodariVMenu
A standalone FiveM administrative menu inspired by vMenu, designed for private servers. It provides a keyboard-accessible NUI with player utilities, vehicle spawning by category, staff-only vehicle groups, vehicle repair and performance controls, teleport destinations, weather and time controls, online player viewing, permission checks through ACE principals, and a dark blue interface styled after the supplied vehicle spawner and teleport screenshots. Configuration is centralized for easy customization.
minelabi

make all files for this vMenu

Kodari AI
KodariJul 24 at 1:20 am 6
  1. Inspect the existing FiveM resource structure and current files.

  2. Complete the resource with the client/server logic, configuration, NUI markup, styling, and JavaScript needed for the vMenu-style feature set.

  3. Check the manifest and resource paths for cross-file consistency, then fill any missing files.

Completed the vMenu resource files and connected the main functionality:

  • fxmanifest.lua

  • config.lua

  • server/main.lua

  • client/main.lua

  • html/index.html

  • html/style.css

  • html/app.js

Implemented:

  • ACE permission checks

  • Staff-only vehicle validation on the server

  • Vehicle spawning

  • Vehicle repair, deletion, flipping, and performance upgrades

  • Player healing, armor, god mode, invisibility, and wanted-level clearing

  • Admin-only noclip toggle

  • Teleports

  • Weather and time controls

  • Online player list

  • Keyboard navigation and NUI menu

  • Vehicle categories and configurable locations

Add these ACE permissions to your server.cfg:

Cfg
add_ace group.admin kodari.vmenu allow
add_ace group.admin kodari.vmenu.staff allow
add_ace group.admin kodari.vmenu.admin allow

ensure KodariVMenu

The resource folder should be named:

Plain Text
KodariVMenu/
Kodari can make mistakes. Review important code before using.
Files
client
html
server
config.lua
fxmanifest.lua
Code
7 1,162
html/app.js
const resourceName = typeof GetParentResourceName === 'function'
    ? GetParentResourceName()
    : 'kodari-vmenu';

const menu = document.getElementById('menu');
const menuTitle = document.getElementById('menu-title');
const menuCount = document.getElementById('menu-count');
const menuList = document.getElementById('menu-list');
const toast = document.getElementById('toast');

const state = {
    open: false,
    screen: 'main',
    category: null,
    rows: [],
    selected: 0,
    data: {
        vehicleCategories: [],
        teleports: [],
        weathers: []
    },
    permissions: {
        use: false,
        staff: false,
        admin: false
    }
};

function post(name, body = {}) {
    return fetch(`https://${resourceName}/${name}`, {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify(body)
    });
}

function closeMenu() {
    post('close');
}

function makeAction(label, action, extra = {}) {
    return {
        label,
        type: 'action',
        action,
        ...extra
    };
}

function makeScreen(label, screen, extra = {}) {
    return {
        label,
        type: 'screen',
        screen,
        ...extra
    };
}

function buildRows() {
    if (state.screen === 'main') {
        return [
            makeScreen('Player', 'player'),
            makeScreen('Vehicle Spawner', 'vehicles'),
            makeScreen('Teleports', 'teleports'),
            makeScreen('World Settings', 'world'),
            makeScreen('Online Players', 'players')
        ];
    }

    if (state.screen === 'player') {
        return [
            makeAction('Heal Player', 'heal', { icon: '♥' }),
            makeAction('Give Full Armor', 'armor', { icon: '◆' }),
            makeAction('Toggle God Mode', 'toggleGodmode', { icon: '♜' }),
            makeAction('Toggle Invisible', 'toggleInvisible', { icon: '◌' }),
            makeAction('Toggle Noclip', 'toggleNoclip', {
                icon: '✥',
                locked: !state.permissions.admin
            }),
            makeAction('Clear Wanted Level', 'clearWanted', { icon: '★' })
        ];
    }

    if (state.screen === 'vehicles') {
        return state.data.vehicleCategories.map(category => ({
            label: category.name,
            type: 'screen',
            screen: 'vehicleCategory',
            category: category.id,
            locked: category.staffOnly && !state.permissions.staff,
            icon: category.staffOnly ? '🔒' : ''
        }));
    }

    if (state.screen === 'vehicleCategory') {
        const category = state.data.vehicleCategories.find(item => item.id === state.category);

        if (!category) {
            return [];
        }

        return [
            ...category.vehicles.map(vehicle => makeAction(vehicle.name, 'spawnVehicle', {
                model: vehicle.model
            })),
            { label: '──────── Vehicle Tools ────────', type: 'label' },
            makeAction('Repair Current Vehicle', 'repairVehicle'),
            makeAction('Max Performance', 'maxVehiclePerformance'),
            makeAction('Flip Current Vehicle', 'flipVehicle'),
            makeAction('Delete Current Vehicle', 'deleteVehicle')
        ];
    }

    if (state.screen === 'teleports') {
        return state.data.teleports.map(teleport => makeAction(teleport.name, 'teleport', {
            id: teleport.id
        }));
    }

    if (state.screen === 'world') {
        return [
            ...state.data.weathers.map(weather => makeAction(`Weather: ${weather.name}`, 'setWeather', {
                weather: weather.id
            })),
            { label: '──────── Time ────────', type: 'label' },
            makeAction('Morning · 08:00', 'setTime', { hour: 8, minute: 0 }),
            makeAction('Noon · 12:00', 'setTime', { hour: 12, minute: 0 }),
            makeAction('Evening · 18:00', 'setTime', { hour: 18, minute: 0 }),
            makeAction('Midnight · 00:00', 'setTime', { hour: 0, minute: 0 })
        ];
    }

    if (state.screen === 'players') {
        return [
            makeAction('Refresh Online Players', 'refreshPlayers'),
            { label: 'Loading players...', type: 'label' }
        ];
    }

    if (state.screen === 'playersLoaded') {
        return state.rows;
    }

    return [];
}

function screenTitle() {
    const titles = {
        main: 'KODARI VMENU',
        player: 'PLAYER',
        vehicles: 'VEHICLE SPAWNER',
        vehicleCategory: 'VEHICLES',
        teleports: 'TELEPORTS',
        world: 'WORLD SETTINGS',
        players: 'ONLINE PLAYERS',
        playersLoaded: 'ONLINE PLAYERS'
    };

    return titles[state.screen] || 'KODARI VMENU';
}

function render() {
    state.rows = buildRows();

    if (state.selected >= state.rows.length) {
        state.selected = Math.max(0, state.rows.length - 1);
    }

    menuTitle.textContent = screenTitle();
    menuCount.textContent = `${state.rows.length} / ${state.rows.length}`;
    menuList.innerHTML = '';

    state.rows.forEach((row, index) => {
        const element = document.createElement('div');
        element.className = 'menu-row';

        if (index === state.selected) {
            element.classList.add('selected');
        }

        if (row.locked) {
            element.classList.add('locked');
        }

        if (row.type === 'label') {
            element.style.minHeight = '28px';
            element.style.color = '#6f87b2';
            element.style.fontSize = '13px';
            element.style.justifyContent = 'center';
            element.textContent = row.label;
            menuList.appendChild(element);
            return;
        }

        const label = document.createElement('span');
        label.className = 'row-label';

        const icon = document.createElement('span');