Author
|
Message
|
Junior Member
|
12-11-2013
, 10:18
Hooking Gun Pickup Action
|
#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.
|
|
|
|