Posted January 3, 20214 yr 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, 20214 yr by bolmin
January 3, 20214 yr 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:
January 3, 20214 yr Author 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!
January 4, 20214 yr 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);
January 4, 20214 yr Author 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, 20214 yr by bolmin
January 5, 20214 yr 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.
January 5, 20214 yr Author 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.
January 6, 20214 yr 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, 20214 yr by Lambda
January 6, 20214 yr Author 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, 20214 yr by bolmin
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.