Author Topic: Fix for Join Team Bug  (Read 2340 times)

0 Members and 1 Guest are viewing this topic.

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Fix for Join Team Bug
« on: April 29, 2007, 07:48:11 pm »
Script Name: Fix for Join Team Bug
Script Description: There is a bug where when you join a team you are alive. For servers with survival mode enabled this is a problem.
Original Author(s): Bmekim
Core Version: 2.6.0
Code:

Code: [Select]
var
setteam: integer;

function OnCommand(ID: Byte; Text: string): boolean;
begin
if MaskCheck(Text, '/setteam? *') then setteam := StrToInt(GetPiece(Text,' ',1));
Result := false;
end;

procedure OnJoinTeam(ID, Team: byte);
begin
if ID = setteam then setteam := 0
else if GetPlayerStat(ID,'team') <> 5 then DoDamage(ID,4000);
end;