Advertisement
DeathChaos25

[L4D2] Pistol Transfer fix

Sep 12th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.52 KB | None | 0 0
  1. if(StrEqual(class, "weapon_pistol"))
  2.     {
  3.         hasdualclient = GetEntProp(eGiverWeapon, Prop_Send, "m_hasDualWeapons");
  4.         clientclip = GetEntProp(eGiverWeapon, Prop_Send, "m_iClip1");
  5.         AcceptEntityInput(eGiverWeapon, "Kill");
  6.         eGiverWeapon = CreateEntityByName("weapon_pistol");
  7.         DispatchSpawn(eGiverWeapon);
  8.     }
  9.     GetEntityClassname(eRecipientWeapon, class, sizeof(class));
  10.     if(StrEqual(class, "weapon_pistol"))
  11.     {
  12.         hasdualtarget = GetEntProp(eRecipientWeapon, Prop_Send, "m_hasDualWeapons");
  13.         targetclip = GetEntProp(eRecipientWeapon, Prop_Send, "m_iClip1");
  14.         AcceptEntityInput(eRecipientWeapon, "Kill");
  15.         eRecipientWeapon = CreateEntityByName("weapon_pistol");
  16.         DispatchSpawn(eRecipientWeapon);
  17.     }
  18.     CallThrowWeapon(giver, eGiverWeapon, recipient);
  19.     if (swap)CallThrowWeapon(recipient, eRecipientWeapon, giver);
  20.    
  21.     CallOnWeaponDropped(giver, eGiverWeapon, recipient);
  22.     if (swap)CallOnWeaponDropped(recipient, eRecipientWeapon, giver);
  23.    
  24.     GetEntityClassname(eGiverWeapon, class, sizeof(class));
  25.     if(StrEqual(class, "weapon_pistol"))
  26.     {
  27.         SetEntProp(eGiverWeapon, Prop_Send, "m_hasDualWeapons", hasdualclient);
  28.         EquipPlayerWeapon(recipient, eGiverWeapon);
  29.         SetEntProp(eGiverWeapon, Prop_Send, "m_iClip1", clientclip);
  30.     }
  31.     GetEntityClassname(eRecipientWeapon, class, sizeof(class));
  32.     if(StrEqual(class, "weapon_pistol"))
  33.     {
  34.         SetEntProp(eRecipientWeapon, Prop_Send, "m_hasDualWeapons", hasdualtarget);
  35.         EquipPlayerWeapon(giver, eRecipientWeapon);
  36.         SetEntProp(eRecipientWeapon, Prop_Send, "m_iClip1", targetclip);
  37.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement