• 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 1.X+ stopEvent or stopScript

darcioantonio

www.adventurerpg.com.br
Joined
Jul 30, 2013
Messages
170
Solutions
1
Reaction score
16
Location
Brasil
GitHub
darcioantonio
Twitch
darcio_
YouTube
MundoOTServer
Hello I have a script that counts from 0 to 5 seconds I would like to know if as soon as the script started it would have like to pause it by clicking on a lever or something of the sort

LUA:
function onUse(cid, creature, player, item, fromPosition, target, toPosition, isHotkey)
darcio(cid)

addEvent(function()
stopEvent(darcio)
end, 2*1000)

end


function darcio(cid)
addEvent(function(cid)
Game.broadcastMessage('1', MESSAGE_STATUS_WARNING)
end, 1*1000)
addEvent(function(cid)
Game.broadcastMessage('2', MESSAGE_STATUS_WARNING)
end, 2*1000)
addEvent(function(cid)
Game.broadcastMessage('3', MESSAGE_STATUS_WARNING)
end, 3*1000)
addEvent(function(cid)
Game.broadcastMessage('4', MESSAGE_STATUS_WARNING)
end, 4*1000)
addEvent(function(cid)
Game.broadcastMessage('5', MESSAGE_STATUS_WARNING)
end, 5*1000)
end
 
Back
Top