View Single Post
  #6  
Old 07-04-2011, 03:12 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
The functions were only supposed to be replaced not the whole thing x.x

PHP Code:
//#CLIENTSIDE

function onTimeout() {
  
// Check for Floating Text IDs
  
if (this.floating.size() > 0) {
    
// Loop through Floating Text IDs
    
for (temp.imgidthis.floating) {
      
// Check if ID is expired
      
if (timevar2 >= this.floating.(@imgid)) {
        
// Hide Floating Text
        
hideimg(imgid);
        
// Remove Floating Text ID Data and from Array
        
this.floating.(@imgid) = "";
        
this.floating.remove(imgid);
      }
    }
    
// Continue Looping if there's still Floating Text
    
if (this.floating.size() > 0) {
      
setTimer(0.1);
    }
  }
}

function 
onActionClientSide() {
  switch (
params[0]) {
    case 
"playerdmg":
      
showDamage(params[1]);
      break;
    case 
"npcdmg":
      
showNPCDamage(params[1], params[2], params[3]);
      break;
  }
}

public function 
showDamage(dmg) { 
  
// Determine Coordinates 
  
temp.tx player..5 random(-1,1); 
  
temp.ty player.random(-1,1); 
  
// Img ID Counter 
  
this.counter_npc = (this.counter_npc) % 20
  
// Draw Floating Text 
  
showFloatingText(this.counter_npctxtydmg100); 


public function 
showNPCDamage(txtydmg) { 
  
// Img ID Counter 
  
this.counter_npc = (this.counter_npc) % 20
  
// Draw Floating Text 
  
showFloatingText(200 this.counter_npctxtydmg100); 


public function 
showFloatingText(imgidtxtymsgrgbz) { 
  
// Hideimg just in case
  
hideimg(imgid);
  
// Add to Image Tracking Array 
  
if (!(imgid in this.floating)) this.floating.add(imgid); 
  
// Set Time to Hide 
  
this.floating.(@imgid) = timevar2 0.75
  
// Display Text 
  
showani(imgidtxty0"effect_floatingtext"msgrgbz); 
  
// Timeout 
  
setTimer(0.1); 

__________________
Quote:
Reply With Quote