Quote:
Originally Posted by Cuttlas
is there any plugin restricting the player from aiming with rifles on freeze time?
what is the goal? on aim or fy maps, if they have freeze time, some players will aim with rifles at the other team's player, and as soon as freeze time ends, they shoot and kill the poor player
also, it would be perfect, if all players switched to knife on freeze time, so they can not also fix their aims with other weapons on heads!!!
|
This will prevent zooming during freeze time. Add whatever other weapons you want in the array, in the same format.
PHP Code:
#include <amxmodx>
#include <hamsandwich>
new const Version[] = "0.1";
enum BlockZoomInfo
{
HamHook:ForwardID,
WeaponName[ 13 ]
}
new g_BlockZoomWeapons[][ BlockZoomInfo ] =
{
{ HamHook:0 , "weapon_scout" },
{ HamHook:0 , "weapon_awp" }
};
public plugin_init()
{
register_plugin( "No Zoom in FreezeTime" , Version , "bugsy" );
for ( new i = 0 ; i < sizeof( g_BlockZoomWeapons ) ; i++ )
{
g_BlockZoomWeapons[ i ][ ForwardID ] = RegisterHam( Ham_Weapon_SecondaryAttack , g_BlockZoomWeapons[ i ][ WeaponName ] , "SecondaryAttack" );
}
register_event( "HLTV" , "FreezeTimeStart" , "a" , "1=0" , "2=0" );
register_logevent( "FreezeTimeEnd" , 2 , "1=Round_Start" );
}
public FreezeTimeStart()
{
for ( new i = 0 ; i < sizeof( g_BlockZoomWeapons ) ; i++ )
{
EnableHamForward( g_BlockZoomWeapons[ i ][ ForwardID ] );
}
}
public FreezeTimeEnd()
{
for ( new i = 0 ; i < sizeof( g_BlockZoomWeapons ) ; i++ )
{
DisableHamForward( g_BlockZoomWeapons[ i ][ ForwardID ] );
}
}
public SecondaryAttack( iEntity )
{
return HAM_SUPERCEDE;
}
__________________