AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Crosshair msg + AWP bug (https://forums.alliedmods.net/showthread.php?t=87279)

xPaw 03-09-2009 10:11

Crosshair msg + AWP bug
 
hello, i'm having an bug, i'm removing from hud the money and roundtimer, and for bug fix i'm sending msg chrosshair to 0, but when i'm in awp, my chrosshair are changing, i'm getting lines, and my dot removes..

PHP Code:

public eResetHUDid ) {
    if( !
is_user_botid ) ) {
        
message_beginMSG_ALLg_msgHideWeapon_id );
        
write_byte( (1<<1<<5) );
        
message_end();
        
        if ( !(
CS_SET_FIRST_ZOOM <= cs_get_user_zoom(id) <= CS_SET_SECOND_ZOOM) ) {
            
message_beginMSG_ALLg_msgCrosshair_id );
            
write_byte);
            
message_end();
        }
    }


i'm tryed cs_get_user_zoom, but it didnt worked, maybe i'm did it wrong.

anakin_cstrike 03-09-2009 10:20

Re: Crosshair msg + AWP bug
 
Have you trying checking player's weapons? and sending the message only if he doesn't holds an awp?

xPaw 03-09-2009 10:25

Re: Crosshair msg + AWP bug
 
maybe he holds awp, but he is not in zoom, resethud sended, and he got crosshair on awp? cheating :D

ConnorMcLeod 03-09-2009 12:49

Re: Crosshair msg + AWP bug
 
MSG_ALL ?

xPaw 03-09-2009 13:16

Re: Crosshair msg + AWP bug
 
i know... i changed MSG_ONE_UNRELIABLE, but that doesnt change anything

ConnorMcLeod 03-09-2009 13:43

Re: Crosshair msg + AWP bug
 
Try client_cmd(id, "crosshair 1"), it's really horrible but blended to your code it won't be noticable :mrgreen:
Plus it could work.

xPaw 03-09-2009 13:57

Re: Crosshair msg + AWP bug
 
maybe there better way :D ? or get that cs_Get_user_zoom to work

edit: also your way didnt worked, i just tested on server :D

ConnorMcLeod 03-09-2009 14:12

Re: Crosshair msg + AWP bug
 
I used this without any bug with snipers :
PHP Code:

public Event_ResetHUD(id)
{
    
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("HideWeapon"), _id)
    
write_byte((1<<4)|(1<<5))
    
message_end()
        
    
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("Crosshair"), _id)
    
write_byte(0)
    
message_end()



Your bug should come from something else, make sure you type crosshair 1 in your game console.

xPaw 03-09-2009 14:28

Re: Crosshair msg + AWP bug
 
i have smae code, just get_user_msgid in init, but i can make screenshot how it before and after...


All times are GMT -4. The time now is 08:54.

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