Results 1 to 2 of 2

Thread: How to use "IsKeyDown"

  1. #1
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default Problem with CS:S colorfinder

    Well... This is to find colors in counterstrike, but I keep getting a type missmatch I can't figure out.

    SCAR Code:
    program CSSAimbot;
    {.Include SRL/SRL.scar}

    Var Targ, ShootY, HoldM, ShootT: String;
    Var Targ1, ShootY1, HoldM1: Boolean;
    Var ShootT1: Integer;

    Procedure Shoot(HoldMouse: Boolean; Time:Integer);
     begin;
      If HoldMouse Then
       begin;
        HoldMouse(x, y, True);
        Wait(Time);
        ReleaseMouse(x, y, True);
       end;
      If not HoldMouse;
       Mouse(x, y, True);
     end;

    Function FindTarget(CT, Shoot, HoldMouse: Boolean; ShootTime:Integer): Boolean;
     begin;
      Case CT of
         True: FindColorTolerance(x, y, 248, 3, 29, 1026, 770, 5);
         False: FindColorTolerance(x, y, 16252928, 3, 29, 1026, 770, 5);
        end;
       MoveMouse(x+10, y+10);
       Wait(1);
       If Shoot Then
        begin;
         If HoldMouse Then
          Shoot(True, 3);
         If not HoldMouse Then
          Shoot(False, 3);
        end;
     end;

    begin
     Targ:= ReadLn('Is Target CT? T/F');
     Targ1:= StrToBool(Targ);
     ShootY:= ReadLn('Shoot once found target? T/F');
     ShootY1:= StrToBool(ShootY);
     HoldM:= ReadLn('Hold mouse down if shooting? T/F');
     HoldM1:= StrToBool(HoldM);
     ShootT:= ReadLn('How long to hold down mouse in seconds? INT');
     ShootT1:= StrToInt(ShootT);
     repeat;
      While (IsNumpadKeyDown(5)) Do
       begin;
        FindTarget(Targ1, ShootY1, HoldM1, ShootT1);
       end;
     until(IsNumPadKeyDown(0));
    end.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  2. #2
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    *cough* IsNumpadKeyDown *cough*.
    Verrekte Koekwous

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 05-17-2008, 12:48 PM
  2. action="www.site.com" method="post"
    By Jason2gs in forum General
    Replies: 4
    Last Post: 05-17-2007, 11:50 PM
  3. Replies: 3
    Last Post: 04-19-2007, 03:44 AM
  4. Replies: 5
    Last Post: 10-26-2006, 11:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •