SetPlayerSpellGranted

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 12:45, 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

setPlayerSpellGranted

Sets or clears an authoritative spell grant for a player.

Syntax

bool setPlayerSpellGranted(int playerId, int|string spell [, bool enabled = true])

Parameters

Name Type Required Description
playerId int yes The connected player to update.
spell string yes A spell id or stable key.
enabled bool no True to grant the spell, false to revoke it.

Returns

Returns true when the grant state is accepted; otherwise returns false.

Examples

Grant Fire Arrow to a player:

setPlayerSpellGranted(playerId, SPELL.FIRE_ARROW, true)

Notes

  • Available only in server-side resource scripts.