Jump to content

Olá, quero fazer um painel ser aberto marker com acl


Recommended Posts

addEventHandler('onMarkerHit', mrk, function(element)
    if getElementType(element) == 'player' then
        triggerClientEvent(element, 'openPainel', element)
    end
end)

O que devo mudar/adicionar? 

Edited by Lord Henry
Texto colorido convertido em Lua.
Link to comment
  • Other Languages Moderators

1) Mantenha o padrão de usar aspas "duplas" em vez de aspas 'simples' nas suas strings.

2) Troque a linha do triggerClientEvent por isso:

        if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(element)), aclGetGroup ("Admin")) then -- Troque Admin pela ACL Group que vc quer.
            triggerClientEvent(element, "openPainel", element)
        else -- Linha opcional.
            outputChatBox("Acesso negado.", element, 255, 0, 0) -- Linha opcional.
        end

 

  • Like 1
Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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