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