Загрузка данных


// ====================== ПЕРЕКЛЮЧЕНИЕ СВИСТА ======================
mp.events.add('toggleWhistleVariant', () => {
    selectedWhistle = selectedWhistle === 1 ? 2 : 1;

    try {
        mp.storage.data.selectedWhistle = selectedWhistle;
        mp.storage.flush();
    } catch (e) {}

    const text = selectedWhistle === 1 ? 'Обычный свист' : 'Новый свист (F4-стиль)';
    mp.gui.chat.push(`!{#7dffb3}[Свист] Выбран: ${text}`);
});

// Временно: F7 переключает свист
mp.keys.bind(0x76, true, () => { // F7
    if (mp.gui.cursor.visible || mp.players.local.isTypingInTextChat) return;
    mp.events.call('toggleWhistleVariant');
});