SetPlayerStat

From Soldat Community Wiki
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;