Raised This Month: $32 Target: $400
 8% 

CS 1.6 server with full static crosshair, can I turn it off?


Post New Thread Reply   
 
Thread Tools Display Modes
canvaschar
Junior Member
Join Date: Mar 2021
Old 03-29-2021 , 06:22   Re: CS 1.6 server with full static crosshair, can I turn it off?
Reply With Quote #11

Quote:
Originally Posted by OciXCrom View Post
So is your question about your own GAME or your SERVER?
I'm only a player, this is not my server.
canvaschar is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-29-2021 , 07:22   Re: CS 1.6 server with full static crosshair, can I turn it off?
Reply With Quote #12

Then why are you posting in the AMXX Plugin Requests section?
For questions not related to AMXX use the Off-Topic section.

cl_dynamiccrosshair is the only option that customizes the crosshair in that way. There's no other method unless the server uses a custom crosshair which has nothing to do with your settings.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
canvaschar
Junior Member
Join Date: Mar 2021
Old 03-29-2021 , 07:34   Re: CS 1.6 server with full static crosshair, can I turn it off?
Reply With Quote #13

Quote:
Originally Posted by OciXCrom View Post
Then why are you posting in the AMXX Plugin Requests section?
For questions not related to AMXX use the Off-Topic section.
My bad, I'm sorry..

Quote:
Originally Posted by OciXCrom View Post
cl_dynamiccrosshair is the only option that customizes the crosshair in that way. There's no other method unless the server uses a custom crosshair which has nothing to do with your settings.
What a shame, if it is a true. I had hope there is a way to bypass it. :/

This is looking that way: https://streamable.com/leowga
Don't pay attention on crosshair color, I should write RGB code in opposite to 'green'.

Last edited by canvaschar; 03-29-2021 at 08:29.
canvaschar is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-29-2021 , 22:39   Re: CS 1.6 server with full static crosshair, can I turn it off?
Reply With Quote #14

Quote:
Originally Posted by OciXCrom View Post
cl_dynamiccrosshair is the only option that customizes the crosshair in that way. There's no other method unless the server uses a custom crosshair which has nothing to do with your settings.
As far as I know, the crosshair is client-side. Are you claiming that in Counter-Strike 1.6 the crosshair is controllable by the server somehow?
__________________
fysiks is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 03-30-2021 , 00:02   Re: CS 1.6 server with full static crosshair, can I turn it off?
Reply With Quote #15

Quote:
Originally Posted by fysiks View Post
As far as I know, the crosshair is client-side. Are you claiming that in Counter-Strike 1.6 the crosshair is controllable by the server somehow?
you can add custom crosshair, i use it in my servers, but players have to type a command to use it, and they can choose the crosshair they want, to force it`s illegal

in my server we use custom crosshair like csgo from a sprite

tarsisd2 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-30-2021 , 00:16   Re: CS 1.6 server with full static crosshair, can I turn it off?
Reply With Quote #16

I know how to set a custom crosshair and the file that is use in Day of Defeat is not recrosshair.spr. Are you simply claiming that you precache the custom crosshair sprite and then have them set cl_xhair_style cvar?

That is one thing that the OP should probably check, maybe the server is setting this cvar. If they are, the only thing that can really be done is to change the sprite (because it can't be overwritten) such that one of the crosshairs that gets set is acceptable (granted, this will be a static crosshair regardless). Or, maybe if the server is setting this cvar, you can set it to 0 and then alias it so that someone sending the command from the server won't work. I know that people have done aliasing like this before but I've never had to do it so I don't know how effective it is or if it can be bypassed.

However, overall, considering how much malicious stuff that server is trying to do to the game, it's probably just best to never join that server.
__________________
fysiks is offline
canvaschar
Junior Member
Join Date: Mar 2021
Old 03-30-2021 , 02:10   Re: CS 1.6 server with full static crosshair, can I turn it off?
Reply With Quote #17

Earlier I was trying to use cl_custom_crosshair 0 but command wasn't found. With cl_xhair_style situation is the same.

Shouldn't be there some file reposible for this crosshair in my game folder that I can replace?

And one more thing, yesterday I found out that using cl_dynamiccrosshair 1 command is making crosshair dynamic, but only when walking, when shooting it's still static. That mean, this crosshair is not just a painted cross on the middle, but it is working like normal crosshair except shooting. Same conclusion you could notice on the video, when I was changing weapons between M4 and USP crosshair gap was bigger or smaller.
I think this fact might make a diffrence.

Last edited by canvaschar; 03-30-2021 at 02:13.
canvaschar is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 03-30-2021 , 04:29   Re: CS 1.6 server with full static crosshair, can I turn it off?
Reply With Quote #18

Quote:
Originally Posted by tarsisd2 View Post
you can add custom crosshair, i use it in my servers, but players have to type a command to use it, and they can choose the crosshair they want, to force it`s illegal

in my server we use custom crosshair like csgo from a sprite

hey can you share that crosshair?
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 03-30-2021 , 10:59   Re: CS 1.6 server with full static crosshair, can I turn it off?
Reply With Quote #19

