Scripting/Squirrel/Client Events/Script::ScriptProcess: 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
(Created page with "This event is called when a player dies. == Syntax == <pre>player - The instance.</pre> == Arguments == None. == Example == This message is in 3D in a map position <code...")
 
No edit summary
 
Line 1: Line 1:
This event is called when a player dies.
This event is called on every script update.


== Syntax ==
== Syntax ==
 
<source lang="squirrel">function Script::ScriptProcess()</source>
<pre>player - The instance.</pre>


== Arguments ==
== Arguments ==
Line 12: Line 11:
This message is in 3D in a map position
This message is in 3D in a map position


<code lang="squirrel">
<source lang="squirrel">
dx3DTextdrawPos <- GUI.WorldPosToScreen( Vector( 497.132, -85.3217, 10.0307 ) );
dx3DTextdrawPos <- GUI.WorldPosToScreen(Vector(497.132, -85.3217, 10.0307));
dxText <- null;
dxText <- null;
function Script::ScriptProcess()
 
{
function Script::ScriptProcess() {
::dx3DTextdrawPos = GUI.WorldPosToScreen( Vector( 497.132, -85.3217, 10.0307 ) );
  ::dx3DTextdrawPos = GUI.WorldPosToScreen(Vector(497.132, -85.3217, 10.0307));
::dxText = GUILabel( VectorScreen( dx3DTextdrawPos.X, dx3DTextdrawPos.Y ), Colour( 255, 255, 0, 255 ), "Hello wolrd" );
  ::dxText = GUILabel(VectorScreen(dx3DTextdrawPos.X, dx3DTextdrawPos.Y), Colour(255, 255, 0, 255), "Hello world");
::dxText.FontSize = 20;
  ::dxText.FontSize = 20;
}
}
</source>
=== Notes ===
This example sets the 3D position on every frame(?), quite inefficient. But there are few (none?) good use cases for this function.


}
== Related Functions ==
</code>
{{Scripting/Squirrel/Client_Events/Script_Events}}
[[Category:Scripting/Squirrel/Client_Events/Script_Events]]

Latest revision as of 08:06, 21 May 2019

This event is called on every script update.

Syntax

function Script::ScriptProcess()

Arguments

None.

Example

This message is in 3D in a map position

dx3DTextdrawPos <- GUI.WorldPosToScreen(Vector(497.132, -85.3217, 10.0307));
dxText <- null;

function Script::ScriptProcess() {
  ::dx3DTextdrawPos = GUI.WorldPosToScreen(Vector(497.132, -85.3217, 10.0307));
  ::dxText = GUILabel(VectorScreen(dx3DTextdrawPos.X, dx3DTextdrawPos.Y), Colour(255, 255, 0, 255), "Hello world");
  ::dxText.FontSize = 20;
}

Notes

This example sets the 3D position on every frame(?), quite inefficient. But there are few (none?) good use cases for this function.

Related Functions

Template:Scripting/Squirrel/Client Events/Script Events