Author Topic: New player list  (Read 3773 times)

if(condition)
   statement1
else
   statement2


Statements can be anything: single assignments (%a = 2;), something larger in curly braces ({%a = 3;%b = 1;}) or another if/else.

Try any of these in-game and it works. It is entirely consistent.
« Last Edit: February 27, 2011, 06:33:11 PM by Space Guy »


Furling, assuming we didn't scare you off, I'd be willing to address any other questions you have about this player list.

So weird.
If you had the slightest idea of what you were talking about it'd make perfect sense.

If you had the slightest idea of what you were talking about it'd make perfect sense.
So, because I didn't know some nonsensical coding practice, that makes me have no idea what I'm talking about?

How did this turn into an argument about if/else statements with/without curly braces?

So, because I didn't know some nonsensical coding practice, that makes me have no idea what I'm talking about?
I've proven to you it exists in other languages.
Space Guy has proven it makes perfect sense.

I mentioned earlier in that big long post you probably didn't read because you're autistic and hate harsh criticism, that if you had taken a minute to actually test the code before complaining to me you'd have avoided the entire conflict.

But you didn't.

You jumped on it to try and make me look bad and the only one walking out of this limping is you.


How did this turn into an argument about if/else statements with/without curly braces?
Kalphiter is a very sensitive boy with needs and emotions that need to be catered to.

which of you should give me correct script. you guys argue over stuipd best of scripter. need right advice script. How I direct to badspot's gui new player list? not add my gui.

Badspot's new player list gui
Code: [Select]

//--- OBJECT WRITE BEGIN ---
new GuiControl(NewPlayerListGui) {
   profile = "GuiDefaultProfile";
   horizSizing = "right";
   vertSizing = "bottom";
   position = "0 0";
   extent = "640 480";
   minExtent = "8 2";
   visible = "1";

   new GuiWindowCtrl(NPL_TrustWindow) {
      profile = "GuiWindowProfile";
      horizSizing = "center";
      vertSizing = "center";
      position = "208 198";
      extent = "223 84";
      minExtent = "8 2";
      visible = "0";
      maxLength = "255";
      resizeWidth = "0";
      resizeHeight = "0";
      canMove = "1";
      canClose = "0";
      canMinimize = "0";
      canMaximize = "0";
      minSize = "50 50";

      new GuiMLTextCtrl() {
         profile = "MapDescriptionTextProfile";
         horizSizing = "center";
         vertSizing = "bottom";
         position = "39 45";
         extent = "145 14";
         minExtent = "8 2";
         visible = "1";
         lineSpacing = "2";
         allowColorChars = "0";
         maxChars = "-1";
         text = "<just:center>Sending Trust Invitation";
         maxBitmapHeight = "-1";
         selectable = "1";
      };
   };
   new GuiWindowCtrl(NPL_Window) {
      profile = "GuiWindowProfile";
      horizSizing = "center";
      vertSizing = "center";
      position = "75 74";
      extent = "489 332";
      minExtent = "469 332";
      visible = "1";
      text = "Player List";
      maxLength = "255";
      resizeWidth = "0";
      resizeHeight = "1";
      canMove = "1";
      canClose = "1";
      canMinimize = "0";
      canMaximize = "0";
      minSize = "50 50";
      closeCommand = "canvas.popDialog(NewPlayerListGui);";

      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "405 70";
         extent = "76 21";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.clickTrustInviteBuild();";
         text = "BUILD";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "405 93";
         extent = "76 21";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.clickTrustInviteFull();";
         text = "FULL";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
      new GuiSwatchCtrl(NPL_ScrollBG) {
         profile = "GuiDefaultProfile";
         horizSizing = "width";
         vertSizing = "height";
         position = "11 54";
         extent = "369 267";
         minExtent = "8 2";
         visible = "1";
         color = "255 255 255 128";
      };
      new GuiScrollCtrl(NPL_Scroll) {
         profile = "ColorScrollProfile";
         horizSizing = "width";
         vertSizing = "height";
         position = "11 54";
         extent = "369 267";
         minExtent = "8 2";
         visible = "1";
         willFirstRespond = "1";
         hScrollBar = "alwaysOff";
         vScrollBar = "alwaysOn";
         constantThumbHeight = "0";
         childMargin = "0 0";
         rowHeight = "40";
         columnWidth = "30";

         new GuiTextListCtrl(NPL_List) {
            profile = "PlayerListProfile";
            horizSizing = "left";
            vertSizing = "height";
            position = "0 0";
            extent = "357 200";
            minExtent = "8 2";
            visible = "1";
            command = "NewPlayerListGui.clickList();";
            enumerate = "0";
            resizeCell = "0";
            columns = "0 33 190 245 310";
            fitParentWidth = "1";
            clipColumnText = "1";
               sortedNumerical = "0";
               sortedAsc = "0";
         };
      };
         new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "11 33";
         extent = "41 19";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.sortList(0);";
         text = "Admin";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "1";
         mColor = "255 255 255 255";
            wrap = "0";
      };
 
 [/color]

      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "75 33";
         extent = "68 19";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.sortList(1);";
         text = "Name";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "1";
         mColor = "255 255 255 255";
            wrap = "0";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "193 33";
         extent = "57 19";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.sortNumList(2);";
         text = "Score";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "1";
         mColor = "255 255 255 255";
            wrap = "0";
      };
      new GuiBitmapButtonCtrl(NPL_BLIDButton) {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "254 33";
         extent = "57 19";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.sortNumList(3);";
         text = "BL_ID";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "1";
         mColor = "255 255 255 255";
            wrap = "0";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "315 33";
         extent = "54 19";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.sortList(4);";
         text = "Trust";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "1";
         mColor = "255 255 255 255";
            wrap = "0";
      };
      new GuiBitmapButtonCtrl(NPL_Trust2Button) {
         profile = "BlockButtonProfile";
         horizSizing = "left";
         vertSizing = "top";
         position = "385 283";
         extent = "96 38";
         minExtent = "8 2";
         visible = "1";
         command = "canvas.popDialog(NewPlayerListGui);";
         accelerator = "escape";
         text = "Close";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
      new GuiTextCtrl() {
         profile = "GuiTextProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "385 51";
         extent = "53 18";
         minExtent = "8 2";
         visible = "1";
         text = "Trust Invite";
         maxLength = "255";
      };
      new GuiTextCtrl() {
         profile = "GuiTextProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "385 115";
         extent = "64 18";
         minExtent = "8 2";
         visible = "1";
         text = "Trust Demote";
         maxLength = "255";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "405 134";
         extent = "76 21";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.ClickTrustDemoteNONE();";
         text = "NO TRUST";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "405 157";
         extent = "76 21";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.ClickTrustDemoteBUILD();";
         text = "BUILD";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
      new GuiSwatchCtrl(NPL_TrustInviteBuildBlocker) {
         profile = "GuiDefaultProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "389 69";
         extent = "93 23";
         minExtent = "8 2";
         visible = "0";
         color = "200 200 200 200";
      };
      new GuiSwatchCtrl(NPL_TrustInviteFullBlocker) {
         profile = "GuiDefaultProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "389 91";
         extent = "93 23";
         minExtent = "8 2";
         visible = "0";
         color = "200 200 200 200";
      };
      new GuiSwatchCtrl(NPL_TrustRemoveBuildBlocker) {
         profile = "GuiDefaultProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "389 132";
         extent = "93 23";
         minExtent = "8 2";
         visible = "1";
         color = "200 200 200 200";
      };
      new GuiSwatchCtrl(NPL_TrustRemoveFullBlocker) {
         profile = "GuiDefaultProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "389 156";
         extent = "93 23";
         minExtent = "8 2";
         visible = "1";
         color = "200 200 200 200";
      };
      new GuiTextCtrl() {
         profile = "GuiTextProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "385 178";
         extent = "50 18";
         minExtent = "8 2";
         visible = "1";
         text = "Mini-Game";
         maxLength = "255";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "405 197";
         extent = "76 21";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.clickMiniGameInvite();";
         text = "Invite";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "405 220";
         extent = "76 21";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.clickMiniGameRemove();";
         text = "Remove";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
      new GuiSwatchCtrl(NPL_MiniGameInviteBlocker) {
         profile = "GuiDefaultProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "389 195";
         extent = "93 23";
         minExtent = "8 2";
         visible = "0";
         color = "200 200 200 200";
      };
      new GuiSwatchCtrl(NPL_MiniGameRemoveBlocker) {
         profile = "GuiDefaultProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "389 219";
         extent = "93 23";
         minExtent = "8 2";
         visible = "1";
         color = "200 200 200 200";
      };
      new GuiBitmapButtonCtrl() {
         profile = "BlockButtonProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "405 260";
         extent = "76 21";
         minExtent = "8 2";
         visible = "1";
         command = "NewPlayerListGui.clickUnIgnore();";
         text = "UN-IGNORE";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
      new GuiSwatchCtrl(NPL_UnIgnoreBlocker) {
         profile = "GuiDefaultProfile";
         horizSizing = "left";
         vertSizing = "bottom";
         position = "389 259";
         extent = "93 23";
         minExtent = "8 2";
         visible = "1";
         color = "200 200 200 200";
      };
   };
};
//--- OBJECT WRITE END ---
         bitmap = "./images/lock";

autistic
boohoo

Furling, this should work:
Code: [Select]
function NewPlayerListGui::update(%this,%cl,%name,%blid,%a,%b,%c)
{
    Parent::update(%this,%cl,%name,%blid,%a,%b,%c);
}

boohoo

Furling, this should work:
Code: [Select]
function NewPlayerListGui::update(%this,%cl,%name,%blid,%a,%b,%c)
{
    Parent::update(%this,%cl,%name,%blid,%a,%b,%c);
}
ok, what about replace of icon, not text H, SA ,S and -

Furling, again, I don't have any idea what you're doing or why you're doing it, but that code you just posted contains syntax errors. You need to start with something easier before trying to make GUIs.

boohoo
1. Thank you for skimming over the rest of my post -- ah forget it why am I bothering to explain things to a kid who only sees and hears what he wants to? If I ever become a billionaire I'll donate all my money to autism foundations to help rid the world of whatever the forget is wrong with you.

%a is "self" or something, I can't tell
%b is has admin (super or regular)
%c is score

1. Thank you for skimming over the rest of my post -- ah forget it why am I bothering to explain things to a kid who only sees and hears what he wants to? If I ever become a billionaire I'll donate all my money to autism foundations to help rid the world of whatever the forget is wrong with you.
You don't get it, do you?
By ridding the world of Aspergers, you will lose so much.

Furling, again, I don't have any idea what you're doing or why you're doing it, but that code you just posted contains syntax errors. You need to start with something easier before trying to make GUIs.
example:
badspot's gui


add icon on badspot's gui| I use paint.net edit this image, none these real.

Host = Green
SuperAdmin = Gold
Admin = Sliver
Player = Blue

This I want.
« Last Edit: February 27, 2011, 06:59:32 PM by Furling »

NPL_Scroll.add(bitmap);
All I can suggest is pasting the image right over.

NPL_Scroll.add(bitmap);
All I can suggest is pasting the image right over.
that not full code, just simple code.
Code: [Select]
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);
     NPL_Scroll.add(bitmap);

}
};
activatePackage(Fancy_Badges);

So, because I didn't know some nonsensical coding practice, that makes me have no idea what I'm talking about?
Yeah, because this about said nonsensical coding practice, a practice that does make sense.