Quote:
Originally Posted by Sanjay Singh View Post
hey can you share that crosshair?
no problem

PHP Code:
#pragma semicolon 1

#include <amxmodx>

#define NVAULT_SAVE

#define PLUGIN_NAME        "Crosshair Menu"
#define PLUGIN_VERS        "1.0"
#define PLUGIN_AUTH        "Dev"

new const crosshairs[][][] = {
    {
"Lined Point","LinedPoint_R","LinedPoint_Y","LinedPoint_G","LinedPoint_P","LinedPoint_C"},
    {
"Cross","Cross_R","Cross_Y","Cross_G","Cross_P","Cross_C"},
    {
"Cross-2","Cross2_R","Cross2_Y","Cross2_G","Cross2_P","Cross2_C"},
    {
"Point","Point_R","Point_Y","Point_G","Point_P","Point_C"},
    {
"Square","Square_R","Square_Y","Square_G","Square_P","Square_C"},
    {
"Square-2","Square2_R","Square2_Y","Square2_G","Square2_P","Square2_C"},
    {
"Cool Cross","CoolCross_R","CoolCross_Y","CoolCross_G","CoolCross_P","CoolCross_C"}
};

new const 
colors[][] = {
    
"Red",
    
"Yellow",
    
"Green",
    
"Purple",
    
"Cyan"
};

new
    
g_crosshair_type[MAX_PLAYERS 1],
    
g_crosshair_color[MAX_PLAYERS 1],
    
bool:g_scope[MAX_PLAYERS 1],
    
g_msgids[4];

public 
plugin_init() {
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSPLUGIN_AUTH);

    
register_clcmd("say /crosshair""@clcmd_crosshair");
    
register_clcmd("say /cross""@clcmd_crosshair");

    
register_event("SetFOV""@Event_SetFOV""be");
    
register_event("CurWeapon""@Event_CurWeapon""be""1=1""2!18");

    
g_msgids[0] = get_user_msgid("HideWeapon");
    
g_msgids[1] = get_user_msgid("WeaponList");
    
g_msgids[2] = get_user_msgid("SetFOV");
    
g_msgids[3] = get_user_msgid("CurWeapon");
}

@
Event_SetFOV(const id) {
    if(!
g_crosshair_type[id]) {
        return;
    }

    new 
FOV read_data(1);

    if(
FOV == 90) {
        
g_scope[id] = false;
    }
    else {
        
g_scope[id] = true;
        
SetMessage_HideWeapon(id0);
    }
}

public 
plugin_precache() {
    for(new 
0sizeof(crosshairs); i++) {
        for(new 
1sizeof(crosshairs[]); a++) {
            
precache_generic(fmt("sprites/%s.txt"crosshairs[i][a]));
        }
    }
    
precache_generic("sprites/recrosshair.spr");
}

public 
client_putinserver(id) {
    
client_cmd(id"crosshair 1");
}

