WashPlayer
Washes a player with the game’s own wash - every dirt and blood value to 0.
The wash of a bathhouse or a water trough, in the player’s game: "all" (the default) the skin and every piece worn,
"skin" the skin alone, "clothes" every piece worn. One item (a class GUID or a name) is washed through
SetPlayerDirt and SetPlayerBlood. The mode decides what a wash costs and where it is offered.
Syntax
Section titled “Syntax”WashPlayer(pid [, part])| Parameter | Type | |
|---|---|---|
pid |
number | the player |
part |
string | "all", "skin", "clothes", or an item’s class GUID or name (optional) |
Returns
Section titled “Returns”boolean | false, string - as SetPlayerDirt’s
Example
Section titled “Example”-- the bathhouse: 10 groschen for a bath and a wash of the clothesfunction OnPlayerCommandText(pid, text) if text ~= "/bath" then return false end if GetPlayerMoney(pid) < 10 then SendClientMessage(pid, COLOR_RED, "A bath is 10 groschen.") elseif WashPlayer(pid) then GivePlayerMoney(pid, -10) SendClientMessage(pid, COLOR_GOLD, "You feel like a new man.") end return trueendSee also
Section titled “See also”SetPlayerDirt · SetPlayerBlood · GetPlayerDirt · the Dirt and blood group of the index
