Raised This Month: $ Target: $400
 0% 

SendProxy Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Afronanny
Veteran Member
Join Date: Aug 2009
Old 03-20-2013 , 13:59   Re: SendProxy Manager
Reply With Quote #1

Unhook should stop the output, yes. I won't be able to help debug this until Sunday when I get back to my main PC. It sounds like it could be a bug in the extension. For now though, you can just return Plugin_Continue in the callback to mimic an unhook.

Last edited by Afronanny; 03-20-2013 at 14:00.
Afronanny is offline
Antlions
Member
Join Date: Sep 2012
Old 03-20-2013 , 16:32   Re: SendProxy Manager
Reply With Quote #2

Is there a way to send a proxy in tf2 for mvm mode.
GameRules_SetProp( "m_bPlayingMannVsMachine", 1 );
i cant find a way to turn that into a proxy
Antlions is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-20-2013 , 17:32   Re: SendProxy Manager
Reply With Quote #3

Quote:
Originally Posted by Antlions View Post
Is there a way to send a proxy in tf2 for mvm mode.
GameRules_SetProp( "m_bPlayingMannVsMachine", 1 );
i cant find a way to turn that into a proxy
Did you try using FindEntityByClassname on the tf_gamerules class?

Not sure why you'd want to change that prop, though. It's liable to cause all sorts of issues with the UI.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 03-20-2013 , 17:37   Re: SendProxy Manager
Reply With Quote #4

Quote:
Originally Posted by Afronanny View Post
Unhook should stop the output, yes. I won't be able to help debug this until Sunday when I get back to my main PC. It sounds like it could be a bug in the extension. For now though, you can just return Plugin_Continue in the callback to mimic an unhook.
The name of array props is the index like "005" instead of the array name.
Don't know if this breaks anything else, but works fine.
Code:
diff -r d5c38c561197 extension.cpp
--- a/extension.cpp    Fri Nov 02 17:44:16 2012 -0400
+++ b/extension.cpp    Wed Mar 20 22:35:41 2013 +0100
@@ -672,6 +672,9 @@
     {
         return pContext->ThrowNativeError("Could not find element %d in %s", element, info.prop->GetName());
     }
+
+    if(pProp->GetParentArrayPropName() == NULL)
+        pProp->SetParentArrayPropName(info.prop->GetName());
     
     SendPropHook hook;
     hook.objectID = entity;
@@ -721,7 +724,7 @@
     IPluginFunction *callback = pContext->GetFunctionById(params[5]);
     for (int i = 0; i < g_Hooks.Count(); i++)
     {
-        if (g_Hooks[i].Element == element && g_Hooks[i].PropType == propType && g_Hooks[i].pCallback == callback && !strcmp(g_Hooks[i].pVar->GetName(), propName) && g_Hooks[i].objectID == entity)
+        if (g_Hooks[i].Element == element && g_Hooks[i].PropType == propType && g_Hooks[i].pCallback == callback && !strcmp(g_Hooks[i].pVar->GetParentArrayPropName(), propName) && g_Hooks[i].objectID == entity)
         {
             g_SendProxyManager.UnhookProxy(i);
         }
__________________
Peace-Maker 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 08:38.


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