Raised This Month: $ Target: $400
 0% 

[BUG][L4D2] A problem with SDKHooks_DropWeapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iaNanaNana
Member
Join Date: Sep 2020
Location: Two-dimensional
Old 11-20-2022 , 00:05   [BUG][L4D2] A problem with SDKHooks_DropWeapon
Reply With Quote #1

When I drop dual pistol by using SDKHooks_DropWeapon, the other pistol can call OnEntityCreated but can't call SDKHook_Spawn .
Even if I set bypassHooks to false. Seems like it block any function call used SDKHook in this frame.

Code:
public OnEntityCreated(a, const String:n[])
{
	if(a > MaxClients && n[0] && !strcmp(n[7], "pistol"))
	{
		SDKHook(a, SDKHook_SpawnPost, OnSpawnPost)
	}
}

OnSpawnPost(a)
{
	PrintToChatAll("%i %i", a, GetEntData(a, 5236))	// Not print if using SDKHooks_DropWeapon to drop dual pistol
}

Last edited by iaNanaNana; 11-20-2022 at 00:10.
iaNanaNana 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 05:55.


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