View Single Post
lugui
Senior Member
Join Date: Feb 2016
Location: GetClientAbsOrigin();
Old 02-12-2018 , 16:46   Re: [EXTENSION] System2 - Easy to use HTTP/FTP Request API and useful system natives
Reply With Quote #83

I made it:

PHP Code:
public void OnMapStart()
{
    
poll();
}

void poll()
{
    
System2HTTPRequest httpRequest = new System2HTTPRequest(OnHTTPSRequestEnd"https://lugui.in/fdlapi/Debug.php");
    
httpRequest.GET();    
    
delete httpRequest;
}

public 
void OnHTTPSRequestEnd(bool success, const char[] errorSystem2HTTPRequest requestSystem2HTTPResponse responseHTTPRequestMethod method)
{
    if(
success) {
            
char res[30];
            
response.GetContent(resresponse.ContentLength 1);
            
LogToFile("addons/sourcemod/logs/FDMLog.log""Received: %s"res);
    }
    
poll();

The simplest script possible, and it still crashing the server, Am I deleting it properly?

Last edited by lugui; 02-12-2018 at 16:46.
lugui is offline