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..base64Encode(fileRead(hFile, 500))-- ... read the next 500 bytes...
- end
- fileClose(hFile) -- close the file once we're done with it
- else
- outputConsole("Unable to open the model file")
- end
- local enBuffer = teaEncode(buffer, "xTN5#Gqm=sKn**dF")
- local deBuffer = base64Decode(teaDecode(enBuffer, "xTN5#Gqm=sKn**dF"))
- engineImportTXD(engineLoadTXD('tex.txd',true) , 596)
- engineReplaceModel(engineLoadDFF(deBuffer) , 596)
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement