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

[L4D & L4D2] Left 4 DHooks Direct (1.146) [21-Apr-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-23-2021 , 02:50   Re: [L4D & L4D2] Left 4 DHooks Direct (1.31) [23-Feb-2021]
Reply With Quote #271

Quote:
Originally Posted by Ja-Forces View Post
L4D part one / LINUX OS / SM 1.10

https://forums.alliedmods.net/showpo...&postcount=403

L 10/14/2020 - 01:57:24: Info (map "l4d_hospital01_apartment") (file "/home/gameserver9654/serverfiles/left4dead/addons/sourcemod/logs/errors_20201014.log")
L 10/14/2020 - 01:57:24: [SM] Unable to load plugin "l4dready.smx": Native "L4D_ScavengeBeginRoundSetupTime" was not found
L 10/14/2020 - 01:58:19: Error log file session closed.
I don't think this ever existed or worked for L4D1. Scavenge is an L4D2 thing. Someone correct me if I'm wrong.





Quote:
Originally Posted by Tonblader View Post
To commands to more targets:

Can add @randominccapedsurvivor = "@ris"
Can add @randomsurvivor = "@rs"
Can add @randominfected = "@ri"
Can add @randomtank = "@rt"

Can add @inccapedsurvivorbot = "@isb"
Can add @survivorbot = "@sb"
Can add @infectedbot = "@ib"
Can add @tankbot = "@tb"

Quote:
Originally Posted by Forgetest View Post
L4D_GetPlayerSpawnTime seems to be broken. I believe the calculation between LoadFromAddress and a float is the cause.

After a bit tests on it, I found it correct to reinterpret the value returned from LoadFromAddress via the view_as cast. Wish it helps.

Done.

Code:
1.31 (23-Feb-2021)
    - Added Target Filters to target randomly. Requested by "Tonblader":
        "@inccapedsurvivors", "@is"
        "@randominccapedsurvivor", "@ris"
        "@randomsurvivor", "@rs"
        "@randominfected", "@ri"
        "@randomtank", "@rt"
        "@inccapedsurvivorbot", "@isb"
        "@survivorbot", "@sb"
        "@infectedbot", "@ib"
        "@tankbot", "@tb"

    - Fixed "L4D_GetPlayerSpawnTime" from returning the wrong value again. Thanks to "Forgetest" for reporting.




Quote:
Originally Posted by Tonblader View Post
Can add a debug (toggle command) of player/survivors action to detect the functions and apply in conditions of other plugins?
Don't know what you mean.
__________________

Last edited by Silvers; 02-23-2021 at 02:53.
Silvers is offline
Forgetest
Member
Join Date: Aug 2020
Old 02-23-2021 , 03:19   Re: [L4D & L4D2] Left 4 DHooks Direct (1.31) [23-Feb-2021]
Reply With Quote #272

Quote:
Originally Posted by Silvers View Post
Code:
1.31 (23-Feb-2021)
    - Added Target Filters to target randomly. Requested by "Tonblader":
        "@randominccapedsurvivor", "@ris"
Isn't this a typo

Edit: plus "@inccapedsurvivors", "@is", "@inccapedsurvivorbot", "@isb"

Last edited by Forgetest; 02-23-2021 at 03:25.
Forgetest is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-23-2021 , 03:31   Re: [L4D & L4D2] Left 4 DHooks Direct (1.32) [23-Feb-2021]
Reply With Quote #273

Quote:
Originally Posted by Forgetest View Post
Isn't this a typo

Edit: plus "@inccapedsurvivors", "@is", "@inccapedsurvivorbot", "@isb"
That's what I get for copy pasting without looking. Thanks, fixed and updated.

Code:
1.32 (23-Feb-2021)
    - Changed native "L4D_GetRandomPZSpawnPosition" to accept client index of 0. Thanks to "Accelerator74" for reporting.
    - Fixed target filters misspelling "incapped". Thanks to "Forgetest" for reporting.
__________________

Last edited by Silvers; 02-23-2021 at 03:32.
Silvers is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-02-2021 , 13:30   Re: [L4D & L4D2] Left 4 DHooks Direct (1.33) [02-Mar-2021]
Reply With Quote #274

Code:
1.33 (02-Mar-2021)
    - Changed forward "L4D2_OnEntityShoved" to trigger for all entities being shoved not just clients.
    - Fixed forward "L4D2_OnEntityShoved" not working in L4D1. GameData file updated for L4D1.
    - Fixed native "L4D_IsFirstMapInScenario" crashing in L4D1 from changes in version 1.30 update.
Surprised no one reported that "L4D2_OnEntityShoved" wasn't returning for infected etc.. Can now block stumbling infected or killing them when shoving.



Code:
1.33a (04-Mar-2021)
    - L4D1 GameData updated. Changes fixing "L4D2_OnEntityShoved" were missing from the previous update.
__________________

Last edited by Silvers; 03-04-2021 at 03:19.
Silvers is offline
disawar1
AlliedModders Donor
Join Date: Aug 2011
Location: Russian
Old 03-04-2021 , 22:40   Re: [L4D & L4D2] Left 4 DHooks Direct (1.33) [02-Mar-2021]
Reply With Quote #275

Quote:
Originally Posted by Silvers View Post
Surprised no one reported that "L4D2_OnEntityShoved" wasn't returning for infected etc.. Can now block stumbling infected or killing them when shoving.
Nobody except me Thanks for update. Good job my friend!
__________________
disawar1 is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-05-2021 , 10:08   Re: [L4D & L4D2] Left 4 DHooks Direct (1.33a) [04-Mar-2021]
Reply With Quote #276

I used the event for that kind, but blocking the stumbling is a very good opportunity. Nicely done!
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-05-2021 , 10:58   Re: [L4D & L4D2] Left 4 DHooks Direct (1.33a) [04-Mar-2021]
Reply With Quote #277

Nice, yeah forgot to say thanks to disawar1 for reporting the issue and testing the fixes. Also thanks to Dragokas for help with the last update.
__________________
Silvers is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 03-22-2021 , 20:14   Re: [L4D & L4D2] Left 4 DHooks Direct (1.33a) [04-Mar-2021]
Reply With Quote #278

Hey Silver,

Can you add HasPlayerControlledZombies native to the plugin as well? Its a bool return. I'm using it in a few of my plugins and it would be the most easiest method to detect if players can control infected.

PHP Code:
CTerrorGameRules::HasPlayerControlledZombies() 
PHP Code:
StartPrepSDKCall(SDKCall_Static);
PrepSDKCall_SetFromConf(hGameConfSDKConf_Signature"HasPlayerControlledZombies");
PrepSDKCall_SetReturnInfo(SDKType_BoolSDKPass_Plain);
Native_HasPlayerControlledZombies EndPrepSDKCall(); 
PHP Code:
SDKCall(Native_HasPlayerControlledZombies
PHP Code:
/*
 * CTerrorGameRules::HasPlayerControlledZombies()
 */
"HasPlayerControlledZombies"
{
    
"library"    "server"
    "linux"        "@_ZN16CTerrorGameRules26HasPlayerControlledZombiesEv"
    "windows"    "\xF7\x05\x2A\x2A\x2A\x2A\x00\x10\x00\x00\x74\x2A\xB8\x2A\x2A\x2A\x2A\xEB\x2A\xA1\x2A\x2A\x2A\x2A\x8B\x40\x24\x85\xC0\x75\x2A\xB8\x2A\x2A\x2A\x2A\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x11\x50\x8B\x42\x10\xFF\xD0\x85\xC0\x74\x2A\x6A\x00\x68\x2A\x2A\x2A\x2A\x8B\xC8\xE8\x2A\x2A\x2A\x2A\x85\xC0\x7E\x2A"
    
/* F7 05 ? ? ? ? 00 10 00 00 74 ? B8 ? ? ? ? EB ? A1 ? ? ? ? 8B 40 24 85 C0 75 ? B8 ? ? ? ? 8B 0D ? ? ? ? 8B 11 50 8B 42 10 FF D0 85 C0 74 ? 6A 00 68 ? ? ? ? 8B C8 E8 ? ? ? ? 85 C0 7E ? */
    /* Search "playercontrolledzombies". */

Just gonna leave the whole windows function here.

PHP Code:
int CTerrorGameRules::HasPlayerControlledZombies()
{
  
char *v0// eax@1
  
KeyValues *v1// eax@4
  
int v2// edx@4

  
v0 "FCVAR_NEVER_AS_STRING";
  if ( !(
byte_F660B5 0x10) )
  {
    
v0 = *(char **)(dword_F660BC 36);
    if ( !
v0 )
      
v0 "";
  }
  
v1 = (KeyValues *)(*(int (__cdecl **)(intchar *))(*(_DWORD *)g_pMatchExtL4D 16))(g_pMatchExtL4Dv0);
  
v2 0;
  if ( 
v1 )
    
LOBYTE(v2) = KeyValues::GetInt(v1"playercontrolledzombies"0) > 0;
  return 
v2;

__________________
Spirit_12 is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 03-22-2021 , 21:08   Re: [L4D & L4D2] Left 4 DHooks Direct (1.33a) [04-Mar-2021]
Reply With Quote #279

If Silvers does decide to add it and chooses to provide L4D1 support for it, here are the signatures:
PHP Code:
/* CTerrorGameRules::HasPlayerControlledZombies() */
"HasPlayerControlledZombies"
{
    
"library"    "server"
    "linux"        "@_ZN16CTerrorGameRules26HasPlayerControlledZombiesEv"
    "windows"    "\xF7\x05\x2A\x2A\x2A\x2A\x00\x10\x00\x00\x74\x2A\xB8\x2A\x2A\x2A\x2A\xEB\x2A\xA1\x2A\x2A\x2A\x2A\x8B\x40\x24\x85\xC0\x75\x2A\xB8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\x50\xE8\x2A\x2A\x2A\x2A\x83\xC4\x08\x85\xC0\x74"
    
/* F7 05 ? ? ? ? 00 10 00 00 74 ? B8 ? ? ? ? EB ? A1 ? ? ? ? 8B 40 24 85 C0 75 ? B8 ? ? ? ? 68 ? ? ? ? 50 E8 ? ? ? ? 83 C4 08 85 C0 74 */
    /* Search "teamversus". */

__________________
Psyk0tik is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-23-2021 , 07:51   Re: [L4D & L4D2] Left 4 DHooks Direct (1.34) [23-Mar-2021]
Reply With Quote #280

Done.

Code:
1.34 (23-Mar-2021)
    - Added native "L4D_HasPlayerControlledZombies" to return if players can control infected. Thanks to "Spirit_12" for requesting.
    - Thanks to "Crasher_3637" for the L4D1 signature.
    - Fixed Linux detection accidentally being broken from version 1.17 update.

    - Updated: L4D1 GameData file.
    - Updated: L4D2 GameData file.
    - Updated: Plugin and Include file.
    - Updated: Test plugin to reflect above changes.
__________________
Silvers 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:06.


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