bolmin 33 Posted January 3, 2021 Share Posted January 3, 2021 (edited) Hi, I was wandering is it possible to load multiplayer textures? I attached how I load singleplayer textures, which works fine most of the time. The problem is that some singleplayer textures just do not work, this includes mostly everything outside of ui_textures.rpf so for example stuff from uI_hud.rpf doesn't work. The other thing is that ui_textures_mp.rpf doesn't work either, so I am curious is it the same thing as with the online weapons, that they can't be loaded without memory manipulation. Edited January 3, 2021 by bolmin Quote Link to comment Share on other sites More sharing options...
Lambda 23 Posted January 3, 2021 Share Posted January 3, 2021 They do work, dont let the engine decide when to unload the textures until you are done with them for starters, im using a ton of mp textures from hud and blips to social club ones, and even some leftovers from gta online. Being biased of course since im the creator but you can much faster test textures by using scripts in the map editor and make changes in realtime i made a really quick test with a mix of sp/mp textures: 1 Quote Link to comment Share on other sites More sharing options...
bolmin 33 Posted January 3, 2021 Author Share Posted January 3, 2021 Thanks for the reply! I'll surely test this out in your map editor. I didn't use it since I wasn't exactly interested in, well, map editing, but it seems there is much more to it! Quote Link to comment Share on other sites More sharing options...
Lambda 23 Posted January 4, 2021 Share Posted January 4, 2021 For me atleast its a massive time saver when i can create new ui without the need of compiling or restarting the game. Works pretty much as c++ and you can test any texture really quickly to see if they work and easily move it in to your own mod heres what it takes to display a texture: // Dict, Texture, x, y, size_x, size_y, heading, r, g, b, a DrawTexture("blips","blip_ambient_secret", 0.565f, 0.5f, 0.035f, 0.035f, 0, 255, 255, 255, 255); 2 Quote Link to comment Share on other sites More sharing options...
bolmin 33 Posted January 4, 2021 Author Share Posted January 4, 2021 (edited) I used this and here are the results: So the texture doesn't load and I removed the lines about unloading the textures. What am I doing wrong? Edited January 5, 2021 by bolmin Quote Link to comment Share on other sites More sharing options...
Lambda 23 Posted January 5, 2021 Share Posted January 5, 2021 DrawTexture("inventory_items_mp", "kit_camp_wilderness", 0.5f, 0.5f, 0.1f, 0.2f, 0.0f, 255, 255, 255, 255); It works fine a few tips: Always and i mean always use curly brakets for any statement you make. Also make sure to use literals on all your floats. 1 Quote Link to comment Share on other sites More sharing options...
bolmin 33 Posted January 5, 2021 Author Share Posted January 5, 2021 It really does work for you! Could you tell me how the function in your map editor is written? I have literally no idea what else to do. Quote Link to comment Share on other sites More sharing options...
Lambda 23 Posted January 6, 2021 Share Posted January 6, 2021 (edited) Read my post again, there is no magic involved its all basic stuff check if the dictionary is loaded if not request it, if it is loaded draw the sprite. Had a quick look again and i see your issue..check the image. //Example if (TEXTURE::HAS_STREAMED_TEXTURE_DICT_LOADED("inventory_items_mp")) { GRAPHICS::DRAW_SPRITE("inventory_items_mp", "kit_camp_wilderness", 0.5f, 0.5f, 0.1f, 0.2f, 0.0f, 255, 255, 255, 255, 0); } else { TEXTURE::REQUEST_STREAMED_TEXTURE_DICT("inventory_items_mp", 0); } Edited January 6, 2021 by Lambda 1 Quote Link to comment Share on other sites More sharing options...
bolmin 33 Posted January 6, 2021 Author Share Posted January 6, 2021 (edited) Ohhh I see it now. I am not gonna lie, this code was an example I found somewhere, I simply pasted it and since it worked I didn't tweak with it. Thank you so much!!! I have no idea how I didn't pay attention that the TEXTURE_DICT_LOADED reffered to sprite, but in the NO_LONGER_NEEDED there was category. Edited January 6, 2021 by bolmin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.