Function: SetAccessToEntityCommandByCharID(Spawn, CharID, CommandString, Allowed)
Description: Sets a character's permission entry on a spawn's primary entity command, using its character ID rather than a live Player actor. The entry is used when listing the spawn's right-click commands for that character.
Parameters:
Spawn(Spawn) - Spawn owning the primary command.CharID(uint32) - Nonzero character ID receiving the permission entry.CommandString(string) - Exact primary command text to match.Allowed(uint8) -1allows the command; other values store a denial.
Returns: true when the primary command was found and updated; false when
it was absent. An invalid spawn or zero character ID produces no result.
Command lifetime: Lookup and permission publication are one mutation operation. A removed command cannot receive a detached descriptor write. Existing packet readers retain their immutable command version; later readers see the updated permission entry. See Lua actor lifetime.