Jump to content

replacing paintjobs help please


jdmark

Recommended Posts

hello can someone help me i make a res for replacing car paintjobs but when i try to start the res he cant find the resource help me please

meta.xml

   
            "Bla" version="Bla" type="script" name="" description="" showInResourceBrowser="false" /> 
            

script.lua

addEventHandler('onClientResourceStart', resourceRoot, 
    function() 
     
      txd = engineLoadTXD ( "elegy2body256.png", 562) 
      engineImportTXD ( txd, 562) 
      txd = engineLoadTXD ( "elegy2body256.png", 562) 
      engineReplaceModel ( txd, 562) 
      txd = engineLoadTXD ( "elegy3body256.png", 562) 
      engineImportTXD ( txd, 562) 
      txd = engineLoadTXD ( "elegy3body256.png", 562) 
      engineReplaceModel ( txd, 562) 
      txd = engineLoadTXD ( "elegy4body256.png", 562) 
      engineImportTXD ( txd, 562) 
      txd = engineLoadTXD ( "elegy4body256.png", 562) 
      engineReplaceModel ( txd, 562) 
  
  
     end 
     ) 

Link to comment

1. Meta.mxl points to *.pgn file (it probably does not exists), but in code you're trying to load .png (which are 2 different files)

2. engineLoadTXD does not load image files but .txd files (texture archives)

3. engineReplaceModel expects DFF element not a TXD element

4. To replace paintjobs you need to use a simple "texture replace" shader

5. DEBUG YOUR SCRIPT because I'm 100% sure you will get loads of error/warning messages

6. If the resource cannot be found that means it hasn't been loaded. If you were running the server before you created the new resource, the server will not know about the resource so you need to /refresh the server's resources. If you see an error message in the server's console saying "ERROR: Couldn't parse meta file for resource 'RESOURCE_NAME' " then you need to check the meta.xml for error (check point (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...