Scripting/Squirrel/Functions/Textdraw.SetRelativeForAll: 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
No edit summary
 
Line 16: Line 16:
local y = 0; // The y coodinate for the textdraw on the screen.
local y = 0; // The y coodinate for the textdraw on the screen.
local Color = 0xFFFFFFFF; // Color white
local Color = 0xFFFFFFFF; // Color white
local TextDraw = CreateTextdraw( "Text, x, y, Color);
local TextDraw = CreateTextdraw( "Text", x, y, Color);
TextDraw.SetRelativeForAll( true ); // Sets the position relative to all.
TextDraw.SetRelativeForAll( true ); // Sets the position relative to all.



Latest revision as of 11:05, 12 March 2016

This function will set a relative position of a TextDraw for all players.

Syntax

TextDraw.SetRelativeForAll( toggle )

Arguments

  • bool toggle - true or false.

Example

function onScriptLoad()
{
		local x = 0; // The x coodinate for the textdraw on the screen.
		local y = 0; // The y coodinate for the textdraw on the screen.
		local Color = 0xFFFFFFFF; // Color white
		local TextDraw = CreateTextdraw( "Text", x, y, Color);
		TextDraw.SetRelativeForAll( true ); // Sets the position relative to all.

}

Notes

Call onScriptLoad and CreateTextdraw were used in this example. More info about them in the corresponding pages.

Related Functions