yes, I wrote it twice already but Im ignored? :<
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
shutdown requires " (quote) before param, ill fix that in next release, as it's bug.
function onSay(cid, words, param)
if(param ~= "") then
if(isNumber(param) == TRUE) then
prepareShutdown(tonumber(param))
else
doPlayerSendCancel(cid, "Command requires numeric param.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
end
return TRUE
end
function prepareShutdown(minutes)
if(minutes == 0) then
shutdown()
else
if(minutes == 1) then
doBroadcastMessage("Server is going down in " .. minutes .. " minute, please log out now!")
elseif(minutes <= 3) then
doBroadcastMessage("Server is going down in " .. minutes .. " minutes, please log out.")
else
doBroadcastMessage("Server is going down in " .. minutes .. " minutes.")
end
addEvent(prepareShutdown, 60000, minutes - 1)
end
end
function onSay(cid, words, param)
if(param ~= "") then
if(isNumber(param) == TRUE) then
prepareClean(tonumber(param), cid)
else
doPlayerSendCancel(cid, "Command requires numeric param.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Collected " .. cleanMap() .. " items.")
end
return TRUE
end
function prepareClean(minutes, cid)
if(minutes == 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cleaned " .. cleanMap() .. " items.")
doBroadcastMessage("Game map cleaned.")
elseif(minutes > 0) then
if minutes == 1 then
doBroadcastMessage("Game map cleaning in " .. minutes .. " minute, please pick up all your items.")
else
doBroadcastMessage("Game map cleaning in " .. minutes .. " minutes.")
end
addEvent(prepareClean, 60000, minutes - 1, cid)
end
end
MC Check does not seem to be working via talkactions.
Error Message:
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/multicheck.luanSay
data/talkactions/scripts/multicheck.lua:7: attempt to call global 'getIPByName'
(a nil value)
stack traceback:
data/talkactions/scripts/multicheck.lua:7: in function <data/talkactions/scripts/multicheck.lua:1>
Open this file with Windows Word Pad. Save it, then you got the normal config.lua
My english sux i just hope you understand !:/ or i can send pic
ImageShack - Hosting :: 78465399ca7.jpg
i get an error when i try to open the server