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

cstrike functions : cs_set_weapon_burst , ...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 12-20-2009 , 06:04   cstrike functions : cs_set_weapon_burst , ...
Reply With Quote #1

I tried to work with cs_set_weapon_burst and cs_set_weapon_silen.
But evry attempt failed, are these functions working?

Now dont tell me they only work for glock and famas for burst, and for m4a1 and usp for silince I know that.

Grtz Grim
__________________
I am out of order!
grimvh2 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-20-2009 , 07:01   Re: cstrike functions : cs_set_weapon_burst , ...
Reply With Quote #2

How do you use this native exactly ? Remember the index is the weapon index not the player's.
__________________
Arkshine is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 12-20-2009 , 07:33   Re: cstrike functions : cs_set_weapon_burst , ...
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
How do you use this native exactly ? Remember the index is the weapon index not the player's.
I know,
I tried
Code:
// When I know he gots those weapons I try this

new ent = find_ent_by_owner(0, "weapon_glock18", id) 
cs_set_weapon_burst(ent,0);

// or

new clip, ammo, weapon = get_user_weapon(id,clip,ammo);
//if weapon is CSW_GLOCK18 or CSW_FAMAS
cs_set_weapon_burst(weapon,0);
Both doesnt work for me :s
__________________
I am out of order!
grimvh2 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-20-2009 , 07:38   Re: cstrike functions : cs_set_weapon_burst , ...
Reply With Quote #4

For the first, check the value of ent.

for the second, get_user_weapon return CSW_ value and not the weapon index.

For both, you can use the offset m_pActiveItem ( 373 ) if the weapon is currently holding by the plauer.
__________________
Arkshine is offline
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 12-20-2009 , 07:41   Re: cstrike functions : cs_set_weapon_burst , ...
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
For the first, check the value of ent.

for the second, get_user_weapon return CSW_ value and not the weapon index.

For both, you can use the offset m_pActiveItem ( 373 ) if the weapon is currently holding by the plauer.
He should use this:
PHP Code:
            new weaponID get_pdata_cbase(attacker368); 
01101101 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-20-2009 , 07:50   Re: cstrike functions : cs_set_weapon_burst , ...
Reply With Quote #6

No it should not.
__________________
Arkshine is offline
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 12-20-2009 , 08:05   Re: cstrike functions : cs_set_weapon_burst , ...
Reply With Quote #7

Why not?
01101101 is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 12-20-2009 , 08:21   Re: cstrike functions : cs_set_weapon_burst , ...
Reply With Quote #8

Quote:
Originally Posted by 01101101 View Post
Why not?
Dunno why but it still doesnt work xD

Code:
new clip, ammo, weapon = get_user_weapon(id,clip,ammo);
if(weapon == CSW_GLOCK18)
{
   new ent = get_pdata_cbase(id, 368);  
   cs_set_weapon_burst(ent,0);
}
__________________
I am out of order!
grimvh2 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-20-2009 , 08:41   Re: cstrike functions : cs_set_weapon_burst , ...
Reply With Quote #9

Did you try what I've said ?
__________________
Arkshine is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 12-20-2009 , 08:52   Re: cstrike functions : cs_set_weapon_burst , ...
Reply With Quote #10

Quote:
Originally Posted by Arkshine View Post
Did you try what I've said ?
ah thx, your right

Working code :

Code:
#define m_pActiveItem 373

new ent = get_pdata_cbase(id, m_pActiveItem, 5);  
cs_set_weapon_burst(ent,0);
__________________
I am out of order!
grimvh2 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 17:08.


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