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.

Do NOT PM ME for help unless invited. - New MTA Script Editor

Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.

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" />

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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