Jump to content

Recommended Posts

I created a Brown Streak mod. And the dff&txd working fine, but the .col does not working. I got a warning in debugscript 3: 

mod.lua:14: Bad 'number' pointer @ engineReplaceCOL'(2)

This is the mod.lua code:

function replaceModel()
local txd
	colsok = engineLoadCOL ( "v43.col" )
	engineReplaceCOL ( colsok, 538)
	txd = engineLoadTXD ( "v43.txd" )
	engineImportTXD ( txd, 538 )
	dff = engineLoadDFF ( "v43.dff" )
	engineReplaceModel ( dff, 538 )   
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel)
addCommandHandler ( "reloadcar", replaceModel )

What wrong? How to fix this?

Link to comment
17 hours ago, 50cent said:

I created a Brown Streak mod. And the dff&txd working fine, but the .col does not working. I got a warning in debugscript 3: 

mod.lua:14: Bad 'number' pointer @ engineReplaceCOL'(2)

This is the mod.lua code:


function replaceModel()
local txd
	colsok = engineLoadCOL ( "v43.col" )
	engineReplaceCOL ( colsok, 538)
	txd = engineLoadTXD ( "v43.txd" )
	engineImportTXD ( txd, 538 )
	dff = engineLoadDFF ( "v43.dff" )
	engineReplaceModel ( dff, 538 )   
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel)
addCommandHandler ( "reloadcar", replaceModel )

What wrong? How to fix this?

 

Please refer to what the wiki states, more info https://wiki.multitheftauto.com/wiki/EngineReplaceCOL

Quote

Note: Collision libraries (.col files containing multiple collision models) are not supported. See COL for details. Object models are supported only (no vehicles or players).

 

  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...