All pastes #633939 Raw Edit

stuff

public text v1 · immutable
#633939 ·published 2007-07-26 01:08 UTC
rendered paste body
function OnPlayerCommand(ID: Byte; Text: string): boolean;
var
  Allow: boolean;
  i: integer;
begin
  Allow := true;
  for i := 0 to GetArrayLength(Disabled) - 1 do if Copy(Text,2,Length(Disabled[i])) = Disabled[i] then begin
    Allow := false;
    Break;
  end;
  if Allow then Result := false else Result := true;
  if Result = false then Case Text of
    '/deagles': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),1);
    '/hkmp5': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),2);
    '/ak74': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),3);
    '/steyr': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),4);
    '/spaz': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),5);
    '/ruger': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),6);
    '/m79': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),7);
    '/barret': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),8);
    '/minimi': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),9);
    '/minigun': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),10);
    '/socom': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),11);
    '/knife': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),12);
    '/saw': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),13);
    '/law': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),14);
    '/stat': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),15);
    '/medic': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),16);
    '/nade': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),17);
    '/flame': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),18);
    '/armor': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),19);
    '/pred': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),20);
    '/berserk': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),21);
    '/cluster': SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),22);
    '/commands': begin
      WriteConsole(ID,'Commands: /deagles /hkmp5 /ak74 /steyr /spaz /ruger /m79 /barret /minimi /minigun',$EE81FAA1);
      WriteConsole(ID,'/socom /knife /saw /law /stat',$EE81FAA1);
      WriteConsole(ID,'/medic /nade /flame /armor /pred /berserk /cluster',$EE81FAA1);
    end;
    '/test': DrawText(0,'Master Chief43',330,RGB(255,255,255),0.20,40,240);
  end;
end;