Raised This Month: $ Target: $400
 0% 

Remove Crosshair


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 04-11-2010 , 19:15   Remove Crosshair
Reply With Quote #1

I need a plugin that will remove crosshairs to all players by a command like crosshair_enable. Thanks
__________________
dj_freeze is offline
Send a message via Skype™ to dj_freeze
fR4gn0tiX!
Senior Member
Join Date: Nov 2009
Location: Georgia, Tbilisi
Old 04-12-2010 , 07:17   Re: Remove Crosshair
Reply With Quote #2

Code:
#include <amxmodx> #define PLUGIN "Crosshair" #define VERSION "0.0.1" #define AUTHOR "Aleko Managadze" new gmsgHideWeapon, crosshair_enable public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         crosshair_enable = register_cvar("crosshair_enable", "1")     gmsgHideWeapon = get_user_msgid("HideWeapon")         register_event("CurWeapon", "Mr_Freeman", "be", "1=0") } public Mr_Freeman(id) {     get_pcvar_num(crosshair_enable) ? draw_crosshair(id) : hide_crosshair(id) } draw_crosshair(id) {     message_begin(MSG_ONE_UNRELIABLE, gmsgHideWeapon, _, id)     write_byte(0)     message_end() } hide_crosshair(id) {     message_begin(MSG_ONE_UNRELIABLE, gmsgHideWeapon, _, id)     write_byte(1<<6)     message_end() }

Not tested.
__________________
fR4gn0tiX! is offline
Send a message via Skype™ to fR4gn0tiX!
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 04-12-2010 , 07:41   Re: Remove Crosshair
Reply With Quote #3

Tested! Works Great! Thanks!
__________________
dj_freeze is offline
Send a message via Skype™ to dj_freeze
nuodas159
Member
Join Date: Feb 2010
Old 08-06-2012 , 03:57   Re: Remove Crosshair
Reply With Quote #4

Hello, when doing hide_money not hiding money. So someone will help to fix this?

Last edited by nuodas159; 08-06-2012 at 03:57.
nuodas159 is offline
Cuttlas
Senior Member
Join Date: Jan 2015
Old 11-19-2023 , 09:41   Re: Remove Crosshair
Reply With Quote #5

how to hide crosshair totally for every weapon for a specific player?
__________________
To Infinity n Beyond
Cuttlas is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-19-2023 , 14:57   Re: Remove Crosshair
Reply With Quote #6

In addition to the cvar check, simply add whatever other conditions you want, including a check for who it is. You'll probably need a command to add and remove a player from the list of those who have a disabled crosshair.
__________________
fysiks is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 11-19-2023 , 17:50   Re: Remove Crosshair
Reply With Quote #7

Quote:
Originally Posted by Cuttlas View Post
how to hide crosshair totally for every weapon for a specific player?

https://gamebanana.com/mods/311932

Not for a specific player, but has some code as example.
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com
WATCH_D0GS UNITED is offline
Cuttlas
Senior Member
Join Date: Jan 2015
Old 11-19-2023 , 22:40   Re: Remove Crosshair
Reply With Quote #8

how to store the "cl_crosshaircolor" somewhere and return the value to "cl_crossaircolor" again?
__________________
To Infinity n Beyond
Cuttlas is offline
WATCH_D0GS UNITED
Senior Member
Join Date: Jan 2023
Old 11-20-2023 , 07:32   Re: Remove Crosshair
Reply With Quote #9

Quote:
Originally Posted by Cuttlas View Post
how to store the "cl_crosshaircolor" somewhere and return the value to "cl_crossaircolor" again?
You can make your server load the commands by saving them in the server.cfg file in the game dir: cstrike/server.cfg

Example of file

Code:
// This config file is executed on server startup.

cl_crosshair_color 0
Is this what you mean?
__________________
💻Know Our New Blog👄
🔗tube2downs.blogspot.com
WATCH_D0GS UNITED is offline
Cuttlas
Senior Member
Join Date: Jan 2015
Old 11-20-2023 , 07:41   Re: Remove Crosshair
Reply With Quote #10

Quote:
Originally Posted by WATCH_D0GS UNITED View Post
You can make your server load the commands by saving them in the server.cfg file in the game dir: cstrike/server.cfg

Example of file

Code:
// This config file is executed on server startup.

cl_crosshair_color 0
Is this what you mean?
no, I just need to get a player crosshair color, then I need to change its value and whenever I want I return back the color to the player crosshair.

as long as, the value is RGB value, I do not know how to store it and how to load it back?
__________________
To Infinity n Beyond
Cuttlas 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 00:15.


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