Make it so user can not drop given weapon
Hello,
I was wondering if any one knew of a good way to do this. When the client is affected by a particular status, they are given a weapon which replaces their primary weapon. While that status is lasting, I do not want them to be able to drop that weapon so they could just then re-pickup their dropped weapon again. in the search: Code:
[...blah...]Code:
[...blah...]Is there a good way (perhaps a native?) that wont cause a lag ? Thank you in advance. |
Re: Make it so user can not drop given weapon
Make a global boolean "bool:BlockPickup[33]" then when you give tmp make boolean true "BlockPickup[id] = true" then hook Touch and block it.
Code:
#include <amxmodx> |
Re: Make it so user can not drop given weapon
Thank you for your response, and forgive this noob question - but if changed to this:
Code:
public Fwd_Touch(Ent, id) |
Re: Make it so user can not drop given weapon
Alka - I tried it and it doesnt seem to work, can anyone offer any suggestions plz?
|
Re: Make it so user can not drop given weapon
This is a pretty straightforward way to stop a user from dropping the USP. You could toy around with this:
PHP Code:
|
Re: Make it so user can not drop given weapon
Take a look at the way gungame deals with this. It covers all the aspects of your problem.
|
Re: Make it so user can not drop given weapon
if I remember correctly gungame doesnt allow you to pick up a gun, I want to stop them from dropping it.
I'll check out what M249-M4A1 posted and let you guys know how it goes. |
Re: Make it so user can not drop given weapon
"hookdrop" with a little customization to fit my needs worked like a charm, thank you!
|
Re: Make it so user can not drop given weapon
PHP Code:
pls don't say "trying" ;) |
Re: Make it so user can not drop given weapon
Yes - but not all - i.e. you can't block commands that don't send any information to the server. I believe it does work with 'name'. You need to return PLUGIN_HANDLED to block the engine call.
|
| All times are GMT -4. The time now is 11:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.