rusztamas Posted December 31, 2015 Share Posted December 31, 2015 Hey guys, i want to replace the object "bustopm" (id 1257), i exported all files, from GTA:SA (txd, dff) and i created a file, script.lua, and i created it's meta file, and it is still not working! Script: function ReplaceObject ( ) txd = engineLoadTXD( "name.txd" ) dff = engineLoadDFF( "name.dff", 0 ) engineImportTXD( txd, 1257 ) engineReplaceModel( dff, 1257 ) end addEvent ( "replaceObj", true ) addEventHandler ( "replaceObj", root, ReplaceObject ) Link to comment
0 MTA Team ccw Posted January 1, 2016 MTA Team Share Posted January 1, 2016 Enable debugging output by pressing F8 and entering the command: debugscript 3 Then insert outputDebugString as show below and run the script again, function ReplaceObject ( ) txd = engineLoadTXD( "name.txd" ) dff = engineLoadDFF( "name.dff", 0 ) engineImportTXD( txd, 1257 ) engineReplaceModel( dff, 1257 ) outputDebugString( "ReplaceObject " .. " txd:" .. tostring(txd) .. " dff:" .. tostring(dff) ) end addEvent ( "replaceObj", true ) addEventHandler ( "replaceObj", root, ReplaceObject ) Link to comment
Question
rusztamas
Hey guys, i want to replace the object "bustopm" (id 1257), i exported all files, from GTA:SA (txd, dff) and i created a file, script.lua, and i created it's meta file, and it is still not working! Script:
Link to comment
1 answer to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now