Difference between revisions of "TActivePlayer.OnVoteKick"

From Soldat Community Wiki
Jump to: navigation, search
(new page)
 
m
Line 11: Line 11:
 
Example makes players say "Voted!" when they hit F11/F12.
 
Example makes players say "Voted!" when they hit F11/F12.
 
<syntaxhighlight lang="pascal">
 
<syntaxhighlight lang="pascal">
function OnVoteMessage(Player: TActivePlayer; Map: string): Boolean;
+
procedure OnVoteMessage(Player, Victim: TActivePlayer);
 
begin
 
begin
 
   Player.Say('Voted!');
 
   Player.Say('Voted!');

Revision as of 08:29, 30 July 2013

property OnVoteKick
 Access mode: RW
 Event handler type: TOnVoteKickEvent
 Event handler declaration: procedure (Player, Victim: TActivePlayer)

Description

Event property called when a player hits F11 or F12 during a kick vote.

Example

Example makes players say "Voted!" when they hit F11/F12.

procedure OnVoteMessage(Player, Victim: TActivePlayer);
begin
  Player.Say('Voted!');
end;

var 
  i: Byte;
begin
  for i:=1 to 32 do
    Players[i].OnVoteKick := @OnVoteMessage;
end.