RefreshResources

From Multi Theft Auto: Wiki
Revision as of 17:44, 16 March 2011 by Arran Fortuna (talk | contribs) (Created page with "{{Server function}} __NOTOC__ This function finds new resources and checks for changes to the current ones. ==Syntax== <syntaxhighlight lang="lua"> bool refreshResources ( ) </syntaxhighlight> ===Retur...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function finds new resources and checks for changes to the current ones.

Syntax

bool refreshResources ( )

Returns

Returns true is refresh was successful, false otherwise.

Example

Click to collapse [-]
Server

This example will refresh resources when a player uses the /refreshresources command just like the hardcoded /refresh.

function commandRefreshResources()
    refreshResources()
    outputChatBox("Resources refreshed", player, 255, 255, 0)
end
addCommandHandler("refreshresources", commandRefreshResources)

See Also