Raised This Month: $64 Target: $400
 16% 

[TUT] Custom Weapon Hud Sprites + Slot Redirection


Post New Thread Reply   
 
Thread Tools Display Modes
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 01-07-2012 , 22:30   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #21

awesome man, that should be useful for me !
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-08-2012 , 04:40   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #22

i will say this , its fucking awesome , great work arkshine.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-08-2012 , 05:25   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #23

Quote:
Originally Posted by hleV View Post
Nice, but are you completely sure that you can only replace the already made weapons and not create new ones? In ESF (which is a mod and possibly uses some different weapon system) you can actually create new weapons by registering a command (like "weapon_new") to hook when the weapon is selected (or force the player to select it), writing certain messages and setting weapon's new ID (if the last ID for ESF is like 34, then for the new weapon it would be 35) in certain messages and of course setting up the weapon_new.txt file.
I don't know. The weapon system is the same as HL, thus hardcoded as hell. I don't think you can, but I've posted so people could test and finding better method. Will try something to make sure.

Quote:
Originally Posted by mabaclu View Post
Can this be used to place a sprite in the player's screen? That way we could show an image without editing hud.txt
No, sadly. I've tried and it doesn't work. I've also check the client dll, and it checks the keywords listed in the tuto only. Others will be ignored.

Quote:
Originally Posted by NiHiLaNTh View Post
Arkshine, I think that knife can be placed in first slot. I passed SlotID as 0 and NumberInSlot 1 and it worked, while setting both to 0 didnt drawed sprite in HUD.

Edit. Is it possible to change crosshair ?
I mean I passed it in .txt file and precached the sprite.But the original CS crosshair appeared. I was trying to hide crosshair with HideWeapon event but I failed.

Edit2. Maybe you explain what each parameter does? Especially, someone maybe confused with flags parameter(since you can add some flags to the weapon).
Playing with the position could make the trick, but I've noticed also it doesn't work well if you modify the position. The whole thing sounds tricky for some weapon. Keep up testing.

About crosshair, it seems the keyword "crosshair" is a second crosshair you can added and not replacing the original.

Will explain the parameters another time. Thanks.
__________________
Working on : CS Weapon Mod (72%) , MonsterAI (PAUSED),

Arkshine is online now
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 01-08-2012 , 07:11   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #24

OK, will do some testing in there.

P.S. You can also pass ammo2 keyword for the secondary ammo type.Using it together with

Code:
byte   SecondaryAmmoID    byte   SecondaryAmmoMaxAmount
you draw secondary ammo type above primary.But there is one bug, secondary HUD ammo over-draws the money HUD.The only way how to fix that is to hide money HUD.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
wangningyu
Member
Join Date: Dec 2011
Location: China.GuangDong
Old 01-08-2012 , 09:19   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #25

thanks for share !
__________________
One Code , One Dream !
wangningyu is offline
pRoxxxDD
Junior Member
Join Date: Feb 2011
Location: Ukraine
Old 01-09-2012 , 15:59   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #26

It was actualy one year ago.
__________________
pRoxxxDD is offline
pRoxxxDD
Junior Member
Join Date: Feb 2011
Location: Ukraine
Old 01-09-2012 , 17:24   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #27

Quote:
Originally Posted by bboygrun View Post
I saw that the crosshair can be changed when you zoom with a weapon ( Awp, scout ... ) but it doesn't work like you if i don't zoom or if i have a weapon without a zoom.
You answer on your question, just set FoV 89 (Standart no Zoom is 90) to player, and you'll see the new crossfire.

To Arkshine, C.S. sends Weapon List as MSG_INIT (This mean message sends one time on connect), if you want change sprite for ever just send your message one time on connect, otherwise you must send
it every time you want change it. =)
__________________

Last edited by pRoxxxDD; 01-09-2012 at 17:29.
pRoxxxDD is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-09-2012 , 18:11   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #28

I'm well aware this message is sent one time but that's would lose the purpose to be dynamic & per player, which would be what want coder for most of them. But it's true I could add a section for the situation all players all the time.
__________________
Working on : CS Weapon Mod (72%) , MonsterAI (PAUSED),

Arkshine is online now
Kiske
Veteran Member
Join Date: May 2009
Old 01-12-2012 , 14:08   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #29

I need to show icon if player has hud_fastswitch 1, is that possible?

Last edited by Kiske; 09-14-2014 at 22:29.
Kiske is offline
Send a message via Skype™ to Kiske
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 01-13-2012 , 19:49   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #30

Does it work on client-side ?
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
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 09:05.


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