Blockland Forums > Modification Help
GUI Question
<< < (3/3)
Fluff-is-back:

--- Quote from: Mapster on January 27, 2012, 08:06:19 PM ---Automatic as in, when the connect to the server it happens on its own.

--- End quote ---

the most commonly used one is
gameConnection::autoAdminCheck(%client)

This is called just after a player connects to the server, so in your case would be used like this:
Server-sided

--- Code: ---function gameConnection::autoAdminCheck(%client)
{
    parent::autoAdminCheck(%client); //We parent + package this so we don't overwrite the function

    commandToClient(%client, 'GivingData', "Whatever needs to be sent");
}

--- End code ---

And client-sided, as Nexus said

--- Code: ---function clientCmdGivingData(%data)
{
   // do stuff with data
}

--- End code ---
Greek2me:
You need to return the parent when using autoAdminCheck:

--- Code: ---function GameConnection::autoAdminCheck(%client)
{
commandToClient(%client, 'GivingData', "Whatever needs to be sent");

return parent::autoAdminCheck(%client); //We parent + package this so we don't overwrite the function
}
--- End code ---
Mapster:
Alright that makes sense, I still need to know how a VCE Variable value is displayed in a GUI. As in what would I add to my GUI itself so that the variable value can be shown in some text.
jes00:

--- Quote from: Mapster on January 28, 2012, 11:37:29 AM ---Alright that makes sense, I still need to know how a VCE Variable value is displayed in a GUI. As in what would I add to my GUI itself so that the variable value can be shown in some text.

--- End quote ---
I think that would be

--- Code: ---CONTROL_NAME.setText(%client.brickGroup.varGroup.getVariable("CLIENT, SELF, OR PLAYER","VAR_NAME",%client));

--- End code ---
Navigation
Message Index
Previous page

Go to full version