Difference between revisions of "TActivePlayer.Grenades"

From Soldat Community Wiki
Jump to: navigation, search
(Example)
m (Example)
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
 
begin
 
begin
 
  for s := 1 to 32 do if Players[s].Active then if Players[s].Alive then
 
  for s := 1 to 32 do if Players[s].Active then if Players[s].Alive then
   if Players[s].Grenades < 4 then GiveBonus(s,4);
+
   if Players[s].Grenades < 4 then Players[s].GiveBonus(4);
 
</syntaxhighlight>
 
</syntaxhighlight>
 
[[Category:TActivePlayer]]
 
[[Category:TActivePlayer]]

Latest revision as of 15:21, 1 July 2013

property TActivePlayer.Grenades: Byte
 Access mode: R

Description

Current amount of a player's grenades.

Example

//snippet from M79 Coop Climb's code
var
 s: byte;
begin
 for s := 1 to 32 do if Players[s].Active then if Players[s].Alive then
   if Players[s].Grenades < 4 then Players[s].GiveBonus(4);