SetPlayerSkill

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

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.