header.banner.textheader.banner.link

switcore.proximity.sections.features.title

⚙️ switcore.proximity.sections.config.title

switcore.proximity.sections.config.description

Config = {}
Config.InteractionKeyName = 'E'                    -- Tasta pentru interacțiune
Config.MouseToggleKey = 'LMENU'                   -- Tasta ALT pentru mouse navigation
Config.MouseToggleKeyDescription = 'Toggle Mouse Navigation'
Config.ProximityDistance = 2.0                     -- Distanța de interacțiune
Config.ShowMarker = true                          -- Afișează marker
Config.ShowText = true                            -- Afișează text
Config.MarkerColor = {r = 0, g = 255, b = 0, a = 200}  -- Culoare marker (verde)
Config.TextOffset = {x = 0.0, y = 0.0, z = 0.5}   -- Offset pentru text
Config.EntityOffset = {x = 0.0, y = 0.0, z = 0.5} -- Offset pentru entități
Config.Interactions = {}                           -- Interacțiuni statice
Config.DynamicInteractions = {}                    -- Interacțiuni dinamice
Config.Debug = false                               -- Debug mode

💻 switcore.proximity.sections.usage.title

switcore.proximity.sections.usage.static.title

switcore.proximity.sections.usage.static.description

Config.Interactions = {
    {
        coords = vector3(25.0, -1347.0, 29.5),
        label = "Magazin",
        type = "shop",
        data = {shopId = 1}
    },
    {
        coords = vector3(150.0, -1038.0, 29.4),
        label = "ATM",
        type = "atm",
        data = {atmId = 1}
    },
}

switcore.proximity.sections.usage.dynamic.title

switcore.proximity.sections.usage.dynamic.description

switcore.proximity.sections.usage.dynamic.examples.simple.title

-- Simplu pe coordonate
exports['proximity']:AddInteraction(
    vector3(100.0, 100.0, 20.0),
    "Casierie",
    "checkout",
    {storeId = 5},
    function(interaction)
        print("Interacțiune: " .. interaction.label)
    end
)

switcore.proximity.sections.usage.dynamic.examples.entity.title

local vehicle = CreateVehicle(
    GetHashKey("adder"), 
    100.0, 200.0, 30.0, 
    90.0, true, false
)

exports['proximity']:AddEntityInteraction(
    vehicle,
    "Vehicul Special",
    "vehicle",
    {vehicleId = vehicle},
    function(interaction)
        print("Bună mașina!")
    end,
    nil,
    {r = 255, g = 165, b = 0, a = 200}  -- Marker portocaliu
)

switcore.proximity.sections.usage.dynamic.examples.model.title

-- Pe toate mașinile de tip "adder"
exports['proximity']:AddModelInteraction(
    "adder", 
    "Mașină", 
    "vehicle", 
    {}
)

-- Pe toți NPC-ii de tip "cop"
exports['proximity']:AddModelInteraction(
    "s_m_y_cop_01", 
    "Polițist", 
    "npc", 
    {}
)

switcore.proximity.sections.usage.eventHandler.title

switcore.proximity.sections.usage.eventHandler.description

RegisterNetEvent('switcore:proximity:interact', function(interaction)
    if interaction.type == "shop" then
        TriggerEvent('shop:open', interaction.data.shopId)
    elseif interaction.type == "atm" then
        TriggerEvent('bank:openATM', interaction.data.atmId)
    elseif interaction.type == "vehicle" then
        -- Deschide meniul pentru vehicul
        OpenVehicleMenu(interaction.data.vehicleId)
    end
end)

📚 switcore.proximity.sections.api.title

switcore.proximity.sections.api.dynamic.title

switcore.proximity.sections.api.dynamic.methods.addInteraction.name

switcore.proximity.sections.api.dynamic.methods.addInteraction.description

AddInteraction(coords, label, type, data, onInteract, entity, glowColor, markerColor)

switcore.proximity.sections.api.dynamic.methods.addEntityInteraction.name

switcore.proximity.sections.api.dynamic.methods.addEntityInteraction.description

AddEntityInteraction(entity, label, type, data, onInteract, glowColor, markerColor)

switcore.proximity.sections.api.dynamic.methods.addModelInteraction.name

switcore.proximity.sections.api.dynamic.methods.addModelInteraction.description

AddModelInteraction(modelName, label, type, data, onInteract, maxDistance, glowColor, markerColor)

switcore.proximity.sections.api.dynamic.methods.removeInteraction.name

switcore.proximity.sections.api.dynamic.methods.removeInteraction.description

RemoveInteraction(id)

Notă: switcore.proximity.sections.api.dynamic.methods.removeInteraction.note

switcore.proximity.sections.api.utilities.title

switcore.proximity.sections.api.utilities.methods.getCurrentInteraction.name

switcore.proximity.sections.api.utilities.methods.getCurrentInteraction.description

GetCurrentInteraction()

switcore.proximity.sections.api.utilities.methods.isNearInteraction.name

switcore.proximity.sections.api.utilities.methods.isNearInteraction.description

IsNearInteraction()

🎮 switcore.proximity.sections.specialFeatures.title

switcore.proximity.sections.specialFeatures.mouseNavigation.title

switcore.proximity.sections.specialFeatures.mouseNavigation.description

    switcore.proximity.sections.specialFeatures.mouseNavigation.note

    switcore.proximity.sections.specialFeatures.smartStacking.title

      switcore.proximity.sections.specialFeatures.positioning.title