Raised This Month: $12 Target: $400
 3% 

SDK Hooks 2.1 - Updated 2011-9-10


Post New Thread Closed Thread   
 
Thread Tools Display Modes
psychonic

BAFFLED
Join Date: May 2008
Old 03-13-2011 , 10:31   Re: [EXTENSION] SDK Hooks 1.3 (NEW 2.0 IN BETA)
#1171

Quote:
Originally Posted by Mecha the Slag View Post
If we compile a plugin against SDKHooks 2 beta, will we have to do the same with the stable release?
If you're not using anything new from sdkhooks2, you can compile against the old inc and have it still be compat.
psychonic is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-13-2011 , 10:31   Re: [EXTENSION] SDK Hooks 1.3 (NEW 2.0 IN BETA)
#1172

Quote:
Originally Posted by Mecha the Slag View Post
also, would it be possible to add a bool to SDKHooks_TakeDamage that makes it ignore OnTakeDamage?.
It should already ignore the OnTakeDamage hook.

Quote:
Originally Posted by Mecha the Slag View Post
edit: SDKHooks_TakeDamage doesn't seem to work properly in TF2: It says the client suicided. I'm doing the following:
PHP Code:
//SDKHooks_TakeDamage(entity, inflictor, attacker, Float:damage, damageType, weapon=-1, Float:damageForce[3]=NULL_VECTOR, Float:damagePosition[3]=NULL_VECTOR);
SDKHooks_TakeDamage(iVictimiAttackeriAttacker100.0DMG_BURNGetPlayerWeaponSlot(iAttacker1)); 
Both victim and attacker are valid clients.
I'll check it out.

Last edited by psychonic; 03-13-2011 at 10:53.
psychonic is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-13-2011 , 11:11   Re: [EXTENSION] SDK Hooks 1.3 (NEW 2.0 IN BETA)
#1173

Quote:
Originally Posted by psychonic View Post
Quote:
Originally Posted by Mecha the Slag View Post
edit: SDKHooks_TakeDamage doesn't seem to work properly in TF2: It says the client suicided. I'm doing the following:
PHP Code:
//SDKHooks_TakeDamage(entity, inflictor, attacker, Float:damage, damageType, weapon=-1, Float:damageForce[3]=NULL_VECTOR, Float:damagePosition[3]=NULL_VECTOR);
SDKHooks_TakeDamage(iVictimiAttackeriAttacker100.0DMG_BURNGetPlayerWeaponSlot(iAttacker1)); 
Both victim and attacker are valid clients.
I'll check it out.
WORKSFORME.

I added a bot and then called it with myself as victim and bot as attacker and inflictor. It said the bot killed me with the weapon he currently held (needle gun fwiw).
psychonic is offline
Mecha the Slag
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 03-13-2011 , 14:03   Re: [EXTENSION] SDK Hooks 1.3 (NEW 2.0 IN BETA)
#1174

Really weird
I'll do some testing and hopefully figure out why my victim is 'suiciding'.

Quote:
Originally Posted by psychonic View Post
If you're not using anything new from sdkhooks2, you can compile against the old inc and have it still be compat.
I meant with a transition from SDKHooks 2 beta -> SDKHooks 2
but I take that as a no. Goodie then.

edit: would it make any difference that I'm calling the SDKHooks_TakeDamage in an OnTakeDamage?
__________________
Mecha the Slag is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-13-2011 , 14:19   Re: [EXTENSION] SDK Hooks 1.3 (NEW 2.0 IN BETA)
#1175

Quote:
Originally Posted by Mecha the Slag View Post
I meant with a transition from SDKHooks 2 beta -> SDKHooks 2
but I take that as a no. Goodie then.
The current beta1 inc will be compatible with the release one. The only possible changes will be addition of new hooktypes, natives, default parameters, or formatting changes.

Quote:
Originally Posted by Mecha the Slag View Post
edit: would it make any difference that I'm calling the SDKHooks_TakeDamage in an OnTakeDamage?
The attacker/inflictor for the death message would be looked up from the damage that caused the kill, whether that be the other damage or the damage you caused inside of it.
psychonic is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 03-14-2011 , 15:09   Re: [EXTENSION] SDK Hooks 1.3 (NEW 2.0 IN BETA)
#1176

