Raised This Month: $12 Target: $400
 3% 

[L4D & L4D2] Item Drop


Post New Thread Reply   
 
Thread Tools Display Modes
theproperson
Member
Join Date: Feb 2017
Old 02-09-2019 , 01:03   Re: [L4D & L4D2] Item Drop
Reply With Quote #31

Quote:
Originally Posted by KoMiKoZa View Post
Could you please share it?

Also, any idea how to prevent the last held-item on survivors from being dropped when survivor is damaged or by the bind? In order to make a workaround for the T-pose glitch.
I did share it here https://forums.alliedmods.net/showth...=123098&page=7 but due to the gayness of the community it was removed lol.

The only work around for the t-pose glitch is to disable forced item drops from special infected while praying your players have enough sense to not throw down all of their items.
theproperson is offline
mikaelangelis
Senior Member
Join Date: Oct 2017
Old 03-15-2019 , 03:16   Re: [L4D & L4D2] Item Drop
Reply With Quote #32

what annoys me is im using pistol_reloading plugin that added reserve ammo for pistol. when i drop pistol or magnum then repickup, reserve ammo refilled without having to go to ammo stash
mikaelangelis is offline
CosmicD
Senior Member
Join Date: Dec 2009
Location: Hasselt, Belgium
Old 02-10-2020 , 04:41   Re: [L4D & L4D2] Item Drop
Reply With Quote #33

Hello, I wonder if it's possible to disable or remap the F key. SOme people love to play with their flashlight and although the functionality of this mod is great, this kind of gets quite a few complaints on the server. Otherwise i would have to search another plugin.
__________________
CosmicD is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-11-2020 , 09:44   Re: [L4D & L4D2] Item Drop
Reply With Quote #34

To disable is easier, you just have to comment the snippet inside OnPlayerRunCmd Action.

PHP Code:
public Action:OnPlayerRunCmd(client, &buttons, &impulsFloat:vel[3], Float:angles[3], &weapon)
{  
    
//if(impuls==IMPULS_FLASHLIGHT )
    //{  
    //    if(GetClientTeam(client)==2 && !IsFakeClient(client) && IsPlayerAlive(client))
    //    {
    //        new Float:time=GetEngineTime();
    //        if(time-PressTime[client]<0.3)
    //        {
    //            //DropSlot(client, GetCurrentWeaponSlot(client), true, 0);    
    //            Command_Drop(client, 0);
    //            PressTime[client]=0.0;
    //        }
    //        else PressTime[client]=time;              
    //    } 
    //}

To change the "F" bind-key is in the same place.
You can check a list of buttons here

Spoiler
__________________

Last edited by Marttt; 02-11-2020 at 09:48.
Marttt is offline
strikeraot
Senior Member
Join Date: Dec 2018
Location: Viet Nam
Old 02-11-2020 , 12:09   Re: [L4D & L4D2] Item Drop
Reply With Quote #35

Quote:
#define IN_BULLRUSH (1 << 22)
#define IN_GRENADE1 (1 << 23) /**< grenade 1 */
#define IN_GRENADE2 (1 << 24) /**< grenade 2 */
#define IN_ATTACK3 (1 << 25)
What are these keys in l4d2?
strikeraot is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-11-2020 , 14:16   Re: [L4D & L4D2] Item Drop
Reply With Quote #36

I got the list from here:
https://sm.alliedmods.net/new-api/en...p_stocks/__raw

Some buttons may not be available for L4D2, I don't know.

Maybe...a guess:

* 3 Button (Throwables, molotov, pipe, bile) => IN_BULLRUSH
* 4 Button (Medkit/Defib) => IN_GRENADE1
* 5 Button (Pills/Adrenaline) => IN_GRENADE2
* Middle Mouse Button => IN_ATTACK3
__________________

Last edited by Marttt; 02-11-2020 at 14:23.
Marttt is offline
RDiver
Member
Join Date: Mar 2010
Old 05-19-2020 , 15:02   Re: [L4D & L4D2] Item Drop
Reply With Quote #37

Quote:
Originally Posted by Marttt View Post
To disable is easier, you just have to comment the snippet inside OnPlayerRunCmd Action.

PHP Code:
public Action:OnPlayerRunCmd(client, &buttons, &impulsFloat:vel[3], Float:angles[3], &weapon)
{  
    
//if(impuls==IMPULS_FLASHLIGHT )
    //{  
    //    if(GetClientTeam(client)==2 && !IsFakeClient(client) && IsPlayerAlive(client))
    //    {
    //        new Float:time=GetEngineTime();
    //        if(time-PressTime[client]<0.3)
    //        {
    //            //DropSlot(client, GetCurrentWeaponSlot(client), true, 0);    
    //            Command_Drop(client, 0);
    //            PressTime[client]=0.0;
    //        }
    //        else PressTime[client]=time;              
    //    } 
    //}

To change the "F" bind-key is in the same place.
You can check a list of buttons here

Spoiler
Any versions of this plugins failed to compile with SM 1.10+ , so impossible to edit SP codes.
Any idea to fix the issue?


HTML Code:
//SourceMod Batch Compiler
// by the SourceMod Dev Team


//// l4d_drop.sp
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(39) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(40) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(41) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(42) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(43) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(44) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(45) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(46) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(47) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(48) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(49) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(50) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(51) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(52) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(266) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(275) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(295) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(307) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(309) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(310) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(329) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(476) : warning 213: tag mismatch
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(490) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(579) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(641) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(660) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.sp(681) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
//
// 12 Errors.
//
// Compilation Time: 0.23 sec
// ----------------------------------------

Press enter to exit ...
RDiver is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 05-19-2020 , 17:22   Re: [L4D & L4D2] Item Drop
Reply With Quote #38

well is not that hard to fix.
1) warning 234: symbol "FCVAR_PLUGIN" => I usually change "FCVAR_PLUGIN" to" FCVAR_NOTIFY" to remove this messages
2) error 173: 'throw' is a newly reserved keyword => Just replace "throw" to "bThrow" in the code and it may fix.
3) warning 213: tag mismatch => change from "new bool: " to "int "
Note I don't have SM 1.11 so maybe it doesn't work at all
__________________

