Difference between revisions of "GetPlayerStat"
(Created page with "===From the Scripting Manual=== ''function GetPlayerStat(ID: byte; Stat: string): variant;'' '''Parameter Info:''' ID (Byte): Player ID to get the stat of. Stat (Strin...") |
m (Fixed table) |
||
| Line 10: | Line 10: | ||
| − | {| class=" | + | {| class="wikitable" width="40%" |
! Stat || Result || Type | ! Stat || Result || Type | ||
|- | |- | ||
Latest revision as of 21:45, 15 April 2020
From the Scripting Manual
function GetPlayerStat(ID: byte; Stat: string): variant; Parameter Info: ID (Byte): Player ID to get the stat of. Stat (String): See Description for more information. Description: This function will return some information about the specified player (ID).
| Stat | Result | Type |
|---|---|---|
| Kills | Player kills | Integer |
| Deaths | Player deaths | Integer |
| Ping | Player ping | Integer |
| Team | Player team | Byte |
| Active | Is in-game? | Boolean |
| IP | Player IP | String |
| Port | Player port | Integer |
| Name | Player name | String |
| Alive | Is player alive? | Boolean |
| Health | Player health | Integer |
| Primary | Primary weapon | Byte |
| Secondary | Secondary weapon | Byte |
| Ammo | Primary ammo | Byte |
| SecAmmo | Secondary ammo | Byte |
| Jets | Jet amount | Integer |
| Grenades | Grenade amount | Byte |
| X | Player X coordinate | Single |
| Y | Player Y coordinate | Single |
| Flagger | Player holding a flag? | Boolean |
| Time | Time in server (minutes) | Integer |
| Ground | Is player on ground | Boolean |
| Human | Is player human? | Boolean |
| VelX | X velocity | Single |
| VelY | Y velocity | Single |
| Vest | Vest amount | Integer |
| Direction | Player facing direction ('<' or '>') | Char |
| Mute | Is player muted? | Byte |
| Flags | Flag captures | Byte |
| TagID | Player's Portal TagID | String |
| Registered | Is player registered? | Boolean |
| WepCount | ? (unique weapons player used on a map ?) | ? (unsigned integer of some sort) |
| HWID | Player's Hardware ID | String (contains alphanumeric chars) |
Examples
begin
WriteLn('Player1''s health is '+inttostr(GetPlayerStat(1,'health')));
WriteLn('Player1''s ping is '+inttostr(GetPlayerStat(1,'PiNg'))); //Case does not matter!
WriteLn('Player1''s IP is '+GetPlayerStat(1,'ip'));
end;