wlj
retierd
- Joined
- Jan 7, 2009
- Messages
- 1,201
- Reaction score
- 1
Lua:
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
local ret = getAccountIdByName(param)
if(ret == 0) then
ret = getAccountIdByAccount(param)
if(ret == 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player or account '" .. param .. "' does not exists.")
return true
end
end
local list = getBanList(BAN_NOTATION, ret)
if(type(list) ~= "table" or table.maxn(list) <= 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such account or player does not have any notation.")
return true
end
ret = "Notations for account " .. ret .. "\n"
for i, ban in ipairs(list) do
local tmp = ban.adminId ~= 0 and getPlayerNameByGUID(ban.adminId) or "unknown"
ret = ret .. "\nAdded at " .. os.date("%c", ban.added) .. " by " .. tmp .. " with reason: " .. getBanReason(ban.reason) .. " and comment: " .. ban.comment .. "."
end
doPlayerPopupFYI(cid, ret)
return true
end
can some1 make it like on the serv sends
13.37: (player name) has recived an infraction by (gm name), He has (numbers of infraction), He need (how meny he needs to get banned) of 10 infractions.