0 Members and 1 Guest are viewing this topic.
01[19:23] <Bonecrusher`> is there any possibility to disable /votemap command?01[19:23] <Bonecrusher`> or map voting when it already began01[19:23] <Bonecrusher`> ?[19:24] <minus> setting percentage to 100?[19:24] <minus> 101% [19:26] <Boblekonvolutt> shouldnt that be scriptable?01[19:27] <Bonecrusher`> yea im thinking about a script[19:27] <Boblekonvolutt> just returning true in onplayercommand if text matches /votemap*?01[19:27] <Bonecrusher`> coz i have this climb server[19:27] <minus> mhm[19:27] <Boblekonvolutt> not sure if going through the menu and voting that way works in the same way[19:27] <Boblekonvolutt> but it probably should01[19:27] <Bonecrusher`> and sometimes i dont want players to vote other map01[19:28] <Bonecrusher`> so i need a script which can disable/enable it on cmd01[19:28] <Bonecrusher`> just wondering if its possible02[19:30] * Quits: minus (~minus@p5DC704E8.dip0.t-ipconnect.de) (Signed off)[19:31] <Boblekonvolutt> of course
function OnCommand(ID: Byte; Text: string): boolean;begin if (Text = '/mapvote 0') then begin Command('/vote% 101'); WriteLn('Not allow map voting.'); end; if (Text = '/mapvote 1') then begin Command('/vote% 60'); // or your percentage of vote favorite WriteLn('Allow map voting.'); end;end;
Just disable map voting in the soldat.ini and if you ever want voting use a script like !nextmap ?
Here it is, its the !nextmap script by curt, but I modified it so you can do /startvote and /stopvote.
You could try something like this, I don't know if it works ... just an ideatest and error, friend xDCode: [Select]function OnCommand(ID: Byte; Text: string): boolean;begin if (Text = '/mapvote 0') then begin Command('/vote% 101'); WriteLn('Not allow map voting.'); end; if (Text = '/mapvote 1') then begin Command('/vote% 60'); // or your percentage of vote favorite WriteLn('Allow map voting.'); end;end;
const Color = $FFD700;var Enable : boolean; function OnPlayerCommand(ID: Byte; Text: string): boolean;beginif (GetPiece(Text,' ',0) = '/votemap') and not (Enable) then beginWriteConsole(ID, 'Vote is disabled atm.',Color);Result := true;end;end;function OnCommand(ID: Byte; Text: string): boolean;beginif Text = '/disable' then beginWriteConsole(ID, 'Vote is now disabled!',Color);Enable := false;end elseif Text = '/enable' then beginEnable := true;WriteConsole(ID, 'Vote is now enabled!',Color);end;end;
but it just disables the /votemap command, you still are able to vote a mpa over the menu so...