Jump to content

Custom Billboards


Recommended Posts

Posted

No. Txd functions load a file located in the resource, so you send it to them like any other resource file.

And I think you could do a bit better as far as searching goes - my 4 days old topic on this matter isn't even off the first page in this subforum yet. varez posted a pretty comprehensive answer in it too.

Posted

Ok, im confused.

I have got this at the bottom of the lua of my GM:

addEventHandler("onClientResourceStart", getResourceRootElement(),
function()
my_txd = engineLoadTXD ("data/billbox.txd")
engineImportTXD(my_txd, 7300)
end

Now where do i put billbox.txd? because i cant see the billboard that i edited, it is as it was before.

Posted

if im getting any problem i just trying to search, look at somebody else job, and don't bothering the forums..

in that way i learned php, 3d modelling, flash, and much much more.. trying to do as much as i really can by myself..

you need to add your txd file to meta.xml

<file src="myfile.txd" />

Posted
if im getting any problem i just trying to search, look at somebody else job, and don't bothering the forums..

in that way i learned php, 3d modelling, flash, and much much more.. trying to do as much as i really can by myself..

you need to add your txd file to meta.xml

<file src="myfile.txd" />

I am lost, i got the meta.xml configured correctly, i got it loading, but the billboard just doesnt seem to change.

Posted
addEventHandler("onClientResourceStart", getResourceRootElement(),
function()
     my_txd = engineLoadTXD ("data/billbox.txd")
engineImportTXD(my_txd, 7300)
end
)

Posted

Ok, i must be doing something wrong, why doesnt this work?

function replaceModel() 
 txd = engineLoadTXD("[color=#FF0000]data/billboard.txd[/color]", 401 )
 engineImportTXD(txd, 401)
end
[color=#FF0000]addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel)[/color]
 
addCommandHandler ( "billboard", replaceModel )

and the meta.xml:

<meta>
   [color=#FF0000]<script src="billbox.lua" type="client"/>[/color]
[color=#FF0000]    <file src="data/billbox.txd" type="client"/>[/color]
</meta>

And yes, the file is in this folder:

/mods/deathmatch/resources/billboard/data

Any ideas why it shouldn't work?

Posted

txd = engineLoadTXD("data/billboard.txd", 401 )
<file src="data/billbox.txd" type="client"/>

look at these two for 1 minute.. see the difference?

you should use "debugscript 3" in console when testing new scripts

Posted

to

txd = engineLoadTXD("data/billbox.txd", 401 )

Lol thanks - stupid mistakes!

EDIT: Still doesn't work, you don't think its because my server is linux do you? Maybe cases might be the problem or / or \ i will fiddle, but if you can see anything else, please don't hesitate to say so!

Posted

Ok, im failing at this, the model number i want to replace is 3110, and here the txd :)

I want it to load when it starts up, and stay loaded.

(it works fine on single player)

Please could someone make me the resource?

Posted
Please could someone make me the resource?

we already did?

look few posts up

I know, but it doesnt work for me - the billboard doesnt change.

Posted
Please could someone make me the resource?

we already did?

look few posts up

I know, but it doesnt work for me - the billboard doesnt change.

siiigh..

if you really need TWO lines of code and meta.xml in zip -> download it..

txd file for free, to make it complete example

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