Advanced Admin-ListAuthor(s): SpotixScript version: 1.5
Server version: 2.7.2
Compile Test: PassedFeatures:- 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:
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;