Difference between revisions of "DCS func getPlayerName"
From DCS World Wiki - Hoggitworld.com
m (1 revision imported) |
(No difference)
|
m (1 revision imported) |
(No difference)
|
| Envrioment: | Mission Scripting | ||
| Function: | getPlayerName | Added with: 1.2.0 | |
| Member Of: | Unit | ||
| Syntax: | string Unit.getPlayerName(Class Self ) | ||
| Description: | Returns a string value of the name of the player if the unit is currently controlled by a player. If a unit is controlled by AI the function returns nil.
| ||
| Return Value: | string | ||
| Return Example: | 'bob' | ||
| Examples: | |||
| Related Functions: | Unit Functions: isActive, getPlayerName, getID, getNumber, getCategoryEx, getObjectID, getController, getGroup, getCallsign, getLife, getLife0, getFuel, getAmmo, getSensors, hasSensors, getRadar, getDrawArgumentValue, getNearestCargos, enableEmission, getDescentCapacity
Object Functions: isExist, destroy, getCategory, getTypeName, getDesc, hasAttribute, getName, getPoint, getPosition, getVelocity, inAir | ||
| Notes: | As of DCS 1.5 this function works on both ground units and aircraft. | ||