Scripting/Squirrel/Client Events/Script::ScriptLoad: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 4: Line 4:
== Arguments ==
== Arguments ==


* ''None''
* ''Label is a variable.''
* ''GUILabel( ) will add the text, vector and textcolor.''
* ''FontFlags will add a flag.''
* ''FontSize will add the size.''
* ''FontName will add a font style.''
* ''Font size will add re-size or increase or decrease the text size.''.
 
----
----


== Example ==
== Example ==


The following example will print "Hello World!" when the client connected to a server.
The following example will show up a text in your screen.
 
<source lang=squirrel>
<source lang=squirrel>
function Script::ScriptLoad()
function Script::ScriptLoad()
{
{
    Console.Print("Hello World!");
      Label <- GUILabel( VectorScreen(_screen.X * 0.70, _screen.Y * 0.93.2 ), Colour( 25, 250, 0 ), "Hello World" );
      Label.FontFlags = GUI_FFLAG_BOLD;
      Label.FontSize = _screen.X * 0.032.0;
      Label.FontName = "Pricedown";
}
}
</source>
</source>
Line 19: Line 29:
== Notes ==
== Notes ==


Function Console.Print was used in this example. The Console.Print function outputs a string on the console.
The functions GUILabel( ). FontFlags. FontSize. FontName and Fontsize were used in this example.

Latest revision as of 18:21, 26 April 2019

Syntax

Script::ScriptLoad()

Arguments

  • Label is a variable.
  • GUILabel( ) will add the text, vector and textcolor.
  • FontFlags will add a flag.
  • FontSize will add the size.
  • FontName will add a font style.
  • Font size will add re-size or increase or decrease the text size..

Example

The following example will show up a text in your screen.

function Script::ScriptLoad()
{
       Label <- GUILabel( VectorScreen(_screen.X * 0.70, _screen.Y * 0.93.2 ), Colour( 25, 250, 0 ), "Hello World" );
       Label.FontFlags = GUI_FFLAG_BOLD;
       Label.FontSize = _screen.X * 0.032.0;
       Label.FontName = "Pricedown";
}

Notes

The functions GUILabel( ). FontFlags. FontSize. FontName and Fontsize were used in this example.