warriorfrog
Active Member
- Joined
- Jul 29, 2015
- Messages
- 334
- Reaction score
- 35
Using version: 0.4
I need a help to fix my !frags, i want this script because it show how many time left to decay the frag
I think it was 1.0 to run, but i really want it
Someone know a function to declar like remainingSeconds or something to fix it \/?
Error
https://i.imgur.com/ZkiU4kt.png
I need a help to fix my !frags, i want this script because it show how many time left to decay the frag
I think it was 1.0 to run, but i really want it
Someone know a function to declar like remainingSeconds or something to fix it \/?
Code:
local config ={
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')),
advancedFragList = getBooleanFromString(getConfigValue('advancedFragList'))}
function onSay(cid, words, param, channel)
if(not config.useFragHandler)then
returnfalse
end
local hours = math.floor(remainingSeconds /3600)
local minutes = math.floor((remainingSeconds %3600)/60)
local seconds = remainingSeconds %60
local message ="You have ".. kills .." unjustified kill"..(kills >1and"s"or"")..". The amount of unjustified kills will decrease after: "
if hours ~=0then
if hours ==1then
message = message .. hours .." hour, "
else
message = message .. hours .." hours, "
end
end
if hours ~=0or minutes ~=0then
if minutes ==1then
message = message .. minutes .." minute and "
else
message = message .. minutes .." minutes and "
end
end
if seconds ==1then
message = message .. seconds .." second."
else
message = message .. seconds .." seconds."
end
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, message)
returntrueend
Error
https://i.imgur.com/ZkiU4kt.png