Jump to content

about txd


myyusuf

Recommended Posts

local txd, state 
  
bindKey( 'F2', 'down', 
    function( ) 
        state = not state 
        if state then 
            destroyElement( txd ) 
            outputChatBox("#ffcc00[MSG]: #c0c0c0Road texture disabled!", source,255,255,255,true) 
        else 
            txd = engineLoadTXD( 'vgncarshade1.txd', 3458 ) 
            engineImportTXD( txd, 3458 ) 
            txd = engineLoadTXD( 'vgncarshade.txd', 8838 ) 
            engineImportTXD( txd, 8838 ) 
            outputChatBox("#ffcc00[MSG]: #c0c0c0Road texture enabled!", source,255,255,255,true) 
        end 
    end 
)   

it isnt running. what is problem?

Link to comment
local txd, txd2, state 
  
bindKey( 'F2', 'down', 
    function( ) 
        state = not state 
        if state then 
            destroyElement( txd ) 
            destroyElement( txd2 ) 
            outputChatBox( '#ffcc00[MSG]: #c0c0c0Road texture disabled!', 255,255,255,true ) 
        else 
            txd = engineLoadTXD( 'vgncarshade1.txd', 3458 ) 
            engineImportTXD( txd, 3458 ) 
            txd2 = engineLoadTXD( 'vgncarshade.txd', 8838 ) 
            engineImportTXD( txd2, 8838 ) 
            outputChatBox( '#ffcc00[MSG]: #c0c0c0Road texture enabled!', 255,255,255,true ) 
        end 
    end 
)   

Because in client side in function outputChatBox 2 argument is number, but you use element.

https://wiki.multitheftauto.com/wiki/OutputChatBox

And also you i see you replace old variable txd with new.

You need define txd2 variable for delete texture in next time.

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