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

SDK Hooks 2.1 - Updated 2011-9-10


Post New Thread Closed Thread   
 
Thread Tools Display Modes
DarkEnergy
SourceMod Donor
Join Date: Apr 2008
Location: Georgia Tech, MSECE
Old 08-26-2010 , 19:16   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#821

Today's CSS update changed the WeaponDrop signature, anyone know how to retrieve the new signature?

Edit: http://forums.alliedmods.net/showthread.php?t=136486
__________________
War3:Source Developer
"Your CPU is just a bunch of Muxes"

Last edited by DarkEnergy; 08-26-2010 at 20:17.
DarkEnergy is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 08-27-2010 , 04:39   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#822

This uses virtual offsets, not signatures. Depending on who has time first today, me or psychonic will update the repository.

Quote:
Originally Posted by snowyiet View Post
Does this have a VPhysicsUpdate hook? If not, then what can be used to replace this?
The version in the repository does, but it's lacking some features of the currently released version.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
psychonic

BAFFLED
Join Date: May 2008
Old 08-27-2010 , 06:55   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#823

Quote:
Originally Posted by DarkEnergy View Post
Today's CSS update changed the WeaponDrop signature, anyone know how to retrieve the new signature?

Edit: http://forums.alliedmods.net/showthread.php?t=136486
I'm almost sure you are referring to CSWeaponDrop. This uses Weapon_Drop, which has not changed.
psychonic is offline
Xsinthis
Senior Member
Join Date: Oct 2008
Location: Canadia, eh?
Old 08-30-2010 , 21:47   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#824

I'm getting these errors, and i don't know if the second one is related to this extension, but i htink their causing all kinds of crazy problems

[10] <FAILED> file "sdkhooks.ext.so": /usr/local/games/tf/851266/68.232.184.123:27015/orangebox/tf/addons/sourcemod/extensions/sdkhooks.ext.so: cannot open shared object file: No such file or directory
[11] <FAILED> file "]<TAB>^<0B><1D><TAB><0D>.ext.so": /usr/local/games/tf/851266/68.232.184.123:27015/orangebox/tf/addons/sourcemod/extensions/dbi.?t<0B><08><1A><18><0D>k<0C><0D><0F>(u$<0C ><08><0E><18><10><0C>(<0C>?<0F>`<0D>(}<0D>`<1 6><0C>r<TAB>?p<0F> /]<TAB>^<0B><1D><TAB><0D>.ext.so: cannot open shared object file: No such file or directory
__________________
Xsinthis is offline
psychonic

BAFFLED
Join Date: May 2008
Old 08-30-2010 , 22:50   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#825

Quote:
Originally Posted by Xsinthis View Post
I'm getting these errors, and i don't know if the second one is related to this extension, but i htink their causing all kinds of crazy problems

[10] <FAILED> file "sdkhooks.ext.so": /usr/local/games/tf/851266/68.232.184.123:27015/orangebox/tf/addons/sourcemod/extensions/sdkhooks.ext.so: cannot open shared object file: No such file or directory
[11] <FAILED> file "]<TAB>^<0B><1D><TAB><0D>.ext.so": /usr/local/games/tf/851266/68.232.184.123:27015/orangebox/tf/addons/sourcemod/extensions/dbi.?t<0B><08><1A><18><0D>k<0C><0D><0F>(u$<0C ><08><0E><18><10><0C>(<0C>?<0F>`<0D>(}<0D>`<1 6><0C>r<TAB>?p<0F> /]<TAB>^<0B><1D><TAB><0D>.ext.so: cannot open shared object file: No such file or directory
you have too many databases in your databases.cfg
psychonic is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 09-01-2010 , 00:12   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#826

As per CrimsonGT's post on using SDKHooks to prevent a client from predicting an event. He mentions prehooking PreThink, does he mean just SDKHook_PreThink or am I missing something entirely?

This works a bit better then using OnPlayerRunCmd. However, the client still predicts the event, just less is displayed.

Code:
public OnClientDisconnect(client)
{
	if (IsClientInGame(client))
	{
		SDKUnhook(client, SDKHook_PreThink, PreThinkHook);
	}
}

public OnClientPutInServer(client)
{
	SDKHook(client, SDKHook_PreThink, PreThinkHook);
}

public PreThinkHook(client)
{
	new Buttons = GetClientButtons(client);

	if (Buttons & IN_ATTACK2)
	{
		Buttons &= ~IN_ATTACK2;
		PrintToChat(client, "Muhahahahahaha!");
		SetEntProp(client, Prop_Data, "m_nButtons", Buttons);
	}
}
I really hope I didn't do this wrong (this is just an example of what I'm trying to do).

Last edited by KyleS; 09-01-2010 at 00:15.
KyleS is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-01-2010 , 07:46   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#827

Quote:
Originally Posted by Kyle12 View Post
As per CrimsonGT's post on using SDKHooks to prevent a client from predicting an event. He mentions prehooking PreThink, does he mean just SDKHook_PreThink or am I missing something entirely?

This works a bit better then using OnPlayerRunCmd. However, the client still predicts the event, just less is displayed.

Code:
public OnClientDisconnect(client)
{
    if (IsClientInGame(client))
    {
        SDKUnhook(client, SDKHook_PreThink, PreThinkHook);
    }
}

public OnClientPutInServer(client)
{
    SDKHook(client, SDKHook_PreThink, PreThinkHook);
}

public PreThinkHook(client)
{
    new Buttons = GetClientButtons(client);

    if (Buttons & IN_ATTACK2)
    {
        Buttons &= ~IN_ATTACK2;
        PrintToChat(client, "Muhahahahahaha!");
        SetEntProp(client, Prop_Data, "m_nButtons", Buttons);
    }
}
I really hope I didn't do this wrong (this is just an example of what I'm trying to do).
No, that's right. I'm not positive, but I don't believe there's a way to full bypass the client's prediction from the server. The client and server share some code, and the client has no idea that some could possibly be different than what it has. PreThink just happens before OnPlayerRunCmd so the prediction is corrected sooner between what the stock client code expected versus what the server code did.

Side note: you don't actually have to manually unhook on client disconnect. All hook for a client/entity are automatically removed on disconnect/destruction.
psychonic is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 09-01-2010 , 09:31   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#828

Quote:
Originally Posted by psychonic View Post
No, that's right. I'm not positive, but I don't believe there's a way to full bypass the client's prediction from the server. The client and server share some code, and the client has no idea that some could possibly be different than what it has. PreThink just happens before OnPlayerRunCmd so the prediction is corrected sooner between what the stock client code expected versus what the server code did.
Works for me, thanks
Quote:
Originally Posted by psychonic View Post
Side note: you don't actually have to manually unhook on client disconnect. All hook for a client/entity are automatically removed on disconnect/destruction.
KyleS is offline
dirka_dirka
Veteran Member
Join Date: Nov 2009
Old 09-01-2010 , 09:52   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#829

another side note:
how many times do you have OnClientDisconnected fire by an already disconnected player?
if (IsClientConnected()) seems kinda pointless in that code bit.
dirka_dirka is offline
chu1720
Senior Member
Join Date: Mar 2010
Location: Hong Kong
Old 09-01-2010 , 11:12   Re: [EXTENSION] SDK Hooks 1.3 (Updated 2010-05-12)
#830

Is that the "SDKHook_OnTakeDamage" function doesn't work?
chu1720 is offline
Send a message via MSN to chu1720
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:45.


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