0 Members and 4 Guests are viewing this topic.
You fail Squiddy, besides that you forgot to check if the players are active the loop is really useless, wherefore is case and these TeamScore variables
The player at the start may be active, but if you check all 32 IDs with a loop you should at least check whether he's active or not, am I right?
const MapGap = 100; WepGap = 50;var WepTemp,Wave,Msg: Byte; W1,W2,W3,MapChange: Boolean;Procedure KickBots();var BotID: Integer; begin for BotID := 1 to 32 do if GetPlayerStat(BotID,'Human') = false then begin Command('/kick ' + inttostr(BotID)); end; end; // Additional weapons for teams with more than 50 pointsProcedure AllowWeapon();var ID: Byte; begin for ID := 1 to 32 do if GetPlayerStat(ID,'Active') then case WepTemp of 1: begin SetWeaponActive(ID,8,true); DrawText(ID,'Your team got a new weapon!',180,White,0.06,160,200); end; 2: begin SetWeaponActive(ID,5,true); DrawText(ID,'Your team got a new weapon!',180,White,0.06,160,200); end; 3: begin SetWeaponActive(ID,7,true); DrawText(ID,'Your team got a new weapon!',180,White,0.06,160,200); end; end; end; Procedure OnPlayerKill(Killer, Victim: Byte; Weapon: String); begin // MapChange + additional weapons case AlphaScore of AlphaScore > (WepGap - 1): begin if W1 then begin W1 := false; WepTemp := 1; AllowWeapon(); end; end; Alphascore > (MapGap - 1): begin if MapChange then begin KickBots(); Command('/nextmap'); DrawText(0,'The Garmons have won the match! Congratulations!',3,White,0.15,160,200); Wave := 1; Msg := 1; MapChange := false; end; end; end; case BravoScore of BravoScore > (WepGap - 1): begin if W2 then begin W2 := false; WepTemp := 2; AllowWeapon(); end; end; Bravoscore > (MapGap - 1): begin if MapChange then begin KickBots(); Command('/nextmap'); DrawText(0,'The Verrights have won the match! Congratulations!',3,White,0.15,160,200); Wave := 1; Msg := 1; MapChange := false; end; end; end; case CharlieScore of CharlieScore > (WepGap - 1): begin if W3 then begin W3 := false; WepTemp := 3; AllowWeapon(); end; end; CharlieScore > (MapGap - 1): begin if MapChange then begin KickBots(); Command('/nextmap'); DrawText(0,'The Magi have won the match! Congratulations!',3,White,0.15,160,200); Wave := 1; Msg := 1; MapChange := false; end; end; end; if DeltaScore <> 0 then SetScore(4,0); end;
function GetTeamKills(Team: byte): integer;var i: byte;beginresult := 0;for i := 1 to 32 do if getplayerstat(i,'active') then if getplayerstat(i,'team') = team then result := result + getplayerstat(i,'kills');end;
@hacktank: getplayerstat(i,'active') = true
You don't afaik, works without it.
Someone needs to be burnt in my opinion.
I'll test it, as an almost scientist I can't leave stuff that way.edit: tk is right, there's no need for = true. Someone needs to be burnt in my opinion.
NEVER, NEVER USE = true OR = false AGAIN EXCEPT FOR GetPlayerStat() STUFF.
I removed Drain and added Vanish instead. Nextmap will be called when TimeLeft is under a certain amount. You get the new weapons after an amount of time either.How can I check a text for certain characters?