Raised This Month: $ Target: $400
 0% 

About stripping user's weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 08-30-2014 , 18:21   About stripping user's weapons
Reply With Quote #1

Would strip_user_weapons(id) strip the user's knife too, or will it only strip not-default weapons?
__________________
~ Swiftly and with style ~
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-30-2014 , 18:22   Re: About stripping user's weapons
Reply With Quote #2

Simply try it and see. I think it's everything.
__________________
fysiks is offline
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 08-30-2014 , 18:30   Re: About stripping user's weapons
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
Simply try it and see. I think it's everything.
I didn't just test it because I have a lot of things running and I'm not really looking forward to closing everything and starting HLDS and Steam.
Thanks anyway!
__________________
~ Swiftly and with style ~
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
Unkolix
Veteran Member
Join Date: Sep 2012
Old 08-30-2014 , 18:56   Re: About stripping user's weapons
Reply With Quote #4

Quote:
Originally Posted by EpicKiller View Post
Would strip_user_weapons(id) strip the user's knife too, or will it only strip not-default weapons?
It strips everything.
Unkolix is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-30-2014 , 21:06   Re: About stripping user's weapons
Reply With Quote #5

I certainly find the stripweapons.inc made by @drekes (https://forums.alliedmods.net/showpo...38&postcount=9), because you can separately strip different type of weapons. I've never had issues with that include, so I guess it's working fully properly.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 08-31-2014 , 04:47   Re: About stripping user's weapons
Reply With Quote #6

Quote:
Originally Posted by Flick3rR View Post
I certainly find the stripweapons.inc made by @drekes (https://forums.alliedmods.net/showpo...38&postcount=9), because you can separately strip different type of weapons. I've never had issues with that include, so I guess it's working fully properly.
Ok, thank you. I will take a look at that include.
__________________
~ Swiftly and with style ~
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-31-2014 , 05:01   Re: About stripping user's weapons
Reply With Quote #7

Quote:
Originally Posted by EpicKiller View Post
Ok, thank you. I will take a look at that include.
Don't forget to set m_fHasPrimary offset ( const m_fHasPrimary = 116, XO_PLAYER = 5, int ) to 0 when you strip user primary weapons.

Edit: set_pdata_int( index, m_fHasPrimary, XO_PLAYER, 0 )

Why you need to do this ?
Because you can't pickup armoury_entity( ground weapons spawned by map ) if you strip a primary weapon without reseting the offset. Anyway, if you pickup a weaponbox( dropped weapon ) and then you drop it, this will fix the problem.
__________________

Last edited by HamletEagle; 08-31-2014 at 06:22.
HamletEagle is offline
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 08-31-2014 , 05:17   Re: About stripping user's weapons
Reply With Quote #8

Quote:
Originally Posted by HamletEagle View Post
Don't forget to set m_fHasPrimary offset ( const m_fHasPrimary = 116, XO_PLAYER = 5, int ) to 0 when you strip user primary weapons.
Thanks, I'll keep it in mind!
__________________
~ Swiftly and with style ~
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-31-2014 , 10:03   Re: About stripping user's weapons
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
Don't forget to set m_fHasPrimary offset ( const m_fHasPrimary = 116, XO_PLAYER = 5, int ) to 0 when you strip user primary weapons.

Edit: set_pdata_int( index, m_fHasPrimary, XO_PLAYER, 0 )

Why you need to do this ?
Because you can't pickup armoury_entity( ground weapons spawned by map ) if you strip a primary weapon without reseting the offset. Anyway, if you pickup a weaponbox( dropped weapon ) and then you drop it, this will fix the problem.
This bug (using strip_user_weapobs()) got fixed with newer releases of amxx IIRC.
mottzi is offline
Send a message via MSN to mottzi
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-31-2014 , 11:07   Re: About stripping user's weapons
Reply With Quote #10

I think that it's fixed in 1.8.3, since I checked 1.8.2 changelog.
__________________
HamletEagle 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 11:54.


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