Results 1 to 4 of 4
  1. #1
    Neokil's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    0

    [SOLVED] Get players weapon

    Hey guys,
    I've got a question, how can I find out what weapon the player is using just now? I want to know because I wrote my own Quick-Scope-Hack and I want it to work only if a Sniper rifle is equiped.
    Anyone knows how to do it?

    Greetings

  2. #2
    Neokil's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    0
    ok, i found it out:
    #define NumOfWeapons 4
    short Weapons[NumOfWeapons] = { 830, 767, 788, 809 }; //Sind die Nummern von Intervention, Barrett, WA2000 und M21.

    bool SniperRifleIsEquiped = false;

    for(int i = 0; i < ENTITIESMAX; i++)
    {
    if(localclientnum == mw2_entities[i].clientnum)
    {
    for(int j = 0; j < NumOfWeapons; j++)
    {
    for(int k = 0; k < 7; k++)
    {
    if(mw2_entities[i].WeaponNum == Weapons[j] + k) //Weaponnumber (j) + Attachment(k) = Gesuchte Waffe
    {
    SniperRifleIsEquiped = true;
    }
    }
    }
    }
    }

  3. #3
    Skyline.'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    10,160
    Reputation
    416
    Thanks
    1,614
    /solved i guess?


  4. #4
    Maybe this world is another planet's Hell.
    MPGH Member
    Arii's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    In my cardbox
    Posts
    2,116
    Reputation
    120
    Thanks
    117
    My Mood
    Breezy
    well other guys can copy that and find some hacking base and don't close it
    MPGH's Official Facebook, Twitter, and Youtube page!






     
    Swiftdude
    Hero
    Jigsaw
    Alen
    JigsawJr

     
    Scata