SetPlayerSkill: 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:Progression Functions]] | [[Category:Progression Functions]] | ||
[[Category:Player Functions]] | [[Category:Player Functions]] | ||
Latest revision as of 09:55, 15 August 2026
setPlayerSkill
Enables or disables an authoritative boolean player skill.
Syntax
bool setPlayerSkill(int playerId, string skillName, bool enabled)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player to update. |
skillName |
string |
yes | A key returned by getPlayerSkillNames.
|
enabled |
bool |
yes | Whether the skill should be enabled. |
Returns
Returns true when the skill state is accepted; otherwise returns false.
Examples
Teach a player the acrobatics skill:
setPlayerSkill(playerId, "acrobatics", true)
Notes
- Available only in server-side resource scripts.