EngineRemoveImage: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Added example)
(Fix description)
Line 2: Line 2:
{{Client function}}
{{Client function}}


{{New feature/item|4|1.6.0|21708|This function removes an IMG container from GTA.}}
{{New feature/item|4|1.6.0|21708|This function disables streaming from an IMG container.}}
{{Warning|This article is incomplete and may contain errors}}


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
img engineRemoveImage ( img img_file )
boolean engineRemoveImage ( img img_file )
</syntaxhighlight>
</syntaxhighlight>


{{OOP||[[DFF|EngineIMG]]}}
{{OOP||[[img]]:remove}}
===Required Arguments===
===Required Arguments===
* '''img_file''': The [[IMG]] file you want to remove.
* '''img_file''': The [[IMG]] file you want to remove.


===Returns===
===Returns===
Returns ''true'' if [[IMG]] file was successfully removed, ''false'' otherwise.
Returns ''true'' if stremaing from [[IMG]] file was successfully disabled, ''false'' otherwise.


==Examples==
==Examples==
Line 22: Line 21:
local img = engineLoadIMG('file.img') -- load IMG file to mta
local img = engineLoadIMG('file.img') -- load IMG file to mta
engineAddImage(img) -- add it to GTA world
engineAddImage(img) -- add it to GTA world
setTimer(engineRemoveImage, 10000, 1, img) -- remove it from GTA world
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{Engine_functions}}
{{Engine_functions}}

Revision as of 18:13, 16 April 2023

ADDED/UPDATED IN VERSION 1.6.0 r21708:
This function disables streaming from an IMG container.

Syntax

boolean engineRemoveImage ( img img_file )


OOP Syntax Help! I don't understand this!

Method: img:remove(...)


Required Arguments

  • img_file: The IMG file you want to remove.

Returns

Returns true if stremaing from IMG file was successfully disabled, false otherwise.

Examples

This example loads IMG file, adds it to GTA and after 10 seconds removes it.

local img = engineLoadIMG('file.img') -- load IMG file to mta
engineAddImage(img) -- add it to GTA world

See Also