Function: SetAccessToEntityCommand(Player, Spawn, CommandString, Allowed)
Description:
Sets a Player's permission entry on a spawn's primary entity command. Primary
commands are matched by their command text, as supplied to AddPrimaryEntityCommand.
The entry is used when listing that spawn's right-click commands for the Player.
Parameters:
Player(Spawn) - Player whose character ID receives the permission entry.Spawn(Spawn) - Spawn owning the primary command.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. Invalid actors or a non-Player first argument produce 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.