Jump to content

Não estou conseguindo colocar o marker em dimensão


Recommended Posts

 

local markerStore = { }

function loadStore ( )
    local markerAttributes = config.shops["attributes"]["marker"]

    async:foreach (config.shops.locations, "ipairs", function (v)
        local x, y, z = unpack (v)
        local markerElement = createMarker (Vector3 (x, y, z - 1), markerAttributes["markerType"], markerAttributes["markerSize"], unpack (markerAttributes["markerColor"]))
        markerStore[markerElement] = true
    end, function ( )
        sendConsoleMessage ("Marker's store loaded.", 4, 130, 150, 255, 50)
    end)
end

function onMarkerEvents (hitElement, hitDimension)
    if not markerStore[source] then
        return
    end
    if hitElement and isElement (hitElement) and getElementType (hitElement) == "player" and hitDimension and not isPedInVehicle (hitElement) then
        triggerClientEvent (hitElement, "Instace.ClientManagement", hitElement, "custom-show", getClothes (hitElement))
        return
    end
end
addEventHandler ("onMarkerHit", resourceRoot, onMarkerEvents, true, "normal")

-- clothes's client's
local typeName = {
    [0] = "a Camisa";
    [1] = "o Cabelo";
    [2] = "as calças/shorts";
}

function customBuyClothes (clothesValue)
    if not client or not clothesValue then
        return
    end
    local client = client;
    if getElementData (client, "custom-click") then
        removeElementData (client, "custom-click")
    end
    if getPlayerMoney (client) >= clothesValue["clothesPrice"] then
        if clothesValue["clothesTexture"] and clothesValue["clothesModel"] then
            addPedClothes (client, clothesValue["clothesTexture"], clothesValue["clothesModel"], clothesValue["clothesType"])
            sendPlayerMessage ("server", client, "Você comprou ( "..clothesValue["clothesName"].." ).", "success")
        else
            removePedClothes (client, clothesValue["clothesType"])
            sendPlayerMessage ("server", client, "Você retirou "..typeName[clothesValue["clothesType"]]..".", "success")
        end
        takePlayerMoney (client, clothesValue["clothesPrice"])
        saveClothes (client)
        triggerClientEvent (client, "Instace.ClientManagement", client, "custom-update", getClothes (client))
        return
    else
        sendPlayerMessage ("server", client, "Você não possui dinheiro suficiente para comprar essa peça de roupa.", "error")
        return
    end
end
createEventHandler ("custom-buy", root, customBuyClothes)

-- clothes's util's
function loadStartupClothes ( )
    if not config.general.startup then
        return
    end
    for _, playerElement in ipairs (getElementsByType ("player")) do
        if playerElement and isElement (playerElement) then
            loadClothes (playerElement)
            print ("Engine loading clothes: "..getPlayerName (playerElement))
        end
    end
end

function loadClothes (player)
    local acc = getAccountName (getPlayerAccount (player))

    if isGuestAccount (getPlayerAccount (player)) then
        for indexClothes, valueClothes in pairs (config["general"]["defaultClothes"]) do
            addPedClothes (player, clothesTexture, clothesModel, clothesType)
        end
    else
        if not database["clothes"][acc] then
            database["clothes"][acc] = {}

            for indexClothes, valueClothes in pairs (config["general"]["defaultClothes"]) do
                local clothesType, clothesTexture, clothesModel = indexClothes, valueClothes["clothesTexture"], valueClothes["clothesModel"]
                database["clothes"][acc][clothesType] = {clothesTexture = clothesTexture, clothesModel = clothesModel}
                addPedClothes (player, clothesTexture, clothesModel, clothesType)
            end
 
            dbExec (database["connection"], "INSERT INTO `clothes` VALUES (?, ?)", acc, toJSON (database["clothes"][acc]))
            return
        else
            for clothesType, valueClothes in pairs (database["clothes"][acc]) do
                addPedClothes (player, valueClothes["clothesTexture"], valueClothes["clothesModel"], clothesType)
            end
        end
    end
end

