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

no aim on Freeze Time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cuttlas
Senior Member
Join Date: Jan 2015
Old 11-29-2023 , 15:19   no aim on Freeze Time
Reply With Quote #1

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!!!
__________________
To Infinity n Beyond
Cuttlas is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-02-2023 , 22:51   Re: no aim on Freeze Time
Reply With Quote #2

Quote:
Originally Posted by Cuttlas View Post
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,
    
WeaponName13 ]
}
new 
g_BlockZoomWeapons[][ BlockZoomInfo ] = 
{
    { 
HamHook:"weapon_scout" },
    { 
HamHook:"weapon_awp" }
};

public 
plugin_init()
{
    
register_plugin"No Zoom in FreezeTime" Version "bugsy" );
    
    for ( new 
sizeofg_BlockZoomWeapons ) ; i++ )
    {
        
g_BlockZoomWeapons][ ForwardID ] = RegisterHamHam_Weapon_SecondaryAttack g_BlockZoomWeapons][ WeaponName ]  , "SecondaryAttack" );
    }
    
    
register_event"HLTV" "FreezeTimeStart" "a" "1=0" "2=0" );
    
register_logevent"FreezeTimeEnd" "1=Round_Start" );
}

public 
FreezeTimeStart()
{
    for ( new 
sizeofg_BlockZoomWeapons ) ; i++ )
    {
        
EnableHamForwardg_BlockZoomWeapons][ ForwardID ] );
    }
}

public 
FreezeTimeEnd()
{
    for ( new 
sizeofg_BlockZoomWeapons ) ; i++ )
    {
        
DisableHamForwardg_BlockZoomWeapons][ ForwardID ] );
    }
}

public 
SecondaryAttackiEntity )
{
    return 
HAM_SUPERCEDE;

__________________

Last edited by Bugsy; 12-02-2023 at 22:52.
Bugsy is offline
Cuttlas
Senior Member
Join Date: Jan 2015
Old 12-03-2023 , 07:45   Re: no aim on Freeze Time
Reply With Quote #3

thank you, Bugsy. Keep up the good work bro.
__________________
To Infinity n Beyond
Cuttlas is offline
101
Member
Join Date: Nov 2023
Old 12-03-2023 , 11:01   Re: no aim on Freeze Time
Reply With Quote #4

OR
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>

new FMPreThink;

public 
plugin_init() 
{
    
register_event("HLTV","FreezeTimeStart","a","1=0","2=0");
    
register_logevent("FreezeTimeEnd",2,"1=Round_Start");
}

public 
FreezeTimeStart()
    
FMPreThink=register_forward(FM_PlayerPreThink,"FB_PreThink");
    
public 
FreezeTimeEnd()
    
unregister_forward(FM_PlayerPreThink,FMPreThink);

public 
FB_PreThink(id)
    if (
cs_get_user_zoom(id))
        
cs_set_user_zoom(id,CS_SET_NO_ZOOM,1); 
Attached Files
File Type: sma Get Plugin or Get Source (Block_Zoom_While_Freezing.sma - 27 views - 492 Bytes)

Last edited by 101; 12-04-2023 at 22:36. Reason: Bugsy's Order
101 is offline
Cuttlas
Senior Member
Join Date: Jan 2015
Old 12-03-2023 , 22:12   Re: no aim on Freeze Time
Reply With Quote #5

Quote:
Originally Posted by 101 View Post
OR
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>

new FMPreThink;

public 
plugin_init() 
{
    
register_event("HLTV","FreezeTimeStart","a","1=0","2=0");
    
register_logevent("FreezeTimeEnd",2,"1=Round_Start");
}

public 
FreezeTimeStart()
    
FMPreThink=register_forward(FM_PlayerPreThink,"FB_PreThink");
    
public 
FreezeTimeEnd()
    
unregister_forward(FM_PlayerPreThink,FMPreThink);

public 
FB_PreThink(P)
    
cs_set_user_zoom(P,CS_SET_NO_ZOOM,1); 
that is also perfect and small. thank you, bro, 101
__________________
To Infinity n Beyond

Last edited by Cuttlas; 12-03-2023 at 22:12.
Cuttlas is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-04-2023 , 12:09   Re: no aim on Freeze Time
Reply With Quote #6

Small/less lines is not the goal.

101's plugin is spamming the cs_set_user_zoom() native for all players during freeze time. This is a shortcut approach.
My plugin blocks attack2 (zoom) only when a player tries to use it, which is more efficient.
__________________
Bugsy is offline
101
Member
Join Date: Nov 2023
Old 12-04-2023 , 22:29   Re: no aim on Freeze Time
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
Small/less lines is not the goal.
its the most important goal in scripting (SO NEW CODERS CAN UNDERSTAND WHAT THE F IS GOING ON) instead of lost in unnecessary twists and loops

Quote:
101's plugin is spamming the cs_set_user_zoom() native for all players during freeze time. This is a shortcut approach.
My plugin blocks attack2 (zoom) only when a player tries to use it, which is more efficient.
if hook-user-zoom is easier for metamod than set-user-zoom , then i'm SORRY

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>

new FMPreThink;

public 
plugin_init() 
{
    
register_event("HLTV","FreezeTimeStart","a","1=0","2=0");
    
register_logevent("FreezeTimeEnd",2,"1=Round_Start");
}

public 
FreezeTimeStart()
    
FMPreThink=register_forward(FM_PlayerPreThink,"FB_PreThink");
    
public 
FreezeTimeEnd()
    
unregister_forward(FM_PlayerPreThink,FMPreThink);

public 
FB_PreThink(id)
    if (
cs_get_user_zoom(id))
        
cs_set_user_zoom(id,CS_SET_NO_ZOOM,1); 
it's better 4 u to ally in-order to Write a fully simple f guide of how natives and hooks work in metamod instead of blaming others , and thats y this site is full of ?questions? .
By the way , Your Code is So Prefect , but u have to know that :
Ham_Weapon_SecondaryAttack is "spamming" another native !

Last edited by 101; 12-04-2023 at 22:48.
101 is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 12-05-2023 , 01:48   Re: no aim on Freeze Time
Reply With Quote #8

Where is this confidence coming from? Instead of learning from it, you still try to explain yourself. Bugsy's code is far more efficient, end of topic.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
101
Member
Join Date: Nov 2023
Old 12-05-2023 , 02:29   Re: no aim on Freeze Time
Reply With Quote #9

Quote:
Originally Posted by bibu View Post
Where is this confidence coming from? Instead of learning from it, you still try to explain yourself. Bugsy's code is far more efficient, end of topic.
_i_
101 is offline
101
Member
Join Date: Nov 2023
Old 12-05-2023 , 04:15   Re: no aim on Freeze Time
Reply With Quote #10

Quote:
Originally Posted by bibu View Post
Where is this confidence coming from? Instead of learning from it, you still try to explain yourself. Bugsy's code is far more efficient, end of topic.
that because you are far more stupid
101 is offline
Old 12-05-2023, 04:54
Cuttlas
This message has been deleted by Cuttlas.
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 21:30.


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