question SetObjectMaterialText
#1

Hello I use SetObjectMaterialText to use webdings character because they are looking cool, but my question is how can use the samp sprites https://imgur.com/6A6Eavy on the objects? I know on textdraw the font is number 4 but what is the name of the font to use it on setobjectmaterialtext?
Reply
#2

you have to use SetObjectMaterial, instead of SetObjectMaterialText, you can change textures with that.
Reply
#3

Quote:
Originally Posted by Mugala
View Post
you have to use SetObjectMaterial, instead of SetObjectMaterialText, you can change textures with that.
if I use this it doesn't show anything

Code:
	SetDynamicObjectMaterial(obj, 0, 0,"ld_grav:bee1", "ld_grav.txd", 0xFFFFFFFF);
I try to change name extensions and nothing work to display that bee https://imgur.com/6A6Eavy or another sprite
Reply
#4

no, you don't have to use it like a sprite (I mean ld_grav:bee1), just take a texture name from ld_grav.txd, in that case bee1.
Reply
#5

same thing, nothing to display
SetDynamicObjectMaterial(obj, 0, 0,"bee1", "ld_grav.txd", 0xFFFFFFFF);
Reply
#6

You cant use textdraw sprites as object material
only in 0.3.8/DL you can use texture from custom models or sprites* as object material
* note that 0.3.8 allows a custom model textures to be loaded as textdraw sprites, you can already use anything in that has model id registered (e.g. createable objects) texture files as object material without having custom 0.3.8 models
The reason behind this because setobjectmaterial requires source model id (which i said creatable) to locate and load the texture files. You put 0 doesnt mean it will load any texture, instead it will load alpha texture.
also you dont need to write .txd in the parameter.
Reply
#7

Quote:
Originally Posted by RoboN1X
View Post
You cant use textdraw sprites as object material
only in 0.3.8/DL you can use texture from custom models or sprites* as object material
* note that 0.3.8 allows a custom model textures to be loaded as textdraw sprites, you can already use anything in that has model id registered (e.g. createable objects) texture files as object material without having custom 0.3.8 models
The reason behind this because setobjectmaterial requires source model id (which i said creatable) to locate and load the texture files. You put 0 doesnt mean it will load any texture, instead it will load alpha texture.
also you dont need to write .txd in the parameter.
It is posible, just look at 2:03 https://youtu.be/9ThrB0oV8oU?t=123
But I don't know what font name or texture material name is
Reply
#8

Quote:
Originally Posted by Mister0
View Post
It is posible, just look at 2:03 https://youtu.be/9ThrB0oV8oU?t=123
But I don't know what font name or texture material name is
theres no font name for that dude... you confuse textdraw font with system font... textdraw uses game font, objectmaterialtext uses system font (arial, comic sans, impact, tahoma, etc)

You can copy the texture add into custom model in 0.3.8 or custom img file and you will be able to use the sprites

All that server use is to trick the client to load the bee texture as textdraw first, it will not work if the textdraw was not rendered (it will be blank for other players unless they do the same). Just like with what i done with skin models for cop tied body snippet i made years ago, which is why copying it as 0.3.8 model texture is the best since everyone can see it.

If you dont believe then go ask that server in the video
Reply
#9

I still didn't find a solution for me, How can I put that bee on objects?
Reply
#10

Quote:
Originally Posted by Mister0
View Post
I still didn't find a solution for me, How can I put that bee on objects?
I think i already gave you a clue..

0.3.DL approach, copy the txd file in custom model folder, add it for download (assign the id), use object material with the texture & the custom model id.

Nothing to do with SetObjectMaterialText
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)