Difference between revisions of "TActivePlayer.OnVoteMap"
m |
m |
||
Line 5: | Line 5: | ||
==Description== | ==Description== | ||
− | Event property called when a player hits | + | Event property called when a player hits F12 during a map vote. F11 (No) votes are ignored. |
<br> | <br> | ||
==Example== | ==Example== | ||
− | Example makes players say "Voted!" when they hit | + | Example makes players say "Voted!" when they hit F12. |
<syntaxhighlight lang="pascal"> | <syntaxhighlight lang="pascal"> | ||
procedure OnVoteMessage(Player: TActivePlayer; Map: string); | procedure OnVoteMessage(Player: TActivePlayer; Map: string); | ||
begin | begin | ||
− | Player.Say('Voted!'); | + | Player.Say('Voted Yes!'); |
end; | end; | ||
Revision as of 23:18, 25 September 2013
property OnVoteMap Access mode: RW Event handler type: TOnVoteMapEvent Event handler declaration: procedure (Player: TActivePlayer; Map: string)
Description
Event property called when a player hits F12 during a map vote. F11 (No) votes are ignored.
Example
Example makes players say "Voted!" when they hit F12.
procedure OnVoteMessage(Player: TActivePlayer; Map: string);
begin
Player.Say('Voted Yes!');
end;
var
i: Byte;
begin
for i:=1 to 32 do
Players[i].OnVoteMap := @OnVoteMessage;
end.