Hello, I'm new to scripting and I want to disable spawning in play/broph.lua if player dimension is not 0.
I tried
addEventHandler("onPlayerWasted", root,
if getElementDimension ( source ) == 0 then
function()
setTimer(spawn, 1800, 1, source)
end
end
)
And it didn't work. What am I doing wrong? Thanks.