Difference between revisions of "TActivePlayer.Grenades"

From Soldat Community Wiki
Jump to: navigation, search
(Example)
Line 7: Line 7:
 
<syntaxhighlight lang="pascal">
 
<syntaxhighlight lang="pascal">
 
//snippet from M79 Coop Climb's code
 
//snippet from M79 Coop Climb's code
for s := 1 to 32 do if Players[s].Active then if Players[s].Alive then
+
var
  if Players[s].Grenades < 4 then GiveBonus(s,4);
+
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 GiveBonus(s,4);
 
</syntaxhighlight>
 
</syntaxhighlight>
 
[[Category:TActivePlayer]]
 
[[Category:TActivePlayer]]

Revision as of 23:40, 30 June 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 GiveBonus(s,4);