Scripting/Squirrel/Client Functions/Script::GetTicks: 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 function returns a number of milliseconds since the computer started. Can be used to measure time intervals. == Syntax == <pre>None.</pre> == Arguments == * None. ==...")
 
No edit summary
 
Line 3: Line 3:
== Syntax ==
== Syntax ==


<pre>None.</pre>
<pre>int Script::GetTicks()</pre>


== Arguments ==
== Arguments ==


* None.
* None


== Return type ==
== Return type ==


'''Integer'''.
'''Integer'''


== Example ==
== Example ==
This will message the number of milliseconds since the computer has started.
This will message the number of milliseconds since the computer has started.


<code lang="squirrel">
<source lang="squirrel">
function Script::ScriptLoad( )
function Script::ScriptLoad()
{
{
 
    Console.Print(GetTicks().tostring());
Console.Print( GetTicks( ).tostring( ) );
 
}
}
</code>
</source>


=== Notes ===
=== Notes ===


The event [http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Client_Events/Script::ScriptLoad Script::ScriptLoad] was used in in this example. More info about them in the corresponding pages.
The event [[Scripting/Squirrel/Client_Functions/Script::GetTicks|Script::GetTicks]] was used in in this example. More info about them in the corresponding pages.

Latest revision as of 04:02, 23 July 2016

This function returns a number of milliseconds since the computer started. Can be used to measure time intervals.

Syntax

int Script::GetTicks()

Arguments

  • None

Return type

Integer

Example

This will message the number of milliseconds since the computer has started.

function Script::ScriptLoad()
{
    Console.Print(GetTicks().tostring());
}

Notes

The event Script::GetTicks was used in in this example. More info about them in the corresponding pages.