Advertisement
nomy

Untitled

Aug 28th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.52 KB | None | 0 0
  1. public OnPluginStart()
  2. {
  3.     for(new idx = 1; idx <= MaxClients ; idx++)
  4.     {
  5.         if(IsClientInGame(idx))
  6.         {
  7.             SDKHook(idx, SDKHook_WeaponCanUse, OnWeaponDecideUse);
  8.         }
  9.     }
  10. }
  11.  
  12. public Action:OnWeaponDecideUse(client, weapon)
  13. {
  14.     if(client > 0 && IsClientInGame(client) && IsPlayerAlive(client) && enabled)
  15.     {
  16.         decl String:sClassname[128];
  17.         GetEntityClassname(weapon, sClassname, sizeof(sClassname));
  18.         if(StrContains(sClassname, "knife", false) == -1)
  19.         {
  20.             return Plugin_Handled;
  21.         }
  22.     }
  23.     return Plugin_Continue;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement