Jump to content

[HELP] Change Car


warlitsh

Recommended Posts

Posted

Hi , I need help.

I can replace the car with:

function Model() 
      txd = engineLoadTXD("name.txd", 411 ) 
      engineImportTXD(txd, 411) 
      dff = engineLoadDFF("name.dff", 411 ) 
      engineReplaceModel(dff, 411) 
    end 
    addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), Model) 

But I try to have the original car + Change car.

how to do this?

(Sorry for my bad english...)

Thx for help. :)

Posted

You can't have the original and the mod.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You can't have them at the same time, but you can desactivate/activate with commands, etc.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted (edited)
function newcar()  
  txd = engineLoadTXD("name.txd", 411 ) 
  engineImportTXD(dff, 411) 
  dff = engineLoadDFF("name.dff", 411 ) 
  engineReplaceModel(dff, 411) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), newcar) 
  
addCommandHandler ( "newcar", newcar ) 

Edited by Guest

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

You can try this, but i havn't tested it.

local isCarModEnabled = false 
function newcar ( )  
    if not isCarModEnabled then 
       local txd = engineLoadTXD("name.txd", id ) 
       engineImportTXD(dff, id) 
       local dff = engineLoadDFF("name.dff", id ) 
        engineReplaceModel(dff, id) 
        isCarModEnabled = true 
    else 
        engineRestoreModel ( id ) 
        isCarModEnabled = false 
    end 
end 
addCommandHandler ( "newcar", newcar ) 

Posted
You can try this, but i havn't tested it.
local isCarModEnabled = false 
function newcar ( )  
    if not isCarModEnabled then 
       local txd = engineLoadTXD("name.txd", id ) 
       engineImportTXD(dff, id) 
       local dff = engineLoadDFF("name.dff", id ) 
        engineReplaceModel(dff, id) 
        isCarModEnabled = true 
    else 
        engineRestoreModel ( id ) 
        isCarModEnabled = false 
    end 
end 
addCommandHandler ( "newcar", newcar ) 

Both are working. x)

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted
You can try this, but i havn't tested it.
local isCarModEnabled = false 
function newcar ( )  
    if not isCarModEnabled then 
       local txd = engineLoadTXD("name.txd", id ) 
       engineImportTXD(dff, id) 
       local dff = engineLoadDFF("name.dff", id ) 
        engineReplaceModel(dff, id) 
        isCarModEnabled = true 
    else 
        engineRestoreModel ( id ) 
        isCarModEnabled = false 
    end 
end 
addCommandHandler ( "newcar", newcar ) 

Both are working. x)

lolz, then why not post the correct one? :wink:

Posted

I used his code. x)

I guess yours better. :D

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted
You can try this, but i havn't tested it.
local isCarModEnabled = false 
function newcar ( )  
    if not isCarModEnabled then 
       local txd = engineLoadTXD("name.txd", id ) 
       engineImportTXD(dff, id) 
       local dff = engineLoadDFF("name.dff", id ) 
        engineReplaceModel(dff, id) 
        isCarModEnabled = true 
    else 
        engineRestoreModel ( id ) 
        isCarModEnabled = false 
    end 
end 
addCommandHandler ( "newcar", newcar ) 

Thanks you ! Is perfect for my server ! Sorry I debuted in script :)

I'll add you to the credit of my server!

Posted
You can try this, but i havn't tested it.
local isCarModEnabled = false 
function newcar ( )  
    if not isCarModEnabled then 
       local txd = engineLoadTXD("name.txd", id ) 
       engineImportTXD(dff, id) 
       local dff = engineLoadDFF("name.dff", id ) 
        engineReplaceModel(dff, id) 
        isCarModEnabled = true 
    else 
        engineRestoreModel ( id ) 
        isCarModEnabled = false 
    end 
end 
addCommandHandler ( "newcar", newcar ) 

Thanks you ! Is perfect for my server ! Sorry I debuted in script :)

I'll add you to the credit of my server!

No problem.

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