@
clcmd_crosshair(const id) {
    new 
menu menu_create("\yCrosshair Menu""@clcmd_crosshair_handler");

    if(
g_crosshair_type[id]) {
        
menu_additem(menufmt("Change Crosshair Type \dCurrent: %s"crosshairs[g_crosshair_type[id] - 1][0]), "1");
        
menu_additem(menufmt("Change Crosshair Color \dCurrent: %s"colors[g_crosshair_color[id]]), "2");
        
menu_additem(menu"Default Crosshair""3");
    }
    else {
        
menu_additem(menu"Change Crosshair Type \dCurrent: Default""1");
    }

    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

@
clcmd_crosshair_handler(const id, const menu, const item) {
    if(
item == MENU_EXIT) {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    new 
data[6];
    
menu_item_getinfo(menuitem_datacharsmax(data));
    new 
key str_to_num(data), weapon get_user_weapon(id);
    switch(
key) {
        case 
1: {
            
g_crosshair_type[id] = Calc(g_crosshair_type[id] + 1sizeof(crosshairs));
            
Change_Crosshair(idweapon);
        }
        case 
2: {
            
g_crosshair_color[id] = Calc(g_crosshair_color[id] + 1sizeof(colors) - 1);
            
Change_Crosshair(idweapon);
        }
        case 
3: {
            
SetMessage_HideWeapon(id0);
            
g_crosshair_type[id] = 0;
        }
    }
    @
clcmd_crosshair(id);
    return 
PLUGIN_HANDLED;
}

Calc(const arg, const max) {
    return (
arg max) ? 1arg;
}

@
Event_CurWeapon(const id) {
    if(!
g_crosshair_type[id] || g_scope[id]) {
        return;
    }

    new 
weapon read_data(2);
    
Change_Crosshair(idweapon);
}

Change_Crosshair(const id, const weapon) {
    switch(
weapon) {
        case 
CSW_P228SetMessage_WeaponList(id952);
        case 
CSW_HEGRENADESetMessage_WeaponList(id121);
        case 
CSW_XM1014SetMessage_WeaponList(id532);
        case 
CSW_C4SetMessage_WeaponList(id141);
        case 
CSW_MAC10SetMessage_WeaponList(id6100);
        case 
CSW_AUGSetMessage_WeaponList(id490);
        case 
CSW_SMOKEGRENADESetMessage_WeaponList(id131);
        case 
CSW_ELITESetMessage_WeaponList(id10120);
        case 
CSW_FIVESEVENSetMessage_WeaponList(id7100);
        case 
CSW_UMP45SetMessage_WeaponList(id6100);
        case 
CSW_GALILSetMessage_WeaponList(id490);
        case 
CSW_FAMASSetMessage_WeaponList(id490);
        case 
CSW_USPSetMessage_WeaponList(id6100);
        case 
CSW_GLOCK18SetMessage_WeaponList(id10120);
        case 
CSW_MP5NAVYSetMessage_WeaponList(id10120);
        case 
CSW_M249SetMessage_WeaponList(id3200);
        case 
CSW_M3SetMessage_WeaponList(id532);
        case 
CSW_M4A1SetMessage_WeaponList(id490);
        case 
CSW_TMPSetMessage_WeaponList(id10120);
        case 
CSW_FLASHBANGSetMessage_WeaponList(id112);
        case 
CSW_DEAGLESetMessage_WeaponList(id835);
        case 
CSW_SG552SetMessage_WeaponList(id490);
        case 
CSW_AK47SetMessage_WeaponList(id290);
        case 
CSW_KNIFESetMessage_WeaponList(id, -1, -1);
        case 
CSW_P90SetMessage_WeaponList(id7100);
        default: return;
    }

    
SetMessage_HideWeapon(id1<<6);
    
SetMessage_SetFOV(id89);
    
SetMessage_CurWeapon(id);
    
SetMessage_SetFOV(id90);
}

SetMessage_WeaponList(const id, const pAmmoId, const pAmmoMaxAmount) {
    
message_begin(MSG_ONEg_msgids[1], .player id); {
        
write_string(crosshairs[g_crosshair_type[id] - 1][g_crosshair_color[id] + 1]);
        
write_byte(pAmmoId);
        
write_byte(pAmmoMaxAmount);
        
write_byte(-1);
        
write_byte(-1);
        
write_byte(0);
        
write_byte(11);
        
write_byte(2);
        
write_byte(0);
    }
    
message_end();
}

SetMessage_SetFOV(const id, const FOV) {
    
message_begin(MSG_ONEg_msgids[2], .player id); {
        
write_byte(FOV);
    }
    
message_end();
}

SetMessage_CurWeapon(const id) {
    new 
ammo;
    
get_user_weapon(idammo);

    
message_begin(MSG_ONEg_msgids[3], .player id); {
        
write_byte(1);
        
write_byte(2);
        
write_byte(ammo);
    }
    
message_end();
}

SetMessage_HideWeapon(const id, const byte) {
    
message_begin(MSG_ONEg_msgids[0], .player id); {
        
write_byte(byte);
    }
    
message_end();
}

#if defined NVAULT_SAVE
#include <nvault>

new g_vault;

public 
plugin_cfg() {
    
g_vault nvault_open("crosshairvault");

    if(
g_vault == INVALID_HANDLE) {
        
set_fail_state("Unknown nvault for crosshair");
    }
}

public 
plugin_end() {
    
nvault_close(g_vault);
}

public 
client_authorized(id, const authid[]) {
    
g_crosshair_type[id] = nvault_get(g_vaultfmt("%s_type"authid));
    
g_crosshair_color[id] = nvault_get(g_vaultfmt("%s_color"authid));
}

public 
client_disconnected(id) {
    new 
authid[MAX_AUTHID_LENGTH];
    
get_user_authid(idauthidcharsmax(authid));

    if(!
g_crosshair_type[id]) {
        if(
nvault_get(g_vaultfmt("%s_type"authid))) {
            
nvault_remove(g_vaultfmt("%s_type"authid));
            
nvault_remove(g_vaultfmt("%s_authid"authid));
        }
        return;
    }

    new 
data[MAX_AUTHID_LENGTH+10];

    
num_to_str(g_crosshair_type[id], datacharsmax(data));
    
nvault_pset(g_vaultfmt("%s_type"authid), data);

    
num_to_str(g_crosshair_color[id], datacharsmax(data));
    
nvault_pset(g_vaultfmt("%s_color"authid), data);
}
#endif 
Attached Files
File Type: zip sprites.zip (12.4 KB, 259 views)
tarsisd2 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-30-2021 , 23:58   Re: CS 1.6 server with full static crosshair, can I turn it off?
Reply With Quote #20

Quote:
Originally Posted by canvaschar View Post
Earlier I was trying to use cl_custom_crosshair 0 but command wasn't found. With cl_xhair_style situation is the same.
Well, I guess this just might be done differently in Day of Defeat (what I play) than how it's done in Counter-Strike 1.6.

Also note that people using tarsisd2's plugin, players who already have this file will not download this new one so it's possible that all the crosshair names in the plugin might be wrong.
__________________

Last edited by fysiks; 03-31-2021 at 00:08.
fysiks 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 12:49.


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