Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnMapStart()
- {
- AddCommandListener(CommandListener);
- }
- public Action:CommandListener(client, const String:command[], args)
- {
- if (StrEqual(command, "go_away_from_keyboard ", false))
- {
- if(IsSurvivorPinned(client))
- {
- return Plugin_Handled;
- }
- }
- return Plugin_Continue;
- }
- public IsSurvivorPinned(client)
- {
- new attacker = GetEntPropEnt(client, Prop_Send, "m_pummelAttacker");
- if (attacker > 0 && attacker != client)
- return true;
- attacker = GetEntPropEnt(client, Prop_Send, "m_carryAttacker");
- if (attacker > 0 && attacker != client)
- return true;
- attacker = GetEntPropEnt(client, Prop_Send, "m_pounceAttacker");
- if (attacker > 0 && attacker != client)
- return true;
- attacker = GetEntPropEnt(client, Prop_Send, "m_tongueOwner");
- if (attacker > 0 && attacker != client)
- return true;
- attacker = GetEntPropEnt(client, Prop_Send, "m_jockeyAttacker");
- if (attacker > 0 && attacker != client)
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment