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

[CS:GO] PTaH - V1.0.8


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
komashchenko
BANNED
Join Date: Nov 2013
Old 10-19-2016 , 12: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 - 10427 views - 3.8 KB)

Last edited by komashchenko; 11-10-2017 at 12:51. Reason: Update V1.0.8
komashchenko is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 10-19-2016 , 15: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?
__________________
retired
shavit is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 10-19-2016 , 20: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 20:39.
headline is offline
komashchenko
BANNED
Join Date: Nov 2013
Old 10-21-2016 , 14: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 , 20: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);
}
__________________
retired

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

Cool, very useful
GJ !

Last edited by milutinke; 10-23-2016 at 03:00.
milutinke is offline
Send a message via Skype™ to milutinke
komashchenko
BANNED
Join Date: Nov 2013
Old 11-01-2016 , 11: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
Senior Member
Join Date: Jun 2016
Old 11-16-2016 , 03: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
BANNED
Join Date: Nov 2013
Old 11-29-2016 , 01:28   Re: [CS:GO] PTaH - V1.0.1
Reply With Quote #9

del

Last edited by komashchenko; 11-29-2016 at 01:35.
komashchenko is offline
Divin12
Senior Member
Join Date: Nov 2011
Old 11-29-2016 , 02: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 12:52.


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