Jump to content

Sou novato no script lua e quero ajuda


Recommended Posts

for i = 1, #config.concessionarias do
    concessionaria = createMarker (config.concessionarias.x, config.concessionarias.y, config.concessionarias.z - 1, "cylinder", 1.2, config.concessionarias.cor[1], config.concessionarias.cor[2], config.concessionarias.cor[3], config.concessionarias.cor[4])
    createBlipAttachedTo (concessionaria, config.concessionarias.blip)
    addEventHandler ("onMarkerHit", concessionaria, function (element)
        if getElementType (element) == "player" then
            if isGuestAccount (getPlayerAccount (element)) then return end
            if not isPedInVehicle (element) then
                triggerClientEvent (element, "MST.onPlayerCheckVehicles", element, {config.concessionarias.x, config.concessionarias.y, config.concessionarias.z})
            end
        end
    end)
end
function onPlayerConcessionaria (player)
    if isElementWithinMarker(player, iniMarker) then
       if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Conce")) then
            if veh[player] and isElement( veh[player] ) then destroyElement(veh[player])
                veh[player] = nil 
        end

Just now, Ayrtoon said:

for i = 1, #config.concessionarias do
    concessionaria = createMarker (config.concessionarias .x, config.concessionarias .y, config.concessionarias .z - 1, "cilindro", 1.2, config.concessionarias .cor[1], config .concessionarias .cor[2], config.concessionarias .cor[3], config.concessionarias .cor[4])
    createBlipAttachedTo (concessionaria , config.concessionarias .blip)
    addEventHandler ("onMarkerHit", concessionaria , function (element)
        if getElementType (elemento) == "player" então
            se isGuestAccount (getPlayerAccount (elemento)) então retorne end
            se não for isPedInVehicle (elemento) então
                triggerClientEvent (elemento, "MST.onPlayerCheckVehicles", elemento, {config.concessionarias .x, config.concessionarias .y, config.concessionarias .z})
            end
        end
    end)
end
function onPlayerConcessionaria (player)
    if isElementWithinMarker(player, iniMarker) then
       se isObjectInACLGroup ("usuário."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Conce")), então
            se veh[player] e isElement( veh[player] ) então destroyElement(veh[player])
                veh[player] =         final nulo 

Queria saber como coloco acl no marker de concecionaria, para que só o dono na conce consiga acessar o marker

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...