Author Topic: Password for players  (Read 2338 times)

0 Members and 1 Guest are viewing this topic.

Offline skrX

  • Soldier
  • **
  • Posts: 112
  • x ye.
Password for players
« on: April 11, 2013, 02:52:19 pm »
Script Name: Password for players
Script Description: useful for clan wars / controlmatch
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;
« Last Edit: March 29, 2014, 02:30:47 am by skrX »

Offline Drax

  • Soldier
  • **
  • Posts: 241
Re: Password for players
« Reply #1 on: March 01, 2014, 10:27:54 pm »
I don't get it, what is this for??

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: Password for players
« Reply #2 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

Im chill like that

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Password for players
« Reply #3 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.

Offline Drax

  • Soldier
  • **
  • Posts: 241
Re: Password for players
« Reply #4 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...


Offline Akinaro

  • Flagrunner
  • ****
  • Posts: 749
Re: Password for players
« Reply #5 on: April 01, 2014, 08:17:23 am »
zip added for Database link