Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addEventHandler('onClientResourceStart', resourceRoot,
- function()
- local buffer
- local hFile = fileOpen("model.dff") -- attempt to open the file
- if hFile then -- check if it was successfully opened
- while not fileIsEOF(hFile) do -- as long as we're not at the end of the file...
- buffer = buffer..fileRead(hFile, 500) -- ... read the next 500 bytes...
- -- ... and output them to the console
- end
- fileClose(hFile) -- close the file once we're done with it
- else
- outputConsole("Unable to open the model file")
- end
- local enBuffer = teaEncode( base64Encode( buffer ), "xTN5#Gqm=sKn**dF" )
- local deBuffer = base64Decode( teaDecode( enBuffer, "xTN5#Gqm=sKn**dF" ) )
- local txd = engineLoadTXD('tex.txd',true)
- engineImportTXD(txd, 596)
- local dff = engineLoadDFF(deBuffer)
- engineReplaceModel(dff, 596)
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement