AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get the crosshair position (https://forums.alliedmods.net/showthread.php?t=100418)

One 08-14-2009 12:06

get the crosshair position
 
tittle?!

minimiller 08-14-2009 12:10

Re: get the crosshair position
 
the title** dosent explain enough

xPaw 08-14-2009 12:11

Re: get the crosshair position
 
-1.0, -1.0 ?!

Jon 08-14-2009 12:12

Re: get the crosshair position
 
get_user_origin( id, vOrigin, 3 ) ?

Bad description.

One 08-14-2009 12:28

Re: get the crosshair position
 
i want to block +lookup or +lookdown. but player can use it in the cases.

example the origin of crosshair when its in the middle = 0

the topmost = 100
& the lower position = -100

i want to block that player can move crosshair more then +50 & -50
so by -50 is stop. & player cant move the crosshair lower.

xPaw 08-14-2009 12:56

Re: get the crosshair position
 
pev_v_angle

Alka 08-14-2009 16:39

Re: get the crosshair position
 
I don't think is other way than PlayerPreThink, get pev_v_angles, make some verifications if vAngle[1] is >= -50 set it to -50 and same for 50.

One 08-14-2009 17:07

Re: get the crosshair position
 
PHP Code:

if( is_user_alive(id)) { // is_user_alive
        
static Float:vAngles];
        
pevidpev_v_anglevAngles );
        
        if( 
vAngles] > 10.0 ) {
            
vAngles] = 10.0;
            
            
set_pevidpev_anglesvAngles );
            
set_pevidpev_fixangle);
        }
        else if( 
vAngles] < 4.0 ) {
            
vAngles] = 4.0;
            
            
set_pevidpev_anglesvAngles );
            
set_pevidpev_fixangle);
        }
    } 

on pc its ok but on the server screen shakes :(

i tried so too ::

PHP Code:

if( is_user_alive(id)) { // is_user_alive
        
static Float:vAngles];
        
pevidpev_v_anglevAngles );
        
        if( 
vAngles] > 4.0 ) {
            
vAngles] = 4.0;
            
            
set_pevidpev_anglesvAngles );
            
set_pevidpev_fixangle);
        }
        else if( 
vAngles] < 4.0 ) {
            
vAngles] = 4.0;
            
            
set_pevidpev_anglesvAngles );
            
set_pevidpev_fixangle);
        }
    } 

& its in my PreThink

xPaw 08-15-2009 05:01

Re: get the crosshair position
 
Atleast you could say what i gave you this code o_0.

Alka 08-15-2009 05:22

Re: get the crosshair position
 
Yea, screen will shake a bit as long as fakemeta forward is slower than engine so you can't set it really fast before engine move the aim.


All times are GMT -4. The time now is 15:13.

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