Jump to content

I'm trying import some TXD files, but my code seems wrong


Recommended Posts

So guys, I'm trying import some TXD files using this code:

Lua code:

  
function LoadMods() 
  
    -- [ XZIBIT CHARACTER ] -- 
    local SkinTXD = engineLoadTXD("../mods/xzibit.txd") 
    engineImportTXD(SkinTXD, 10) 
    local SkinDFF = engineLoadDFF("../mods/xzibit.dff", 0) 
    engineReplaceModel(SkinDFF, 10) 
  
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), LoadMods) 
  

Meta.xml:

  
    <info author="Sathler" type="gamemode" name="RPG MODE" description="Our project" /> 
    <map src="./mapa/main_prison.map" /> 
    <script src="./scripts/LoadMods.lua" type="client" /> 
     
    <!-- Mods imports --> 
    <file src="./mods/xzibit.txd" /> 
    <file src="./mods/xzibit.dff" /> 
  

But it doesn't work and I don't know why. Somebody can help me? :|

Hugs,

Sathler.

Link to comment

As I supposed, the dots are the problem, you don't need them.

-- LoadMods.lua:

function LoadMods() 
    -- [ XZIBIT CHARACTER ] -- 
    local SkinTXD = engineLoadTXD("mods/xzibit.txd") 
    engineImportTXD(SkinTXD, 10) 
    local SkinDFF = engineLoadDFF("mods/xzibit.dff", 10) 
    engineReplaceModel(SkinDFF, 10) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), LoadMods) 

-- meta.xml:

    -- Server Header --> 
    "Sathler" type="gamemode" name="RPG MODE" description="Our project" /> 
    "mapa/main_prison.map" /> 
     
    -- Server Scripts --> 
    

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...