• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

!notation command?

Ceejzor

Murica Born N Raised!
Joined
Jul 5, 2008
Messages
2,294
Reaction score
188
Location
USA - Philippines
I was wondering can someone make a command that when you do !notation a window pop's up and show's you your notations?

rep++ ofc.
 
Code:
function onSay(cid, words, param, channel)
	local ret = getAccountIdByName(getPlayerName(cid))
	local list = getBanList(BAN_NOTATION, ret)
	if(type(list) ~= "table" or table.maxn(list) <= 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have any notations.")
		return true
	end

	ret = "Notations for your account:\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
 
You're not supposed to use /notations name, but my script instead. It's for normal players and doesn't support param(s).
 
Back
Top