முதன்மை உள்ளடக்கத்துக்குச் செல்லவும்

GetPlayerObjectMaterial

எச்சரிக்கை

செயல்பாடு என்பது omp v1.1.0.2612 பதிப்பில் சேர்க்கப்பட்டது. இது முந்தைய பதிப்புகளில் இயங்காது!

Description​

Get the material data from an index of the player-object.

NameDescription
playeridThe ID of the player.
objectidThe ID of the player-object.
materialIndexThe material index on the object. (0 to 15)
&modelidA variable in which to store the model ID, passed by reference.
textureLibrary[]An array into which to store the texture library name, passed by reference.
textureLibrarySizeThe size of the array for the texture library name.
textureName[]An array into which to store the texture name, passed by reference.
textureNameSizeThe size of the array for the texture name.
&materialColourA variable in which to store the materialColour, passed by reference.

Returns​

true - The function was executed successfully.

false - The function failed to execute. The object specified does not exist or an invalid material index is specified.

Examples​

new playerobjectid = CreatePlayerObject(playerid, 19371, 978.71143, -925.25708, 42.63720, 0.00000, 0.00000, 2.00000);
SetPlayerObjectMaterial(playerid, playerobjectid, 0, 19341, "egg_texts", "easter_egg01", 0xFFFFFFFF);

new
modelid,
textureLibrary[16],
textureName[16],
materialColour;

GetPlayerObjectMaterial(playerid, playerobjectid, 0, modelid, textureLibrary, sizeof(textureLibrary), textureName, sizeof(textureName), materialColour);
// modelid = 19341
// textureLibrary = "egg_texts"
// textureName = "easter_egg01"
// materialColour = 0xFFFFFFFF