[SOLVED] Get players weapon

Posts 1–4 of 4 · Page 1 of 1
[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
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;
}
}
}
}
}
/solved i guess?
well other guys can copy that and find some hacking base and don't close it
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us