• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

How to stopEvent?

MeNi

*^#%$%
Joined
Jul 23, 2008
Messages
183
Reaction score
12
Hi, how i can stop event?

I have such code
Code:
(...)
for i = 1, 4 do
  if players[i] then
    (...)
    event = addEvent(teleport, tptime, players[i])
    setPlayerStorageValue(players[i], eventStorage, event)
  end
end
(...)

and in other script:

Code:
(...)
for i = 1, 4 do
  event = getPlayerStorageValue(players[i], eventStorage)
  if event then
    stopEvent(event)
    event = nil
  end
end
(...)

but "stopEvent(event)" doesn't work, it doesn't stop event. How change it to make it work?
 
Isn't there any way to save "handle" for event in storage, and then stop it from other script, reading handle from storage and stopping it?
 
Last edited:
Back
Top