Blockland Forums > Modification Help

New player list

Pages: (1/12) > >>

Furling:

I am try create this script code with gui, I am not sure if this right or wrong.


--- Code: ---function clientCmdInfoListProfile(%status, %name, %BL_ID)
{
        $status = %status;
$name = %name;
$BL_ID = %BL_ID;


InfoList.addRow(InfoList.rowCount(), $status TAB $name TAB $BL_ID);
}

         %status = getField(%player,2);
         if(%status $= 3)
            %status = "<bitmap:add-ons/script_InformationPlayer/icon_hostshield.png>";
         else if(%status $= 2)
            %status = "<bitmap:add-ons/script_InformationPlayer/icon_superadminshield.png>";
         else if(%status $= 1)
            %status = "<bitmap:add-ons/script_InformationPlayer/icon_adminshield.png>";
         else
            %status = "<bitmap:add-ons/script_InformationPlayer/icon_playershield.png>";
      }
   }
function clientCmdInfoListProfile
--- End code ---


Iban:

I'm afraid you'll need to relearn basic TorqueScript semantics before attempting this. I'd point out the multiple syntax errors but I'd be better off just writing the thing myself and showing it to you.

Furling:


--- Quote from: Iban on February 27, 2011, 05:44:06 PM ---I'm afraid you'll need to relearn basic TorqueScript semantics before attempting this. I'd point out the multiple syntax errors but I'd be better off just writing the thing myself and showing it to you.

--- End quote ---
good idea. I want icons add it to new player list. I made icons already.

Iban:

Eh, well, you could always try a hack if you feel crafty. It'd be a bit more complicated, though.



--- Code: ---package Fancy_Badges
{
function NPL_List::addRow(%this, %row, %text, %index)
{
if(%row == 0)
if(%text $= "A")
%text = "<bitmap:....>";
else if(%text $= "S")
%text = "<bitmap:....>";

return parent::addRow(%this, %row, %text, %index);
}
};
activatePackage(Fancy_Badges);
--- End code ---

Or something like that.


* I take no responsibility if this untested code snippet contains syntax errors or outright destroys functionality of the player list and/or your game.

Kalphiter:


--- Quote from: Iban on February 27, 2011, 05:54:00 PM ---Eh, well, you could always try a hack if you feel crafty. It'd be a bit more complicated, though.



--- Quote ---package Fancy_Badges
{
   function NPL_List::addRow(%this, %row, %text, %index)
   {
      if(%row == 0)
         if(%text $= "A")
            %text = "<bitmap:....>";
         else if(%text $= "S")
            %text = "<bitmap:....>";
         
      return parent::addRow(%this, %row, %text, %index);
   }
};
activatePackage(Fancy_Badges);
--- End quote ---

--- End quote ---
Bold is causes a syntax error.

Pages: (1/12) > >>

Go to full version