d7ici Posted January 28, 2022 Share Posted January 28, 2022 hello i want active txd and dff Without bearing the file on the other party -- Server addCommandHandler ( "LoadCar" , function ( player ) local txd1,dff1 = fileOpen ( ":car/576.txd" ) , fileOpen ( ":car/576.dff" ) if ( txd1 and dff1 ) then local txd,dff = fileRead ( txd1 , fileGetSize ( txd1 ) ) , fileRead ( dff1 , fileGetSize ( dff1 ) ) triggerLatentClientEvent ( player , "acceptCar" , 5000,false,player,txd,dff) print(tostring(fileGetSize ( txd1 ))) print(tostring(fileGetSize ( dff1 ))) fileClose ( txd1 ) fileClose ( dff1 ) end end ) -- Client addEvent ( "acceptCar" , true ) addEventHandler ( "acceptCar" , root , function ( t1 , d1 ) print("done1") txd1 = engineLoadTXD ( t1 ) dff1 = engineLoadDFF ( d1,576 ) engineImportTXD ( txd1, 576 ) engineReplaceModel ( dff1, 576 ) end ) sorry for bad language Link to comment
βurak Posted January 28, 2022 Share Posted January 28, 2022 (edited) hello, after a long effort, I finally managed to run your code. I think the problem is about entering a low value for the bandwith parameter, but if you enter a high amount here, the problem will be solved, I'll send you the code I tried. server: addCommandHandler ("LoadCar",function(player) txd1 = fileOpen("sultan.txd") dff1 = fileOpen("sultan.dff") local txd = fileRead (txd1, 100*1024*1024) local dff = fileRead(dff1, 100*1024*1024) triggerLatentClientEvent(player,"acceptCar",100*1024*1024,false,player,txd,dff) fileClose (txd1) fileClose (dff1) end) client: addEvent ("acceptCar", true) addEventHandler ("acceptCar",root,function(t1 ,d1) outputDebugString("test") txd1 = engineLoadTXD ( t1 ) dff1 = engineLoadDFF ( d1,576 ) engineImportTXD ( txd1, 576 ) engineReplaceModel ( dff1, 576 ) end) triggerLatentClientEvent(player,"acceptCar",100*1024*1024,false,player,txd,dff) -- max bandwidth : 100 MB When you type LoadCar it will load your model with a little delay. Edited January 28, 2022 by Burak5312 1 Link to comment
βurak Posted January 28, 2022 Share Posted January 28, 2022 no problem if you have any other questions, please open a thread, I'll help as much as I can 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now