Raised This Month: $32 Target: $400
 8% 

csgo best way use


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BassPower
Member
Join Date: Mar 2011
Location: Lithuania
Old 02-22-2018 , 07:03   csgo best way use
Reply With Quote #1

public Action WeaponCanUseGunsRound(int client, int weapon)
{
if (RR || SGR || SSG != 1)return Plugin_Continue;
char sWeapon[32];
GetEdictClassname(weapon, sWeapon, sizeof(sWeapon));
if (StrEqual(sWeapon, "weapon_deagle") || StrEqual(sWeapon, "weapon_awp"))
{
return Plugin_Handled;
}
return Plugin_Changed;
}

best way use:
if (RR || SGR || SSG != 1)return Plugin_Continue;
if (RR && SGR && SSG != 1)return Plugin_Continue;
if ((RR != 1) || (SGR != 1) || (SSG != 1))return Plugin_Continue;
BassPower is offline
Papero
Veteran Member
Join Date: Aug 2016
Location: Italy
Old 02-22-2018 , 10:09   Re: csgo best way use
Reply With Quote #2

Tell us more info (like posting your whole code), we even dont know what are you trying to achieve...
__________________
My Plugins
SPCode


Steam: hexer504
Telegram: Hexah
Discord: Hexah#6903

If you like my work you can donate here!
Papero is offline
BassPower
Member
Join Date: Mar 2011
Location: Lithuania
Old 02-22-2018 , 10:36   Re: csgo best way use
Reply With Quote #3

Quote:
Originally Posted by Papero View Post
Tell us more info (like posting your whole code), we even dont know what are you trying to achieve...
i can post all code:

PHP Code:
int RR = -1;
int SRG = -1;
int SSG = -1;

SDKHook(clientSDKHook_WeaponCanUseWeaponCanUseGunsRound);
SDKHook(clientSDKHook_WeaponCanSwitchToWeaponCanUseGunsRound);

public 
Action WeaponCanUseGunsRound(int clientint weapon)
{
if (
RR || SGR || SSG != 1)return Plugin_Continue;
char sWeapon[32];
GetEdictClassname(weaponsWeaponsizeof(sWeapon));
if (
StrEqual(sWeapon"weapon_deagle") || StrEqual(sWeapon"weapon_awp"))
{
return 
Plugin_Handled;
}
return 
Plugin_Changed;

here is function to use weapons like in RR = Rifle Round - Handled weapons awp and dgl and if SSG = Scout round do same, just want know how fix because now not block weapons problem is if (RR || SGR || SSG != 1)return Plugin_Continue; if i write just if (RR != 1)return Plugin_Continue; is ok how add more in 1 function
BassPower is offline
Papero
Veteran Member
Join Date: Aug 2016
Location: Italy
Old 02-23-2018 , 03:16   Re: csgo best way use
Reply With Quote #4

Quote:
Originally Posted by BassPower View Post
i can post all code:

PHP Code:
int RR = -1;
int SRG = -1;
int SSG = -1;

SDKHook(clientSDKHook_WeaponCanUseWeaponCanUseGunsRound);
SDKHook(clientSDKHook_WeaponCanSwitchToWeaponCanUseGunsRound);

public 
Action WeaponCanUseGunsRound(int clientint weapon)
{
if (
RR || SGR || SSG != 1)return Plugin_Continue;
char sWeapon[32];
GetEdictClassname(weaponsWeaponsizeof(sWeapon));
if (
StrEqual(sWeapon"weapon_deagle") || StrEqual(sWeapon"weapon_awp"))
{
return 
Plugin_Handled;
}
return 
Plugin_Changed;

here is function to use weapons like in RR = Rifle Round - Handled weapons awp and dgl and if SSG = Scout round do same, just want know how fix because now not block weapons problem is if (RR || SGR || SSG != 1)return Plugin_Continue; if i write just if (RR != 1)return Plugin_Continue; is ok how add more in 1 function
You need to use SDKHook inside the OnClientPutInServer(int client) forward.
__________________
My Plugins
SPCode


Steam: hexer504
Telegram: Hexah
Discord: Hexah#6903

If you like my work you can donate here!

Last edited by Papero; 02-23-2018 at 03:17.
Papero is offline
Reply


Thread Tools
Display Modes

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 18:22.


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