Jump to content

Replacing models problem


Blueman

Recommended Posts

cars.lua:

  
function replace() 
faggio = engineLoadTXD ( "txds/faggio.txd" ) 
engineImportTXD ( txd, 462 ) 
faggio = engineLoadDFF ( "dffs/faggio.dff", 462 ) 
engineReplaceModel ( dff, 462 ) 
end 
addEventHandler("onClientResourceStart", getRootElement(), replace) 
  

meta.xml:

  
<meta> 
<script src="Cars.lua" type="client" /> 
<file src="dffs\faggio.dff" /> 
<file src="txds\faggio.txd" /> 
</meta> 
  

This causes my game to crash can anyone help the server outputs no errors and dosn't crash itself.

Can anyone help and yes both the txd and dff are valid files.

Crash data:

  
Version = 1.0.5-release-2560.0.000 
Time = Tue Jun 28 20:32:20 2011 
Module = S:\Gtasa\gta_sa.exe 
Code = 0xC0000005 
Offset = 0x002BD71C 
  
EAX=BCE30020  EBX=0CF201A8  ECX=00000000  EDX=3E01767C  ESI=08B6A038 
EDI=00B2B244  EBP=00000000  ESP=0022FC0C  EIP=006BD71C  FLG=00210246 
CS=001B   DS=0023  SS=0023  ES=0023   FS=003B  GS=0000 
  

Link to comment
function replace() 
local txd = engineLoadTXD ( "txds/:O.txd" ) 
engineImportTXD ( txd, 462 ) 
local dff = engineLoadDFF ( "dffs/:O.dff", 462 ) 
engineReplaceModel ( dff, 462 ) 
end 
addEventHandler("onClientResourceStart", getRootElement(), replace) 

Link to comment

Er-rm sorry I recopied it from pastebin since I asked about it in the irc and pastebin did some funky stuff to my code :o was the car name in the xml. :| So that wouldn't help.

Edit:I would just type the name but it appears my Browsers dictionary is glitching and turns it into :o so It wasn't pastebin

Edit:Or it may be the forms way from preventing us from saying a word in the cars name. :P

Edit: Never mind I found the problem but thanks. :)

Edited by Guest
Link to comment

<meta> 
<script src="Cars.lua" type="client" /> 
<file src="dffs/:O.dff" /> 
<file src="txds/:O.txd" /> 
</meta> 

function replace() 
local txd = engineLoadTXD ( "txds/:O.txd" ) 
engineImportTXD ( txd, 462 ) 
local dff = engineLoadDFF ( "dffs/:O.dff", 462 ) 
engineReplaceModel ( dff, 462 ) 
end 
addEventHandler("onClientResourceStart", resourceRoot, replace) 

Link to comment

Try

<meta> 
<script src="Cars.lua" type="client" /> 
<file src="dffs/O.dff" /> 
<file src="txds/O.txd" /> 
</meta> 

function replace() 
local txd = engineLoadTXD ( "txds/O.txd" ) 
engineImportTXD ( txd, 462 ) 
local dff = engineLoadDFF ( "dffs/O.dff", 462 ) 
engineReplaceModel ( dff, 462 ) 
end 
addEventHandler("onClientResourceStart", resourceRoot, replace) 

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