Scripting/Server/Functions/player.SetClothing
Wears the item (a file name of LU/clothes without its extension) in that slot. null or "" takes it off (the model's own texture shows again). Works on NPC handles too. The wardrobe stays through respawns and skin changes and is sent to players who join later.
Syntax
player.SetClothing(slot, "item")Arguments
- int slot
- any "item"
Returns
true, or false when the item does not exist
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "setclothing" )
{
local result = player.SetClothing( 0, 0 );
MessagePlayer( "player.SetClothing returned: " + result, player );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: Ped clothing (v0.3.3)
Categories: Server functions | Ped clothing (v0.3.3)