RLZ Posted May 28, 2014 Share Posted May 28, 2014 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
Dealman Posted May 28, 2014 Share Posted May 28, 2014 Put the if statement inside the function instead Link to comment
Twisted Posted May 28, 2014 Share Posted May 28, 2014 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
Twisted Posted May 28, 2014 Share Posted May 28, 2014 worked, thank you both. No problem Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now