addEventHandler("onPlayerChat", getRootElement(),
function(msg)
if msg:find("!money ") or msg:find("!cash ") then
for i,v in ipairs(getElementsByType("player")) do
if msg:find(getPlayerName(v)) and getPlayerName(v) ~= false then
local player = getPlayerFromName(v)
local cash = getPlayerMoney(player)
outputChatBox("#0188ff"..getPlayerName(player).." Has #ff8801$"..cash, root, 255,255,255,true)
else
outputChatBox("Wrong player-name/syntax", source)
end
end
end
end
)
I'm not sure of this, but it should work.