DeathChaos25

l4d1_arms fix

Nov 21st, 2015
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3. #include <l4d2sendproxy>
  4. #pragma semicolon 1
  5.  
  6. public OnClientPostAdminCheck(client)
  7. {
  8.     SendProxy_Hook(client, "m_iTeamNum", Prop_Int, ProxyCallBack);
  9. }
  10.  
  11. public Action:ProxyCallBack(entity, const String:propname[], &iValue, element)
  12. {
  13.     if (IsSurvivor(entity))
  14.     {
  15.         iValue = 2;
  16.         return Plugin_Changed;
  17.     }
  18.     return Plugin_Continue;
  19. }
  20.  
  21. stock bool:IsSurvivor(client)
  22. {
  23.     if (client > 0 && client <= MaxClients && IsClientInGame(client) && (GetClientTeam(client) == 4 || GetClientTeam(client) ==2))
  24.     {
  25.         return true;
  26.     }
  27.     return false;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment