Blockland Forums > Modification Help

Shapename for admin on the player's head text above

Pages: << < (3/5) > >>

Cubelands:

Updated:


--- Code: ---package AdminIdentifier {
    function GameConnection::getPlayerName(%client) {
        %name = Parent::getPlayerName(%client);
        if (%client.isAdmin) {
            %name = %name SPC "(Admin)";
        }
        else if (%client.isSuperAdmin) {
            %name = %name SPC "(Super Admin)";
        }
else if (%client.isHost) {
            %name = %name SPC "(Host)";
        }
        return %name;
            %player.setShapeNameColor("0 0 0");
        %player.headtext = %name;
        %Player.mountPoint = $HeadSlot;
    }
};
activatepackage(AdminIdentifier);

datablock StaticShapeData(playerTextEmptyShape)

{

        shapefile = "base/data/shapes/empty.dts";

};
        if(isObject(%player.textShape))

        {

                %player.playertext = %name;
    %player.mountPoint = $HeadSlot
%player.textShape = new StaticShape() <--- line 34, I hate this. I did put (); and without (); It keep error.
}
       

                {

                        datablock = playerTextEmptyShape;

                        position = vectorAdd(%player.getPosition(),"0 0" SPC %player.getDatablock().playerSizeZ/9 + "0.166");

                        scale = "0.1 0.1 0.1";

                };

        };

--- End code ---


xXBeibsFan119Xx:

The line above the error needs a ';' at the end, so does after the ().

Generally syntax errors are caused by the line above it or whatnot.

Cubelands:


--- Quote from: xXBeibsFan119Xx on May 01, 2012, 04:04:07 AM ---The line above the error needs a ';' at the end, so does after the ().

Generally syntax errors are caused by the line above it or whatnot.

--- End quote ---

I did put (); and without (); It keep error.

Headcrab Zombie:

First off, the code TheRealMint gave you in his most recent post does not work, it was an example he said would be nice if it worked. Remove it, and either use the code he gave you in his first post, and nothing else, or if you want it to work how you originally wanted it in the OP, you won't be able to use it at all.
Other than that, there's a problem with pretty much every line, and I don't have the time right now to fix it.

Cubelands:


--- Quote from: Headcrab Zombie on May 01, 2012, 11:49:33 AM ---First off, the code TheRealMint gave you in his most recent post does not work, it was an example he said would be nice if it worked. Remove it, and either use the code he gave you in his first post, and nothing else, or if you want it to work how you originally wanted it in the OP, you won't be able to use it at all.
Other than that, there's a problem with pretty much every line, and I don't have the time right now to fix it.

--- End quote ---
:C, maybe you will do it later.

Pages: << < (3/5) > >>

Go to full version