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

[TUT] Custom Weapon Hud Sprites + Slot Redirection


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-09-2012 , 14:28   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #71

You need to update properly whatever you want to show a new _and_ after an old weapon. You will have to play also with CurWeapon probably. Not tried that much. So, test.
__________________
Arkshine is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 09-09-2012 , 14:58   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #72

Normally, if it won't pass the team check, it should use the default sprite right? But the default weapon is not clickable. I would really appreciate if you test it with the example plugin since it's the same.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-09-2012 , 15:46   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #73

The example is not complete. Once you update with non-default sprites, you will have to update again when the player gets a default weapon. So you have to save when a player was using a new weapon, then the next time he deploys a normal weapon, you will have to send WeaponInfo again with the original value.
__________________
Arkshine is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 09-09-2012 , 16:03   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #74

You don't understand. Nevermind.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 09-09-2012 , 17:06   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #75

Quote:
Originally Posted by bibu View Post
You don't understand. Nevermind.
WeaponList is sent only one time per player, this means, if you overwrited the default (client) values of WeaponList and then you want them again, you should send the default values to the client for skipping this issue, not hard.

EDIT: For forcing a client to clean his WeaponList values, you can use the m_fKnownItem offset (which offset value is unknown), or use GetItemInfo with Orpheu and send to the player the default values of a single weapon.

For more info, search in the HLSDK.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross

Last edited by meTaLiCroSS; 09-09-2012 at 17:09.
meTaLiCroSS is offline
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 09-22-2012 , 06:55   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #76

I used 3-4 plugins with custom weapon hud + slot redirect and I have a question: Ham_Item_AddToPlayer or Ham_Item_ItemSlot call CBasePlayer::SelectItem ? Because i have got a crash on my server with CBasePlayer::SelectItem.. and after i removed some plugins who used slot redirect server dosen't got crash with CBasePlayer::SelectItem
Here is crash log:
Spoiler
dFF is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-22-2012 , 07:23   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #77

If it crashes in strcmp(), I don't think it's related to this tutorial, at least not directly. You should check if you send valid string with the amxx plugins. It might also a buffer issue in AMXX.

SelectItem is called when you type the weapon name in the console.
__________________
Arkshine is offline
sokarcreative
Senior Member
Join Date: Aug 2009
Location: Belgium
Old 12-26-2012 , 11:12   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #78

Wow, good job !
__________________

sokarcreative is offline
EDUTz
Senior Member
Join Date: Jun 2010
Location: Dracula's Homeland
Old 02-16-2013 , 17:42   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #79

So, i know this tut is made for weapon list only, but can be modified for something like this ?

[IMG]http://img805.**************/img805/769/84286641187526556860515.jpg[/IMG]
EDUTz is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-16-2013 , 17:46   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #80

Unrelated and the answer is still no.
__________________
Arkshine 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 22:23.


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