Raised This Month: $ Target: $400
 0% 

SDK Hooks 2.1 - Updated 2011-9-10


Post New Thread Closed Thread   
 
Thread Tools Display Modes
ouchie
Member
Join Date: Feb 2014
Old 03-05-2014 , 02:14   Re: SDK Hooks 2.1 - Updated 2011-9-10
#2651

So I have a plugin I am trying to get working, and it requires SDK Hooks 2.2.0. The problem is my server runs on Windows, and with the new SDK Hooks being included in Sourcemod, I am having a really hard time getting them installed. First if I install sourcemod, then sdkhooks 2.2 I look at sm exts list and get an error on sdkhooks saying that it could not find gEntlist pointer... Also I should include that I have to remove sourcemod's updater ext because it will automatically revert my sdkhooks to sourcemod's included edition of 1.5.3.... ideas? The plugin does not work with the newer 1.5.3 edition of sdkhooks, need 2.2.0
ouchie is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 03-05-2014 , 02:21   Re: SDK Hooks 2.1 - Updated 2011-9-10
#2652

Update the plugin to be compatible with the SM stock version of SDKHooks.
__________________
ddhoward is offline
ouchie
Member
Join Date: Feb 2014
Old 03-05-2014 , 06:46   Re: SDK Hooks 2.1 - Updated 2011-9-10
#2653

Quote:
Originally Posted by ddhoward View Post
Update the plugin to be compatible with the SM stock version of SDKHooks.
It is not my plugin to update
ouchie is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-05-2014 , 07:48   Re: SDK Hooks 2.1 - Updated 2011-9-10
#2654

Quote:
Originally Posted by ouchie View Post
So I have a plugin I am trying to get working, and it requires SDK Hooks 2.2.0. The problem is my server runs on Windows, and with the new SDK Hooks being included in Sourcemod, I am having a really hard time getting them installed. First if I install sourcemod, then sdkhooks 2.2 I look at sm exts list and get an error on sdkhooks saying that it could not find gEntlist pointer... Also I should include that I have to remove sourcemod's updater ext because it will automatically revert my sdkhooks to sourcemod's included edition of 1.5.3.... ideas? The plugin does not work with the newer 1.5.3 edition of sdkhooks, need 2.2.0
The latest version of SDKHooks has all the functions that 2.2.0 does... I can't think of a reason it shouldn't just work in place of 2.2.0.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 03-05-2014 , 08:32   Re: SDK Hooks 2.1 - Updated 2011-9-10
#2655

Quote:
Originally Posted by ouchie View Post
It is not my plugin to update
And? You have the .sp; edit it anyway.
__________________
ddhoward is offline
ouchie
Member
Join Date: Feb 2014
Old 03-05-2014 , 13:44   Re: SDK Hooks 2.1 - Updated 2011-9-10
#2656

Quote:
Originally Posted by ddhoward View Post
And? You have the .sp; edit it anyway.
I am not really sure how... I have looked at the source, and cannot find where I would edit it.. I am inexperienced, and I apologize.
ouchie is offline
h3bus
AlliedModders Donor
Join Date: Nov 2013
Old 03-30-2014 , 04:49   Re: SDK Hooks 2.1 - Updated 2011-9-10
#2657

Hi guys,

I have a "Double Hook" issue on CS:GO

When running that simple code:
PHP Code:
#include <sourcemod>
#include <sdkhooks>

public Hook_OnWeaponSpawned(weaponEntity)
{
    
PrintToChatAll("Hook_OnWeaponSpawned %d"weaponEntity);
}


public 
OnEntityCreated(entity, const String:classname[])
{
    
    if(
StrEqual(classname"weapon_knife"))
    {
        
PrintToChatAll("OnEntityCreated %d"entity);
        
SDKHook(entitySDKHook_SpawnHook_OnWeaponSpawned);
    }

OnEntityCreated gets called once but Hook_OnWeaponSpawned is called twice...

What could be causing this?

Note: My SdKtool version
Code:
[10] SDK Hooks (1.5.4-dev+4028): Source SDK Hooks

Last edited by h3bus; 03-30-2014 at 04:53.
h3bus is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 03-31-2014 , 15:35   Re: SDK Hooks 2.1 - Updated 2011-9-10
#2658

Quote:
Originally Posted by h3bus View Post
-snip-
If you're sure it's definitely your plugin which is calling it twice, and not two separate plugins callling it once each, then just unhook the entity in Hook_OnWeaponSpawned to avoid it being called a second time. More CS:GO "quirks" I presume?

Edit: He realised his mistake.

Quote:
Originally Posted by h3bus View Post
I was hooking them twice due to the double spawn event.
__________________

Last edited by 11530; 03-31-2014 at 15:50.
11530 is offline
h3bus
AlliedModders Donor
Join Date: Nov 2013
Old 03-31-2014 , 16:43   Re: SDK Hooks 2.1 - Updated 2011-9-10
#2659

Nope OnSpawn hook is really called twice...

Reload however is only called once (well most of the time). But as I hooked reload onspawn which is called twice, I hooked it twice

However, when weapon clip is full and client press reload key, Realod hook is spamed (10 to 20 call, did not count them)

Last edited by h3bus; 03-31-2014 at 18:03.
h3bus is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 04-06-2014 , 10:06   Re: SDK Hooks 2.1 - Updated 2011-9-10
#2660

Ciao,

PHP Code:
forward Action:OnLevelInit(const String:mapName[], String:mapEntities[2097152]); 
seems not working, I tried my code below and nothing was logged in sm error logs..

my test code:
PHP Code:
public Action:OnLevelInit(const String:mapName[], String:mapEntities[2097152])
{
    
LogError"TEST" );
    
    new 
Handle:FileHandle OpenFile"testLevelInit.txt""w" );
    
    if( !
WriteFileStringFileHandlemapEntitiestrue ) )
        
LogError"TEST2" );
    
    
CloseHandleFileHandle );

KissLick 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 04:52.


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