Last edited by Marttt; 05-19-2020 at 17:24.
Marttt is offline
RDiver
Member
Join Date: Mar 2010
Old 05-20-2020 , 16:23   Re: [L4D & L4D2] Item Drop
Reply With Quote #39

Quote:
Originally Posted by Marttt View Post
well is not that hard to fix.
1) warning 234: symbol "FCVAR_PLUGIN" => I usually change "FCVAR_PLUGIN" to" FCVAR_NOTIFY" to remove this messages
2) error 173: 'throw' is a newly reserved keyword => Just replace "throw" to "bThrow" in the code and it may fix.
3) warning 213: tag mismatch => change from "new bool: " to "int "
Note I don't have SM 1.11 so maybe it doesn't work at all
Thx for yr advice. However new error generated below while compiling. No idea what "msg" represented in this plugin.

HTML Code:
//SourceMod Batch Compiler
// by the SourceMod Dev Team


//// l4d_drop.txt
//
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.txt(268) : error 017: undefined symbol "msg"
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.txt(268) : warning 215: expression has no effect
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.txt(274) : error 017: undefined symbol "msg"
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.txt(274) : warning 215: expression has no effect
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.txt(297) : error 017: undefined symbol "msg"
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.txt(297) : warning 215: expression has no effect
// D:\Games\Steam\steamapps\common\Left 4 Dead 2 Dedicated Server\left4dead2\addons\sourcemod\scripting\l4d_drop.txt(301) : error 017: undefined symbol "msg"
//
// 4 Errors.
//
// Compilation Time: 0.25 sec
// ----------------------------------------

Press enter to exit ...
Currently using SourceMod Version: 1.10.0.6482

Last edited by RDiver; 05-20-2020 at 16:34.
RDiver is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 05-20-2020 , 16:31   Re: [L4D & L4D2] Item Drop
Reply With Quote #40

Why are you trying to compile a text file?

The plugin compiles fine for me as an .sp file after getting rid of all the warnings and errors.
__________________
Psyk0tik 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 18:28.


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