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

[L4D & L4D2] Push And Drag


Post New Thread Reply   
 
Thread Tools Display Modes
MaiSiaoSiao
Junior Member
Join Date: Nov 2010
Location: On a Blue Planet
Old 12-01-2010 , 00:22   Re: [L4D & L4D2] Push And Drag
Reply With Quote #21

Quote:
Originally Posted by delirium_trigger View Post
do you think you can add another convar for admins only?

only admins can push and drag 0 for anybody 1 for admins only.
Yea i agree with you.Cause the moment other players know about this push and drag function,they kept using it to toss bots up into the sky or use it to disrupt other players gaming.
__________________
Did you know that when someone pisses you off, it takes 42 muscles to frown, but only 4 muscles to extend your arm and slap that retard? So do the smart thing, and enjoy life.
MaiSiaoSiao is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 10-04-2012 , 23:02   Re: [L4D & L4D2] Push And Drag
Reply With Quote #22

Nice plugin!

You may want to view compile warnings as they point out potential issues While in Pawn they're tags (All 32bits except for Strings), having something like new bool:GameMode; and setting it to 3 is typically a bad thing
KyleS is offline
Yono_Yume
Junior Member
Join Date: Jan 2021
Location: Hong Kong
Old 08-04-2022 , 02:40   Re: [L4D & L4D2] Push And Drag
Reply With Quote #23

Even if I don't edit anything, just download the l4d_pushdrag_v12.sp , trying to convert to smx but,gets 3 errors.

Code:
\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v12.sp(230) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier

\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v12.sp(233) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier

\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v12.sp(236) : error 173: 'throw' is a newly reserved keyword that may be used in the future; use a different name as an identifier
I don't know how to code at all I don't know what's going on, I try to use synonyms, replace [throw] with [cast].

Code:
//// l4d_pushdrag_v13.sp
//
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.sp(14) : warning 203: symbol is never used: "ShoveTime"
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.sp(40) : warning 234: symbol "FindSendPropOffs" is marked as deprecated: Use FindSendPropInfo instead, or HasEntProp if you just want to check for existence.
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.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.
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.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.
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.sp(48) : warning 213: tag mismatch (expected "bool", got "int")
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.sp(50) : warning 213: tag mismatch (expected "bool", got "int")
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.sp(52) : warning 213: tag mismatch (expected "bool", got "int")
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.sp(55) : warning 213: tag mismatch (expected "bool", got "int")
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.sp(65) : warning 204: symbol is assigned a value that is never used: "L4D2Version"
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.sp(96) : warning 213: tag mismatch (expected "bool", got "int")
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.sp(102) : warning 204: symbol is assigned a value that is never used: "gamestart"
// C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d_pushdrag_v13.sp(108) : warning 217: inconsistent indentation (did you mix tabs and spaces?)
// Code size:         16728 bytes
// Data size:         5488 bytes
// Stack/heap size:      16584 bytes
// Total requirements:   38800 bytes
//
// 12 Warnings.
Although I got 12 warnings, it doesn't matter, it was successfully translated to smx, and the plugin works normally in the game.

Then I made changes to several things
The first is to change all [IN_USE] to [IN_RELOAD]
Because the IN_USE button is too easy to trigger this plugin. For example, when I was playing No mercy map one time, some players liked to click the E button quickly when calling the elevator, and then the elevator was bug,players who try to enter the elevator will be pushed away,Then hit the wall and die.even if the elevator doesn't move.
Now you need to double-click the Reload button to trigger this plugin.I believe this will reduce a lot of false touches.

Throw is changed to use [IN_ATTACK2], which is push.
Sometimes grab the survivors and want them to go to a position. Using the shooting button [IN_ATTACK] will cause TK, so changing it to IN_ATTACK2 is more reasonable and logical.

The distance to grab something has been reduced from 1000 to 120.
1000, are you kidding me,even magicians don't have such a strong distance. 1000 distance is just too unbalanced, and powerful. 120 is just right, neither too far nor too close. Just like in reality, reaching out and picking up the cup.

The strength of throwing some things has also been reduced. Originally at 2000, you will be like a tank, grab the survivors and throw them out, and the survivors will fall to their death with a high probability.
Now 200, there will be no such problems.

(I still keep the 2000 velocity, but need to use another key combination to throw it. After grabbing the item, press and hold the [IN_ATTACK] shoot button, then click [IN_RELOAD] to reload, you can use the 2000 velocity to throw out something.Although catching survivors and throwing them in this way will cause some TK, when you use this method to throw survivors, do you still care about TK? XD)

⭐ ⭐ ⭐ ⭐ 2022-11-10 ⭐ ⭐ ⭐ ⭐
Sometimes pressing R once (like when I want to reload) will trigger this plugin as well, so I changed it to IN_SPEED. The default is perss Shift , which is the key that makes you walk slowly. double press it so that you can grab the item.
v13: double press R[reload] to grab the item.
v13 - shift double press Shift[walk] to grab the item.

