Thread: Spawn Point
View Single Post
  #16  
Old 09-08-2007, 09:30 PM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
Quote:
Originally Posted by Switch View Post
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.
__________________
Stan.
Reply With Quote