Raised This Month: $51 Target: $400
 12% 

Hooking Gun Pickup Action


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
invermere
Junior Member
Join Date: Nov 2011
Old 12-11-2013 , 10:18   Hooking Gun Pickup Action
Reply With Quote #1

Hey all,

I'm looking to hook an event where a player picks up a new primary gun (this is for DoD:S, but could be for anything really) and I want to get that weapon stored in a global var currentPrimary or something like that.

Problem:
I need a menu to base listings off of the primary weapon the client is currently carrying, not what they spawned with.

Currently using:
new class = GetEntProp(client, Prop_Send, "m_iPlayerClass"); to check their default class, which works.

What I've tried:
- using GetPlayerWeaponSlot(client, 0) gives me something close, but the indexes change. Simetimes a rifle will be 667, 171 or 169 and other times Thompson, BAR and Bazooka will all be 166.

Is there a way to tell which weapon is in the players primary slot after they drop their class default primary and pick up another, random gun? I was thinking of just using those indexes and hack it that way, but because 3 primaries share the same index sometimes, that won't work.

Any help would be incredible.

Thanks in advance.
invermere is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 12-11-2013 , 10:42   Re: Hooking Gun Pickup Action
Reply With Quote #2

You're in the wrong forum.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
invermere
Junior Member
Join Date: Nov 2011
Old 12-11-2013 , 11:31   Re: Hooking Gun Pickup Action
Reply With Quote #3

Quote:
Originally Posted by bibu View Post
You're in the wrong forum.
Ty!
invermere is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:10.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode