GetLatentEventStatus: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server client function}} Gets the status of one queued latent event. ==Syntax== Server: <syntaxhighlight lang="lua"> table getLatentEventStatus( element player, int handle ) </syntaxhighlight> ...")
 
No edit summary
Line 6: Line 6:
Server:
Server:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
table getLatentEventStatus( element player, int handle )
table getLatentEventStatus( player thePlayer, int handle )
</syntaxhighlight>
</syntaxhighlight>
Client:
Client:
Line 14: Line 14:


===Required Arguments===
===Required Arguments===
*'''player:''' (Only required if called on the server) The player who is receiving the event.
*'''thePlayer:''' (Only required if called on the server) The player who is receiving the event.
*'''int :''' A handle previous got from [[getLatentEventHandles]].
*'''handle:''' A handle previous got from [[getLatentEventHandles]].


===Returns===
===Returns===
Returns a table with the following info or false if invalid arguments were passed.
Returns a table with the following info or false if invalid arguments were passed:
*'''tickStart:''' A number representing how many ticks until the data transfer starts (Negative means the transfer has already started)
*'''tickStart:''' A number representing how many ticks until the data transfer starts (Negative means the transfer has already started)
*'''tickEnd:''' A number representing how many ticks until the data transfer completes
*'''tickEnd:''' A number representing how many ticks until the data transfer completes
Line 28: Line 28:
--TODO
--TODO
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|1.3.0-9.03772|1.3.0-9.03772|}}


==See Also==
==See Also==
{{Event functions}}
{{Event functions}}

Revision as of 10:34, 29 January 2012

Gets the status of one queued latent event.

Syntax

Server:

table getLatentEventStatus( player thePlayer, int handle )

Client:

table getLatentEventStatus( int handle )

Required Arguments

  • thePlayer: (Only required if called on the server) The player who is receiving the event.
  • handle: A handle previous got from getLatentEventHandles.

Returns

Returns a table with the following info or false if invalid arguments were passed:

  • tickStart: A number representing how many ticks until the data transfer starts (Negative means the transfer has already started)
  • tickEnd: A number representing how many ticks until the data transfer completes
  • totalSize: A number representing how many bytes in total this transfer will transfer
  • percentComplete: A number between 0-100 saying how much is done

Example

--TODO

Requirements

Minimum server version 1.3.0-9.03772
Minimum client version 1.3.0-9.03772

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.3.0-9.03772" client="1.3.0-9.03772" />

See Also