SAMP Gitlab CI Test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
910 B

//------------------------------------------------
#include <a_samp>
#include <a_http>
forward MyHttpResponse(index, response_code, data[]);
//------------------------------------------------
public OnFilterScriptInit()
{
print("\n--HTTP Test Loaded.\n");
return 1;
}
//------------------------------------------------
public MyHttpResponse(index, response_code, data[])
{
new showdata[256+1];
format(showdata, 256, "Index: %d ResponseCode: %d Data: %s", index, response_code, data);
SendClientMessage(index, 0xFFFFFFFF, showdata);
}
//------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256+1];
if(strcmp("/httptest", cmd, true) == 0)
{
HTTP(playerid, HTTP_GET, "sa-mp.com/return.txt", "", "MyHttpResponse");
return 1;
}
return 0;
}
//------------------------------------------------