Quote:
Originally Posted by Starfire2001
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)