<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=SetPlayerSkinColor</id>
	<title>SetPlayerSkinColor - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=SetPlayerSkinColor"/>
	<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=SetPlayerSkinColor&amp;action=history"/>
	<updated>2026-09-19T06:21:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://g1r-mp.com/wiki/index.php?title=SetPlayerSkinColor&amp;diff=825&amp;oldid=prev</id>
		<title>QCherry: Document skin color and tattoos available from 0.1.3; identity/armor improvements</title>
		<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=SetPlayerSkinColor&amp;diff=825&amp;oldid=prev"/>
		<updated>2026-09-09T02:32:20Z</updated>

		<summary type="html">&lt;p&gt;Document skin color and tattoos available from 0.1.3; identity/armor improvements&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= setPlayerSkinColor =&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#111111; font-weight:bold; letter-spacing:0.04em;&amp;quot;&amp;gt;AVAILABLE FROM UPDATE 0.1.3&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#111111; margin-top:0.25rem;&amp;quot;&amp;gt;This function is available in G1R:MP 0.1.3 and later. The contract below includes the compatibility guarantees introduced in that update.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets an independent server-owned sRGB skin-color override for a player.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPlayerSkinColor(int playerId, int r, int g, int b)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Required !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playerId&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; || yes || The connected player identifier.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; || yes || The red sRGB channel: a finite integer from 0 through 255 inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; || yes || The green sRGB channel: a finite integer from 0 through 255 inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; || yes || The blue sRGB channel: a finite integer from 0 through 255 inclusive.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; when the server accepts the override; otherwise returns &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, including an unavailable player or invalid channel value.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Apply a skin tint after authorizing the request:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; line&amp;gt;&lt;br /&gt;
-- The resource must authorize this change first.&lt;br /&gt;
if not setPlayerSkinColor(playerId, 180, 140, 110) then&lt;br /&gt;
    outputDebugString(&amp;quot;Skin color was rejected.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Available only in server-side resource scripts.&lt;br /&gt;
* Alias: &amp;lt;code&amp;gt;SetPlayerSkinColor&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Cosmetic state only: this does not change identity, equipped armor, inventory, HP or other progression statistics.&lt;br /&gt;
* Fractions, NaN, infinity and values outside 0..255 are rejected, not clamped. RGB is sRGB, converted to linear material RGB by the native client; there is no alpha argument.&lt;br /&gt;
* This preserves the tattoo override. Use &amp;lt;code&amp;gt;resetPlayerSkinColor&amp;lt;/code&amp;gt; to restore native material defaults; setting white is still an enabled override, not a reset.&lt;br /&gt;
* Only supported skin surfaces are tinted. Armor, clothing, eyes and hair are not skin targets. Final appearance depends on the underlying skin texture, supported material, lighting and visible body regions.&lt;br /&gt;
* The server owns the reliable state and replays it on late join and relevance entry; the native client reapplies it after supported visual rebuilds. Acceptance is not confirmation that a client has already rendered the change.&lt;br /&gt;
* Resources must implement their own authorization before allowing a player request to call a setter. There is no client mutation packet or arbitrary texture upload API.&lt;br /&gt;
* See [[Player customization]] and [[Player tattoo catalog]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Functions]]&lt;br /&gt;
[[Category:Server Functions]]&lt;br /&gt;
[[Category:Player Functions]]&lt;br /&gt;
[[Category:Appearance Functions]]&lt;/div&gt;</summary>
		<author><name>QCherry</name></author>
	</entry>
</feed>