SetPlayerStat

From Soldat Community Wiki
Revision as of 12:44, 15 August 2012 by Freeman (talk | contribs) (Created page with "===From the Scripting Manual=== ''procedure SetPlayerStat(ID: byte; Stat: string; Value: variant);'' '''Parameter Info:''' ID (Byte): Player ID to set the stat of. Sta...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

From the Scripting Manual

procedure SetPlayerStat(ID: byte; Stat: string; Value: variant);

Parameter Info:
 ID (Byte): Player ID to set the stat of.
 Stat (String): See Description for more information.
 Value (Variant): Value to set the above Stat to

Description:
 This function will set some information about the specified player (ID).


Stat Value Type
Kills Player kills Integer
Deaths Player deaths Integer
Health Player health Integer
Flags Flag captures Byte

Example:

begin
    SetPlayerStat( 1 , 'health' , GetPlayerStat(1,'health') + 30 );
    // This will increase player 1's current health by 30!
end;