Some useful functions for textdraws? -
n0minal - 22.02.2015
Hello, since some time ago i was figuring out some new textdraw functions, specifically, preview models. Since i started designing my systems and started using preview models, i've figured out how good should be if we could re-texture objects (as the same way we can do in-game) into preview model, change their color etc and show the TextDrawPreviewModel to the players.
Why its not useless? Why do it?
Because we could do a lot of "new own objects" using retexturing and use it on our preview models, like my inventory system:
Inventory video demo
Some examples of "customized objects":
-Medical stuff
-Furniture items modfied
-Custom general objects and buidings
So here are my suggestions:
Quote:
native TextDrawSetPreviewMaterial(Text:textid, materialindex, modelid, txdname[], texturename[], materialcolor);
native PlayerTextDrawSetPreviewMaterial(playerid, PlayerText:text, materialindex, modelid, txdname[], texturename[], materialcolor);
[new suggestions]:
native TextDrawSetPreviewMaterialText(Text:textid, text[], materialindex, materialsize, fontface[], fontsize, bold , fontcolor, backcolor, textalignment);
native PlayerTextDrawSetPreviewMaterialText(playerid, PlayerText:text, ...);
native TextDrawSetRotation( Text:textid, Float:rx, Float:ry, Float:rz);
native PlayerTextDrawSetRotation(playerid, PlayerText:text, Float:rx, Float:ry, Float:rz);
|
Some other ideas:
Quote:
-Game objects in textdraws, retexture and retext them before seting to preview.
-native TextDrawSetPreviewObject(Text:textid, objectid)//insert game modified objects into preview models
-native PlayerTextDrawSetPreviewObject(playerid, PlayerText:text, objectid)//insert game modified objects into preview models
|
It should help us to do innovations on our own servers, what do you guys think?
Respuesta: Some useful functions for textdraws? -
adri1 - 22.02.2015
new textdraws fonts would be awesome
Re: Respuesta: Some useful functions for textdraws? -
n0minal - 22.02.2015
Quote:
Originally Posted by adri1
new textdraws fonts would be awesome
|
Indeed, should be an nice improvement too, we need some more updates on textdraws stuff.
Re: Some useful functions for textdraws? -
dominik523 - 23.02.2015
I agree, it would be nice to have some new functions. Maybe some dynamic textdraws like progress bars with some lines, I don't know exactly.

Btw, that system with textdraws that you've made is so awesome. Nice job!
Re: Some useful functions for textdraws? -
OKStyle - 23.02.2015
Code:
native TextDrawSetPreviewMaterial(Text:text, materialindex, modelid, txdname[], texturename[], materialcolor);
native TextDrawSetPreviewMaterialText(Text:text, (objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
native PlayerTextDrawSetPreviewMaterial(playerid, PlayerText:text, materialindex, modelid, txdname[], texturename[], materialcolor);
native PlayerTextDrawSetPreviewMaterialText(playerid, PlayerText:text, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
Support, but I think we have a more simple way for it: change TextDrawSetPreviewModel to TextDrawSetPreviewObject and change ID from
modelid to
objectid. And after all changes of material we can use object for preview.
Re: Some useful functions for textdraws? -
n0minal - 23.02.2015
Quote:
Originally Posted by OKStyle
Code:
native TextDrawSetPreviewMaterial(Text:text, materialindex, modelid, txdname[], texturename[], materialcolor);
native TextDrawSetPreviewMaterialText(Text:text, (objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
native PlayerTextDrawSetPreviewMaterial(playerid, PlayerText:text, materialindex, modelid, txdname[], texturename[], materialcolor);
native PlayerTextDrawSetPreviewMaterialText(playerid, PlayerText:text, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
Support, but I think we have a more simple way for it: change TextDrawSetPreviewModel to TextDrawSetPreviewObject and change ID from modelid to objectid. And after all changes of material we can use object for preview.
|
Thanks for contribution, i appreciate the idea of pre-processed objects for TextDraws, so we could modify some object before using it on a textdraw, should be easier for Kalcor (i think) and awesome. Ill be changing the topic and adding your suggestions when i come to PC
Re: Some useful functions for textdraws? -
Cell_ - 26.02.2015
And while at it... Textdraw rotation functions would be nice too..
Re: Some useful functions for textdraws? -
n0minal - 26.02.2015
Quote:
Originally Posted by Cell_
And while at it... Textdraw rotation functions would be nice too..
|
Rotation should be scriptable if Kalcor do the TextDrawSetPreviewMaterialText, so we could change the object to text and rotate the preview model, pretty easy
Respuesta: Some useful functions for textdraws? -
adri1 - 26.02.2015
Rotate textdraws:
Re: Some useful functions for textdraws? -
Crayder - 27.02.2015
Quote:
Originally Posted by OKStyle
Code:
native TextDrawSetPreviewMaterial(Text:text, materialindex, modelid, txdname[], texturename[], materialcolor);
native TextDrawSetPreviewMaterialText(Text:text, (objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
native PlayerTextDrawSetPreviewMaterial(playerid, PlayerText:text, materialindex, modelid, txdname[], texturename[], materialcolor);
native PlayerTextDrawSetPreviewMaterialText(playerid, PlayerText:text, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
Support, but I think we have a more simple way for it: change TextDrawSetPreviewModel to TextDrawSetPreviewObject and change ID from modelid to objectid. And after all changes of material we can use object for preview.
|
*Cough* VEHICLE MODELS *Cough*
And this, PlayerTextDrawSetPreviewMaterialText, is extremely long. The compiler does have a limit on how long a function name can be ya know.