Jump to content

Mensagem aparece pra todos


Recommended Posts

então recentemente coloquei esta função no meu servidor
para os staff's sem painel P ver a quantia de dinheiro dos players
so que eu percebi que essa mensagem aparece para todos
gostaria de saber como resolvo codigo abaixo

              function verMoney(playerSource, commandName, id)
               if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Staff")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Console")) then
                  for i, v in pairs(getElementsByType("player")) do
                     if getElementData(v, "ID") == tonumber(id) then
                            local dinheiro = getPlayerMoney(v)
                            outputChatBox('O jogador: '..getPlayerName(v)..'#ffffff Tem R$: #00ff00'..dinheiro.. ' #ffffffDe Dinheiro Na Mão !',source, 255, 255, 255, true)
                     end
                  end
               end
            end
            addCommandHandler("rlkver", verMoney

 

Link to comment
function verMoney(playerSource, commandName, id)
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Staff")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("Console")) then
        for i, v in pairs(getElementsByType("player")) do
            local IdPlayer = getElementData(v, "ID") or 0
            if (id and tonumber(IdPlayer) == tonumber(id)) then
                local dinheiro = getPlayerMoney(v)
                outputChatBox('O jogador: '..getPlayerName(v)..'#ffffff Tem R$: #00ff00'..dinheiro.. ' #ffffffDe Dinheiro Na Mão ! ',playerSource, 255, 255, 255, true)
            end
        end
    end
end
 addCommandHandler("rlkver", verMoney)
Edited by VictorBRP
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...