Jump to content

Question


Negriukas

Recommended Posts

I think it's possible f.e :

  
local vModLoader = { 
      { 'txd','cars/infernus.txd','411'}, 
      { 'dff','cars/infernus.dff','411'}, 
      { 'dff','cars/hunter.dff','425'} 
} 
for index,value in ipairs ( vCommandLoader ) do 
outputChatBox (value[ 3 ],source,255,255,255,true ) 
-- This will output the 3rd value into the chat. 
  

Link to comment
I think it's possible f.e :
  
local vModLoader = { 
      { 'txd','cars/infernus.txd','411'}, 
      { 'dff','cars/infernus.dff','411'}, 
      { 'dff','cars/hunter.dff','425'} 
} 
  

That's what i meant by 'spamming over and over', and it wont help

How do you want it then?

Like this?

  
local cars = { 
    filePath = "txd/", 
    txdFiles = {425,411,214}, 
    ids = {425,411,214}, 
} 
function () 
for i,value in pairs(cars.txdFiles) do 
local txd = engineLoadTXD ( cars.filePath..value..".txd" ) 
for i,value1 in pairs(cars.ids) do 
engineImportTXD ( txd, value1 ) 
end 
  

It must have alot of debugs problems, but I'm just trying to get your idea.

Let's say i have 20 mod in a folder, txd and dff, which makes them 40 file, I have to spam
{ 'txd','cars/infernus.txd','411'}, 
      { 'dff','cars/infernus.dff','411'}, 
      { 'txd','cars/name.txd','id'}, 
      { 'dff','cars/name.txd','id'}, 
      { 'txd','cars/name.txd','id'}, 
      { 'dff','cars/name.txd','id'}, 

all the time?

Is there any to get automatically the files from 'cars' folder and insert in a table etc...

I don't know actually, but mine could be helpful and less spam.

Edit : I searched for a script and I found this example :

  
    for i = 0, 3 do 
        local tex = dxCreateTexture ( "stopbord/right/rframe"..i..".png" ) 
  

0, 3 will be the files name.

Edited by Guest
Link to comment

Let's say i have 20 mod in a folder, txd and dff, which makes them 40 file, I have to spam

{ 'txd','cars/infernus.txd','411'}, 
      { 'dff','cars/infernus.dff','411'}, 
      { 'txd','cars/name.txd','id'}, 
      { 'dff','cars/name.txd','id'}, 
      { 'txd','cars/name.txd','id'}, 
      { 'dff','cars/name.txd','id'}, 

all the time?

Is there any to get automatically the files from 'cars' folder and insert in a table etc...

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