What Text? Where? Inside Gmod? In skype? The forum here? Whatsapp?
You gave us literally no information
Hold up lemme use my non-existent tech support mind reading powers to understand your question real quick.
You can't use unicode emoticons in GMod.
If you're talking about in Gmod chat you would need to make your own chat; the way other's have done it in the past is by using a table of materials and strings to reference to the chat they created. If you don't want to go through the trouble of making one yourself HatsChat2 is available on GmodStore for $15
That or Atlas Chat
I mean like i want to add an icon in a hud, like a heart icon or something like that.
Well first you'd have too find the material path, in this case it'd probably be icon16/heart.png. You can find a ton of built in GMOD icons here: http://www.famfamfam.com/lab/icons/silk/previews/index_abc.png
Then you'd have to define the icon with a [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/Material]Material[/url] call.
Then finally to draw it, you could use a http://wiki.garrysmod.com/page/GM/HUDPaint and a surface.DrawTexturedRect
Here's a small example to draw a heart in the middle of your screen:
local icon = Material("icon16/heart.png", "noclamp") --Here is where we define the icon we are going to use
hook.Add("HUDPaint", "DrawMyHeart", function() --Here is where we add the HUDPaint hook
surface.SetDrawColor(255, 255, 255, 255) --This makes sure the icon stays the same color as well as the transparency of it
surface.SetMaterial(icon) --Sets the icon as the texture to use for the next draw operation
surface.DrawTexturedRect(ScrW() / 2, ScrH() / 2, 16, 16) --Here is the actual icon draw, the arguements are: x position, y position, width, height
end)
Sorry, you need to Log In to post a reply to this thread.