Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma semicolon 1
- #include <sourcemod>
- #include sdktools
- public OnPluginStart()
- {
- HookEvent("ammo_pack_used", EventAu);
- }
- public Action:EventAu(Handle:event, const String:name[], bool:dontBrodcast)
- {
- new client = GetClientOfUserId(GetEventInt(event, "userid"));
- int Weapon = GetPlayerWeaponSlot(client, 0);
- if (Weapon == -1)
- {
- char sWeapon[32];
- GetEntityClassname(Weapon, sWeapon, sizeof(sWeapon));
- int AmmoType = GetEntProp(Weapon, Prop_Data, "m_iPrimaryAmmoType");
- int Clip = GetEntProp(Weapon, Prop_Send, "m_iClip1");
- SetEntProp(client, Prop_Send, "m_iAmmo", Clip + 40, _, AmmoType);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment