Geramy92 Posted November 19, 2012 Share Posted November 19, 2012 Hey there, i want to create a little script for the advertisesigns in gtasa. For that script it is nessesary that the images are easy to change (the best way will be that it can change while server is running) so the imagefile cannot be written in the meta.xml so i have the Question: at the function dxCreateTexture, can i use an http path for the filepath (for example http://example.com/text.png) and if not, is there an workaround which is working?? Link to comment
myonlake Posted November 19, 2012 Share Posted November 19, 2012 You cannot change a texture of an object, skin or anything with normal pictures. They must be in .txd and .dff files or you can use shaders. Shaders » Engine functions » Client-side engineLoadTXD engineImportTXD engineLoadDFF engineReplaceModel Link to comment
Geramy92 Posted November 19, 2012 Author Share Posted November 19, 2012 sry i think you don't understand i have an working script! Its like the Shader for the animations in advertising in the exampleshaders for create such advertise sign you need an picture for dxCreateTexture see https://wiki.multitheftauto.com/wiki/DxCreateTexture first argument now the question is: is there anyway for not writing the path in meta.xml (like playSound) Link to comment
denny199 Posted November 19, 2012 Share Posted November 19, 2012 use fetchRemote https://wiki.multitheftauto.com/wiki/FetchRemote so you can recieve the image from the website. Link to comment
50p Posted November 19, 2012 Share Posted November 19, 2012 You can use the second variant where you pass pixels instead of file path. You can use downloadFile and onClientFileDownloadComplete but these both are available in nightly at this time. If you want to do it with 1.3 then you can use fetchRemote to do the same thing but instead it's the server that downloads the file and then you can send it to clients. 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