View Single Post
  #4  
Old 07-21-2011, 06:25 AM
Arch_Angel Arch_Angel is offline
Registered User
Join Date: Apr 2007
Posts: 482
Arch_Angel is on a distinguished road
Send a message via AIM to Arch_Angel
Quote:
Originally Posted by fowlplay4 View Post
Let's see...

hideimgs usage:

hideimg(start_index, end_index); - Hides images with ID range specified. (Inclusive)

I.e:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
showimg(200, "block.png", 30, 30);
  
showimg(201, "block.png", 30, 30);
  
showimg(202, "block.png", 30, 30);
  
showimg(203, "block.png", 30, 30);
  
hideimgs(200, 204); // Hides above blocks.
} 
You can just do:

hideimgs(200, 1000);

To hide all your images. The way your script is setup right now you're also drawing over existing image indexes. I.e:

a = 0
200 + a = 200
201 + a = 201

a = 1
200 + a = 201 (Overlapping here)
201 + a = 202


You can replace (GS1 Way):

PHP Code:
for( a = 0; a < playerscount; a++ ) { 
    if ( 
players[a].guild in this.staff_list ) { 
With (GS2/Object-oriented Way):

PHP Code:
temp.a = 0;
for (
temp.pl: players) {
  if (
temp.pl.guild in this.staff_list) {
    
  }
  
temp.a += 3;
} 
I wish I could rep+ you every day. Thanks, stay tuned for my next thread in a few days

And thank you Andrew as well, I appreciate your help.
Reply With Quote