View Single Post
  #2  
Old 02-09-2011, 04:38 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by Starfire2001 View Post
When the player is killed I want them to have weapons disabled. The script disables their weapons when they are lying on the ground dead, but when they get up their weapons are enabled again. Help

PHP Code:
function onPlayerDies() {
  
setlevel2("jd_spar.nw",30.5,35);
  
disableweapons();
} 
There are probably quite alot of ways to do it but I think having a flag added to the player within your onPlayerDies function and then creating a script within the destination level like this would work:

PHP Code:
//#CLIENTSIDE
function onPlayerEnters(){
  if(
player.client.someflag){
    
player.client.someflag = false;
    
this.onTimeout();
  }
}

function 
onTimeout(){
  if(
player.hearts > 0){
    
disableweapons();
  }
  else{
    
this.setTimer(0.05);
  }
} 
(although this is assuming that this problem is as a result of built-in movement and not separate scripts interfering with eachother)
Reply With Quote