Raised This Month: $ Target: $400
 0% 

[ Solved ] Ham_CS_Item_CanDrop question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 03-19-2009 , 03:39   [ Solved ] Ham_CS_Item_CanDrop question
Reply With Quote #1

Hi

subj:

I have a question about Ham_CS_Item_CanDrop. Can it force a player to drop a current item (weapon)?
Example: player has m4a1 (active), and i want him to drop it.

And if not so hard, can you show me an example of usage it. I tried ExecuteHam and ExecuteHamB, but it doesn't work, because i don't know how to use it.

I read ham_const, but didn't understand well.

Thanks.

Last edited by TheRadiance; 03-19-2009 at 05:04.
TheRadiance is offline
Send a message via ICQ to TheRadiance
jim_yang
Veteran Member
Join Date: Aug 2006
Old 03-19-2009 , 04:24   Re: Ham_CS_Item_CanDrop question
Reply With Quote #2

no, it can't.
cs use
Code:
void CBasePlayer::DropPlayerItem ( char *pszItemName )
to force a player drop some item
you can use engclient_cmd(id, "drop")
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 03-19-2009 , 04:31   Re: Ham_CS_Item_CanDrop question
Reply With Quote #3

Quote:
Originally Posted by jim_yang View Post
no, it can't.
cs use
Code:
void CBasePlayer::DropPlayerItem ( char *pszItemName )
to force a player drop some item
you can use engclient_cmd(id, "drop")
ok, thanks.
One more question:
Can i force a player to drop knife or grenade? - i tried engclient_cmd in this case, but it didn't help me. Is there any another way to do it?
TheRadiance is offline
Send a message via ICQ to TheRadiance
jim_yang
Veteran Member
Join Date: Aug 2006
Old 03-19-2009 , 04:55   Re: Ham_CS_Item_CanDrop question
Reply With Quote #4

there is a tut about strip user's weapon but not drop. you have to simulate the drop effect yourself
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 03-19-2009 , 05:03   Re: Ham_CS_Item_CanDrop question
Reply With Quote #5

Quote:
Originally Posted by jim_yang View Post
there is a tut about strip user's weapon but not drop. you have to simulate the drop effect yourself
Ok, Thanks anyway.
Solved.
TheRadiance is offline
Send a message via ICQ to TheRadiance
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-19-2009 , 08:29   Re: [ Solved ] Ham_CS_Item_CanDrop question
Reply With Quote #6

You could use engclient_cmd with nades but then you would have to hook Ham_CS_Item_CanDrop, return true and supercede.

See http://forums.alliedmods.net/showpos...1&postcount=27
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 03-19-2009 , 08:36   Re: [ Solved ] Ham_CS_Item_CanDrop question
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
You could use engclient_cmd with nades but then you would have to hook Ham_CS_Item_CanDrop, return true and supercede.

See http://forums.alliedmods.net/showpos...1&postcount=27
OMG, thank ver much!
TheRadiance is offline
Send a message via ICQ to TheRadiance
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:00.


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