function saveClothes (player)
    local acc = getAccountName (getPlayerAccount (player))
    if not database["clothes"][acc] then
        return false
    end

    local tableClothes = {}

    for i = 0, 17 do
        local clothesTexture, clothesModel = getPedClothes (player, i)

        if clothesTexture and clothesModel then
            tableClothes[tostring (i)] = {clothesTexture = clothesTexture, clothesModel = clothesModel}
        end
    end
    for clothesType, clothesValues in pairs (tableClothes) do  
        database["clothes"][acc][clothesType] = clothesValues
    end
    dbExec (database["connection"], "UPDATE `clothes` SET `clothes` = ? WHERE `account` = ?", toJSON (database["clothes"][acc]), acc)
    return
end

function getClothes (player)
    local acc = getAccountName (getPlayerAccount (player))

    if database["clothes"][acc] then
        return database["clothes"][acc]
    end
    return config["general"]["defaultClothes"]
end

-- player's event's
function onPlayerEvents (...)
    local _, acc = ...
    if isGuestAccount (acc) then
        return
    end
    return loadClothes (source)
end
addEventHandler ("onPlayerLogin", root, onPlayerEvents)

--------------------------------loja ls---------------------------
--- Marker Entrar
local Entrarcj = createMarker(1103.2294921875, -1440.1158447266, 15.796875 -1, "cylinder", 1.5, 0 , 255, 255)
setElementInterior(Entrarcj, 0)
setElementDimension(Entrarcj, 0)
local blip = createBlip( 1103.2294921875, -1440.1158447266, 15.796875, 45, 0, 0, 0, 255, myPlayer )
setBlipVisibleDistance(blip, 300)

--- Marker Sair
local Sair1 = createMarker(227.02728271484, -8.4545259475708, 1002.2109375 -1, "cylinder", 1.5, 0 ,255 ,255)
setElementDimension(Sair1, 0)  
setElementInterior(Sair1, 5)
-- Posição De Entra
function entrar(hitElement, matchingDimension, interior)
    if (getElementType(hitElement) == "player") and (matchingDimension) then
    local vehicle = getPedOccupiedVehicle(hitElement)
    local playerAccount = getPlayerAccount(hitElement)
        if (not vehicle) then
            if (playerAccount) then
                if (not isGuestAccount(playerAccount)) then
                    setElementPosition(hitElement, 227.02728271484, -8.4545259475708, 1002.2109375)
                    setElementDimension(hitElement, 0)
                    setElementInterior(hitElement, 5)
                    setElementRotation(hitElement, 0, 0, 180)
                end
            end
        end
    end
end
addEventHandler("onMarkerHit", Entrarcj, entrar)

-- Posição De Sair
function sair(hitElement, matchingDimension)
    setElementPosition(hitElement, 1103.2294921875, -1440.1158447266, 15.796875)
    setElementDimension(hitElement, 0)  
    setElementInterior(hitElement, 0)
    setElementRotation(hitElement, 0, 0, 90)
end
addEventHandler("onMarkerHit", Sair1, sair)
------------------------------------------loja ls------------------------------------------------------

Estou tentando colocar esse marker na dimensão 5 

porém simplesmente não consigo entender como encaixar isso neste script

 

