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

Dynamic replace of crosshair sprite


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vieni
Member
Join Date: Apr 2018
Old 06-07-2020 , 09:14   Dynamic replace of crosshair sprite
Reply With Quote #1

Hey guys,
As far as I know, it's possible to replace the default half-life type crosshairs with custom sprites, but this only works statically with premade files(like it is in "sprites/weapon_ak47.txt").

I want to create custom sprites, which could be shown on the clients monitor, and i know it's client sided, the question is, is it possible to override that "crosshair ..." line from a plugin and not with a premade file(i mean without a .txt, 'cause as that i should create it custom_sprite*weapon_file times)?

Last edited by Vieni; 06-07-2020 at 10:30.
Vieni is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-07-2020 , 09:17   Re: Dynamic replace of crosshair sprite
Reply With Quote #2

I know that there used to be a plugin that lets you execute commands on a player, so you could make them say anything or type anything in their console. But, I believe this is against the rules or something, or it's illegal, idk.
supertrio17 is offline
Vieni
Member
Join Date: Apr 2018
Old 06-07-2020 , 09:23   Re: Dynamic replace of crosshair sprite
Reply With Quote #3

Quote:
Originally Posted by supertrio17 View Post
I know that there used to be a plugin that lets you execute commands on a player, so you could make them say anything or type anything in their console. But, I believe this is against the rules or something, or it's illegal, idk.
Nah, didn't mean something like that. I don't want to replace the default crosshair(the four lines), I wanna replace the "sub-"crosshair(visible in spectator) with a custom sprite(possible by sending a weaponlist message), but don't want to override the bullet/weapon/weapon_s sprites, only the crosshair one. I can even go with the override the whole stuff option, but it would be great if I didnt have to.

Edit: Anyways, thx for trying to help

Last edited by Vieni; 06-07-2020 at 09:25.
Vieni is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 06-07-2020 , 10:20   Re: Dynamic replace of crosshair sprite
Reply With Quote #4

Use HUD for replacement spec X hair.
Animated examples to get ideas from.
Code:
///Hide HUD first if you like. #define HIDEHUD_CROSSHAIR   (1<<6) #define m_iHideHUD        361 set_pdata_int(id, m_iHideHUD, get_pdata_int(id, m_iHideHUD) | HIDEHUD_CROSSHAIR);
__________________
DJEarthQuake is offline
Vieni
Member
Join Date: Apr 2018
Old 06-07-2020 , 10:30   Re: Dynamic replace of crosshair sprite
Reply With Quote #5

Quote:
Originally Posted by DJEarthQuake View Post
Use HUD for replacement spec X hair.
Animated examples to get ideas from.
Code:
///Hide HUD first if you like. #define HIDEHUD_CROSSHAIR   (1<<6) #define m_iHideHUD        361 set_pdata_int(id, m_iHideHUD, get_pdata_int(id, m_iHideHUD) | HIDEHUD_CROSSHAIR);
Want to use custom sprites, as this I could show achivement sprites and stuff for the players on screen.
Vieni is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 06-07-2020 , 10:52   Re: Dynamic replace of crosshair sprite
Reply With Quote #6

Gotcha. My bad overlooking key specification. What do you think about attaching your achievement sprites to all live players instead of 1 at time?
__________________

Last edited by DJEarthQuake; 06-07-2020 at 10:53.
DJEarthQuake is offline
Vieni
Member
Join Date: Apr 2018
Old 06-07-2020 , 10:59   Re: Dynamic replace of crosshair sprite
Reply With Quote #7

Quote:
Originally Posted by DJEarthQuake View Post
Gotcha. My bad overlooking key specification. What do you think about attaching your achievement sprites to all live players instead of 1 at time?
Wanna use precache generic, so it ain't what I'm looking for.
(generic has a bunch of free precache space)

But ain't a bad idea, gonna use it somehow, but not for this one.
Vieni is offline
Reply


Thread Tools
Display Modes

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 10:31.


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