View Single Post
  #40  
Old 03-31-2007, 05:46 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
I recently have been practicing better organization and clean coding in my scripts, heres a snippet.

PHP Code:
public function Hurt(damageattackerhurtani){
  
temp.conditionsok = ((this.clientr.hp && this.clientr.dead == false && level.nopk == false && this.client.nopk == false) ? true false);
   if (
temp.conditionsok){
       if (
temp.damage => this.clientr.hp) {
        
this.clientr.hp 0;
        
this.Kill(temp.attacker); 
        
this.showHp(7);
        return;
       }
       if (
temp.hurtanithis.setani("hurt"null);
          
clientr.lastattacker temp.attacker;
          
this.clientr.hp -= abs(temp.damage);
          
this.showHp(7);
    }
    return;

Reply With Quote