1
0
EQ2Emu/docs/lua_functions/SetAccessToEntityCommandByCharID.md
2025-05-19 13:13:42 -04:00

20 lines
817 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Function: SetAccessToEntityCommandByCharID(Spawn, CharID, CommandString, Allowed)
Description: Similar to SetAccessToEntityCommand, but targets a specific player (by character ID) and spawn. It toggles a commands availability for that one player on the given spawn.
Parameters:
Spawn: Spawn The entity offering the command.
CharID: Int32 The character ID of the player whose access to adjust.
CommandString: String The command name.
Allowed: UInt8 `1` to allow that player to use the command; `0` to deny them.
Returns: If successful at setting permission to the entity command, function return's true.
Example:
-- Example usage (allow only a specific player to use a secret doors “Open” command)
SetAccessToEntityCommandByCharID(SecretDoor, PlayerCharID, "Open", 1)