As far as I know, rapid fire function has something to do with certain netprops, like "m_flNextPrimaryAttack" & "m_flNextSecondaryAttack". If you can set those two netprops correctly, the weapon's rate of fire can change.
If the rapid fire that you meant was the ability to keep shooting when holding fire button, that can be done by using "m_afButtonDisabled" netprops & then triggering that function in miliseconds. For example, like this:
BuffTrigger <- 0
function AutomaticShot()
{
local survteam = null;
while(survteam = Entities.FindByClassname(survteam, "player"))
{
if(survteam.IsSurvivor())
{
if(Time() >= BuffTrigger)
{
local ReleasedButtons = NetProps.GetPropInt(survteam, "m_afButtonDisabled");
local IsDisabled = ReleasedButtons & 1;
local IsAttacking = survteam.GetButtonMask() & 1;
local mainactiveweaponA = null;
if(survteam.GetActiveWeapon())
{
mainactiveweaponA = survteam.GetActiveWeapon().GetClassname();
}
if(mainactiveweaponA == "weapon_grenade_launcher")
{
if(IsDisabled)
{
NetProps.SetPropInt(survteam, "m_afButtonDisabled", ReleasedButtons & ~1);
}
if(IsAttacking)
{
NetProps.SetPropInt(survteam, "m_afButtonDisabled", ReleasedButtons | 1);
}
}
}
}
}
DoEntFire("!self", "CallScriptFunction", "AutomaticShot", 0.01, self, self);
}
function OnGameEvent_round_start_post_nav(event)
{
AutomaticShot();
}
If you put those functions into a vscript file, you can make grenade launcher shoot continuously by holding fire button, but it's still affected by the weapon's rate of fire.