0 Members and 1 Guest are viewing this topic.
const//TeamsALPHA = 1;BRAVO = 2;CHARLIE = 3;DELTA = 4;SPECTATOR = 5;//Game ModesDEATHMATCH = 0;POINTMATCH = 1;TEAMMATCH = 2;CTF = 3;RAMBO = 4;INF = 5;HTF = 6;//Weapons DEAGLES = 1; HKMP5 = 2; AK74 = 3; STEYR = 4; SPAS = 5; RUGER = 6; M79 = 7; BARRET = 8; MINIMI = 9; MINIGUN = 10; FLAMER = 11; BOW = 12; FLAMEBOW = 13; SOCOM = 0; KNIFE = 14; CHAINSAW = 15; LAW = 16; //Color Color = $FF99DD40; Red = $ff0033; ClMessage = $FFFF0000; MajorKick = $FFFFFFFF; KDColor = $FFD700; var TrackOrNot: boolean; Track: array[1..32] of boolean; TrackPing: array[1..32] of integer; TrackCount: array [1..32] of byte; TrackPingMax: array[1..32] of integer; i: byte; FoundID: boolean; NeededID: byte; // Ping Track (New by Dominik) procedure FindID(Src: string); begin FoundID := FALSE; if (MaskCheck(Src,'?') = TRUE) OR (MaskCheck(Src,'??') = TRUE) then begin NeededID := strtoint(Src); FoundID := TRUE; end else begin for i:=1 to MaxPlayers do begin if (ContainsString(lowercase(GetPlayerStat(i,'name')),lowercase(Src)) = TRUE) then begin FoundID := TRUE; NeededID := i; end; end; end; end; //Ratio 1.5.0 by Dominik procedure Ratio(ID: Integer);varKD: Double;Kills: integer;beginkills:=GetPlayerStat(ID,'kills');if(GetPlayerStat(ID,'team')=5) thenWriteConsole(0,GetPlayerStat(ID,'name')+', you are spectating',KDColor) else if(GetPlayerStat(ID,'deaths')=0) then WriteConsole(0,GetPlayerStat(ID,'name')+', your K:D is incalculable ('+intToStr(kills)+'/'+IntToStr(GetPlayerStat(ID,'Deaths'))+')',KDColor) else begin KD := kills/GetPlayerStat(ID,'deaths'); WriteConsole(0,GetPlayerStat(ID,'name')+', your K:D is '+FloatToStr(roundto(KD,2))+' ('+intToStr(kills)+'/'+IntToStr(GetPlayerStat(ID,'Deaths'))+')',KDColor); end;end; procedure ActivateServer();beginfor i:=1 to 12 do Track[i]:=FALSE;end; procedure AppOnIdle(Ticks: integer);begin //Ping Track (New by Dominik) if (TrackOrNot = true) then begin for i:=1 to 12 do begin if Track[i]=true then begin if TrackCount[i] = 0 then begin TrackPing[i] := TrackPing[i] + GetPlayerStat(i,'ping'); WriteConsole(0,'Track result for '+IDToName(i)+':',Color); WriteConsole(0,'Max Ping:'+inttostr(TrackPingMax[i])+' Avarage:'+inttostr(Round(TrackPing[i]/4)),Color); // reset vars TrackPingMax[i] := 0; TrackPing[i] := 0; Track[i] := false; end else if TrackCount[i] > 0 then begin TrackPing[i] := TrackPing[i] + GetPlayerStat(i,'ping'); if GetPlayerStat(i,'ping') > TrackPingMax[i] then TrackPingMax[i] := GetPlayerStat(i,'ping'); TrackCount[i] := TrackCount[i] - 1; end; end; end; end;end; procedure OnPlayerSpeak(ID: byte; Text: string);begin //Ratio 1.5.0 by Dominik if (Text = '!ratio') or (Text = '!rate') then begin Ratio(ID); end; //Ping Track (New by Dominik) if (Copy(Text,1,6)='!track') then begin if (Text='!track') then begin NeededID := ID; FoundID := true; end else FindID(Copy(Text,8,Length(Text))); if (FoundID = true) and (GetPlayerStat(NeededID,'name') <> '') then begin TrackOrNot := true; Track[NeededID] := true; TrackPing[NeededID] := 0; TrackCount[NeededID] := 5; WriteConsole(ID,'Tracking '+GetPlayerStat(NeededID,'name')+'... ',Color); end else WriteConsole(0,'Match Not Found.',Red); end; end; function OnCommand(ID: Byte; Text: string): boolean;var Name: string;begin //Spawner v2.6.4 by Dominik if Text = '/weapons' then begin WriteConsole(ID,'Spawn Desert Eagles - /Desert Eagles',$EE00FFFF); WriteConsole(ID,'Spawn HK MP5 - /HK MP5',$EE00FFFF); WriteConsole(ID,'Spawn AK-74 - AK-74',$EE00FFFF); WriteConsole(ID,'Spawn Steyr AUG - Steyr AUG',$EE00FFFF); WriteConsole(ID,'Spawn Spas-12 - Spas-12',$EE00FFFF); WriteConsole(ID,'Spawn Ruger 77 - Ruger 77',$EE00FFFF); WriteConsole(ID,'Spawn M79 - M79',$EE00FFFF); WriteConsole(ID,'Spawn Barrett M82A1 - Barrett M82A1',$EE00FFFF); WriteConsole(ID,'Spawn FN Minimi - FN Minimi',$EE00FFFF); WriteConsole(ID,'Spawn USSOCOM - USSOCOM',$EE00FFFF); WriteConsole(ID,'Spawn Combat Knife - Combat Knife',$EE00FFFF); WriteConsole(ID,'Spawn M72 LAW - M72 LAW',$EE00FFFF); WriteConsole(ID,'Spawn M2 Stationary Gun - /stat569',$EE00FFFF); end; if Text = '/bonuses' then begin WriteConsole(ID,'Spawn Medikit bonus - /bon1',$EE00FFFF); WriteConsole(ID,'Spawn Grenades bonus - /bon2',$EE00FFFF); WriteConsole(ID,'Spawn Flame God bonus - /bon3',$EE00FFFF); WriteConsole(ID,'Spawn Bulletproof Vest bonus - /bon4',$EE00FFFF); WriteConsole(ID,'Spawn Predator bonus - /bon5',$EE00FFFF); WriteConsole(ID,'Spawn Berserker bonus - /bon6',$EE00FFFF); WriteConsole(ID,'Spawn Cluster Grenades bonus - /bon7',$EE00FFFF); end; if regExpMatch('^/(Desert Eagles|desert eagles|Eagle|eagle|Deagles|deagles|Deserteagles|DesertEagles|deserteagles)$',lowercase(Text)) then begin forceWeapon(ID,1,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Desert Eagles',$EE00FFFF); end; if regExpMatch('^/(hkmp5|mp5|hk|MP5|HK|HKMP5|HK MP5)$',lowercase(Text)) then begin forceWeapon(ID,2,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the HK MP5',$EE00FFFF); end; if regExpMatch('^/(ak74|AK-74|AK|ak-74|AK74)$',lowercase(Text))then begin forceWeapon(ID,3,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the AK-74',$EE00FFFF); end; if regExpMatch('^/(steyr|Steyr|aug|Aug|AUG|Steyr AUG)$',lowercase(Text)) then begin forceWeapon(ID,4,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Steyr AUG',$EE00FFFF); end; if regExpMatch('^/(spas 12|spas-12|Spas|spas|Szedgan|szedgan|Shotgun|shotgun|ShotGun|shotGun|Spas 12|spas12|Spas12)$',lowercase(Text)) then begin forceWeapon(ID,5,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Spas-12',$EE00FFFF); end; if regExpMatch('^/(ruger|ruger77|Ruger|Ruger77|ruger 77|Ruger 77)$',lowercase(Text)) then begin forceWeapon(ID,6,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Ruger 77',$EE00FFFF); end; if regExpMatch('^/(m79|M79)$',lowercase(Text)) then begin forceWeapon(ID,7,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the M79',$EE00FFFF); end; if regExpMatch('^/(barreta|Barreta|barr|Barr|BARR|barrett m82a1|Barrett M82A1||barret|Barret|baret|Baret|beret|Beret)$',lowercase(Text)) then begin forceWeapon(ID,8,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Barrett M82A1',$EE00FFFF); end; if regExpMatch('^/(fn minimi|FN|FN Minimi|minimi|Minimi|fn)$',lowercase(Text)) then begin forceWeapon(ID,9,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the FN Minimi',$EE00FFFF); end; if regExpMatch('^/(minigun|minig|Minigun|Minig|MiniG|Gun|gun)$',lowercase(Text)) then begin forceWeapon(ID,10,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Minigun',$EE00FFFF); end if regExpMatch('^(USSOCOM|ussocom|uscom|Uscom)$',lowercase(Text)) then begin forceWeapon(ID,11,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the USSOCOM',$EE00FFFF); end; if regExpMatch('^(Combat Knife|combat knife|Combat knife|combat Knife|Combat|combat|Knife|knife)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),12); WriteConsole(ID,'You have been given the Combat Knife',$EE00FFFF); end; if (Text = '/m72') or (Text = '/LAW') or (Text = 'M72 LAW') then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),14); WriteConsole(ID,'You have been given the M72 LAW',$EE00FFFF); end; if Text = '/stat569' then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),15); WriteConsole(ID,'You have been given the M2 Stationary Gun',$EE00FFFF); end; if regExpMatch('^/(medic|Medic|med|Med|health|Health|med pack|bon1|Bon1|bon 1|Bon 1|bon-1|Bon-1)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16); WriteConsole(ID,'You have been given the Medikit bonus',$EE00FFFF); end; if regExpMatch('^/(medic|Medic|med|Med|health|Health|med pack|bon1|Bon1|bon 1|Bon 1|bon-1|Bon-1)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16); WriteConsole(ID,'You have been given the Medikit bonus',$EE00FFFF); end; if regExpMatch('^/(grenade|Granade|nade|Nade|bon2|Bon2|bon-2|Bon-2|bon 2|Bon 2)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),17); WriteConsole(ID,'You have been given the Grenades bonus',$EE00FFFF); end; if regExpMatch('^/(flame god|Flame god|Flame God|Flamegod|FlameGod|flame|Flame|flamegodmode|Flamegodmode|FlameGodMode|flame god mode|Flame god mode|Flame God mode|Flame God Mode|bon3|Bon3|bon 3|Bon 3|bon-3|Bon-3)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),18); WriteConsole(ID,'You have been given the Flame God bonus',$EE00FFFF); end; if regExpMatch('^/(armor|Armor|vest|Vest|Bulletproofvest|bulletproofvest|Bulletproof Vest|bulletproof vest|Bulletproof vest|bulletproof Vest|bon4|Bon4|Bon 4|bon 4|bon-4|Bon-4)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),19); WriteConsole(ID,'You have been given the Bulletproof Vest bonus',$EE00FFFF); end; if regExpMatch('^/(preditor|Preditor|Predator|predator|pred|Pred|inv|INV|Inv|invisible|Invisible|bon5|Bon5|bon 5|Bon 5|bon-5|Bon-5)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),20); WriteConsole(ID,'You have been given the Predator bonus',$EE00FFFF); end; if regExpMatch('^/(berseker|Berseker|serk|Serk|bon6|Bon6|bon 6|Bon 6|bon-6|Bon-6)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),21); WriteConsole(ID,'You have been given the Berserker bonus',$EE00FFFF); end; if regExpMatch('^/(cluster|Cluster|clust|Clust|clustergrandes|Clustergranades|ClusterGranades|clusternades|Clustgranades|ClustGranades|clustnades|Clustnades|ClustNades|bon7|Bon7|bon 7|Bon 7|bon-7|Bon-7)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),22); WriteConsole(ID,'You have been given the Cluster Grenades bonus',$EE00FFFF); end; //Color Admin Mesage if ID = 255 then Name := 'Server' else Name := GetPlayerStat(ID,'Name'); if Copy(Text,1,5) = '/say ' then begin Result := true; WriteConsole(0,'[' + Name + '] ' + Copy(Text,6,Length(Text)),$FF52DD52); end; // Big Text 1.5.0 if ID = 255 then Name := 'Server' else Name := GetPlayerStat(ID,'Name'); if Copy(Text,1,5) = '/big ' then begin if Length(Text) <= 72 then DrawText(0,Copy(Text,6,Length(Text)),Length(Text) * 10 + 100,$EE00FF00,4 / Length(Text),8,240 + Length(Text)) else WriteConsole(ID,'Your message was greater than 72 charactes. It was unable to be drawn.',$FF50D); end; end;procedure OnJoinTeam(ID, Team: byte);begin // Major Kicker if (GetPlayerStat(ID,'Name') = 'Major') or (MaskCheck(GetPlayerStat(ID,'Name'), 'Major(?)')) or (MaskCheck(GetPlayerStat(ID,'Name'), 'Major(??)')) then begin WriteConsole(ID,'Please use a unique name.',MajorKick); KickPlayer(ID); end;end;
const TRIGGER = '!whoisadmin'; // edit this if you want to change text which shows the admin listvar playerAdmin, playerShown: array[1..32] of boolean; online: boolean;function xsplit(const source: string; const delimiter: string): TStringArray; // by KeYDoN var i, x, d: integer; s: string; begin d := length(delimiter); x := 0; i := 1; SetArrayLength(Result, 1); while(i <= length(source)) do begin s := Copy(source, i, d); if (s = delimiter) then begin inc(i, d); inc(x, 1); SetArrayLength(result, x + 1); end else begin result[x] := result[x] + Copy(s, 1, 1); inc(i, 1); end; end; end;procedure ActivateServer(); var i: byte; begin // set all variables to false for i := 1 to 32 do begin playerAdmin[i] := false; playerShown[i] := false; end; online := false; end;procedure ShowOnlineAdminList; var adminList: TStringArray; i, j: byte; begin if FileExists('remote.txt') then begin SetArrayLength(adminList, 1); adminList := xsplit(ReadFile('remote.txt'), chr(13) + chr(10)); WriteConsole(0, 'Do serwera jest podłączony:', $FFD700); for i := 0 to ArrayHigh(adminList) do for j := 1 to 32 do if (GetPlayerStat(j, 'Active') = true) and (GetPlayerStat(j, 'Human') = true) then // if player is an admin (via remote.txt), show his nick if (GetPlayerStat(j, 'IP') = adminList[i]) and (playerShown[j] = false) then begin WriteConsole(0, IDToName(IPToID(adminList[i])), $FFD700); online := true; playerShown[j] := true; // if player is an admin (via /adminlog), show his nick end else if (playerAdmin[j] = true) and (playerShown[j] = false) then begin WriteConsole(0, IDToName(j), $FF99DD40); online := true; playerShown[j] := true; // if there ain't any admin online, show this line... end else if (i = ArrayHigh(adminList)) and (online = false) then WriteConsole(0, 'Do serwera nie jest podłączony żaden admin.', $FFD700); online := false; // clear variables after showing list for i := 1 to 32 do playerShown[i] := false; end else WriteConsole(0, 'Error: file ''remote.txt'' not found.', $FFFF0000); end; function OnPlayerCommand(ID: Byte; Text: string): boolean; begin // saves successfully adminlogged players to variable if Text = '/adminlog ' + ReadINI('soldat.ini', 'NETWORK', 'Admin_Password', 'FAIL') then playerAdmin[ID] := true; Result := false; end;procedure OnLeaveGame(ID, Team: byte; Kicked: boolean); begin // if player was an admin, clear variable of his ID if playerAdmin[ID] = true then playerAdmin[ID] := false; end;procedure OnPlayerSpeak(ID: byte; Text: string); begin // show the list! if Text = TRIGGER then ShowOnlineAdminList; end;
const//TeamsALPHA = 1;BRAVO = 2;CHARLIE = 3;DELTA = 4;SPECTATOR = 5;//Game ModesDEATHMATCH = 0;POINTMATCH = 1;TEAMMATCH = 2;CTF = 3;RAMBO = 4;INF = 5;HTF = 6;//Weapons DEAGLES = 1; HKMP5 = 2; AK74 = 3; STEYR = 4; SPAS = 5; RUGER = 6; M79 = 7; BARRET = 8; MINIMI = 9; MINIGUN = 10; FLAMER = 11; BOW = 12; FLAMEBOW = 13; SOCOM = 0; KNIFE = 14; CHAINSAW = 15; LAW = 16; //Color Color = $FF99DD40; Red = $ff0033; ClMessage = $FFFF0000; MajorKick = $FFFFFFFF; KDColor = $FFD700; TRIGGER = '!whoisadmin'; var TrackOrNot: boolean; Track: array[1..32] of boolean; TrackPing: array[1..32] of integer; TrackCount: array [1..32] of byte; TrackPingMax: array[1..32] of integer; i: byte; FoundID: boolean; NeededID: byte; playerAdmin, playerShown: array[1..32] of boolean; online: boolean; function xsplit(const source: string; const delimiter: string): TStringArray; // by KeYDoN var i, x, d: integer; s: string; begin d := length(delimiter); x := 0; i := 1; SetArrayLength(Result, 1); while(i <= length(source)) do begin s := Copy(source, i, d); if (s = delimiter) then begin inc(i, d); inc(x, 1); SetArrayLength(result, x + 1); end else begin result[x] := result[x] + Copy(s, 1, 1); inc(i, 1); end; end; end; procedure ShowOnlineAdminList; var adminList: TStringArray; i, j: byte; begin if FileExists('remote.txt') then begin SetArrayLength(adminList, 1); adminList := xsplit(ReadFile('remote.txt'), chr(13) + chr(10)); WriteConsole(0, 'Do serwera jest podlaczony:', $FFD700); for i := 0 to ArrayHigh(adminList) do for j := 1 to 32 do if (GetPlayerStat(j, 'Active') = true) and (GetPlayerStat(j, 'Human') = true) then // if player is an admin (via remote.txt), show his nick if (GetPlayerStat(j, 'IP') = adminList[i]) and (playerShown[j] = false) then begin WriteConsole(0, IDToName(IPToID(adminList[i])), $FFD700); online := true; playerShown[j] := true; // if player is an admin (via /adminlog), show his nick end else if (playerAdmin[j] = true) and (playerShown[j] = false) then begin WriteConsole(0, IDToName(j), $FF99DD40); online := true; playerShown[j] := true; // if there ain't any admin online, show this line... end else if (i = ArrayHigh(adminList)) and (online = false) then WriteConsole(0, 'Do serwera nie jest podlaczony zaden admin.', $FFD700); online := false; // clear variables after showing list for i := 1 to 32 do playerShown[i] := false; end else WriteConsole(0, 'Error: file ''remote.txt'' not found.', $FFFF0000); end; // Ping Track (New by Dominik) procedure FindID(Src: string); begin FoundID := FALSE; if (MaskCheck(Src,'?') = TRUE) OR (MaskCheck(Src,'??') = TRUE) then begin NeededID := strtoint(Src); FoundID := TRUE; end else begin for i:=1 to MaxPlayers do begin if (ContainsString(lowercase(GetPlayerStat(i,'name')),lowercase(Src)) = TRUE) then begin FoundID := TRUE; NeededID := i; end; end; end; end; //Ratio 1.5.0 by Dominik procedure Ratio(ID: Integer);varKD: Double;Kills: integer;beginkills:=GetPlayerStat(ID,'kills');if(GetPlayerStat(ID,'team')=5) thenWriteConsole(0,GetPlayerStat(ID,'name')+', you are spectating',KDColor) else if(GetPlayerStat(ID,'deaths')=0) then WriteConsole(0,GetPlayerStat(ID,'name')+', your K:D is incalculable ('+intToStr(kills)+'/'+IntToStr(GetPlayerStat(ID,'Deaths'))+')',KDColor) else begin KD := kills/GetPlayerStat(ID,'deaths'); WriteConsole(0,GetPlayerStat(ID,'name')+', your K:D is '+FloatToStr(roundto(KD,2))+' ('+intToStr(kills)+'/'+IntToStr(GetPlayerStat(ID,'Deaths'))+')',KDColor); end;end; procedure ActivateServer();beginfor i:=1 to 12 do beginTrack[i]:=FALSE;end;for i := 1 to 32 do begin playerAdmin[i] := false; playerShown[i] := false; end; online := false;end; procedure AppOnIdle(Ticks: integer);begin //Ping Track (New by Dominik) if (TrackOrNot = true) then begin for i:=1 to 12 do begin if Track[i]=true then begin if TrackCount[i] = 0 then begin TrackPing[i] := TrackPing[i] + GetPlayerStat(i,'ping'); WriteConsole(0,'Track result for '+IDToName(i)+':',Color); WriteConsole(0,'Max Ping:'+inttostr(TrackPingMax[i])+' Avarage:'+inttostr(Round(TrackPing[i]/4)),Color); // reset vars TrackPingMax[i] := 0; TrackPing[i] := 0; Track[i] := false; end else if TrackCount[i] > 0 then begin TrackPing[i] := TrackPing[i] + GetPlayerStat(i,'ping'); if GetPlayerStat(i,'ping') > TrackPingMax[i] then TrackPingMax[i] := GetPlayerStat(i,'ping'); TrackCount[i] := TrackCount[i] - 1; end; end; end; end;end; procedure OnPlayerSpeak(ID: byte; Text: string);begin //Ratio 1.5.0 by Dominik if (Text = '!ratio') or (Text = '!rate') then begin Ratio(ID); end; //Ping Track (New by Dominik) if (Copy(Text,1,6)='!track') then begin if (Text='!track') then begin NeededID := ID; FoundID := true; end else FindID(Copy(Text,8,Length(Text))); if (FoundID = true) and (GetPlayerStat(NeededID,'name') <> '') then begin TrackOrNot := true; Track[NeededID] := true; TrackPing[NeededID] := 0; TrackCount[NeededID] := 5; WriteConsole(ID,'Tracking '+GetPlayerStat(NeededID,'name')+'... ',Color); end else WriteConsole(0,'Match Not Found.',Red); end; if Text = TRIGGER then begin ShowOnlineAdminList; end; end; function OnCommand(ID: Byte; Text: string): boolean;var Name: string;begin //Spawner v2.6.4 by Dominik if Text = '/weapons' then begin WriteConsole(ID,'Spawn Desert Eagles - /Desert Eagles',$EE00FFFF); WriteConsole(ID,'Spawn HK MP5 - /HK MP5',$EE00FFFF); WriteConsole(ID,'Spawn AK-74 - AK-74',$EE00FFFF); WriteConsole(ID,'Spawn Steyr AUG - Steyr AUG',$EE00FFFF); WriteConsole(ID,'Spawn Spas-12 - Spas-12',$EE00FFFF); WriteConsole(ID,'Spawn Ruger 77 - Ruger 77',$EE00FFFF); WriteConsole(ID,'Spawn M79 - M79',$EE00FFFF); WriteConsole(ID,'Spawn Barrett M82A1 - Barrett M82A1',$EE00FFFF); WriteConsole(ID,'Spawn FN Minimi - FN Minimi',$EE00FFFF); WriteConsole(ID,'Spawn USSOCOM - USSOCOM',$EE00FFFF); WriteConsole(ID,'Spawn Combat Knife - Combat Knife',$EE00FFFF); WriteConsole(ID,'Spawn M72 LAW - M72 LAW',$EE00FFFF); WriteConsole(ID,'Spawn M2 Stationary Gun - /stat569',$EE00FFFF); end; if Text = '/bonuses' then begin WriteConsole(ID,'Spawn Medikit bonus - /bon1',$EE00FFFF); WriteConsole(ID,'Spawn Grenades bonus - /bon2',$EE00FFFF); WriteConsole(ID,'Spawn Flame God bonus - /bon3',$EE00FFFF); WriteConsole(ID,'Spawn Bulletproof Vest bonus - /bon4',$EE00FFFF); WriteConsole(ID,'Spawn Predator bonus - /bon5',$EE00FFFF); WriteConsole(ID,'Spawn Berserker bonus - /bon6',$EE00FFFF); WriteConsole(ID,'Spawn Cluster Grenades bonus - /bon7',$EE00FFFF); end; if regExpMatch('^/(Desert Eagles|desert eagles|Eagle|eagle|Deagles|deagles|Deserteagles|DesertEagles|deserteagles)$',lowercase(Text)) then begin forceWeapon(ID,1,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Desert Eagles',$EE00FFFF); end; if regExpMatch('^/(hkmp5|mp5|hk|MP5|HK|HKMP5|HK MP5)$',lowercase(Text)) then begin forceWeapon(ID,2,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the HK MP5',$EE00FFFF); end; if regExpMatch('^/(ak74|AK-74|AK|ak-74|AK74)$',lowercase(Text))then begin forceWeapon(ID,3,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the AK-74',$EE00FFFF); end; if regExpMatch('^/(steyr|Steyr|aug|Aug|AUG|Steyr AUG)$',lowercase(Text)) then begin forceWeapon(ID,4,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Steyr AUG',$EE00FFFF); end; if regExpMatch('^/(spas 12|spas-12|Spas|spas|Szedgan|szedgan|Shotgun|shotgun|ShotGun|shotGun|Spas 12|spas12|Spas12)$',lowercase(Text)) then begin forceWeapon(ID,5,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Spas-12',$EE00FFFF); end; if regExpMatch('^/(ruger|ruger77|Ruger|Ruger77|ruger 77|Ruger 77)$',lowercase(Text)) then begin forceWeapon(ID,6,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Ruger 77',$EE00FFFF); end; if regExpMatch('^/(m79|M79)$',lowercase(Text)) then begin forceWeapon(ID,7,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the M79',$EE00FFFF); end; if regExpMatch('^/(barreta|Barreta|barr|Barr|BARR|barrett m82a1|Barrett M82A1||barret|Barret|baret|Baret|beret|Beret)$',lowercase(Text)) then begin forceWeapon(ID,8,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Barrett M82A1',$EE00FFFF); end; if regExpMatch('^/(fn minimi|FN|FN Minimi|minimi|Minimi|fn)$',lowercase(Text)) then begin forceWeapon(ID,9,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the FN Minimi',$EE00FFFF); end; if regExpMatch('^/(minigun|minig|Minigun|Minig|MiniG|Gun|gun)$',lowercase(Text)) then begin forceWeapon(ID,10,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the Minigun',$EE00FFFF); end if regExpMatch('^(USSOCOM|ussocom|uscom|Uscom)$',lowercase(Text)) then begin forceWeapon(ID,11,GetPlayerStat(ID,'Primary'),0); WriteConsole(ID,'You have been given the USSOCOM',$EE00FFFF); end; if regExpMatch('^(Combat Knife|combat knife|Combat knife|combat Knife|Combat|combat|Knife|knife)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),12); WriteConsole(ID,'You have been given the Combat Knife',$EE00FFFF); end; if (Text = '/m72') or (Text = '/LAW') or (Text = 'M72 LAW') then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),14); WriteConsole(ID,'You have been given the M72 LAW',$EE00FFFF); end; if Text = '/stat569' then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),15); WriteConsole(ID,'You have been given the M2 Stationary Gun',$EE00FFFF); end; if regExpMatch('^/(medic|Medic|med|Med|health|Health|med pack|bon1|Bon1|bon 1|Bon 1|bon-1|Bon-1)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16); WriteConsole(ID,'You have been given the Medikit bonus',$EE00FFFF); end; if regExpMatch('^/(medic|Medic|med|Med|health|Health|med pack|bon1|Bon1|bon 1|Bon 1|bon-1|Bon-1)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16); WriteConsole(ID,'You have been given the Medikit bonus',$EE00FFFF); end; if regExpMatch('^/(grenade|Granade|nade|Nade|bon2|Bon2|bon-2|Bon-2|bon 2|Bon 2)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),17); WriteConsole(ID,'You have been given the Grenades bonus',$EE00FFFF); end; if regExpMatch('^/(flame god|Flame god|Flame God|Flamegod|FlameGod|flame|Flame|flamegodmode|Flamegodmode|FlameGodMode|flame god mode|Flame god mode|Flame God mode|Flame God Mode|bon3|Bon3|bon 3|Bon 3|bon-3|Bon-3)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),18); WriteConsole(ID,'You have been given the Flame God bonus',$EE00FFFF); end; if regExpMatch('^/(armor|Armor|vest|Vest|Bulletproofvest|bulletproofvest|Bulletproof Vest|bulletproof vest|Bulletproof vest|bulletproof Vest|bon4|Bon4|Bon 4|bon 4|bon-4|Bon-4)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),19); WriteConsole(ID,'You have been given the Bulletproof Vest bonus',$EE00FFFF); end; if regExpMatch('^/(preditor|Preditor|Predator|predator|pred|Pred|inv|INV|Inv|invisible|Invisible|bon5|Bon5|bon 5|Bon 5|bon-5|Bon-5)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),20); WriteConsole(ID,'You have been given the Predator bonus',$EE00FFFF); end; if regExpMatch('^/(berseker|Berseker|serk|Serk|bon6|Bon6|bon 6|Bon 6|bon-6|Bon-6)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),21); WriteConsole(ID,'You have been given the Berserker bonus',$EE00FFFF); end; if regExpMatch('^/(cluster|Cluster|clust|Clust|clustergrandes|Clustergranades|ClusterGranades|clusternades|Clustgranades|ClustGranades|clustnades|Clustnades|ClustNades|bon7|Bon7|bon 7|Bon 7|bon-7|Bon-7)$',lowercase(Text)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),22); WriteConsole(ID,'You have been given the Cluster Grenades bonus',$EE00FFFF); end; //Color Admin Mesage if ID = 255 then Name := 'Server' else Name := GetPlayerStat(ID,'Name'); if Copy(Text,1,5) = '/say ' then begin Result := true; WriteConsole(0,'[' + Name + '] ' + Copy(Text,6,Length(Text)),$FF52DD52); end; // Big Text 1.5.0 if ID = 255 then Name := 'Server' else Name := GetPlayerStat(ID,'Name'); if Copy(Text,1,5) = '/big ' then begin if Length(Text) <= 72 then DrawText(0,Copy(Text,6,Length(Text)),Length(Text) * 10 + 100,$EE00FF00,4 / Length(Text),8,240 + Length(Text)) else WriteConsole(ID,'Your message was greater than 72 charactes. It was unable to be drawn.',$FF50D); end; end;procedure OnJoinTeam(ID, Team: byte);begin // Major Kicker if (GetPlayerStat(ID,'Name') = 'Major') or (MaskCheck(GetPlayerStat(ID,'Name'), 'Major(?)')) or (MaskCheck(GetPlayerStat(ID,'Name'), 'Major(??)')) then begin WriteConsole(ID,'Please use a unique name.',MajorKick); KickPlayer(ID); end;end;procedure OnLeaveGame(ID, Team: byte; Kicked: boolean); begin // if player was an admin, clear variable of his ID if playerAdmin[ID] = true then playerAdmin[ID] := false; end;///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////