Click or drag to resize

GlobalObjectSetMaterial Method

Sets the material of this IGameObject.

Namespace:  SampSharp.GameMode.World
Assembly:  SampSharp.GameMode (in SampSharp.GameMode.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
public virtual void SetMaterial(
	int materialindex,
	int modelid,
	string txdname,
	string texturename,
	Color materialcolor
)

Parameters

materialindex
Type: SystemInt32
The material index on the object to change.
modelid
Type: SystemInt32
The modelid on which the replacement texture is located. Use 0 for alpha. Use -1 to change the material color without altering the texture.
txdname
Type: SystemString
The name of the txd file which contains the replacement texture (use "none" if not required).
texturename
Type: SystemString
The name of the texture to use as the replacement (use "none" if not required).
materialcolor
Type: SampSharp.GameMode.SAMPColor
The object color to set (use default(Color) to keep the existing material color).

Implements

IGameObjectSetMaterial(Int32, Int32, String, String, Color)
See Also