Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPluginStart()
- {
- for(new idx = 1; idx <= MaxClients ; idx++)
- {
- if(IsClientInGame(idx))
- {
- SDKHook(idx, SDKHook_WeaponCanUse, OnWeaponDecideUse);
- }
- }
- }
- public Action:OnWeaponDecideUse(client, weapon)
- {
- if(client > 0 && IsClientInGame(client) && IsPlayerAlive(client) && enabled)
- {
- decl String:sClassname[128];
- GetEntityClassname(weapon, sClassname, sizeof(sClassname));
- if(StrContains(sClassname, "knife", false) == -1)
- {
- return Plugin_Handled;
- }
- }
- return Plugin_Continue;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement