Using tfs 1.3
I added this function into global:
And then i'm running this function from an onThink globalevent but it will only update when i /reload global or within restart, how come and how should I do it?
Edit: Forgot to paste the getSpectators inside the function.
I added this function into global:
Lua:
function checkEventWaitingRoom()
if playerAmount == nil or playerAmount > 0 then
playerAmount = 0
end
if eventWaitingRoom ~= nil then
for _, s in pairs(eventWaitingRoom) do
if isPlayer(s) then
playerAmount = playerAmount + 1
end
end
end
return playerAmount
end
And then i'm running this function from an onThink globalevent but it will only update when i /reload global or within restart, how come and how should I do it?
Edit: Forgot to paste the getSpectators inside the function.
Last edited: