FlacoBey

Untitled

May 30th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3. #include <sdkhooks>
  4. #include <iAmmo.CoreClude>
  5.  
  6. #pragma semicolon 1
  7. #pragma newdecls required
  8.  
  9. public void OnPluginStart()
  10. {
  11.     RegConsoleCmd("sm_clip", clip);
  12. }
  13.  
  14. public Action clip(int client, int args)
  15. {
  16.     int weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
  17.     if(IsValidEntity(weapon))
  18.     {
  19.         int m_iPrimaryAmmoType = -1;
  20.         if ((m_iPrimaryAmmoType = GetEntProp(weapon, Prop_Send, "m_iPrimaryAmmoType")) != -1)
  21.         {
  22.             SetEntProp(client, Prop_Send, "m_iAmmo", 0, _, m_iPrimaryAmmoType);
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment