0 Members and 1 Guest are viewing this topic.
Cube is good script, but too complicated. I need a simple script... only balance, when one team have 2 players more... do you know something that?
var Double, Alone, Messages: boolean; PlayerPnts, TeamPnts: byte; Color: longint;function AlivePlayers(Team: shortint): byte;var i: byte;begin for i := 1 to 32 do if (GetPlayerStat(i,'Active') = true) and (GetPlayerStat(i,'Alive') = true) and ((Team = -1) or (GetPlayerStat(i,'Team') = Team)) then Result := Result + 1;end;procedure ActivateServer();begin try if ReadINI('scripts/' + ScriptName + '/settings.ini','General','Message','true') = 'true' then Messages := true else Messages := false; Color := StrtoInt(ReadINI('scripts/' + ScriptName + '/settings.ini','General','MsgColor','$FFFFFFFF')); PlayerPnts := StrtoInt(ReadINI('scripts/' + ScriptName + '/settings.ini','General','PlayerPnts','5')); TeamPnts := StrtoInt(ReadINI('scripts/' + ScriptName + '/settings.ini','General','TeamPnts','1')); if ReadINI('scripts/' + ScriptName + '/settings.ini','General','DoubleCap','false') = 'true' then Double := true else Double := false; if ReadINI('scripts/' + ScriptName + '/settings.ini','General','AloneCap','false') = 'true' then Alone := true else Alone := false; except WriteLn('Error while loading settings.'); end;end;procedure OnFlagScore(ID, TeamFlag: byte);var i: byte;begin if iif(TeamFlag = 1,AlphaPlayers,BravoPlayers) = 0 then begin if Alone = false then begin SetTeamScore(iif(TeamFlag = 1,2,1),iif(TeamFlag = 1,BravoScore,AlphaScore) - 1); if Messages then WriteConsole(ID,'Capturing while alone has no effect.',Color); end else begin SetTeamScore(iif(TeamFlag = 1,2,1),iif(TeamFlag = 1,BravoScore,AlphaScore) - 1 + TeamPnts); end; end else if AlivePlayers(TeamFlag) = 0 then begin if Double = false then begin SetTeamScore(iif(TeamFlag = 1,2,1),iif(TeamFlag = 1,BravoScore,AlphaScore) - 1); if Messages then WriteConsole(ID,'Double capturing has no effect.',Color); end else begin SetTeamScore(iif(TeamFlag = 1,2,1),iif(TeamFlag = 1,BravoScore,AlphaScore) - 1 + TeamPnts); end; end else begin SetTeamScore(iif(TeamFlag = 1,2,1),iif(TeamFlag = 1,BravoScore,AlphaScore) - 1 + TeamPnts); end;end;