IsPlayerSpellGranted

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

isPlayerSpellGranted

Checks whether a player has an authoritative spell grant.

Syntax

bool isPlayerSpellGranted(int playerId, int|string spell)

Parameters

Name Type Required Description
playerId int yes The connected player to inspect.
spell string yes A spell id or stable key.

Returns

Returns true if the spell is granted; otherwise returns false.

Examples

Check for Fire Arrow before granting it:

if not isPlayerSpellGranted(playerId, SPELL.FIRE_ARROW) then
    grantPlayerSpell(playerId, SPELL.FIRE_ARROW)
end

Notes

  • Available only in server-side resource scripts.