This function was added in SA-MP 0.3e and will not work in earlier versions!
Replace the texture of a player-object with the texture from another model in the game.
|playerid||The ID of the player the object is associated to.|
|objectid||The ID of the object to replace the texture of|
|materialindex||The material index on the object to change (0 to 15)|
|modelid||The modelid on which replacement texture is located. Use 0 for alpha. Use -1 to change the material color without altering the existing texture.|
|txdname||The name of the txd file which contains the replacement texture (use "none" if not required)|
|texturename||The name of the texture to use as the replacement (use "none" if not required)|
|materialcolor||The object color to set, as an integer or hex in ARGB format. Using 0 keeps the existing material color.|
This function does not return any specific values.
Vertex lightning of the object will disappear if material color is changed.
You MUST use ARGB color format, not RGBA like used in client messages etc.
- SetObjectMaterial: Replace the texture of an object with the texture from another model in the game.
Filterscripts with texturing/text support
- Ultimate Creator by Nexius
- Texture Studio by [uL]Pottus
- Fusez's Map Editor by RedFusion
- Map Editor I by adri1