Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: skrX on April 11, 2013, 02:52:19 pm

Title: Password for players
Post by: skrX on April 11, 2013, 02:52:19 pm
Script Name: Password for players
Script Description: useful for clan wars / controlmatch (http://forums.soldat.pl/index.php?topic=42710.0)
Author: skrX
Core Version: 2.7.6

Code: [Select]
const
  COLOR = $FFFFFFFF;

var
  RemovePassword: string;

procedure ActivateServer();
begin
  RemovePassword := ReadINI('soldat.ini','NETWORK','Game_Password','');
end;

function OnPlayerCommand(ID: Byte; Text: string): boolean;
begin
if GetPiece(Text,' ',0) = '/pass' then begin
if GetPiece(Text,' ',2) = '' then begin
Command('/password '+GetPiece(Text,' ',1));
WriteConsole(ID,'Password has been changed to: '+GetPiece(Text,' ',1), COLOR);             
end;
end;
Result := false;
end;

procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);
begin
  if Numplayers = 1 then Command('/password ' +RemovePassword);
end;
Title: Re: Password for players
Post by: Drax on March 01, 2014, 10:27:54 pm
I don't get it, what is this for??
Title: Re: Password for players
Post by: Bonecrusher on March 02, 2014, 04:50:10 am
Quote
Full Description:

Usage command /pass allows you to set a password (available for players)
When the last player leaves the server, he remove the password.

dont make me mute you dude
Title: Re: Password for players
Post by: DorkeyDear on March 02, 2014, 10:49:44 am
Drax, an example use case would be when there is a server used both publicly and for scrims/clan wars. If the server is full of the members of the clans who want to play, they can use the /pass command to create a password on the server so it is temporarily a private server and tell everybody in the server what the password is, until the scrim/cw is done and everybody leaves where it automatically becomes public again.
Title: Re: Password for players
Post by: Drax on March 02, 2014, 03:54:43 pm
Quote
Posted by: Bonecrusher
« on: Today at 04:50:10 am » Insert Quote
Quote
Full Description:

Usage command /pass allows you to set a password (available for players)
When the last player leaves the server, he remove the password.

dont make me mute you dude

why so mean?

Posted by: DorkeyDear
« on: Today at 10:49:44 am » Insert Quote
Drax, an example use case would be when there is a server used both publicly and for scrims/clan wars. If the server is full of the members of the clans who want to play, they can use the /pass command to create a password on the server so it is temporarily a private server and tell everybody in the server what the password is, until the scrim/cw is done and everybody leaves where it automatically becomes public again.

thank you for kind respond...

Title: Re: Password for players
Post by: Akinaro on April 01, 2014, 08:17:23 am
zip added for Database link