How to put an image on its menu?


#1

Hi Guys, I’m looking for how to put an image to the place of a title.

Watch I have an example :

dd


#2

I’m pretty sure you can only use default game ‘images’/logos. You can’t use custom images if that’s what you’re trying to do. As far as selecting those default game images/logos, I’m not sure on how to do that.


#3

It depends on what menu resource you’re using - by default there’s no menus unless you write your own or use a resource.

Custom images will work by putting a custom .ytd in stream/, then you can use it just like the stock texture files.


#4

not cool to say we can’t when we can… not cool :weary:


#5

Relax, I wasn’t 100% sure if it was possible.


#6

this doesn’t look not sure XD

but don’t worry i’m relax , look i put a smiley in my message ahahah


#7

I agree, I should’ve been more clear.


#8

You can use custom images. You have to create a ytd file on stream folder.


#9

That’s exactly what @terbium said… :slight_smile:


#10

I just confirm that :wink:


#11

and how exactly would you make the image to ytd… just online convert it?


#12

ytd files are like archives. Create one with OpenIV and import the picture in there.


#13

i mean would it be possible to to it on my scoreboard, which i modified to have an image on top, but won’t load, and i entered it into the __Resource, but still won’t


#14
local options = {
    x = 0.1,
    y = 0.2,
    width = 0.2,
    height = 0.04,
    scale = 0.4,
    font = 0,
    menu_title = "menu",
    menu_subtitle = "Menu",
    color_r = 208, 
    color_g = 222,
    color_b = 2

When I put for example “menu” and that my image is called menu.ytd except that it does not put the image to me but the normal one


#15

@Riller0807
Is this HTML? If so, this ytd stuff won’t work.

@Flico Same for you, if it is HTML it won’t work, but if you use natives, just do it like this:


if not HasStreamedTextureDictLoaded(  YTD_NAME_HERE  ) then
	RequestStreamedTextureDict(  YTD_NAME_HERE  , true)
	while not HasStreamedTextureDictLoaded(  YTD_NAME_HERE  ) do
		Citizen.Wait(0)
	end
end
DrawSprite(  YTD_NAME_HERE  ,   IMAGE_NAME_HERE  ,   ScreenX  ,   ScreenY  ,   WIDTH  ,   HEIGHT  , HEADING,   RED  ,   GREEN  ,  BLUE  ,   ALPHA  )

#16

it’s HTML and im just comfused about the tables, if it’s possible to make it as an table with text instead of image… but not that much into HTML so don’t know