Raised This Month: $ Target: $400
 0% 

Do spray from any weapon (CS)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-28-2013 , 09:19   Re: Do spray from any weapon (CS)
Reply With Quote #1

I don't know, try it.
Also, client_cmd is usually a poor way for that kind of stuff, would be better to force IN_ATTACK button in CmdStart , or in PostThink.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 12-28-2013 , 09:30   Re: Do spray from any weapon (CS)
Reply With Quote #2

Quote:
Originally Posted by ConnorMcLeod View Post
I don't know, try it.
Also, client_cmd is usually a poor way for that kind of stuff, would be better to force IN_ATTACK button in CmdStart , or in PostThink.
The problem is that I don't know how to get ammo number in this function.
I think need to use get_pdata_int() or something like that, but question in offsets...

UPD, DONE:
PHP Code:
    new amm get_pdata_int(iPISTOL51);    
    if(
amm == 10)
    {
        
set_pdata_int(iPISTOL5120);
    } 

Last edited by Phant; 12-28-2013 at 09:36.
Phant is offline
Send a message via ICQ to Phant
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-28-2013 , 15:13   Re: Do spray from any weapon (CS)
Reply With Quote #3

Example.

PHP Code:
public OnCUSP_PrimaryAttack_PiUSP 
{
    if( 
cs_get_weapon_ammo(iUSP) > )
    {
        
set_pdata_int(iUSPm_iShotFired0XO_CBASEPLAYERWEAPON); 
    }

If you use fakemeta and pdatas, don't forget to add the correct linux offset difference.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 10:07.


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