game.addPlugin

Adds a plugin to the game's resources.

Prototype

  1. bOk = game.addPlugin ( hGame, hFile|sPluginName )

Description

Adds plugins to the game module's plugin resources tab.


Parameters

hGame - valid Game handle
hFile|sPluginName - valid file handle OR plugin name string


Return values

bOk - true on success


Sample

  1. if ( hGame ) then
  2. for i = 1, #tFiles do
  3. if ( project.getFileType ( tFiles[i] ) == project.kFileTypePlugin ) then
  4. game.addPlugin ( hGame, tFiles[i] )
  5. end
  6. end
  7. end

Available since ShiVa 2.0