Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreateLuaEvent #481

Closed
afdz1 opened this issue Apr 10, 2024 · 1 comment
Closed

CreateLuaEvent #481

afdz1 opened this issue Apr 10, 2024 · 1 comment

Comments

@afdz1
Copy link

afdz1 commented Apr 10, 2024

Is it possible to return and stop the indefinite loop for a CreateLuaEvent?

The way documentation reads, I believe if the eventid is returned, the loop is supposed to stop?

local function CheckPlayer(playerGuid, eventid)
local player = GetPlayerByGUID(playerGuid)
if player:IsInWorld() then
player:SendBroadcastMessage("Player in world, ending loop")
return eventid
end
end

eventid = CreateLuaEvent(function() CheckPlayer(playerguid eventid) end, 1000, 0)

@Foereaper
Copy link
Member

Foereaper commented Apr 10, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants