Raised This Month: $51 Target: $400
 12% 

First plugin Rate of Fire for HL2DM--need some help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jdproper34
Junior Member
Join Date: Sep 2008
Old 03-18-2009 , 23:32   First plugin Rate of Fire for HL2DM--need some help
Reply With Quote #1

Hello Guys and Gals,

This plugin is based off of this Rof plugin

http://forums.alliedmods.net/showthr...ight=fire+rate

But my plugin is for HL2DM not for CSS.
I compile it fine but when I started the server with it in the plugins it threw this at me

L 03/18/2009 - 17:46:11: [SM] Native "HookEvent" reported: Game event "player_activeweapon" does not exist
L 03/18/2009 - 17:46:11: [SM] Displaying call stack trace for plugin "Rof_beta.smx":
L 03/18/2009 - 17:46:11: [SM] [0] Line 60, Rof_beta.sp::OnPluginStart()

I'm attaching the .sp file and the .smx file
Thanks for any help guys and gals.

Jason

here is the source code


Code:
/**
* ====================
* 
*  Rate of Fire
* 
* ==================== 
*/
#pragma semicolon 1
#include <sourcemod>
#include <sdktools_sound>
#define VERSION "0.9"
// activeWeapon uses the same weapon to integer representations as enum WeaponType
// i.e.  The weapon pistol = 1; the smg1 = 2; ect.
new activeWeapon[MAXPLAYERS+1];
// Modes:  0 = no mode  ---  1 = auto  ---  2 = semi-auto  ---  3 = burst
new primWeaponMode[MAXPLAYERS+1];
new secWeaponMode[MAXPLAYERS+1];
// 0 = Active Weapon Switched  ---  1 = Change Rof command used
new bool:weaponChanged[MAXPLAYERS+1];
static const String:bindAuto[] = "bind z +auto";
static const String:bindSemi[] = "bind z semi";
static const String:bindBurst[] = "bind z burst";
static const String:xBurst[] = "+attack2; w5; -attack2";
//static const String:crosshair[] = "cl_crosshairscale";
static const String:soundFile[] = "weapons/RoF.wav";
static const Float:soundVolume = 1.0;
new Handle:WeaponTrie;
enum WeaponType
{
 Weapon_None = 0,
 Weapon_pistol = 1,
 Weapon_smg1 = 2,
 Weapon_ar2 = 3,
 Weapon_shotgun = 4,
 Weapon_crossbow = 5,
 Weapon_357 = 6,
 Weapon_frag = 7,
 
};
public OnPluginStart()player_activeweapon
{
 // ======================================================================
 
 RegConsoleCmd("rof", RateOfFire, "Changes weapons rate of fire");
 
 // ======================================================================
 
 HookEvent("player_activeweapon", WeaponChange);
 HookEvent("player_drop", WeaponDrop);
 HookEvent("player_spawn", PlayerSpawn);
 
 // ======================================================================
 
 PrecacheSound((soundFile), true);
 
 // ======================================================================
 //
 // Inactive
 //
 //enum WeaponType
 //{
 // Weapon_None = 0,
 // Weapon_pistol = 1,
 // Weapon_smg1 = 2,
 // Weapon_ar2 = 3,
 // Weapon_shotgun = 4,
 // Weapon_crossbow = 5,
 // Weapon_357 = 6,
 // Weapon_frag = 7,
 
 //};
 //---------------------------------------------------
 
 WeaponTrie = CreateTrie();
 // Primary
 SetTrieValue(WeaponTrie, "none", Weapon_None);
 SetTrieValue(WeaponTrie, "pistol", Weapon_pistol);
 SetTrieValue(WeaponTrie, "smg1", Weapon_smg1);
 SetTrieValue(WeaponTrie, "ar2", Weapon_ar2);
 SetTrieValue(WeaponTrie, "shotgun", Weapon_shotgun);
 SetTrieValue(WeaponTrie, "crossbow", Weapon_crossbow);
 SetTrieValue(WeaponTrie, "357", Weapon_357);
 SetTrieValue(WeaponTrie, "frag", Weapon_frag);
 
 
 //---------------------------------------------------------------------
 
 CreateConVar("gs_selective_fire_version",VERSION,"[SelectiveFire] Current version of this plugin",FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
 
 //---------------------------------------------------------------------
}
public Action:WeaponChange(Handle:event, const String:name[], bool:dontBroadcast)
{
 new index = GetClientOfUserId(GetEventInt(event, "userid"));
 
 weaponChanged[index] = true;
 
 decl String:weapon[24];
 GetEventString(event, "weapon", weapon, sizeof(weapon));
 
 GetTrieValue(WeaponTrie, weapon, activeWeapon[index]);
 
 ChangeRateOfFire(index);
}
public Action:WeaponDrop(Handle:event, const String:name[], bool:dontBroadcast)
{
 new index = GetClientOfUserId(GetEventInt(event, "userid"));
 
 decl String:weapon[24];
 GetEventString(event, "weapon", weapon, sizeof(weapon));
 
 new weaponDropped;
 GetTrieValue(WeaponTrie, weapon, weaponDropped);
 
 switch (weaponDropped)
 {
  case 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16:
  {
   // No primary weapon mode now
   primWeaponMode[index] = 0;
  }
  case 17, 18, 19, 20, 21, 22, 23, 24:
  {
   // No secondary weapon mode now
   secWeaponMode[index] = 0;
  }
 }
}
public Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
 new index = GetClientOfUserId(GetEventInt(event, "userid"));
 
 // Resets rate of fire to automatic
 primWeaponMode[index] = 1;
 secWeaponMode[index] = 1;
 weaponChanged[index] = true;
 ChangeRateOfFire(index);
}
public Action:RateOfFire(client, args)
{
 if (IsPlayerAlive(client))
 {
  new index = client;
  weaponChanged[index] = false;
  ChangeRateOfFire(client);
 }
 
 return Plugin_Handled;
}
ChangeRateOfFire(client)
{
 switch (activeWeapon[client])
 {
  case 1:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, bindAuto);
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, bindSemi);
      
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, bindSemi);
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, bindAuto);
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 2:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, bindAuto);
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, bindSemi);
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, bindSemi);
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, bindAuto);
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 3:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      
      //SetConVarInt(cl_crosshairscale, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 4:
  {
   if (weaponChanged[client])
   {
    // Set to auto
    ClientCommand(client, (bindAuto));
    
    //SetConVarInt(crosshair, 0, false, false);
    primWeaponMode[client] = 1;
   }
   else
   {
    playRofSound(client);
   }
  }
  case 5:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 6:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 7:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 8:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
     // if burst
     case 3:
     {
      // Set to burst
      ClientCommand(client, (bindBurst));
      //SetConVarInt(crosshair, 1500, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to burst
      ClientCommand(client, (bindBurst));
      //SetConVarInt(crosshair, 1500, false, false);
      primWeaponMode[client] = 3;
     }
     // if burst
     case 3:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 9:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
     // if burst
     case 3:
     {
      // Set to burst
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 1500, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to burst
      ClientCommand(client, (bindAuto));
      ClientCommand(client, (xBurst));
      //SetConVarInt(crosshair, 1500, false, false);
      primWeaponMode[client] = 3;
     }
     // if burst
     case 3:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      ClientCommand(client, (xBurst));
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 10:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 11:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 12:
  {
   if (weaponChanged[client])
   {
    // Set to auto
    ClientCommand(client, (bindAuto));
    
    //SetConVarInt(crosshair, 0, false, false);
    primWeaponMode[client] = 1;
   }
   else
   {
    playRofSound(client);
   }
  }
  case 13:
  {
   if (weaponChanged[client])
   {
    // Set to auto
    ClientCommand(client, (bindAuto));
    
    //SetConVarInt(crosshair, 0, false, false);
    primWeaponMode[client] = 1;
   }
   else
   {
    playRofSound(client);
   }
  }
  case 14:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 15:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  case 16:
  {
   if (weaponChanged[client])
   {
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (primWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      primWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      primWeaponMode[client] = 1;
     }
    }
   }
  }
  // Secondary
  case 17:
  {
   if (weaponChanged[client])
   {
    switch (secWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (secWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      secWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      secWeaponMode[client] = 1;
     }
    }
   }
  }
  case 18:
  {
   if (weaponChanged[client])
   {
    switch (secWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if semi-auto
     case 2:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (secWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to semi-auto
      ClientCommand(client, (bindSemi));
      //SetConVarInt(crosshair, 1750, false, false);
      secWeaponMode[client] = 2;
     }
     // if semi-auto
     case 2:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
      secWeaponMode[client] = 1;
     }
    }
   }
  }
  case 19:
  {
   if (weaponChanged[client])
   {
    switch (secWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 0, false, false);
     }
     // if burst
     case 3:
     {
      // Set to burst
      ClientCommand(client, (bindAuto));
      //SetConVarInt(crosshair, 1500, false, false);
     }
    }
   }
   // Rof Command used
   //elseif (rofCommandUsed)
   else
   {
    playRofSound(client);
    switch (secWeaponMode[client])
    {
     // if auto
     case 1:
     {
      // Set to burst
      ClientCommand(client, (bindAuto));
      ClientCommand(client, (xBurst));
      //SetConVarInt(crosshair, 1500, false, false);
      secWeaponMode[client] = 3;
     }
     // if burst
     case 3:
     {
      // Set to auto
      ClientCommand(client, (bindAuto));
      ClientCommand(client, (xBurst));
      //SetConVarInt(crosshair, 0, false, false);
      secWeaponMode[client] = 1;
     }
    }
   }
  }
  case 20, 21, 22, 23, 24:
  {
   if (weaponChanged[client])
   {
    // set to auto
    ClientCommand(client, (bindAuto));
    //SetConVarInt(crosshair, 0, false, false);
    secWeaponMode[client] = 1;
   }
   else
   {
    playRofSound(client);
   }
  }
  // Accessories
  case 25, 26, 27, 28, 29:
  {
   if (weaponChanged[client])
   {
    // set to auto
    ClientCommand(client, (bindAuto));
    //SetConVarInt(crosshair, 0, false, false);
   }
  }
 }
}
playRofSound(client)
{
 EmitSoundToClient(client, (soundFile), _, _, _, _, (soundVolume));
}
// End
Attached Files
File Type: smx Rof_beta.smx (5.7 KB, 180 views)
File Type: sp Get Plugin or Get Source (Rof_beta.sp - 423 views - 22.4 KB)

Last edited by bl4nk; 12-17-2009 at 19:04. Reason: please use the [code][/code] tags
jdproper34 is offline
menotyou
Member
Join Date: Jul 2008
Old 12-17-2009 , 16:47   Re: First plugin Rate of Fire for HL2DM--need some help
Reply With Quote #2

Have yet to test this
Wanted to ask does the mod change the rate of fire and just put up these errors?
__________________
menotyou is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 12-18-2009 , 15:11   Re: First plugin Rate of Fire for HL2DM--need some help
Reply With Quote #3

Quote:
L 03/18/2009 - 17:46:11: [SM] Native "HookEvent" reported: Game event "player_activeweapon" does not exist
As the log says the event doesn´t exist in your game so you have to find another way.
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
menotyou
Member
Join Date: Jul 2008
Old 12-18-2009 , 17:12   Re: First plugin Rate of Fire for HL2DM--need some help
Reply With Quote #4

Quote:
Originally Posted by andi67 View Post
As the log says the event doesn´t exist in your game so you have to find another way.
Is there any plugins to change the rate of fire in hl2dm that you know of as i have searched and found only thus
__________________
menotyou is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode