SetPlayerSpellGranted: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 31: | Line 31: | ||
* Available only in server-side resource scripts. | * Available only in server-side resource scripts. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:Magic Functions]] | [[Category:Magic Functions]] | ||
[[Category:Progression Functions]] | [[Category:Progression Functions]] | ||
Latest revision as of 09:55, 15 August 2026
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.