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

Solved Check if a weapon have fireburst


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ojisan
New Member
Join Date: Jan 2024
Old 01-31-2024 , 04:56   Check if a weapon have fireburst
Reply With Quote #1

Hello everyone! I am struggling finding out how to check if weapon has a fireburst. I can check if the weapon has silencer but it is different if firebust. Please help me.

Last edited by ojisan; 02-08-2024 at 07:34.
ojisan is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 01-31-2024 , 17:54   Re: Check if a weapon have fireburst
Reply With Quote #2

firebust?
__________________
mlibre is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 02-02-2024 , 00:08   Re: Check if a weapon have fireburst
Reply With Quote #3

Which Game?
__________________
HarryPotter is offline
ojisan
New Member
Join Date: Jan 2024
Old 02-07-2024 , 11:50   Re: Check if a weapon have fireburst
Reply With Quote #4

It is for cs:s
The weapon is glock. Any idea?
ojisan is offline
ojisan
New Member
Join Date: Jan 2024
Old 02-08-2024 , 07:28   Re: Check if a weapon have fireburst
Reply With Quote #5

I'm okey now problem solve!



public bool isOn2ndMode(int weapon)
{
bool fireMode = false;
char ClassName[30];
GetEdictClassname(weapon, ClassName, sizeof(ClassName));
if(StrEqual(ClassName, "weapon_glock"))
{
if(GetEntProp(weapon, Prop_Send, "m_bBurstMode") == 1)
{
fireMode = true;
}
}
return fireMode;
}
ojisan is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 02-08-2024 , 10:48   Re: Check if a weapon have fireburst
Reply With Quote #6

nice, use bbcode [php]here..[/php]
__________________
mlibre is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 02-08-2024 , 11:00   Re: Check if a weapon have fireburst
Reply With Quote #7

Quote:
Originally Posted by ojisan View Post
I'm okey now problem solve!
can be shortened to this:
PHP Code:
bool isOn2ndMode(int weapon)
{
    static 
char cls[16];
    return 
weapon MaxClients && GetEntityClassname(weaponclssizeof(cls)) && !strcmp(cls[7], "glock")
        && 
GetEntProp(weaponProp_Send"m_bBurstMode");

__________________

Last edited by Grey83; 02-08-2024 at 11:00.
Grey83 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:21.


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