Doongogar Posted October 13, 2021 Share Posted October 13, 2021 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
_SAXI_ Posted October 14, 2021 Share Posted October 14, 2021 (edited) outputChatBox('O jogador: '..getPlayerName(v)..'#ffffff Tem R$: #00ff00'..dinheiro.. ' #ffffffDe Dinheiro Na Mão !',playerSource, 255, 255, 255, true) Edited October 14, 2021 by _SAXI_ Link to comment
VictorBRP Posted October 14, 2021 Share Posted October 14, 2021 (edited) 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 October 14, 2021 by VictorBRP Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now