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

TFS 0.3 alpha 4 frags bug.

christiandb

Member
Joined
Feb 5, 2008
Messages
2,469
Reaction score
5
Location
010
When someone makes a frag at my server and he does !frags this will come:
Code:
You have 1.9985555555556 unjustified frag. The amount of unjustified frags will decrease after:2.0696057213677e-015h and 0m.
 
working one, somone posted it already, but dont remember nick :/ so its not mine if u ask.

PHP:
local config = {
	fragTime = getConfigInfo('timeToDecreaseFrags'),
	fragToBan = getConfigInfo('killsToBan')
}


function onSay(cid, words, param)
	maxfrag = config.fragToBan
	local amount = getPlayerRedSkullTicks(cid)
	if(amount > 0 and config.fragTime > 0) then
		local frags = (amount / config.fragTime);
		frags = math.ceil(frags)
		local remainingTime = amount
		local hours = ((remainingTime / 1000) / 60) / 60;
		hours = math.floor(hours)
		local minutes = ((remainingTime / 1000) / 60) - (hours * 60);
		minutes = math.floor(minutes)
		text = ""
		if(frags == maxfrag-1) then
		 text = "Warning!!! You have " ..frags.. " unjustified frag" .. (frags > 2 and "s" or "") .. ". If you have "..maxfrag.." frags you been banned."
		 else
		 text = "You have " .. frags .. " unjustified frag" .. (frags > 2 and "s" or "") .. "."
		 end
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ""..text.." 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
 
Back
Top