kimokimo
Kimo
Hello
how i can add a count down on this script?
i think it will be something like this but how i merge with the script above?
how i can add a count down on this script?
PHP:
local createpos = {x=x,y=y,z=z}
local topos = {x=x,y=y,z=z}
local msg = "................!"
local timetoclose = 120 -- in second
local function remove()
local tp = getTileItemById(createpos,1387).uid
if tp > 0 then
doRemoveItem(tp)
doBroadcastMessage(msg)
end
end
function onSay(cid, words, param)
doCreateTeleport(1387, topos, createpos)
doBroadcastMessage(".......................!")
addEvent(remove,timetoclose*1000)
return true
end
PHP:
for x = 1, cfg.time do
local n = cfg.time - x
addEvent(doSendAnimatedText, x * 1000, toPosition, n > 0 and tostring(n), TEXTCOLOR_WHITE)
end