Jump to content

How to replace a sign with your png


Recommended Posts

Ahm okey, the sign is "8331" the name of it is "vgsbboardsigns18", and the png's name is "fork" xdd, so i want to change the sign with the "fork" image, here's the sign: mta-screen_2017-06-24_17-52-26.png[/img]

And here's my image:

1000x500

BADASSAFK.png *This is just a test png*

Edited by Skarbonke
Link to comment
Just now, StormFighter said:

You'll need txd workshop and a txd file for that. Open the txd file with the txd workshop and replace the billboard you want with the png. The texture's name must not change. After that, save the txd file, and import it on your server. The billboard will be your png.

Don't i need a resource that will replace it, like i do the txd and in the lua text a replacment? Like this one

Meta:

<meta>
    <info type="script" description="******" author="*****" version="1.0" name="Sign" />
    <script src="sign.lua" type="server" />
    <file src="img/****.txd"></file>
<meta>

Lua:

addEvent('receiveData19',true)
addEventHandler('receiveData19',getRootElement(),function(dataFlow)
    local file = fileCreate("480.dff")
    fileWrite(file, dataFlow)
    fileClose(file)
    local file2 = fileExists("480.txd")
    if not file2 then
        triggerServerEvent('setupDownload20',localPlayer)
    else
        txd = engineLoadTXD("480.txd")
        engineImportTXD(txd, 480)
        dff = engineLoadDFF("480.dff",480)
        engineReplaceModel(dff,480)  
        downloaded()
    end
end)

addEvent('receiveData20',true)
addEventHandler('receiveData20',getRootElement(),function(dataFlow)
    local file = fileCreate("480.txd")
    fileWrite(file, dataFlow)
    fileClose(file)
    txd = engineLoadTXD("480.txd")
    engineImportTXD(txd, 480)
    dff = engineLoadDFF("480.dff",480)
    engineReplaceModel(dff,480)  
    downloaded()
end)

addEvent('onVehicleLoad',true)
addEventHandler('onVehicleLoad',getRootElement(),function(options)
    if options[16] then
        local file = fileExists("480.dff")
        local file2 = fileExists("480.txd")
        if file and file2 then
            txd = engineLoadTXD("480.txd")
            engineImportTXD(txd, 480)
            dff = engineLoadDFF("480.dff",480)
            engineReplaceModel(dff,480)  
        end
    else
        if txd then
            destroyElement(txd)
            destroyElement(dff)
            txd,dff = nil
        end
    end
end)

O is it just for the cars, guns, weapons?
 

Link to comment
5 minutes ago, StormFighter said:

You replace it just like a car. The only difference is, that you don't replace a DFF now, you replace only a TXD. But yeah. The method is the same, with your edited txd.

Ok, thank u, but where do i find the txd of this sign?

I tried "gta3" but it just got me the dff file

Oh, nevermind, found it, thanks again.

Edited by Skarbonke
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...