Difference between revisions of "TActivePlayer.Active"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with " '''''property TActivePlayer.Alive: Boolean''''' Acess mode: R ==Description== If the player (or bot) is playing, returns true. ==Example== <syntaxhighlight lang="pascal"> ...")
 
m
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
  '''''property TActivePlayer.Alive: Boolean'''''
+
  '''''property TActivePlayer.Active: Boolean'''''
   Acess mode: R
+
   Access mode: R
 
==Description==
 
==Description==
 
If the player (or bot) is playing, returns true.
 
If the player (or bot) is playing, returns true.
Line 8: Line 8:
 
var i: byte;
 
var i: byte;
 
begin
 
begin
  for i := 1 to 32 do if Players[i].Active then Players[i].WriteConsole('I can see you.',$FFFFFF);
+
  for i := 1 to 32 do if Players[i].Active then
 +
  Players[i].WriteConsole('I can see you.',$FFFFFF); //sends a message to all active players
 
end;
 
end;
 
</syntaxhighlight>
 
</syntaxhighlight>
 
[[Category:TActivePlayer]]
 
[[Category:TActivePlayer]]

Latest revision as of 15:20, 1 July 2013

property TActivePlayer.Active: Boolean
 Access mode: R

Description

If the player (or bot) is playing, returns true.

Example

var i: byte;
begin
 for i := 1 to 32 do if Players[i].Active then
  Players[i].WriteConsole('I can see you.',$FFFFFF); //sends a message to all active players
end;