0 Members and 1 Guest are viewing this topic.
procedure Disarm(ID: byte);begin ForceWeapon(ID,NoWeapon,NoWeapon,1);end;procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: Byte);begin if (ID<>Tagger1) and (ID<>Tagger2) then begin Disarm(ID); end else if (GameStyle=4) and (ID=Tagger1) then forceweapon(ID,FLAMEBOW,FLAMEBOW,0);end;procedure SwitchTagger(Before,After: integer);var MyByte:byte;begin if After=-1 then begin if Tagger1<>-1 then begin Disarm(Tagger1); Tagger1:=-1; end if Tagger2<>-1 then begin Disarm(Tagger2); Tagger2:=-1; end end else if NumPlayers>=TwoTaggers then begin if before<>0 then begin if Tagger1=before then begin Disarm(Tagger1); Tagger1:=after end else begin Disarm(Tagger2); Tagger2:=after; end; if (GameStyle=4) and (Tagger1=before)then forceweapon(after,FLAMEBOW,FLAMEBOW,0); end else begin //before=0 here if Tagger2=-1 then Tagger2:=After else if Tagger1=-1 then Tagger1:=After else begin MyByte:=random(0,2); disarm(iif(MyByte=0,Tagger1,Tagger2)); if MyByte=0 then Tagger1:=after else Tagger2:=after; end; end; end else begin //numplayers<twotaggers here if tagger1<>-1 then disarm(tagger1); tagger1:=after; end;end;procedure Resettagtimes;var i:integer;begin for i:=1 to Max_Players do begin TagTime[i]:=ScoreLimit-1; SetScore(i,ScoreLimit-1); end;end;
function OnCommand(ID: Byte; Text: string): boolean;var MyByte:byte;begin if ID<>255 then case GetPiece(Text,' ',0) of '/help','/command','/commands':begin WriteConsole(ID,'/arm '+'/'+'/Armageddon',cDspl); WriteConsole(ID,'/randr '+'/'+'/Randrom Respawn',cDspl); WriteConsole(ID,'/2tag # '+'/'+'/Number of players for 2 Taggers',cDspl); WriteConsole(ID,'/tagban '+'/'+'/Leaving tagger will get ban?',cDspl);
function OnPlayerCommand(ID: Byte; Text: string): boolean;var i:integer;begin case GetPiece(Text,' ',0) of '/help','/command','/commands':begin WriteConsole(ID,'When someone reaches tagtime 0, he/she looses the game,',cDspl); WriteConsole(ID,'and the map changes. You tag people by killing them.',cDspl); WriteConsole(ID,'Available commands:',cDspl); WriteConsole(ID,'/weapon # '+'/'+'/Change to Weapon (only for the Tagger)',cDspl); WriteConsole(ID,'/showw '+'/'+'/Show Weapons',cDspl);
[b ]Core Version:[ /b] (Version of the Dedicated Server you made this script with)
Careca Cabeludo wrote: pegapega.servegame.comporta 23073
for i := 1 to 255 do begin Ran := Random(1, MAXPLAYER{providing you have this variable to save loop time}); if GetPlayerStat(Ran, 'Active') then begin tagger[Ran] := true; //or whatever variable it is that makes someone it for you. break; end;end;