This is an old revision of the document!
Table of Contents
Player Information Functions
System functions that provide you information about the player
sysGetPlayerID
Format | sysGetPlayerID( [Player Name] ) |
---|---|
Description | Returns the ID for a specified player name |
Parameters | Player Name |
Returns | Player ID |
Example:
Event( "Custom", "Special" ) { $playerID = sysGetPlayerID( "Bob" ) if ( $playerID <= 0 ) { *msg %PLAYER% Bob doesn't exist on this world } else { *msg %PLAYER% Bob's player ID is $playerID } }
sysIsPlayerIDOnline
Format | sysIsPlayerIDOnline( [Player ID] ) |
---|---|
Description | Used to determine if the specified player is currently online on the world |
Parameters | Player ID |
Returns | 1 if the player is connected, 0 if not |
Example | $isOnline = sysIsPlayerIDOnline(32) |
sysIsInSpawnZone
: This function name is inconsistent, as it only acts on the context player it needs to be renamed to 'sysPlayerIsInSpawnZone'
Format | sysIsInSpawnZone( [SpawnZone Type/ID] ) |
---|---|
Description | Used to determine if the current player is within the specified spawn zone region |
Parameters | SpawnZone Type/ID |
Returns | 1 if the player is in the region, 0 if not |
Example | $isInDefaultSpawnZone = sysIsInSpawnZone(0) |
sysPlayerIsInTown
Example : $var = sysPlayerIsInTown(“Home Town”))
Returns 1 if the current player is within the boundaries of the specified town, 0 if not
sysNumPlayersOnTeam
Example : $var = sysNumPlayersOnTeam(3)
Returns the number of players currently online and in the specified team
sysPlayerSkillLevel
Example : $var = sysPlayerSkillLevel(“Farmer”)
Returns the current player's skill level for the skill named (0 means the player does not yet have this skill)
sysPlayerIsLearningSkill
Example : $isLearning = sysPlayerIsLearningSkill(“Farmer”)
Returns 1 if the player is currently learning the specified skill, 0 if not.
sysNumPlayersWithPlayerVarVal
TBD