• 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!

!Frags

cocoroto

New Member
Joined
Oct 13, 2008
Messages
54
Reaction score
0
Does anyone know where can I find this commands?

!frags and !kills -show player his stats

!top5 - if player say that - it show him top 5 fraggers list, if GM - broadcast this list, auto broadcast every 5 min (LUA scripts)

Like there was on "The Best War by Gesior", the problem is that his link is broken so I cant get the commands from there <_<

If anyone got them and can post the codes, I would rly appreciate it. :p
 
!frags
Code:
local config = {
	fragTime = getConfigInfo('timeToDecreaseFrags')
}

function onSay(cid, words, param)
	local amount = getPlayerRedSkullTicks(cid)
	if(amount > 0 and config.fragTime > 0) then
		local frags = math.floor((amount / config.fragTime) + 1)
		local remainingTime = math.floor(amount - (config.fragTime * (frags - 1)))

		local hours = math.floor(((remainingTime / 1000) / 60) / 60)
		local minutes = math.floor(((remainingTime / 1000) / 60) - (hours * 60))
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have " .. frags .. " unjustified frag" .. (frags > 2 and "s" or "") .. ". The amount of unjustified frags will decrease after: " .. hours .. "h and " .. minutes .. "m.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have any unjustified frag.")	
	end
	return TRUE
end

!top5
Code:
function onSay(cid, words, param)
	local stats = show_top(0)
	if getPlayerAccess(cid) > 1 then
		broadcastMessage(stats)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, stats)
	end
	return FALSE
end
 
Last edited:
Back
Top