Raised This Month: $433 Target: $400
 108% 

[L4D & L4D2] Left 4 DHooks Direct (1.11) [18-Mar-2020]


Post New Thread Reply   
 
Thread Tools Display Modes
hoanganh81097
Senior Member
Join Date: Apr 2016
Old 02-25-2020 , 08:58   Re: [L4D & L4D2] Left 4 DHooks Direct (1.0) [24-Feb-2020]
Reply With Quote #11

Can u help me ?
Quote:
L 02/25/2020 - 05:58:10: [SM] Unable to load plugin "ai_jockeybehaviour.smx": Native "L4D_StaggerPlayer" was not found
L 02/25/2020 - 05:58:14: [left4dhooks.smx] Failed to load "ChooseVictim" signature.
L 02/25/2020 - 05:58:14: [left4dhooks.smx] Failed to load "StartMeleeSwing" signature.
hoanganh81097 is offline
SkiPlix
Junior Member
Join Date: Dec 2016
Location: Argentina
Old 02-25-2020 , 14:43   Re: [L4D & L4D2] Left 4 DHooks Direct (1.0) [24-Feb-2020]
Reply With Quote #12

Seems this makes the server spawn more than one of each infected, even though the limit is set to 1 for each one).

Last edited by SkiPlix; 02-25-2020 at 14:47.
SkiPlix is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 02-25-2020 , 18:09   Re: [L4D & L4D2] Left 4 DHooks Direct (1.0) [24-Feb-2020]
Reply With Quote #13

Quote:
Originally Posted by hoanganh81097 View Post
Can u help me ?
Windows or Linux?

Quote:
Originally Posted by SkiPlix View Post
Seems this makes the server spawn more than one of each infected, even though the limit is set to 1 for each one).
Which native or plugin are you using to spawn infected?
__________________

Last edited by Spirit_12; 02-25-2020 at 18:33.
Spirit_12 is offline
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Old 02-25-2020 , 19:09   Re: [L4D & L4D2] Left 4 DHooks Direct (1.0) [24-Feb-2020]
Reply With Quote #14

Quote:
Originally Posted by Spirit_12 View Post
Just gonna leave this here for now.
Nice one! Haven't tested yet but will put link to your plugin and any using left4dhooks in the 2nd post.


Quote:
Originally Posted by Accelerator74 View Post
-
Thanks, forgot to move natives/fowards for release. All fixed next version.



Quote:
Originally Posted by Spirit_12 View Post
Quote:
Originally Posted by hoanganh81097 View Post
Can u help me ?
Windows or Linux?
Windows probably. Those functions already detoured by another plugin, so wildcarded first bytes. Fixed next update.

Almost done adding l4d2addresses natives. Over 30 new ones.



Quote:
Originally Posted by SkiPlix View Post
Seems this makes the server spawn more than one of each infected, even though the limit is set to 1 for each one).
Doesn't make sense why this would occur, the plugin itself does nothing on it's own except detour various functions but only if they're being used. That itself is unlikely to cause this and possibly another plugin that's using forwards or natives provided by this? Or more likely not related to left4dhooks at all. Edit: sure you can probably override the limits by changing the type in some forwards (SpawnSpecial) or manually spawning. If you want a plugin to respect the limits write that into it. Not something I'll be doing for this as this plugin shouldn't reduce functionality by limiting anything.
__________________

Last edited by Silvers; 02-26-2020 at 00:24.
Silvers is offline
hoanganh81097
Senior Member
Join Date: Apr 2016
Old 02-26-2020 , 02:46   Re: [L4D & L4D2] Left 4 DHooks Direct (1.0) [24-Feb-2020]
Reply With Quote #15

Quote:
public Action L4D_OnGetScriptValueInt(const char[] key, int &retVal)
{
if (!InfectedAllowed && StrEqual(key, "MaxSpecials") && SiSpMore.BoolValue && AutoDifficulty.BoolValue)
{
retVal = MaxSpecials;
return Plugin_Handled;
}
return Plugin_Continue;
}
Without l4dt. Plugin cant spawn more SI. Can you help me replace this with left4dhooks ?
hoanganh81097 is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 02-26-2020 , 18:07   Re: [L4D & L4D2] Left 4 DHooks Direct (1.0) [24-Feb-2020]
Reply With Quote #16

Quote:
Originally Posted by hoanganh81097 View Post
Without l4dt. Plugin cant spawn more SI. Can you help me replace this with left4dhooks ?
It is the same native, so I feel like something else might be a miss on the plugin. Can you link the actual plugin, so maybe we can look up the code?
__________________
Spirit_12 is offline
hoanganh81097
Senior Member
Join Date: Apr 2016
Old 02-26-2020 , 19:36   Re: [L4D & L4D2] Left 4 DHooks Direct (1.0) [24-Feb-2020]
Reply With Quote #17

