Jump to content

not work filepath


Kenix

Recommended Posts

i create this script for easy replace txd and dff but filepath not work

i test filepath and it work please help me with filepath

this work

  
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), 
    function()           
        vehicleIDs = { {470} } 
        for i,v in pairs(vehicleIDs) do 
            txd = engineLoadTXD("models/patriot.txd",v[i]);engineImportTXD(txd, v[i]) 
            dff = engineLoadDFF("models/patriot.dff",v[i]);engineReplaceModel(dff, v[i]) 
        end 
    end      
) 
  

but this not woking.i need fix it

  
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), 
    function()           
        vehicleIDs = { {470} } 
        for i,v in pairs(vehicleIDs) do 
            txd = engineLoadTXD("models/"..v[i]..".txd",v[i]);engineImportTXD(txd, v[i]) 
            dff = engineLoadDFF("models/"..v[i]..".dff",v[i]);engineReplaceModel(dff, v[i]) 
        end 
    end      
)        
  

Link to comment

v is wrong. It should just be using v[1] and v[2]

Your table should be like { {470, "patriot"} }

In that case v[1] will be 470 and v[2] will be patriot which is the name of your txd and dff

  
vehicleIDs = { {470, "patriot"} } 
for i,v in pairs(vehicleIDs) do 
    txd = engineLoadTXD("models/"..v[2]..".txd",v[1]);engineImportTXD(txd, v[1]) 
    dff = engineLoadDFF("models/"..v[2]..".dff",v[1]);engineReplaceModel(dff, v[1]) 
end  

Link to comment
v is wrong. It should just be using v[1] and v[2]

Your table should be like { {470, "patriot"} }

In that case v[1] will be 470 and v[2] will be patriot which is the name of your txd and dff

  
vehicleIDs = { {470, "patriot"} } 
for i,v in pairs(vehicleIDs) do 
    txd = engineLoadTXD("models/"..v[2]..".txd",v[1]);engineImportTXD(txd, v[1]) 
    dff = engineLoadDFF("models/"..v[2]..".dff",v[1]);engineReplaceModel(dff, v[1]) 
end  

ok thx dude

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