<?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=SetPlayerNameplateTextFor</id>
	<title>SetPlayerNameplateTextFor - 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=SetPlayerNameplateTextFor"/>
	<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=SetPlayerNameplateTextFor&amp;action=history"/>
	<updated>2026-09-19T07:35:43Z</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=SetPlayerNameplateTextFor&amp;diff=841&amp;oldid=prev</id>
		<title>QCherry: Document universal per-observer nameplates and test resource available from update 0.1.3</title>
		<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=SetPlayerNameplateTextFor&amp;diff=841&amp;oldid=prev"/>
		<updated>2026-09-09T03:08:28Z</updated>

		<summary type="html">&lt;p&gt;Document universal per-observer nameplates and test resource available from update 0.1.3&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= setPlayerNameplateTextFor =&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;
Overrides a target player&amp;#039;s overhead text for one observer only.&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 setPlayerNameplateTextFor(int observerId, int targetId, string text)&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;observerId&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; || yes || The connected human player who will see the label.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;targetId&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; || yes || The different connected human player whose overhead label is controlled.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || yes || UTF-8 label; an empty string resets this pair&amp;#039;s text override.&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 change or an identical owned no-op; &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; for invalid arguments/endpoints, ownership conflicts, unavailable service or exhausted limits. Acceptance is not a client-render acknowledgement.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Change only observer A&amp;#039;s view of target B:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; line&amp;gt;&lt;br /&gt;
local accepted = setPlayerNameplateTextFor(observerId, targetId, &amp;quot;Known friend&amp;quot;)&lt;br /&gt;
if not accepted then&lt;br /&gt;
    outputDebugString(&amp;quot;Nameplate override 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;
* The ordered pair is observer -&amp;gt; target; the reverse pair is independent. Both IDs must be distinct, connected session IDs, not persistent character IDs or NPC IDs.&lt;br /&gt;
* Each field resolves independently: explicit pair override, then the target&amp;#039;s current global field, then the native default. Getters expose server policy, not whether pixels are currently rendered.&lt;br /&gt;
* No built-in acquaintance database or gamemode permission policy is assumed. See [[Observer nameplates]] for resource ownership, limits, persistence and privacy boundaries.&lt;br /&gt;
* A pair field is exclusively owned by the resource that first sets it. Another resource cannot overwrite or reset that field; other fields remain independent. An absent reset and an identical owned write are successful no-ops.&lt;br /&gt;
* Pair overrides survive leaving the synchronization range, but are cleared for both endpoints on disconnect and for their owning resource on stop. State is replayed reliably when the target becomes relevant again; no database persistence is automatic.&lt;br /&gt;
* Limits default to 250,000 active pairs globally and per resource, with a per-resource mutation token bucket of 4,096/s and an 8,192 burst. New/changed non-reset writes consume tokens; resets and cleanup do not. See the guide for configuration keys.&lt;br /&gt;
* Text is limited to 48 Unicode code points and 96 UTF-8 bytes. Invalid UTF-8, control characters, &amp;lt;code&amp;gt;&amp;amp;lt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;amp;amp;&amp;lt;/code&amp;gt;, byte-order marks, zero-width and bidirectional formatting characters rejected by the shared validator are not accepted.&lt;br /&gt;
* Custom text never changes the canonical player name and does not implicitly hide the ID. Use [[setPlayerNameplateIdVisibleFor]] separately.&lt;br /&gt;
* PascalCase alias: &amp;lt;code&amp;gt;SetPlayerNameplateTextFor&amp;lt;/code&amp;gt;.&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:Nameplate Functions]]&lt;/div&gt;</summary>
		<author><name>QCherry</name></author>
	</entry>
</feed>