Skip to content

ObjectMaterial #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Disinterpreter opened this issue Jun 14, 2020 · 0 comments
Open

ObjectMaterial #23

Disinterpreter opened this issue Jun 14, 2020 · 0 comments
Labels
compatibility Compatibility with latest version of SAMP depends on blue The feature might depend on MTA:SA source code function SAMP functions

Comments

@Disinterpreter
Copy link
Member

Disinterpreter commented Jun 14, 2020

Function name
SetObjectMaterial(objectid, materialindex, modelid, txdname[], texturename[], materialcolor)

SetObjectMaterialText(objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0)

SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, txdname[], texturename[], materialcolor)

SetPlayerObjectMaterialText(playerid, objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0)

  • playerid The ID of the player the object is associated to.
  • objectid The ID of the object to replace the texture of with text.
  • text The text to show on the object (MAX 2048 characters).
  • materialindex The object's material index to replace with text (default: 0) (0 to 15).
  • materialsize The size of the material (default: 256x128).
  • fontface The font to use (default: Arial).
  • fontsize The size of the text (default: 24) (MAX 255).
  • bold Bold text. Set to 1 for bold, 0 for not (default: 1).
  • fontcolor The color of the text, in ARGB format (default: White).
  • backcolor The background color, in ARGB format (default: None (transparent)).
  • textalignment The alignment of the text (default: left).

Describe the function
SetObjectMaterial - Replace the texture of an object with the texture from another model in the game.

SetObjectMaterialText - Replace the texture of an object with text.

SetPlayerObjectMaterial - Replace the texture of a player-object with the texture from another model in the game.

SetPlayerObjectMaterialText - Replace the texture of a player object with text.

Equivalent in MTA
I don't know how we can do it in MTA. Maybe We can change the texture via HLSL?

Additional information
SetObjectMaterial
SetObjectMaterialText
SetPlayerObjectMaterial
SetPlayerObjectMaterialText

https://forum.gamerxserver.com/forum/samp-server-188-165-219-63-8800/questions-and-answers/tutorials/2907-object-material-tutorial-spoma <- how it works.

@Disinterpreter Disinterpreter added compatibility Compatibility with latest version of SAMP function SAMP functions depends on blue The feature might depend on MTA:SA source code labels Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with latest version of SAMP depends on blue The feature might depend on MTA:SA source code function SAMP functions
Projects
None yet
Development

No branches or pull requests

1 participant