[Tutorial] SetObjectMaterial Help
#21

nice tutorial
@Psymetrix No lol
there are many of objects in game how come you know which object id has which name with TXD workshop
so better is JernejL's Map Editor in these cases
Reply
#22

good tutorial!
well explained and thought me something!

thx.
Reply
#23

Damn.. SetObjectMaterial doesn't work with CreateDynamicObject.
Reply
#24

pawn Code:
native GetDynamicObjectMaterial(objectid, materialindex, &modelid, txdname[], texturename[], &materialcolor, maxtxdname = sizeof txdname, maxtexturename = sizeof texturename);
native SetDynamicObjectMaterial(objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor = 0);
native GetDynamicObjectMaterialText(objectid, materialindex, text[], &materialsize, fontface[], &fontsize, &bold, &fontcolor, &backcolor, &textalignment, maxtext = sizeof text, maxfontface = sizeof fontface);
native SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
Reply
#25

Ahh, thanks!
Reply
#26

I'm kinda confused, someone told me this could be used to say put letters on a wall. How would that work out?
Reply
#27

Quote:
Originally Posted by Don Lidner
View Post
I'm kinda confused, someone told me this could be used to say put letters on a wall. How would that work out?
You cannot use this to change text on a wall, yet this can:

SetObjectMaterialText

On-Topic:

Great tutorial, I myself actually didn't know how to use this, considering I never tried it.
Reply
#28

Sorry to bump this, however when I manage to bring up the box that appears to look like this:



The box which states 'egg_texts' (Texture) is blank upon every object I click, however the other boxes return with information. My game has NOT BEEN modified in any way. What could be the cause of this?
Reply
#29

Quote:
Originally Posted by Karkand
View Post
Sorry to bump this, however when I manage to bring up the box that appears to look like this:



The box which states 'egg_texts' (Texture) is blank upon every object I click, however the other boxes return with information. My game has NOT BEEN modified in any way. What could be the cause of this?
I get this problem to, the Texture is blank, how to fix it?
Reply
#30

Quote:

new wang = CreateObject(11317, -1947.24695, 280.81851, 45.27340, 0.00000, 0.00000, 0.00000, 3000);
SetObjectMaterial(wang, 0, 9078, "excalibur", "ws_sandstone2", 0);

What's wrong? I playing with this code one day.. Please help...
Reply
#31

Up. Sorry for off-topic, but please help anyone!!
Reply
#32

Hello, ah...

a question?

if I need some non-breakable object, can I just create one and replace its texture??

Thank you.
Reply
#33

Quote:
Originally Posted by Luis-
Посмотреть сообщение
What is wrong with this?
pawn Код:
CMD:test(playerid, params[])
{
    new myobject;
    myobject = CreateObject(8397, 3629, 2112.9375, -2384.6172, 18.8828, 0.25);
    SetObjectMaterial(myobject, 0, 19341, "egg_texts", "easter_egg01", 0xFFFFFFFF);
    return 1;
}
Nice tutorial by the way
you lose the intention of the script, you need to line return 1; with the rest, like this:
Quote:

CMD:test(playerid, params[])
{
new myobject;
myobject = CreateObject(8397, 3629, 2112.9375, -2384.6172, 18.8828, 0.25);
SetObjectMaterial(myobject, 0, 19341, "egg_texts", "easter_egg01", 0xFFFFFFFF);
return 1;
}

now should work...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)