Update:
IT WORKS! I changed it from using OnGameFrame() to SDKHooks_PreThink which handles clients much better and now the duration till removal works
The ability:
Code:
"abilityX" // Replace the x with a number numbnuts
{
"name" "rage_timed_new_weapon"
"arg1" "" // Weapon classname
"arg2" "" // Weapon index
"arg3" "" // Weapon attributes(You should know how to do this, but e.g. "2 ; 3.0"(Damage bonus)
"arg4" "" // Weapon slot (0: Primary, 1: Secondary, 2: Melee)
"arg5" "" // Weapon off hand ammo (Or clipless weapons ammo)
"arg6" "" // Weapon clip ammo
"arg7" "1" // Don't change this
"arg8" "" // Duration to keep the weapon, set to 0 to keep the weapon
"plugin_name" "ff2_timed_new_weapon"
}
It functions exactly the same as the default rage ability, only with the added benefit of limiting how long you keep the weapon
I should mention, that it probably has some redundancies in it, I'm notorious for doing that
ff2_timed_new_weapon.ff2