Raised This Month: $ Target: $400
 0% 

How to Detect Slot number Pressing?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
inklesspen
Member
Join Date: Nov 2015
Location: Russia, Moscow
Old 07-25-2017 , 03:25   Re: How to Detect Slot number Pressing?
Reply With Quote #11

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 clientint &buttonsint &impulsefloat vel[3], float angles[3], int &weaponint &subtypeint &cmdnumint &tickcountint &seedint mouse[2])
{
    if(
weapon != 0)
    {
        if(
GetPlayerWeaponSlot(2) == weapon)
        {
            
//do something
        
}
    }

I think we can hook without OnPlayerRunCmd... How? I don't know
__________________
Mai inglish is veri gud!
inklesspen is offline
Send a message via Skype™ to inklesspen
 



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 00:42.


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