Raised This Month: $134 Target: $400
 33% 

[CS:GO] PTaH - V1.0.8


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
komashchenko
Member
Join Date: Nov 2013
Old 10-19-2016 , 13:53   [CS:GO] PTaH - V1.0.8
Reply With Quote #1

PTaH - P Tools and Hooks

include


Example/Test Plugin


Thanks to: Dr!fter, Peace-Maker, GoD-Tony, rom4s

Links
Source
Builds
Gamedata

Changelog
Attached Files
File Type: sp Get Plugin or Get Source (PTaH_test.sp - 1251 views - 3.8 KB)

Last edited by komashchenko; 11-10-2017 at 13:51. Reason: Update V1.0.8
komashchenko is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-19-2016 , 16:28   Re: [CS:GO] PTaH - V1.0
Reply With Quote #2

hey, that's pretty good!
could you possibly add a threaded function with a callback for PTaH_GetHostByName?
__________________
My Plugins
Not taking private requests, too busy.
shavit is offline
Headline
SourceMod Moderator
Join Date: Mar 2015
Location: 32.7157 N, 117.1611 W
Old 10-19-2016 , 21:38   Re: [CS:GO] PTaH - V1.0
Reply With Quote #3

Awesome!! Definitely going to have fun with this!
__________________

Last edited by Headline; 10-19-2016 at 21:39.
Headline is offline
komashchenko
Member
Join Date: Nov 2013
Old 10-21-2016 , 15:03   Re: [CS:GO] PTaH - V1.0
Reply With Quote #4

Quote:
Originally Posted by shavit View Post
hey, that's pretty good!
could you possibly add a threaded function with a callback for PTaH_GetHostByName?
can you give an example of what you would like to see?
komashchenko is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-22-2016 , 21:06   Re: [CS:GO] PTaH - V1.0
Reply With Quote #5

Quote:
Originally Posted by komashchenko View Post
can you give an example of what you would like to see?
something like this i guess:
Code:
public void OnPluginStart()
{
	// uses the system's dns resolver
	PTaH_GetHostByName("google.com", OnDNSLookup_Success, OnDNSLookup_Failure);
	
	// custom dns resolver
	PTaH_GetHostByName_Custom("google.com", OnDNSLookup_Success, OnDNSLookup_Failure, "8.8.4.4");
}

public void OnDNSLookup_Success(int ipaddress[4])
{
	PrintToServer("IP: %d.%d.%d.%d", ipaddress >>> 24 & 255, ipaddress >>> 16 & 255, ipaddress >>> 8 & 255, ipaddress & 255);
}

public void OnDNSLookup_Failure(const char[] reason)
{
	PrintToServer("Lookup failed! Reason: %s", reason);
}
__________________
My Plugins
Not taking private requests, too busy.

Last edited by shavit; 10-22-2016 at 21:07.
shavit is offline
milutinke
AlliedModders Donor
Join Date: Jun 2012
Location: Serbia
Old 10-23-2016 , 03:59   Re: [CS:GO] PTaH - V1.0
Reply With Quote #6

Cool, very useful
GJ !
__________________

Last edited by milutinke; 10-23-2016 at 04:00.
milutinke is offline
Send a message via Skype™ to milutinke
komashchenko
Member
Join Date: Nov 2013
Old 11-01-2016 , 12:53   Re: [CS:GO] PTaH - V1.0.1
Reply With Quote #7

1.0.1
  • Added hook ServerConsolePrint
  • Fixed PTaH_GetEconItemViewFromWeapon for Windows (Thank you GoD-Tony)
  • PTaH_GetHostByName substituted for PTaH_GetAddrInfo

Quote:
Originally Posted by shavit View Post
something like this i guess:
Code:
public void OnPluginStart()
{
	// uses the system's dns resolver
	PTaH_GetHostByName("google.com", OnDNSLookup_Success, OnDNSLookup_Failure);
	
	// custom dns resolver
	PTaH_GetHostByName_Custom("google.com", OnDNSLookup_Success, OnDNSLookup_Failure, "8.8.4.4");
}

public void OnDNSLookup_Success(int ipaddress[4])
{
	PrintToServer("IP: %d.%d.%d.%d", ipaddress >>> 24 & 255, ipaddress >>> 16 & 255, ipaddress >>> 8 & 255, ipaddress & 255);
}

public void OnDNSLookup_Failure(const char[] reason)
{
	PrintToServer("Lookup failed! Reason: %s", reason);
}
I could not make a feature for custom dns, but slightly increased functionality
komashchenko is offline
metal_upa
Member
Join Date: Jun 2016
Old 11-16-2016 , 04:09   Re: [CS:GO] PTaH - V1.0.1
Reply With Quote #8

Good extension, can i request this hook too? https://forums.alliedmods.net/showthread.php?t=141109
metal_upa is offline
komashchenko
Member
Join Date: Nov 2013
Old 11-29-2016 , 02:28   Re: [CS:GO] PTaH - V1.0.1
Reply With Quote #9

del

Last edited by komashchenko; 11-29-2016 at 02:35.
komashchenko is offline
Divin12
Senior Member
Join Date: Nov 2011
Old 11-29-2016 , 03:01   Re: [CS:GO] PTaH - V1.0.1
Reply With Quote #10

Can you fix error GetItemSchema after recent update it didn't work
__________________

Divin12 is offline
Reply


Thread Tools
Display Modes

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


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