Skip to content
This repository has been archived by the owner on Dec 20, 2019. It is now read-only.

Commit

Permalink
Updated hooks for GameRules
Browse files Browse the repository at this point in the history
Tested in tf2 only, but should works fine in csgo too.
  • Loading branch information
CurTInq authored Jan 15, 2019
1 parent 6af7460 commit 39a90f2
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 49 deletions.
Binary file modified addons/sourcemod/extensions/sendproxy.ext.2.csgo.dll
Binary file not shown.
Binary file modified addons/sourcemod/extensions/sendproxy.ext.2.csgo.so
Binary file not shown.
Binary file modified addons/sourcemod/extensions/sendproxy.ext.2.tf2.dll
Binary file not shown.
Binary file modified addons/sourcemod/extensions/sendproxy.ext.2.tf2.so
Binary file not shown.
17 changes: 8 additions & 9 deletions addons/sourcemod/scripting/include/sendproxy.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
#define _SENDPROXYMANAGER_INC_

enum SendPropType {
Prop_Int = 0,
Prop_Float = 1,
Prop_String = 2,
//Prop_Array = 3,
Prop_Int,
Prop_Float,
Prop_String,
Prop_Vector = 4,
Prop_Max
};
Expand All @@ -20,14 +19,14 @@ typeset SendProxyCallback

typeset SendProxyCallbackGamerules
{
function Action (const char[] cPropName, int &iValue, int iElement); //Prop_Int
function Action (const char[] cPropName, float &flValue, int iElement); //Prop_Float
function Action (const char[] cPropName, char cModifiedValue[4096], int iElement); //Prop_String
function Action (const char[] cPropName, float vecValues[3], int iElement); //Prop_Vector
function Action (const char[] cPropName, int &iValue, int iElement, int iClient); //Prop_Int
function Action (const char[] cPropName, float &flValue, int iElement, int iClient); //Prop_Float
function Action (const char[] cPropName, char cModifiedValue[4096], int iElement, int iClient); //Prop_String
function Action (const char[] cPropName, float vecValues[3], int iElement, int iClient); //Prop_Vector
};

typedef PropChangedCallback = function void(int iEntity, const char[] cPropName, const char[] oldValue, const char[] newValue);
typedef GameRulesPropChangedCallback = function void(const char[] PropName, const char[] oldValue, const char[] newValue);
typedef GameRulesPropChangedCallback = function void(const char[] cPropName, const char[] oldValue, const char[] newValue);

//Returns true upon success, false upon failure
native bool SendProxy_Hook(int entity, char[] propname, SendPropType proptype, SendProxyCallback callback);
Expand Down
Loading

0 comments on commit 39a90f2

Please sign in to comment.