Quote:
Originally Posted by Spirit_12 View Post
It is the same native, so I feel like something else might be a miss on the plugin. Can you link the actual plugin, so maybe we can look up the code?
Of course :
l4d_superversus.sp
hoanganh81097 is offline
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Old 02-26-2020 , 19:46   Re: [L4D & L4D2] Left 4 DHooks Direct (1.0) [24-Feb-2020]
Reply With Quote #18

Quote:
Originally Posted by hoanganh81097 View Post
Without l4dt. Plugin cant spawn more SI. Can you help me replace this with left4dhooks ?
So for now this is a limitation with the plugin version. The extension seems to be loaded before the director processes variables while plugins load after.

Might have a solution for version 1.2+ by calling the variables to be read again, or providing a native to force specified variable keys to be read again in turn firing the forward. The latter would require changes to existing plugins whose variables are processed too early for the plugin detours/forwards. The latter would also be easier and guaranteed while the former might only work on specific variables being called to re-check.

An ugly solution would be storing a list of all variables (or at least known ones required or processed before the plugin) and calling them all to be rechecked thereby firing the GetScript* forwards. I'm tempted to go with this method which saves numerous additional signatures or modifications to existing plugins. Very tempted to add this, might even for 1.1

Will release 1.1 next few hours once I finish the notes on it.
__________________

Last edited by Silvers; 02-26-2020 at 19:56.
Silvers is offline
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Old 02-27-2020 , 00:04   Re: [L4D & L4D2] Left 4 DHooks Direct (1.1) [27-Feb-2020]
Reply With Quote #19

Code:
1.1 (27-Feb-2020)
    - Added 26 new natives to L4D2 and 15 to L4D1 from "l4d2addresses.txt". Thanks to "Nuki" for suggesting.
    - See the "NATIVES - l4d2addresses.txt" section inside the include file for details.

    - Added 7 new natives to L4D2 and 5 to L4D1 from my plugins.
    - See the "NATIVES - Silvers" section inside the include file for details.

    - Fixed "L4D2_OnEndVersusModeRound" forwards triggering more than once per round. Thanks to "spumer" for reporting.
    - Fixed creating forwards and natives in the wrong place. Thanks to "Accelerator74" for reporting.
    - Fixed some signatures failing when other plugins detour them. Thanks to "hoanganh810972" for reporting.
    - Fixed cvar "l4d2_addons_eclipse" - values 0 and 1 now disable/enable addons unless otherwise handled.
    - Fixed not forwarding some Director Variables that were initialized too early. Thanks to "hoanganh81097" for reporting.
    - Thanks to "Spirit_12" for ideas with the Director Variables fix.
    - Removed unused actions from some forwards.

    - Plugin, GameData and Include files updated.


Quote:
Originally Posted by hoanganh81097 View Post
Without l4dt. Plugin cant spawn more SI. Can you help me replace this with left4dhooks ?
This should now be fixed.


Any additional director variables initialized too early and not being changed please let me know and I can add these in.
__________________
Silvers is offline
Accelerator74
AlliedModders Donor
Join Date: Dec 2010
Location: Russia
Old 02-27-2020 , 00:28   Re: [L4D & L4D2] Left 4 DHooks Direct (1.1) [27-Feb-2020]
Reply With Quote #20

Code:
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
{
	if (!buttons)
		return Plugin_Continue;
	
	if (!IsClientInGame(client) || IsFakeClient(client) || GetClientTeam(client) != 3
		|| GetEntProp(client, Prop_Send, "m_zombieClass") != 8)
			return Plugin_Continue;
	
	if (buttons & IN_RELOAD)
	{
		g_iQueuedThrow[client] = 3; //two hand overhand
		buttons |= IN_ATTACK2;
	}
	else if (buttons & IN_USE)
	{
		g_iQueuedThrow[client] = 2; //underhand
		buttons |= IN_ATTACK2;
	}
	else
	{
		g_iQueuedThrow[client] = 1; //one hand overhand
	}
	
	return Plugin_Continue;
}

public Action:L4D2_OnSelectTankAttack(client, &sequence)
{
	if ((sequence == 761 || sequence == 762) && g_iQueuedThrow[client])
	{
		//rock throw
		sequence = g_iQueuedThrow[client] + 48;
		return Plugin_Handled;
	}
	return Plugin_Continue;
}
I don’t understand what I'm doing wrong, but it doesn’t work) The rock throw animation is just buggy.
__________________
Accelerator74 is offline
Send a message via ICQ to Accelerator74
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 09:12.


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