FlacoBey

Untitled

Feb 18th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.07 KB | None | 0 0
  1. public OnMapStart()
  2. {
  3.     AddCommandListener(CommandListener);
  4. }
  5.  
  6. public Action:CommandListener(client, const String:command[], args)
  7. {
  8.     if (StrEqual(command, "go_away_from_keyboard ", false))
  9.     {
  10.         if(IsSurvivorPinned(client))
  11.         {
  12.             return Plugin_Handled;
  13.         }
  14.     }
  15.     return Plugin_Continue;
  16. }
  17.  
  18. public IsSurvivorPinned(client)
  19. {
  20.     new attacker = GetEntPropEnt(client, Prop_Send, "m_pummelAttacker");
  21.     if (attacker > 0 && attacker != client)
  22.         return true;
  23.        
  24.     attacker = GetEntPropEnt(client, Prop_Send, "m_carryAttacker");
  25.     if (attacker > 0 && attacker != client)
  26.         return true;
  27.        
  28.     attacker = GetEntPropEnt(client, Prop_Send, "m_pounceAttacker");
  29.     if (attacker > 0 && attacker != client)
  30.         return true;
  31.        
  32.     attacker = GetEntPropEnt(client, Prop_Send, "m_tongueOwner");
  33.     if (attacker > 0 && attacker != client)
  34.         return true;
  35.        
  36.     attacker = GetEntPropEnt(client, Prop_Send, "m_jockeyAttacker");
  37.     if (attacker > 0 && attacker != client)
  38.         return true;
  39.        
  40.     return false;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment