View Single Post
  #6  
Old 07-30-2006, 08:58 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
You can't make part of a level a killing zone and the other a non-player killing zone, but, you can do this:


PHP Code:
//#CLIENTSIDE
function onCreated()
{
 
setTimer0.05 );
}

function 
onTimeOut()
{
  if  ( 
player.x in |start[x]range,end[x]range| && player.y in |start[y]range,end[y]range| ) {
   
enableweapons();
  } else {
   
disableweapons();
   
//INSERT LINE HERE TO MAKE YOUR PLAYER HEARTS ALWAYS EQUAL YOUR MAX PLAYER HEARTS. NOT EVERY SERVER USES THE CUSTOM HEART SYSTEM, SO I'LL LEAVE THIS LINE EMPTY FOR YOU TO ADD TO FIT TO YOUR SERVER.
  
}
  
setTimer0.05 );


EDIT to Skyld's post right below mines: I would expect the person to have common sense. On Maloria, I'd do something like

PHP Code:
if (created)
  
setshape 1,32,32;

if (
actionheal) {
  
setstring clientr.hp,#s(clientr.hpmax);
  
set client.updateheart;
}
//#CLIENTSIDE
if ( created )
  
timeout=0.05;

if ( 
timeout ) {
  if ( 
playerx in |startxendx| && playery in |starty,endy| ) {
    unset 
client.disable;
    
enableweapons;
  } else {
    
set client.disable;
    
disableweapons;
   if ( 
strtofloat#s(clientr.hp) ) < strtofloat( #s(clientr.hpmax) ) ) {
    
triggeraction x+0.5,y+0.5,heal,;
    }
  }
  
timeout=0.05;


Last edited by Gambet; 07-30-2006 at 10:10 PM..
Reply With Quote