IsResourceArchived

From Multi Theft Auto: Wiki
Revision as of 19:12, 5 July 2017 by Gothemsh (talk | contribs) (Fixed build number and added example.)
Jump to navigation Jump to search

Checks whether a resource is currently archived (running from within a ZIP file).

Syntax

bool isResourceArchived ( resource resourceElement )

OOP Syntax Help! I don't understand this!

Method: resource:isArchived(...)
Variable: .archived


Required Arguments

  • resource: the resource to check

Returns

Returns true if a resource is archived, false if it is not archived, or nil if there is problem with resource.

Example

This example stops the resource from loading if it's archived

function resourceLoading( res )
    if res.archived then
        cancelEvent()
    end

end
addEventHandler('onResourcePreStart',root,resourceLoading,true,'high+10')

See Also