Raised This Month: $ Target: $400
 0% 

Remove weapon dropped by a CERTAIN player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-10-2012 , 04:47   Remove weapon dropped by a CERTAIN player
Reply With Quote #1

Can anyone show me an example of removing a weapon that gets dropped upon death (or with "drop" command but that's blocked anyway) by a certain player (for example, player whose team is CT etc, I don't want all the weapons to be removed)? I tried doing it with FM_SetModel, or something like that though the weapon model has always been 'weaponbox.mdl' and I wasn't successful. I want only to remove a dropped desert eagle.

Thanks.

Last edited by Backstabnoob; 06-10-2012 at 04:48.
Backstabnoob is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 06-10-2012 , 04:54   Re: Remove weapon dropped by a CERTAIN player
Reply With Quote #2

if you know a bit C++, you can see CSDM source, native csdm_remove_weapon;
maybe it can help you
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-10-2012 , 08:33   Re: Remove weapon dropped by a CERTAIN player
Reply With Quote #3

How could that help me?
Backstabnoob is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-10-2012 , 09:39   Re: Remove weapon dropped by a CERTAIN player
Reply With Quote #4

Hook Ham_Touch with "weaponbox", and check if weaponbox is not on the ground, touching player should be the droping one.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-10-2012 , 10:01   Re: Remove weapon dropped by a CERTAIN player
Reply With Quote #5

I'm actually using your plugin ( http://forums.alliedmods.net/showthread.php?p=761924 ) and I figured out the hooks I used before (like FM_SetModel) didn't work because of that. Can you be that kind and show me an example of doing it within your plugin? I don't want Deagle to be dropped.

I tried checking if iWeapon's ID is CSW_DEAGLE and if it was, I'd use 'continue' in the loop, but it was crashing the server.
Backstabnoob is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 06-10-2012 , 10:33   Re: Remove weapon dropped by a CERTAIN player
Reply With Quote #6

Try hooking FM_Think through FakeMeta
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-10-2012 , 12:42   Re: Remove weapon dropped by a CERTAIN player
Reply With Quote #7

Your thread is about filtering dropped weapon by player (assuming it is not on death else it makes no sense),
and now you are asking to filter by weapon type and on death.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-10-2012 at 12:43.
ConnorMcLeod is offline
Alekkkk
Member
Join Date: Mar 2012
Location: Bulgaria
Old 06-10-2012 , 12:50   Re: Remove weapon dropped by a CERTAIN player
Reply With Quote #8

Why just don't strip that weapon from the player on Ham_Killed ?
__________________
Alekkkk is offline
Send a message via Skype™ to Alekkkk
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-10-2012 , 13:35   Re: Remove weapon dropped by a CERTAIN player
Reply With Quote #9

@Connor:
Quote:
removing a weapon that gets dropped upon death
I use your plugin, so all the weapons get dropped on death. However, I want Desert Eagle to be deleted when a player dies, so he doesn't drop it.

@Alekkkk: Thank you, it works. Don't know why I didn't think about it before O.o
Backstabnoob is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-10-2012 , 13:51   Re: Remove weapon dropped by a CERTAIN player
Reply With Quote #10

Quote:
Originally Posted by Backstabnoob View Post
@Alekkkk: Thank you, it works. Don't know why I didn't think about it before O.o
Because you said you don't want to strip all weapons ? (don't strip c4 if your server is playing with bomb objectives ;) )
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 06:10.


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