Jump to content

[help] how do I disable spawning if player dimension isn't 0


RLZ

Recommended Posts

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.

Link to comment
addEventHandler("onPlayerWasted", root, 
function () 
    if getElementDimension ( source ) == 0 then 
        setTimer(spawn, 1800, 1, source) 
    end 
end  
) 

Not gunna work if you post the if statement inside the event handler rather than the function but try that.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...