GetResourceLoadTime: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:


==Syntax==
==Syntax==
{{New feature|3|1.0 r840|
<syntaxhighlight lang="lua">
int getResourceLoadTime ( resource res )
</syntaxhighlight>
}}
{{Deprecated_feature|3|1.0|
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
string getResourceLoadTime ( resource res )
string getResourceLoadTime ( resource res )
</syntaxhighlight>
</syntaxhighlight>
}}


===Required Arguments===
===Required Arguments===

Revision as of 12:00, 21 May 2009

Gets the date and time at which a resource was last loaded in the server.

Syntax

int getResourceLoadTime ( resource res )

Required Arguments

  • res: the resource you want to know the load time of.

Returns

If successful, returns seconds from loadtime, otherwise false.

Example

This code outputs the date and time at which the scoreboard resource was last loaded.

local res = getResourceFromName ( "scoreboard" )
if res then
    outputConsole ( "scoreboard was last loaded on: " .. getResourceLoadTime(res) )
end

See Also