AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [REQ][L4D] Drop weapons (https://forums.alliedmods.net/showthread.php?t=103818)

LTR.2 09-16-2009 15:36

[REQ][L4D] Drop weapons
 
hi, i was thinking on a plugin that allows you to drop your primary weapon and second pistol, medkit and explosives whenever you want. with a specific key.

Possible? =D

olj 09-16-2009 19:58

Re: [REQ][L4D] Drop weapons
 
I think so. But should rather use a chat trigger - all commands are bound for living survivors, no free button which can be used for that. My suggestion is to get survivor's active weapon slot, fakeclient command give that weapon, then remove weapon from survivor.

A few problems however - i doubt you can drop pistol (but we can try), and i dont know how to set ammo in dropped weapon.

LTR.2 09-17-2009 12:02

Re: [REQ][L4D] Drop weapons
 
the ammo in droped weapon it's not big deal. but i was suggesting this instead of just give to toher players ammo packs. something tnat it's impossible to do cuz ammo packs doesn't exist =P

so instead of passing ammo, pass the weapon.

olj 09-19-2009 04:49

Re: [REQ][L4D] Drop weapons
 
Quote:

Originally Posted by LTR.2 (Post 935853)
the ammo in droped weapon it's not big deal

so instead of passing ammo, pass the weapon.

It is, since if you "drop" and then pickup weapon you will replenish your ammo (WE CREATE NEW WEAPON, dont forget about it) . So, we need to get around this first.

Oh well - i think we can "remember" the current ammo of player BEFORE he "drop" weapon.

But this way we also need to hook if he is picking up "dropped" weapon again - that can be abit tricky, we can use GetClientAimTarget + hooking IN_USE to help with it.

But how the hell we determine if weapon he picking up is the one he dropped?? "give" command dont have index property. Maybe just plain entity spawn should work, but im not too good at spawning something from code.

Can someone give example of spawning pickable weapon?

LTR.2 09-19-2009 09:52

Re: [REQ][L4D] Drop weapons
 
Quote:

Originally Posted by olj (Post 937367)
But how the hell we determine if weapon he picking up is the one he dropped??

because the weapon falls on his feets?

Frus 09-19-2009 15:51

Re: [REQ][L4D] Drop weapons
 
Quote:

Originally Posted by olj (Post 937367)
Can someone give example of spawning pickable weapon?

I do it in my comp plugin (to force somebody to drop a weapon if they pick one up in pause mode). (EDIT: I do use the give command, but only because I was too lazy to find all the models for every weapon in the game.)

I'll see what I can do for this request.

Frus 09-19-2009 16:41

Re: [REQ][L4D] Drop weapons
 
1 Attachment(s)
Here you go, I tested it a bit. Seems to work fine. uses sm_drop so type !drop in chat.

LTR.2 09-19-2009 18:00

Re: [REQ][L4D] Drop weapons
 
let's see.

LTR.2 09-19-2009 19:02

Re: [REQ][L4D] Drop weapons
 
well, it's good. but it's annoying have to write !drop everytime.
i can bind a key to say it of course, but it's still annoying to flood the chat.
what it's the cvar for that? so i can bind a key to attach it.

PD:
other idea: if i want the bots to drop a gun, i can say something like "louis drop" like saying to another teammate to drop that gun.

PD2: still saying that drop ammo would be more useful =D

Frus 09-19-2009 19:07

Re: [REQ][L4D] Drop weapons
 
Quote:

Originally Posted by LTR.2 (Post 937988)
well, it's good. but it's annoying have to write !drop everytime.
i can bind a key to say it of course, but it's still annoying to flood the chat.
what it's the cvar for that? so i can bind a key to attach it.

PD:
other idea: if i want the bots to drop a gun, i can say something like "louis drop" like saying to another teammate to drop that gun.

PD2: still saying that drop ammo would be more useful =D

It's not a cvar, it's a concommand, and it's sm_drop. It doesn't matter whether you bind something to sm_drop, type it in console, or type !sm_drop or !drop in chat.

You can use the fake client execute plugin if you want to force other players like bots to execute commands (like sm_drop)

http://forums.alliedmods.net/showthread.php?p=630439


All times are GMT -4. The time now is 22:17.

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