engineGetModelVisibleTime | Multi Theft Auto: Wiki Skip to content

engineGetModelVisibleTime

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function returns a model's visibility time, this is used for example for building lights being shown after 23:00.

Syntax

int,​ int engineGetModelVisibleTime ( int modelId )
Required Arguments
  • modelId: The ID of the model.

Returns

  • int: value1
  • int: value2

Returns 2 integers , indicating timeOn and timeOff .

Code Examples

shared

Make Los Santos Tower visible only between 10 and 12 AM.

function init ()
engineSetModelVisibleTime (4550, 10, 12)
local timeOn, timeOff = engineGetModelVisibleTime (4550)
outputChatBox ("Los Santos Tower visible time is now between " .. timeOn .. " and " .. timeOff)
end
addEventHandler ("onClientResourceStart", resourceRoot, init)

See Also

Engine Functions
Engine Elements