Jump to content

image on text


ReGo

Recommended Posts

any ideas how i can put image on this?

Client side

toBeShowed = toBeShowed.."Tralala: "..anotherone(this is for the text which will come on that image)).."\n"

 

So basiacly i need to put image on that anotherone ( so the text will be on image)

 

Edited by ReGo
Link to comment

Use these functions:

addEventHandler("onClientRender", root,
	function()
    	dxDrawImage(...)
    	dxDrawText(...)
    end
)

Obviously you must supply the correct arguments in to parameters of the dxDrawImage and dxDrawText to set the positioning and how you want it to appear for the client. The reason you use "onClientRender" is because if you just used the dx functions alone it would create it for one frame only resulting in basically nothing (unless the clients PC has like 1 FPS, in which case he/she would see it for 1 second) so this will allow the client to see the image on every frame.

 

An alternative is to use the GUI functions and create the image and text as GUI elements for the client. see: https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions#GUI_functions_2

Edited by Pembo
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...