From 347643895334b7b43a59fae06d878cdc24e90900 Mon Sep 17 00:00:00 2001 From: Greyscale Date: Mon, 29 Jun 2009 12:25:24 -0700 Subject: [PATCH] Updated gamedata file for ZRTools and updated zrtools include file. --- .../gamedata/plugin.zombiereloaded.txt | 20 ++++- src/include/zrtools.inc | 75 +++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletion(-) diff --git a/cstrike/addons/sourcemod/gamedata/plugin.zombiereloaded.txt b/cstrike/addons/sourcemod/gamedata/plugin.zombiereloaded.txt index b3d42d5..85f40c9 100644 --- a/cstrike/addons/sourcemod/gamedata/plugin.zombiereloaded.txt +++ b/cstrike/addons/sourcemod/gamedata/plugin.zombiereloaded.txt @@ -21,13 +21,31 @@ "windows" "58" "linux" "59" } - + "OnTakeDamage" { "windows" "60" "linux" "61" } + "StartTouch" + { + "windows" "88" + "linux" "89" + } + + "Touch" + { + "windows" "89" + "linux" "90" + } + + "EndTouch" + { + "windows" "90" + "linux" "91" + } + "Weapon_CanUse" { "windows" "216" diff --git a/src/include/zrtools.inc b/src/include/zrtools.inc index 94734a7..ed20afe 100644 --- a/src/include/zrtools.inc +++ b/src/include/zrtools.inc @@ -125,6 +125,81 @@ native ZRTools_HookOnTakeDamage(client, ZRTools_OnTakeDamage:callback); */ native ZRTools_UnhookOnTakeDamage(hookid); +/** + * Callback function for StartTouch. + * + * @param client The client index. + * @param entity The entity index of the entity being touched. + */ +functag public ZRTools_Action:ZRTools_StartTouch(client, entity); + +/** + * Hooks StartTouch on a client. + * + * @param client The client index. + * @param callback The callback function for hook. + * @return The unique HookID. + */ +native ZRTools_HookStartTouch(client, ZRTools_StartTouch:callback); + +/** + * Unhooks StartTouch on a client. + * + * @param hookid The HookID of the hook. + * @error Invalid HookID. + */ +native ZRTools_UnhookStartTouch(hookid); + +/** + * Callback function for Touch. + * + * @param client The client index. + * @param entity The entity index of the entity being touched. + */ +functag public ZRTools_Action:ZRTools_Touch(client, entity); + +/** + * Hooks Touch on a client. + * + * @param client The client index. + * @param callback The callback function for hook. + * @return The unique HookID. + */ +native ZRTools_HookTouch(client, ZRTools_Touch:callback); + +/** + * Unhooks Touch on a client. + * + * @param hookid The HookID of the hook. + * @error Invalid HookID. + */ +native ZRTools_UnhookTouch(hookid); + +/** + * Callback function for EndTouch. + * + * @param client The client index. + * @param entity The entity index of the entity being touched. + */ +functag public ZRTools_Action:ZRTools_EndTouch(client, entity); + +/** + * Hooks EndTouch on a client. + * + * @param client The client index. + * @param callback The callback function for hook. + * @return The unique HookID. + */ +native ZRTools_HookEndTouch(client, ZRTools_EndTouch:callback); + +/** + * Unhooks EndTouch on a client. + * + * @param hookid The HookID of the hook. + * @error Invalid HookID. + */ +native ZRTools_UnhookEndTouch(hookid); + /** * Callback function for Weapon_CanUse. * Called when a client attempts to pick up a weapon.