I am trying to add my GUI but (!success) :-[.So plz help meby giving an example of GUI. I want when a player join server a welcome GUI message occures. ;D
http://wiki.adtec.ovh/wiki/Scripting/Squirrel/Client_Functions#GUILabel
_label <- null;
function Script::ScriptLoad()
{
local
screenSize = ::GUI.GetScreenSize(),
label = ::GUILabel( ::VectorScreen( ( screenSize.X * 0.005 ), ( screenSize.Y * 0.96 ) ), ::Colour( 255, 255, 255 ), format( "Hey, %s. Welcome to the server!", ::World.FindLocalPlayer().Name ) );
label.FontName = "Verdana";
label.FontSize = ( screenSize.X * 0.2 );
label.FontFlags = GUI_FFLAG_BOLD;
label.TextAlignment = GUI_ALIGN_LEFT;
::_label = label;
}
which will display:
[spoiler="Click here!"](https://i.imgur.com/wXGtkO2.png)[/spoiler]
if you want to delete the message, use:
::_label = null;
Quote from: =TRC=Kelvin on Nov 05, 2020, 06:09 PMhttp://wiki.adtec.ovh/wiki/Scripting/Squirrel/Client_Functions#GUILabel
_label <- null;
function Script::ScriptLoad()
{
local
screenSize = ::GUI.GetScreenSize(),
label = ::GUILabel( ::VectorScreen( ( screenSize.X * 0.005 ), ( screenSize.Y * 0.96 ) ), ::Colour( 255, 255, 255 ), format( "Hey, %s. Welcome to the server!", ::World.FindLocalPlayer().Name ) );
label.FontName = "Verdana";
label.FontSize = ( screenSize.X * 0.2 );
label.FontFlags = GUI_FFLAG_BOLD;
label.TextAlignment = GUI_ALIGN_LEFT;
::_label = label;
}
which will display:
[spoiler="Click here!"](https://i.imgur.com/wXGtkO2.png)[/spoiler]
if you want to delete the message, use:
::_label = null;
thanks its helpful