0 Members and 5 Guests are viewing this topic.
function OnVoteMap(Voter: byte; MapName: string):boolean;beginwriteconsole(0,'onvotemap',color);result:=true;writeconsole(0,'shouldnt add',color);end;
var i: integer; function DisableDefaultVotemap(Player: TActivePlayer; Map: string): Boolean;begin Result:=true;end;begin for i:=1 to 32 do begin Players[i].OnVoteMapStart := @DisableDefaultVotemap; end;end.
* Vote_Percent=x is it for both voting: for kicking and changing map?
function OnVoteMapStart(Voter: byte; MapName: string): boolean;begin WriteLn('dzialaj kurwo'); Result:=true;end;
Code: [Select]function OnVoteMapStart(Voter: byte; MapName: string): boolean;begin WriteLn('dzialaj kurwo'); Result:=true;end;Why OnVoteMapStart event isn't triggered anymore after he had returned true value? I doubt this is expexcted behaviour. I am asking first here, I don't want to do mess on bugtracker unneccesarily.
var trueorfalse: boolean;procedure OnPlayerSpeak(ID: Byte; Text: string);begin if Text='!result' then begin trueorfalse:=not trueorfalse; WriteConsole(0 , 'trueorfalse:='+iif(trueorfalse=true,'TRUE','FALSE')+';', $FF00FF); end;end;procedure ActivateServer();begin trueorfalse:=true;end;function OnVoteMapStart(Voter: byte; MapName: string): boolean;begin WriteLn('dzialaj kurwo'); Result:=trueorfalse;end;
@elMorvano, lack of conclusions?I found second bug, but to be honest it's an extension of previous one. My first question should be:Why OnVoteMap event is triggered instead of OnVoteMapStart after OnVoteMapStart had returned true value at first triggering?Currently this solve all my problems (using OnVoteMap instead of OnVoteMapStart), but this shouldn't work as now. EDIT:Bugtracker ticket: http://bugs.soldat.pl/view.php?id=550
function OnVoteMapStart(Voter: byte; MapName: string): boolean; // to jest zeby nie dalo sie wlaczyc votowania na mapy ESC>GLosuj na mapebeginresult:=true;end;
function OnVoteMap probably is just a procedure which works always when you Click F12.
Code: [Select]function OnVoteMapStart(Voter: byte; MapName: string): boolean; // to jest zeby nie dalo sie wlaczyc votowania na mapy ESC>GLosuj na mapebeginresult:=true;end;
Quote from: elMorvano on April 25, 2014, 06:31:23 amfunction OnVoteMap probably is just a procedure which works always when you Click F12. Not always, only when vote is running, and also when player is active (Player.Team<>5)
disable votekick also. Or maybe I spent too much time on this all and this is caused by something else. Eh...
I mean always when you press F12
There i can't even check someone is trying VoteMap or VoteKick