0 Members and 1 Guest are viewing this topic.
you cant really stop people grabbing grenades with out turning them off altogether unfortunately you cant take peoples grenades away through script
ConstRandomise = False;//If true each gun change is random if false it moves through each gun in order DisabledGuns = '11 12 13';//note that each gun whos number is less then 10 MUST have a 0 in front for example 04, 07, 02VarRoundType: Byte;Function RandomGun(): Byte;VarRandomness: Byte;C: String;Begin Repeat Randomness:=Random(1, 16); If (Randomness >= 0) And (Randomness <= 9) Then C:='0'+IntToStr(Randomness) Else C:=IntToStr(Randomness); If RegExpMatch(C, DisabledGuns) Then Randomness:= RoundType; Until Randomness <> RoundType Result:=Randomness;End;Procedure ActivateServer();Begin If Randomise = False Then RoundType:=1 Else RoundType:=RandomGun(); WriteConsole(0, 'Next Round Is '+WeaponNameByNum(RoundType), $FF9933);End;Procedure OnMapChange(NewMap: String);VarA: String;Done: Boolean;Begin If Randomise = True Then RoundType:=RandomGun() Else Begin If RoundType < 16 Then Begin Done:=False; Repeat RoundType:=RoundType+1; If RoundType >= 16 Then RoundType:=1; If (RoundType >= 0) And (RoundType <= 9) Then A:='0'+IntToStr(RoundType) Else A:=IntToStr(RoundType); If Not RegExpMatch(A, DisabledGuns) Then Done:=True; Until Done = True End Else RoundType:=1; WriteConsole(0, 'Next Round Is '+WeaponNameByNum(RoundType), $FF9933); End;End;Procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: Byte);Begin If (PrimaryNum <> RoundType) And (PrimaryNum <> 255) Then ForceWeapon(ID, RoundType, 255, 0);End;