If you don't like the two versions I provided, you can change it yourself. Even a rookie like me can change it.

Take l4d_pushdrag_v13 - shift as an example.
Click Get source
open it with notepad
ctrl+F Search for IN_SPEED
Change all the IN_SPEED you see to your favorite button, you can refer to this website
https://wiki.facepunch.com/gmod/Enums/IN
Some buttons are not available in L4D, you have to decide for yourself.
ctrl+s save and then translate into SMX file to use
Attached Files
File Type: sp Get Plugin or Get Source (l4d_pushdrag_v13.sp - 125 views - 10.8 KB)
File Type: sp Get Plugin or Get Source (l4d_pushdrag_v13 - shift .sp - 108 views - 10.8 KB)

Last edited by Yono_Yume; 11-09-2022 at 14:12. Reason: Improve user experience
Yono_Yume is offline
Mika Misori
Senior Member
Join Date: Sep 2022
Old 05-29-2023 , 13:19   Re: [L4D & L4D2] Push And Drag
Reply With Quote #24

Quote:
Originally Posted by Yono_Yume View Post
If you don't like the two versions I provided, you can change it yourself. Even a rookie like me can change it.

Take l4d_pushdrag_v13 - shift as an example.
Click Get source
open it with notepad
ctrl+F Search for IN_SPEED
Change all the IN_SPEED you see to your favorite button, you can refer to this website
https://wiki.facepunch.com/gmod/Enums/IN
Some buttons are not available in L4D, you have to decide for yourself.
ctrl+s save and then translate into SMX file to use
Good work! A very underrated plugin. But the problem is that the plugin cvars does not work, for example: I want the survivors in a co-op can only take items (weapons, medkits, pills), but no matter what value I put in cvars, survivors can pick up everything: cars, each other and all objects, which ruins all gameplay...

I even tried to change something in the code so that the survivors can only carry items, but it did not work

It would be great if someone could update this plugin, it's a hidden gem!

Last edited by Mika Misori; 05-29-2023 at 13:19.
Mika Misori is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 05-29-2023 , 16:05   Re: [L4D & L4D2] Push And Drag
Reply With Quote #25

Is the problem with the plugin or with the cvar value not being set? Do you have Command and ConVar - Buffer Overflow Fixer plugin? That would fix cvars not being set because of too many cvars.
__________________
Silvers is offline
Yono_Yume
Junior Member
Join Date: Jan 2021
Location: Hong Kong
Old 05-31-2023 , 06:12   Re: [L4D & L4D2] Push And Drag
Reply With Quote #26

Quote:
Originally Posted by Mika Misori View Post
Good work! A very underrated plugin. But the problem is that the plugin cvars does not work, for example: I want the survivors in a co-op can only take items (weapons, medkits, pills), but no matter what value I put in cvars, survivors can pick up everything: cars, each other and all objects, which ruins all gameplay...

I even tried to change something in the code so that the survivors can only carry items, but it did not work

It would be great if someone could update this plugin, it's a hidden gem!
I sent you a message, please check it
The plugin has been redo, but due to the author's request, I can't make this redo plugin public,If you want this plugin, please private message me, I will provide the author's link.

Last edited by Yono_Yume; 05-31-2023 at 06:15.
Yono_Yume is offline
Mika Misori
Senior Member
Join Date: Sep 2022
Old 06-05-2023 , 15:15   Re: [L4D & L4D2] Push And Drag
Reply With Quote #27

Quote:
Originally Posted by Silvers View Post
Is the problem with the plugin or with the cvar value not being set? Do you have Command and ConVar - Buffer Overflow Fixer plugin? That would fix cvars not being set because of too many cvars.
Yes, i have your latest plugins: Command and ConVar - Buffer Overflow Fixer and Left 4 DHooks Direct.

By the problem I meant plugin's cvars:
Code:
"l4d_pushdrag_versus_survivor", "3", "0:disable survivor use in versus ,1: survivor grab object, 2:, survivor grab teamate 3: survivor grab all"
"l4d_pushdrag_versus_infected", "2", "0:disable infected use in versus ,1: infected grab object, 2:, infected grab teamate 3: infected grab all"
No matter what values I set them, in the game survivors can take and drag everything (items, each other, even cars). I wanted survivors to be able to take and drag only items (weapons/medkit etc) by l4d_pushdrag_versus_survivor 1

I tried to dive into the code, tried to remove everything unnecessary from the function GetEnt, but I failed — for some reason conditions with cvar l4d_pushdrag_versus_survivor 1 does not work in this function.
Mika Misori is offline
Reply



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 17:58.


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