scripting:reference:system_functions:playerbuildingownershipfunctions
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| scripting:reference:system_functions:playerbuildingownershipfunctions [2020/02/07 09:49] – mit | scripting:reference:system_functions:playerbuildingownershipfunctions [2025/05/28 18:58] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| Functions allowing you to query and manipulate the ownership of buildings | Functions allowing you to query and manipulate the ownership of buildings | ||
| + | |||
| + | ==== sysPlayerGetNumBuildingsOwned ==== | ||
| + | ^ Format | sysPlayerGetNumBuildingsOwned ( PlayerID )| | ||
| + | ^ Description | Returns the number of buildings the specified player currently owns | | ||
| + | ^ Returns | Number owned | | ||
| + | // | ||
| + | < | ||
| + | { | ||
| + | $numOwned = sysPlayerGetNumBuildingsOfType( $gPlayerID ) | ||
| + | *msg %PLAYER% You currently own $numOwned buildings | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| ==== sysPlayerGetNumBuildingsOfType ==== | ==== sysPlayerGetNumBuildingsOfType ==== | ||
| Line 15: | Line 28: | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ==== sysPlayerGetNumBuildingsOfBuildSkill ==== | ||
| + | ^ Format | sysPlayerGetNumBuildingsOfBuildSkill ( PlayerID, Skill Name/Num )| | ||
| + | ^ Description | Returns the number of buildings the specified player currently owns that require the specified build skill | | ||
| + | ^ Returns | Number owned | | ||
| + | // | ||
| + | < | ||
| + | { | ||
| + | $numOwned = sysPlayerGetNumBuildingsOfBuildSkill ( $gPlayerID, " | ||
| + | *msg %PLAYER% You currently own $numOwned buildings that require the Baker skill to construct | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | |||
| ==== sysPlayerGetNearestOwnedBuildingOfType ==== | ==== sysPlayerGetNearestOwnedBuildingOfType ==== | ||
| ^ Format | sysPlayerGetNearestOwnedBuildingOfType ( PlayerID, BuildingType, | ^ Format | sysPlayerGetNearestOwnedBuildingOfType ( PlayerID, BuildingType, | ||
scripting/reference/system_functions/playerbuildingownershipfunctions.1581068974.txt.gz · Last modified: (external edit)
