engineReplaceCOL
Client-side
Server-side
Shared
Pair: engineRestoreCOL
This function replaces the collision file of the given model id to the collision file passed. Use engineLoadCOL to load the collision file first.
Note
- Follow loading order ( COL -> TXD -> DFF ) as other orders can cause collisions, textures or the DFF not to load.
- Object models are supported only (no vehicles or peds).
OOP Syntax Help! I don't understand this!
- Method:col:replace(...)
Syntax
bool engineReplaceCOL ( col theCol, int modelID )Required Arguments
- theCol: The collision file to replace with.
- modelID: The model ID whose collision file you want to replace.
Returns
- bool: result
Returns true if the collision was successfully replaced, false or nil if the collision could not be replaced for a reason.
Code Examples
client
local col = engineLoadCOL("trashcan.col")engineReplaceCOL(col, 1337)See Also
Engine Functions
- engineAddClothingModelNew
- engineAddClothingTXDNew
- engineAddImageNew
- engineApplyShaderToWorldTexture
- engineFreeModel
- engineFreeTXDNew
- engineGetModelFlagsNew
- engineGetModelIDFromName
- engineGetModelLODDistance
- engineGetModelNameFromID
- engineGetModelPhysicalPropertiesGroup
- engineGetModelTextureNames
- engineGetModelTextures
- engineGetModelTXDIDNew
- engineGetModelVisibleTime
- engineGetObjectGroupPhysicalProperty
- engineGetPoolCapacityNew
- engineGetPoolDefaultCapacityNew
- engineGetPoolUsedCapacityNew
- engineGetSurfaceProperties
- engineGetVisibleTextureNames
- engineImageGetFileNew
- engineImageGetFilesNew
- engineImageGetFilesCountNew
- engineImageLinkDFFNew
- engineImageLinkTXDNew
- engineImportTXD
- engineLoadCOL
- engineLoadDFF
- engineLoadIFP
- engineLoadIMGNew
- engineLoadTXD
- enginePreloadWorldAreaNew
- engineRemoveImageNew
- engineRemoveShaderFromWorldTexture
- engineReplaceAnimation
- engineReplaceCOL
- engineReplaceModel
- engineRequestModel
- engineRequestTXDNew
- engineResetModelFlagsNew
- engineResetModelLODDistance
- engineResetModelTXDIDNew
- engineResetSurfaceProperties
- engineRestoreAnimation
- engineRestoreCOL
- engineRestoreDFFImageNew
- engineRestoreModel
- engineRestoreModelPhysicalPropertiesGroup
- engineRestoreObjectGroupPhysicalProperties
- engineRestoreTXDImageNew
- engineRestreamNew
- engineRestreamModelNew
- engineRestreamWorldUpdated
- engineSetAsynchronousLoading
- engineSetModelFlagNew
- engineSetModelFlagsNew
- engineSetModelLODDistanceUpdated
- engineSetModelPhysicalPropertiesGroupUpdated
- engineSetModelTXDIDNew
- engineSetModelVisibleTime
- engineSetObjectGroupPhysicalProperty
- engineSetPoolCapacityNew
- engineSetSurfaceProperties
- engineStreamingFreeUpMemory
- engineStreamingGetBufferSizeNew
- engineStreamingGetMemorySizeNew
- engineStreamingGetModelLoadStateNew
- engineStreamingGetUsedMemory
- engineStreamingReleaseModelNew
- engineStreamingRequestModelNew
- engineStreamingRestoreBufferSizeNew
- engineStreamingRestoreMemorySizeNew
- engineStreamingSetBufferSizeNew
- engineStreamingSetMemorySizeNew
- engineStreamingSetModelCacheLimitsNew