Quote:
Originally Posted by Switch
PHP Code:
function onCreated()
setTimer(0.05);
function onTimeOut() {
if (player.hearts < 0.5) {
setlevel2("hospital.nw",30,30); //syntax: setlevel2(LevelNameInString,x,y);
}
}
That should work without much lag. If there is lag, then use this:
PHP Code:
function onPlayerDies() { //I don't know if this is a real command, but Codein said there was one.
setlevel2("hospital.nw",30,30); //syntax: setlevel2(LevelNameInString,x,y);
}
|
The first one won't work because that's serverside, and usually when a serverside script is initialized it is not in the scope of the player.
Isn't onPlayerDies clientside only? If it is that won't work either becauset setlevel2() is serverside only.