Author Topic: Advanced Admin-List.  (Read 2130 times)

0 Members and 1 Guest are viewing this topic.

Offline Spotix

  • Major
  • *
  • Posts: 63
  • Shut up! I just give my sentimental side!
    • http://steamcommunity.com/id/Spotix
Advanced Admin-List.
« on: February 23, 2012, 10:29:13 am »
Advanced Admin-List

Author(s): Spotix
Script version: 1.5
Server version: 2.7.2
Compile Test: Passed



Features:

- Easy in-game edit
- Easy to set up your own commands and colours
- Shows ingame admins AND connected tcp admins.
- Remembers admin Ips.
- Secure-Mode, choose a password so that simple remote admins cant edit your script.
- Ability to disable the ingame or tcp-editing mode completely.

Commands

/addname <Name> = adds a name to the list.
/editname <Old name> <New name> = changes a name.
/movename <Name> <Position> = move a name to <position>.
/delname <Name> = deletes a name.
/delallnames = delete all names.
/cleariplist = clears up the iplist.
/hide = hide your name in the online-admins-list.
/unhide = shows up your name again.
/setonad <Number> = Set the number of connected tcp-admins. You may have to do this after a recompile!

Player Commands  (changeable)

!whois, !onlineadmins = shows the online admins.
!adminlist = shows the offline-list.
!alladmins = shows the offline and the online-list.

Code:
Code: [Select]
   
  var
   Check, Check2, OnAdmins : boolean;
   PlayerAdmin, ShowAdmin, LoggedIn, HideAdmin : array[1..32] of boolean;
   GI, TcpAdmins : integer;
   AdminName, Client : array of string;

function Implode(const AryStr: array of string; const Delimiter: string): string;
var
   i: word;
begin
   Result := '';
   if (GetArrayLength(AryStr) > 0) then begin
      for i := 0 to GetArrayLength(AryStr) - 1 do
         Result := Result + AryStr[i] + Delimiter;
      Delete(Result, Length(Result) - Length(Delimiter) + 1, Length(Delimiter));
   end;
end;
   
function Explode(Source: string; const Delimiter: string): array of string;
var
  Position, DelLength, ResLength: integer;
begin
  DelLength := Length(Delimiter);
  Source := Source + Delimiter;
  repeat
    Position := Pos(Delimiter, Source);
    SetArrayLength(Result, ResLength + 1);
    Result[ResLength] := Copy(Source, 1, Position - 1);
    ResLength := ResLength + 1;
    Delete(Source, 1, Position + DelLength - 1);
  until (Position = 0);
  SetArrayLength(Result, ResLength - 1);
end;
« Last Edit: February 25, 2012, 04:24:57 am by Spotix »

Offline Beowulf Agate

  • Major
  • *
  • Posts: 73
Re: Advanced Admin-List.
« Reply #1 on: February 23, 2012, 10:45:54 am »
I understand that it's only for 2.6.5 server and not for 2.7.2? What's the point of creating scripts for old versions?

Offline Spotix

  • Major
  • *
  • Posts: 63
  • Shut up! I just give my sentimental side!
    • http://steamcommunity.com/id/Spotix
Re: Advanced Admin-List.
« Reply #2 on: February 23, 2012, 10:57:31 am »
I understand that it's only for 2.6.5 server and not for 2.7.2? What's the point of creating scripts for old versions?

Sry.
I've just got to make a mistake is not so respected.
But no reason to worry, there have been Setting new.

Regards,

Spotix