Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma semicolon 1
- #define DEBUG
- #define PLUGIN_AUTHOR ""
- #define PLUGIN_VERSION "0.00"
- #include <sourcemod>
- #include <sdktools>
- public Plugin myinfo =
- {
- name = "",
- author = PLUGIN_AUTHOR,
- description = "",
- version = PLUGIN_VERSION,
- url = ""
- };
- public void OnPluginStart()
- {
- init();
- }
- stock void init()
- {
- HookEvent("player_spawn", onSpawn);
- HookEvent("weapon_reload", onReload);
- }
- /* Player is shooting */
- public Action OnPlayerRunCmd(int client, &buttons, &impulse, float vel[3], float angles[3], &weapon);
- {
- if ((buttons & IN_ATTACK) == IN_ATTACK)
- {
- for (int wep; wep < 4; wep++)
- {
- if ((ent = GetPlayerWeaponSlot(client, wep)) != -1)
- {
- SetEntProp(ent, Prop_Send, "m_iPrimaryReserveAmmoCount", 0);
- SetEntProp(ent, Prop_Send, "m_iClip1", 0)
- }
- }
- }
- }
- /* Remove ammo on spawn */
- public Action onSpawn(Handle event, const char[] name, bool dontBroadcast)
- {
- if (GameRules_GetProp("m_bWarmupPeriod") == 0) // it's not warm up
- {
- int cl = GetClientOfUserId(GetEventInt(event, "userid"));
- for (int wep; wep < 4; wep++)
- {
- if ((ent = GetPlayerWeaponSlot(cl, wep)) != -1)
- {
- SetEntProp(ent, Prop_Send, "m_iPrimaryReserveAmmoCount", 0);
- SetEntProp(ent, Prop_Send, "m_iClip1", 0)
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement