IsResourceArchived

From Multi Theft Auto: Wiki

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