The beta appears to be stable on OB (I'm not using any new features, though. 5+ Days of uptime at the moment).

Just for those of you who were wary about trying it.

Last edited by KyleS; 03-14-2011 at 17:13. Reason: See below. :<
KyleS is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-14-2011 , 15:20   Re: [EXTENSION] SDK Hooks 1.3 (NEW 2.0 IN BETA)
#1177

Quote:
Originally Posted by Kyle12 View Post
The beta appears to be stable on OB (I'm not using any new features, though. 5+ Days of uptime at the moment).

Just for those of you who were weary about trying it.
*wary

Thanks for the feedback!
psychonic is offline
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 03-14-2011 , 18:03   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#1178

Quote:
Originally Posted by DJ Tsunami View Post
Code:
#undef REQUIRE_EXTENSIONS
#include <sdkhooks>

new bool:g_bSDKHooks = false;

public OnPluginStart()
{
  g_bSDKHooks = LibraryExists("sdkhooks.ext");
}

public OnLibraryAdded(const String:name[])
{
  if(StrEqual(name, "sdkhooks.ext"))
    g_bSDKHooks = true;
}

public OnLibraryRemoved(const String:name[])
{
  if(StrEqual(name, "sdkhooks.ext"))
    g_bSDKHooks = false;
}
Something like this?
Anybody knows if it work?
In documentation is written that OnLibraryAdded is called when extension is loading, but in my tests it does not called if i execute sm exts load sdkhooks.
__________________
altex is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-14-2011 , 18:28   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#1179

Quote:
Originally Posted by altex View Post
Anybody knows if it work?
In documentation is written that OnLibraryAdded is called when extension is loading, but in my tests it does not called if i execute sm exts load sdkhooks.
The library name is just "sdkhooks".
psychonic is offline
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 03-14-2011 , 19:22   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#1180

Quote:
Originally Posted by psychonic View Post
The library name is just "sdkhooks".
It does not metter how it's named. The function OnLibraryAdded does not been called at all for extension.

Code:
#pragma semicolon 1

#undef AUTOLOAD_EXTENSIONS
#undef REQUIRE_EXTENSIONS
#include <sdkhooks>

public Plugin:myinfo = {
    name = "test",
    author = "test",
    description = "test",
    version = "test",
    url = "test"
};

public OnLibraryAdded(const String:name[]) {
    LogError("DEBUG ADD name = %s", name);
}

public OnLibraryRemoved(const String:name[]) {
    LogError("DEBUG RM name = %s", name);
}

public OnAllPluginsLoaded() {
    LogError("DEBUG LOADED g_SdkHooksEnabled = %i", GetExtensionFileStatus("sdkhooks.ext") == 1);
}

public OnPluginStart() {
    LogError("DEBUG START g_SdkHooksEnabled = %i", GetExtensionFileStatus("sdkhooks.ext") == 1);
}

L 03/15/2011 - 02:20:08: -------- Mapchange to aim_ag_texture_city --------
L 03/15/2011 - 02:20:08: [test.smx] DEBUG START g_SdkHooksEnabled = 0
L 03/15/2011 - 02:20:08: [test.smx] DEBUG LOADED g_SdkHooksEnabled = 0
<skip>
Connection to Steam servers successful.
   VAC secure mode is activated.
sm exts list
[SM] Displaying 4 extensions:
[01] Automatic Updater (1.3.6): Updates SourceMod gamedata files
[02] Webternet (1.3.6): Extension for interacting with URLs
[03] CS:S Tools (1.3.6): CS:S extended functionality
[04] BinTools (1.3.6): Low-level C/C++ Calling API
sm exts load sdkhooks
[SM] Loaded extension sdkhooks.ext.dll successfully.
sm exts list
[SM] Displaying 5 extensions:
[01] Automatic Updater (1.3.6): Updates SourceMod gamedata files
[02] Webternet (1.3.6): Extension for interacting with URLs
[03] CS:S Tools (1.3.6): CS:S extended functionality
[04] BinTools (1.3.6): Low-level C/C++ Calling API
[05] SDK Hooks (1.3.0-REDUCKS): Source SDK Hooks
sm exts unload 5
[SM] Extension sdkhooks.ext.dll is now unloaded.
__________________
altex is offline
Closed Thread



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 16:36.


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