Guest User

Untitled

a guest
May 16th, 2012
65
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local fail = {}
  2.  
  3. function replaceModel ( iModel, sTXD )
  4.     local pTXD = engineLoadTXD ( "objz/" .. sTXD .. ".txd" )
  5.     if not pTXD then
  6.         -- Loading failed, so reload again to avoid white models.
  7.         if not fail [ iModel ] then
  8.             -- Mostly the texture will re
  9.             fail [ iModel ] = true
  10.             return replaceModel ( iModel, sTXD )
  11.         end
  12.     end
  13.  
  14.     engineImportTXD ( pTXD, iModel )
  15.    
  16.     -- replace dff and col here ....
  17. end
  18.  
  19. replaceModel ( 3375, "hello" )
RAW Paste Data