On forward of SDKTools, "OnPlayerRunCmd", you ran compare int &
weapon with otherweapons. (
weapon isn't nextweapon,
weapon is weapon of slot that was been pressed... For hook via OnPlayerRunCmd you need non-empty slot.)
For hook button
3
PHP Code:
public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2])
{
if(weapon != 0)
{
if(GetPlayerWeaponSlot(2) == weapon)
{
//do something
}
}
}
I think we can hook without OnPlayerRunCmd... How? I don't know
__________________