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

[ H3LP ] Easy method change weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-23-2017 , 17:28   [ H3LP ] Easy method change weapon
Reply With Quote #1

Hello. How can I change the user weapon to nothing, like it didn't have any weapon, without stripping the user weapons? I don't want to use the CD Handle stuff, just set the user weapon to nothing. Thanks !
DarthMan is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-23-2017 , 17:35   Re: [ H3LP ] Easy method change weapon
Reply With Quote #2

Do you want to hide the model? Then set pev_viewmodel2 to "".
__________________

Last edited by HamletEagle; 10-23-2017 at 17:35.
HamletEagle is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-23-2017 , 17:49   Re: [ H3LP ] Easy method change weapon
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
Do you want to hide the model? Then set pev_viewmodel2 to "".
Well, I want to completly set the player weapon to nothing, not just the model. Basically I want it to have no weapon and then apply the weapon skin.

This is due to the weapon icon hud that appears if I strip the user weapons and give them back.

Last edited by DarthMan; 10-23-2017 at 18:05.
DarthMan is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 10-23-2017 , 22:20   Re: [ H3LP ] Easy method change weapon
Reply With Quote #4

you can simply strip the weapon you want (primary/secondary) then apply the model.
That way you don't have to give other weapon again.
__________________
My plugin:
Celena Luna is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-24-2017 , 00:41   Re: [ H3LP ] Easy method change weapon
Reply With Quote #5

Quote:
Originally Posted by Celena Luna View Post
you can simply strip the weapon you want (primary/secondary) then apply the model.
That way you don't have to give other weapon again.
But I want to give all weapons back without those hud icons.
DarthMan is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 10-24-2017 , 07:52   Re: [ H3LP ] Easy method change weapon
Reply With Quote #6

Quote:
Originally Posted by DarthMan View Post
But I want to give all weapons back without those hud icons.
Hook Ham_Item_AddToPlayer and return HAM_SUPERCEDE?
__________________
My plugin:
Celena Luna is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-24-2017 , 08:41   Re: [ H3LP ] Easy method change weapon
Reply With Quote #7

Quote:
Originally Posted by Celena Luna View Post
Hook Ham_Item_AddToPlayer and return HAM_SUPERCEDE?
No, you don't understand. I don't want to block weapons from being picked up by the player, I just want to change the player weapon to nothing, 0. So no weapon, no skin etc. And hen I'll just set the weapon skin using FakeMeta.

Last edited by DarthMan; 10-24-2017 at 08:41.
DarthMan is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 10-25-2017 , 08:58   Re: [ H3LP ] Easy method change weapon
Reply With Quote #8

How about you hook WeaponList Message and block it?
You won't see the weapon on the WeaponList (the one that you press 123) and it won't show up the Hud when you give it to player.
__________________
My plugin:

Last edited by Celena Luna; 10-25-2017 at 08:59.
Celena Luna is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-25-2017 , 09:02   Re: [ H3LP ] Easy method change weapon
Reply With Quote #9

Quote:
Originally Posted by Celena Luna View Post
How about you hook WeaponList Message and block it?
You won't see the weapon on the WeaponList (the one that you press 123) and it won't show up the Hud when you give it to player.
But if I unregister_message the WeaponList, wouldn't it completly block it everytime I choose a weapon?

Last edited by DarthMan; 10-25-2017 at 09:03.
DarthMan is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 10-25-2017 , 09:31   Re: [ H3LP ] Easy method change weapon
Reply With Quote #10

Use get_msg_arg_string to get the weapon name (ex: "weapon_c4") then if it corret then BLOCK.
I am not really sure
__________________
My plugin:

Last edited by Celena Luna; 10-25-2017 at 09:31.
Celena Luna 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 23:21.


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