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

freelook crosshair


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lexzor
Veteran Member
Join Date: Nov 2020
Old 04-05-2022 , 22:04   freelook crosshair
Reply With Quote #1

hello. i have a csgo mod addons and i'm using a crosshair plugin which allows players to use custom crosshairs. the problem occurs when players are using default game crosshair, sometimes when i shoot freelook crosshair appear and dissapear (https://imgur.com/B2rThnn).

this is how i "restart" the crosshair to the default one.

PHP Code:

#define HUD_HIDE_CROSS (1<<6)
#define HUD_DRAW_CROSS (1<<7)

public plugin_init()
{
   
iMsgCrosshair get_user_msgid("Crosshair");
}

public 
HookCurWeapon2(id)
{
    if(!
is_user_connected(id) || !is_user_logged(id))
        return 
PLUGIN_HANDLED;

    if(
ImlecKontrol[id][SeciliCrosshair] == -1)
    {
        
Hide_NormalCrosshair(id0);
        return 
PLUGIN_HANDLED;
    }
    
    new 
clipammo
    
new get_user_weapon(idclipammo)

    
Msg_WeaponList(id,genel_bilgiler[ImlecKontrol[id][SeciliCrosshair]][2][0],silah_listesi[w][1][0],silah_listesi[w][2][0],silah_listesi[w][3][0],silah_listesi[w][4][0],silah_listesi[w][5][0],0,CSW_SHIELD,silah_listesi[w][8][0]);
    
Msg_SetFOV(id,DEFAULT_FOV-1);
    
ClearPlayerBit(g_bSomeBoolid);
    
SetPlayerBit(g_bSomeBool,id);
    
Msg_SetFOV(id,DEFAULT_FOV+ImlecKontrol[id][FovKontrol]);
    return 
PLUGIN_CONTINUE
}

stock Hide_NormalCrosshair(idflag)
{
    if(
flag == 1)
    {
        
message_begin(MSG_ONEg_msgHideWeapon_id);
        
write_byte(HUD_HIDE_CROSS);
        
message_end();
    }
    else
    {
        
message_begin(MSG_ONEg_msgHideWeapon_id);
        
write_byte(HUD_DRAW_CROSS);
        
message_end();
    }

i played with message flags, but same problem.

Last edited by lexzor; 04-05-2022 at 22:05.
lexzor is offline
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 09:23.


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