config = { -- Configurações.
    general = { -- Configurações Gerais.
        infobox = "MST.sendPlayerNotification"; -- Evento da Infobox.
        startup = true; -- Deixe "true" para carregar todas as roupas da inicialização.
        defaultClothes = {
            [0] = {clothesTexture = "player_torso", clothesModel = "torso"}; -- Textura, Modelo.
            [1] = {clothesTexture = "bald", clothesModel = "head"}; -- Textura, Modelo.
            [2] = {clothesTexture = "player_legs", clothesModel = "legs"}; -- Textura, Modelo.
            [3] = {clothesTexture = "foot", clothesModel = "feet"}; -- Textura, Modelo.
        };
    };
    shops = { -- Lojas.
        attributes = { -- Atributos.
            marker = { -- Atributos do Marcador.
                markerType = "cylinder"; -- Tipo do Marcador.
                markerSize = 2; -- Tamanho do Marcador.
                markerColor = {130, 150, 255, 50}; -- Cor {R, G, B} do Marcador.
            };
            preview = { -- Posições do Preview.
                positionMatrix = {2119.2902832031, 1936.4862060547, 11.218799591064, 2118.4636230469, 1935.9243164062, 11.245359420776, 0, 70}; -- Posição da Camera Matrix.
                positionPedPreview = {2113.7507324219, 1932.7330322266, 10.8203125, -55}; -- Posição do PED.
            };
        };
        locations = { -- Localizações das Lojas.
            {206.3757019043, -8.1241798400879, 1001.2109375}; -- Posição {X, Y, Z} da Loja.
        };
    };
    clothes = {
        ["Cabelos"] = {
            {clothesName = "Remover Cabelo", clothesPrice = 0, clothesTexture = nil, clothesModel = nil, clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Degradê", clothesPrice = 35.50, clothesTexture = "highfade", clothesModel = "head", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Hi-top Degradê", clothesPrice = 45.99, clothesTexture = "highafro", clothesModel = "highafro", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Tranças Nagô", clothesPrice = 97.39, clothesTexture = "cornrows", clothesModel = "cornrows", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Tranças Nagô Descoloridas", clothesPrice = 134.69, clothesTexture = "cornrowsb", clothesModel = "cornrows", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Clássico 4 listras", clothesPrice = 25.00, clothesTexture = "tramline", clothesModel = "tramline", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "BlackPower", clothesPrice = 68.33, clothesTexture = "afro", clothesModel = "afro", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Militar", clothesPrice = 44.39, clothesTexture = "flattop", clothesModel = "flattop", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
        };
        ["Camisetas"] = {
            {clothesName = "Remover Camisa", clothesPrice = 0, clothesTexture = nil, clothesModel = nil, clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Jaqueta 1", clothesPrice = 254.36, clothesTexture = "bbjackrim", clothesModel = "bbjack", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Regata 1", clothesPrice = 149,99, clothesTexture = "baskballdrib", clothesModel = "baskball", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 1", clothesPrice = 249.99, clothesTexture = "sixtyniners", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 2", clothesPrice = 176.99, clothesTexture = "tshirtbase5", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 3", clothesPrice = 189.75, clothesTexture = "tshirtblunts", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 4", clothesPrice = 142.67, clothesTexture = "tshirtheatwht", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 5", clothesPrice = 98.20, clothesTexture = "tshirtilovels", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 6", clothesPrice = 192.35, clothesTexture = "tshirtbobomonk", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 7", clothesPrice = 118.19, clothesTexture = "tshirtlocgrey", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 8", clothesPrice = 168.19, clothesTexture = "bandits", clothesModel = "baseball", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            
        };
        ["Calças"] = {
            {clothesName = "Cueca", clothesPrice = 0, clothesTexture = nil, clothesModel = nil, clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Jeans", clothesPrice = 97.30, clothesTexture = "jeansdenim", clothesModel = "jeans", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Rasgada", clothesPrice = 126.35, clothesTexture = "denimsred", clothesModel = "jeans", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Adidas Moletom preto", clothesPrice = 87.72, clothesTexture = "tracktrwhstr", clothesModel = "tracktr", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Adidas Moletom vermelho", clothesPrice = 87.72, clothesTexture = "tracktrpro", clothesModel = "tracktr", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Adidas Moletom verde", clothesPrice = 87.72, clothesTexture = "tracktrgang", clothesModel = "tracktr", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Adidas Moletom branco", clothesPrice = 87.72, clothesTexture = "tracktreris", clothesModel = "tracktr", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Adidas Moletom azul", clothesPrice = 87.72, clothesTexture = "tracktrblue", clothesModel = "tracktr", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
        };
        ["Sapatos"] = {
            {clothesName = "Sapato 1", clothesPrice = 89.29, clothesTexture = "convprogrn", clothesModel = "conv", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Sapato 2", clothesPrice = 233.70, clothesTexture = "bask1eris", clothesModel = "bask1", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Sapato 3", clothesPrice = 174.20, clothesTexture = "hitop", clothesModel = "bask1", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Sapato 4", clothesPrice = 185.65, clothesTexture = "bask2heatwht", clothesModel = "bask1", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Sapato 5", clothesPrice = 381.98, clothesTexture = "sneakerheatwht", clothesModel = "sneaker", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Sapato 6", clothesPrice = 1734.99, clothesTexture = "sneakerprored", clothesModel = "sneaker", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
        };
        ["Chapéus"] = {

        };
        ["Acessórios"] = {
            {clothesName = "Rolex Cr", clothesPrice = 1712.93, clothesTexture = "watchcro2", clothesModel = "watch", clothesType = 14}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Rolex Dr", clothesPrice = 2479.37, clothesTexture = "watchcro", clothesModel = "watch", clothesType = 14}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
        
        };
    };
}

 

Link to comment
On 18/01/2023 at 19:26, realasuramc said:

 

local markerStore = { }

function loadStore ( )
    local markerAttributes = config.shops["attributes"]["marker"]

    async:foreach (config.shops.locations, "ipairs", function (v)
        local x, y, z = unpack (v)
        local markerElement = createMarker (Vector3 (x, y, z - 1), markerAttributes["markerType"], markerAttributes["markerSize"], unpack (markerAttributes["markerColor"]))
        markerStore[markerElement] = true
    end, function ( )
        sendConsoleMessage ("Marker's store loaded.", 4, 130, 150, 255, 50)
    end)
end

function onMarkerEvents (hitElement, hitDimension)
    if not markerStore[source] then
        return
    end
    if hitElement and isElement (hitElement) and getElementType (hitElement) == "player" and hitDimension and not isPedInVehicle (hitElement) then
        triggerClientEvent (hitElement, "Instace.ClientManagement", hitElement, "custom-show", getClothes (hitElement))
        return
    end
end
addEventHandler ("onMarkerHit", resourceRoot, onMarkerEvents, true, "normal")

-- clothes's client's
local typeName = {
    [0] = "a Camisa";
    [1] = "o Cabelo";
    [2] = "as calças/shorts";
}

function customBuyClothes (clothesValue)
    if not client or not clothesValue then
        return
    end
    local client = client;
    if getElementData (client, "custom-click") then
        removeElementData (client, "custom-click")
    end
    if getPlayerMoney (client) >= clothesValue["clothesPrice"] then
        if clothesValue["clothesTexture"] and clothesValue["clothesModel"] then
            addPedClothes (client, clothesValue["clothesTexture"], clothesValue["clothesModel"], clothesValue["clothesType"])
            sendPlayerMessage ("server", client, "Você comprou ( "..clothesValue["clothesName"].." ).", "success")
        else
            removePedClothes (client, clothesValue["clothesType"])
            sendPlayerMessage ("server", client, "Você retirou "..typeName[clothesValue["clothesType"]]..".", "success")
        end
        takePlayerMoney (client, clothesValue["clothesPrice"])
        saveClothes (client)
        triggerClientEvent (client, "Instace.ClientManagement", client, "custom-update", getClothes (client))
        return
    else
        sendPlayerMessage ("server", client, "Você não possui dinheiro suficiente para comprar essa peça de roupa.", "error")
        return
    end
end
createEventHandler ("custom-buy", root, customBuyClothes)

-- clothes's util's
function loadStartupClothes ( )
    if not config.general.startup then
        return
    end
    for _, playerElement in ipairs (getElementsByType ("player")) do
        if playerElement and isElement (playerElement) then
            loadClothes (playerElement)
            print ("Engine loading clothes: "..getPlayerName (playerElement))
        end
    end
end

function loadClothes (player)
    local acc = getAccountName (getPlayerAccount (player))

    if isGuestAccount (getPlayerAccount (player)) then
        for indexClothes, valueClothes in pairs (config["general"]["defaultClothes"]) do
            addPedClothes (player, clothesTexture, clothesModel, clothesType)
        end
    else
        if not database["clothes"][acc] then
            database["clothes"][acc] = {}

            for indexClothes, valueClothes in pairs (config["general"]["defaultClothes"]) do
                local clothesType, clothesTexture, clothesModel = indexClothes, valueClothes["clothesTexture"], valueClothes["clothesModel"]
                database["clothes"][acc][clothesType] = {clothesTexture = clothesTexture, clothesModel = clothesModel}
                addPedClothes (player, clothesTexture, clothesModel, clothesType)
            end
 
            dbExec (database["connection"], "INSERT INTO `clothes` VALUES (?, ?)", acc, toJSON (database["clothes"][acc]))
            return
        else
            for clothesType, valueClothes in pairs (database["clothes"][acc]) do
                addPedClothes (player, valueClothes["clothesTexture"], valueClothes["clothesModel"], clothesType)
            end
        end
    end
end

function saveClothes (player)
    local acc = getAccountName (getPlayerAccount (player))
    if not database["clothes"][acc] then
        return false
    end

    local tableClothes = {}

    for i = 0, 17 do
        local clothesTexture, clothesModel = getPedClothes (player, i)

        if clothesTexture and clothesModel then
            tableClothes[tostring (i)] = {clothesTexture = clothesTexture, clothesModel = clothesModel}
        end
    end
    for clothesType, clothesValues in pairs (tableClothes) do  
        database["clothes"][acc][clothesType] = clothesValues
    end
    dbExec (database["connection"], "UPDATE `clothes` SET `clothes` = ? WHERE `account` = ?", toJSON (database["clothes"][acc]), acc)
    return
end

function getClothes (player)
    local acc = getAccountName (getPlayerAccount (player))

    if database["clothes"][acc] then
        return database["clothes"][acc]
    end
    return config["general"]["defaultClothes"]
end

-- player's event's
function onPlayerEvents (...)
    local _, acc = ...
    if isGuestAccount (acc) then
        return
    end
    return loadClothes (source)
end
addEventHandler ("onPlayerLogin", root, onPlayerEvents)

--------------------------------loja ls---------------------------
--- Marker Entrar
local Entrarcj = createMarker(1103.2294921875, -1440.1158447266, 15.796875 -1, "cylinder", 1.5, 0 , 255, 255)
setElementInterior(Entrarcj, 0)
setElementDimension(Entrarcj, 0)
local blip = createBlip( 1103.2294921875, -1440.1158447266, 15.796875, 45, 0, 0, 0, 255, myPlayer )
setBlipVisibleDistance(blip, 300)

--- Marker Sair
local Sair1 = createMarker(227.02728271484, -8.4545259475708, 1002.2109375 -1, "cylinder", 1.5, 0 ,255 ,255)
setElementDimension(Sair1, 0)  
setElementInterior(Sair1, 5)
-- Posição De Entra
function entrar(hitElement, matchingDimension, interior)
    if (getElementType(hitElement) == "player") and (matchingDimension) then
    local vehicle = getPedOccupiedVehicle(hitElement)
    local playerAccount = getPlayerAccount(hitElement)
        if (not vehicle) then
            if (playerAccount) then
                if (not isGuestAccount(playerAccount)) then
                    setElementPosition(hitElement, 227.02728271484, -8.4545259475708, 1002.2109375)
                    setElementDimension(hitElement, 0)
                    setElementInterior(hitElement, 5)
                    setElementRotation(hitElement, 0, 0, 180)
                end
            end
        end
    end
end
addEventHandler("onMarkerHit", Entrarcj, entrar)

-- Posição De Sair
function sair(hitElement, matchingDimension)
    setElementPosition(hitElement, 1103.2294921875, -1440.1158447266, 15.796875)
    setElementDimension(hitElement, 0)  
    setElementInterior(hitElement, 0)
    setElementRotation(hitElement, 0, 0, 90)
end
addEventHandler("onMarkerHit", Sair1, sair)
------------------------------------------loja ls------------------------------------------------------

Estou tentando colocar esse marker na dimensão 5 

porém simplesmente não consigo entender como encaixar isso neste script

 

config = { -- Configurações.
    general = { -- Configurações Gerais.
        infobox = "MST.sendPlayerNotification"; -- Evento da Infobox.
        startup = true; -- Deixe "true" para carregar todas as roupas da inicialização.
        defaultClothes = {
            [0] = {clothesTexture = "player_torso", clothesModel = "torso"}; -- Textura, Modelo.
            [1] = {clothesTexture = "bald", clothesModel = "head"}; -- Textura, Modelo.
            [2] = {clothesTexture = "player_legs", clothesModel = "legs"}; -- Textura, Modelo.
            [3] = {clothesTexture = "foot", clothesModel = "feet"}; -- Textura, Modelo.
        };
    };
    shops = { -- Lojas.
        attributes = { -- Atributos.
            marker = { -- Atributos do Marcador.
                markerType = "cylinder"; -- Tipo do Marcador.
                markerSize = 2; -- Tamanho do Marcador.
                markerColor = {130, 150, 255, 50}; -- Cor {R, G, B} do Marcador.
            };
            preview = { -- Posições do Preview.
                positionMatrix = {2119.2902832031, 1936.4862060547, 11.218799591064, 2118.4636230469, 1935.9243164062, 11.245359420776, 0, 70}; -- Posição da Camera Matrix.
                positionPedPreview = {2113.7507324219, 1932.7330322266, 10.8203125, -55}; -- Posição do PED.
            };
        };
        locations = { -- Localizações das Lojas.
            {206.3757019043, -8.1241798400879, 1001.2109375}; -- Posição {X, Y, Z} da Loja.
        };
    };
    clothes = {
        ["Cabelos"] = {
            {clothesName = "Remover Cabelo", clothesPrice = 0, clothesTexture = nil, clothesModel = nil, clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Degradê", clothesPrice = 35.50, clothesTexture = "highfade", clothesModel = "head", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Hi-top Degradê", clothesPrice = 45.99, clothesTexture = "highafro", clothesModel = "highafro", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Tranças Nagô", clothesPrice = 97.39, clothesTexture = "cornrows", clothesModel = "cornrows", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Tranças Nagô Descoloridas", clothesPrice = 134.69, clothesTexture = "cornrowsb", clothesModel = "cornrows", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Clássico 4 listras", clothesPrice = 25.00, clothesTexture = "tramline", clothesModel = "tramline", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "BlackPower", clothesPrice = 68.33, clothesTexture = "afro", clothesModel = "afro", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Militar", clothesPrice = 44.39, clothesTexture = "flattop", clothesModel = "flattop", clothesType = 1}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
        };
        ["Camisetas"] = {
            {clothesName = "Remover Camisa", clothesPrice = 0, clothesTexture = nil, clothesModel = nil, clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Jaqueta 1", clothesPrice = 254.36, clothesTexture = "bbjackrim", clothesModel = "bbjack", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Regata 1", clothesPrice = 149,99, clothesTexture = "baskballdrib", clothesModel = "baskball", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 1", clothesPrice = 249.99, clothesTexture = "sixtyniners", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 2", clothesPrice = 176.99, clothesTexture = "tshirtbase5", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 3", clothesPrice = 189.75, clothesTexture = "tshirtblunts", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 4", clothesPrice = 142.67, clothesTexture = "tshirtheatwht", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 5", clothesPrice = 98.20, clothesTexture = "tshirtilovels", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 6", clothesPrice = 192.35, clothesTexture = "tshirtbobomonk", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 7", clothesPrice = 118.19, clothesTexture = "tshirtlocgrey", clothesModel = "tshirt", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Camisa 8", clothesPrice = 168.19, clothesTexture = "bandits", clothesModel = "baseball", clothesType = 0}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            
        };
        ["Calças"] = {
            {clothesName = "Cueca", clothesPrice = 0, clothesTexture = nil, clothesModel = nil, clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Jeans", clothesPrice = 97.30, clothesTexture = "jeansdenim", clothesModel = "jeans", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Rasgada", clothesPrice = 126.35, clothesTexture = "denimsred", clothesModel = "jeans", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Adidas Moletom preto", clothesPrice = 87.72, clothesTexture = "tracktrwhstr", clothesModel = "tracktr", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Adidas Moletom vermelho", clothesPrice = 87.72, clothesTexture = "tracktrpro", clothesModel = "tracktr", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Adidas Moletom verde", clothesPrice = 87.72, clothesTexture = "tracktrgang", clothesModel = "tracktr", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Adidas Moletom branco", clothesPrice = 87.72, clothesTexture = "tracktreris", clothesModel = "tracktr", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Calça Adidas Moletom azul", clothesPrice = 87.72, clothesTexture = "tracktrblue", clothesModel = "tracktr", clothesType = 2}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
        };
        ["Sapatos"] = {
            {clothesName = "Sapato 1", clothesPrice = 89.29, clothesTexture = "convprogrn", clothesModel = "conv", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Sapato 2", clothesPrice = 233.70, clothesTexture = "bask1eris", clothesModel = "bask1", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Sapato 3", clothesPrice = 174.20, clothesTexture = "hitop", clothesModel = "bask1", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Sapato 4", clothesPrice = 185.65, clothesTexture = "bask2heatwht", clothesModel = "bask1", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Sapato 5", clothesPrice = 381.98, clothesTexture = "sneakerheatwht", clothesModel = "sneaker", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Sapato 6", clothesPrice = 1734.99, clothesTexture = "sneakerprored", clothesModel = "sneaker", clothesType = 3}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
        };
        ["Chapéus"] = {

        };
        ["Acessórios"] = {
            {clothesName = "Rolex Cr", clothesPrice = 1712.93, clothesTexture = "watchcro2", clothesModel = "watch", clothesType = 14}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
            {clothesName = "Rolex Dr", clothesPrice = 2479.37, clothesTexture = "watchcro", clothesModel = "watch", clothesType = 14}; -- Nome da Peça' Roupa, Preço da peça, Textura, Modelo, Tipo.
        
        };
    };
}

 

Se seu objetivo for colocar na dimensão 5 você inverteu o lugar. Você está colocar no interior 5 ao invez da dimensão...

--------------------------------loja ls---------------------------
--- Marker Entrar
local Entrarcj = createMarker(1103.2294921875, -1440.1158447266, 15.796875 -1, "cylinder", 1.5, 0 , 255, 255)
setElementInterior(Entrarcj, 0)
setElementDimension(Entrarcj, 0)

local blip = createBlip( 1103.2294921875, -1440.1158447266, 15.796875, 45, 0, 0, 0, 255, myPlayer )
setBlipVisibleDistance(blip, 300)

--- Marker Sair
local Sair1 = createMarker(227.02728271484, -8.4545259475708, 1002.2109375 -1, "cylinder", 1.5, 0 ,255 ,255)
setElementDimension(Sair1, 5)  
setElementInterior(Sair1, 5)
-- Posição De Entra
function entrar(hitElement, matchingDimension, interior)
    if (getElementType(hitElement) == "player") and (matchingDimension) then
    local vehicle = getPedOccupiedVehicle(hitElement)
    local playerAccount = getPlayerAccount(hitElement)
        if (not vehicle) then
            if (playerAccount) then
                if (not isGuestAccount(playerAccount)) then
                    setElementPosition(hitElement, 227.02728271484, -8.4545259475708, 1002.2109375)
                    setElementDimension(hitElement, 5)
                    setElementInterior(hitElement, 5)
                    setElementRotation(hitElement, 0, 0, 180)
                end
            end
        end
    end
end
addEventHandler("onMarkerHit", Entrarcj, entrar)

-- Posição De Sair
function sair(hitElement, matchingDimension)
    setElementPosition(hitElement, 1103.2294921875, -1440.1158447266, 15.796875)
    setElementDimension(hitElement, 0)  
    setElementInterior(hitElement, 0)
    setElementRotation(hitElement, 0, 0, 90)
end
addEventHandler("onMarkerHit", Sair1, sair)
------------------------------------------loja ls------------------------------------------------------

Se deu bom deixar o troféuzinho<3

  • Thanks 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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