GetPlayerClothes

From Multi Theft Auto: Wiki
Revision as of 12:56, 25 July 2006 by MrJax (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function is used to get the current clothes texture and model of a certain type on a player.

Syntax

string string getPlayerClothes ( player thePlayer, int clothesType )

Required Arguments

  • thePlayer: The player whose clothes you want to retrieve.
  • clothesType: The type/slot of clothing you want to get.

Returns

This function returns 2 strings, the clothes texture and model.

Example

This example prints the model and texture of the current clothing on a player's torso.

addCommandHandler ( "clothes?", "getClothes" )
function getClothes ( source, key, clothesType )
  texture, model = getPlayerClothes ( source, clothesType )
  if ( texture and model ) then
    outputChatBox ( getClientName ( source ) .. " is wearing " .. texture .. model .. " on his " .. getClothesTypeName ( clothesType ) )
  end
end

See Also