ExecuteCommandHandler

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 12:44, 4 August 2026 by QCherry (talk | contribs) (Automatyczna aktualizacja dokumentacji funkcji)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

executeCommandHandler

Executes a registered command as a specific connected player.

Syntax

bool executeCommandHandler(string commandName, int playerId, ...)

Parameters

Name Type Required Description
commandName string yes Command name without the leading slash.
playerId int yes The connected player treated as the command issuer.
... string/number/bool no Up to 32 command arguments.

Returns

Returns true when the command is accepted for execution; otherwise returns false.

Examples

Execute the heal command from another server script:

executeCommandHandler("heal", playerId, 25)

Notes

  • Available only in server-side resource scripts.
  • Arguments are converted to strings and may not exceed 2,048 bytes in total.