View Single Post
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