View Single Post
  #3  
Old 08-15-2014, 05:11 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Thanks. That helped alot.

Now the only problem I am having with it is the getstringkeys not getting all the flags. Any idea why it might not? I made sure they are all added using the same method.

PHP Code:
  temp.choosefrom getstringkeys("this.option.");
  
temp.options.desc null;

  
// If player is not in the list go ahead and add them anyways
  
if ( this.option.(@player.account) == null ) {
    
this.option.(@player.account) = 0;
  }
  
  for ( 
temp.coption temp.choosefrom ) {
    
// this tells it the option is a playerobject
    // get there account name and head icon
    
if ( player.account != temp.coption ) {
      
temp.pl      findplayer(temp.coption);
      
temp.offline temp.pl == NULL;
      
temp.pl      temp.offline ? new TServerPlayer(@temp.coption) : temp.pl;
      
temp.options.desc.add(temp.pl.account);
    }
  }

  for ( 
temp.pl allplayers ) {
    if ( !(
temp.pl.account in temp.options.desc) ) {
      
// they are RC
      
if ( temp.pl.level != null && temp.pl.account != player.account) {
        
temp.options.desc.add(temp.pl.account);
      }
    }
  }

  
// now send temp.data to be shown in the list :)
  
temp.data temp.options.savevarstoarray(false);
  return 
temp.data
I believe the problem is related to offline players. I could have sworn this was working before for loading head and hair of offline players.

Last edited by scriptless; 08-15-2014 at 05:52 AM..
Reply With Quote