Skip to content

Commit c7ab293

Browse files
authored
Merge pull request #20 from Y-Less/master
General improvements (2)
2 parents c4b6759 + e875298 commit c7ab293

File tree

8 files changed

+748
-413
lines changed

8 files changed

+748
-413
lines changed

a_actor.inc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
*
55
*/
66

7-
#if defined _actor_included
7+
#if defined _INC_a_actor
88
#endinput
99
#endif
10+
#define _INC_a_actor
1011
#define _actor_included
11-
#pragma library actors
12+
13+
#define SAMP_CONST_CORRECT
14+
15+
#pragma tabsize 4
1216

1317
/// <summary>Create a static 'actor' in the world. These 'actors' are like NPCs, however they have limited functionality. They do not take up server player slots.</summary>
1418
/// <param name="modelid">The model ID (skin ID) the actor should have</param>
@@ -222,3 +226,4 @@ native IsActorInvulnerable(actorid);
222226
/// <remarks>This function was added in <b>SA-MP 0.3.7</b> and will not work in earlier versions!</remarks>
223227
/// <returns><b><c>1</c></b> if the actor is valid, <b><c>0</c></b> if not.</returns>
224228
native IsValidActor(actorid);
229+

a_http.inc

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,33 @@
44
*
55
*/
66

7+
#if defined _INC_a_http
8+
#endinput
9+
#endif
10+
#define _INC_a_http
11+
12+
#define SAMP_CONST_CORRECT
13+
14+
#pragma tabsize 4
15+
16+
// --------------------------------------------------
17+
// Defines
18+
// --------------------------------------------------
19+
720
// HTTP requests
8-
#define HTTP_GET 1
9-
#define HTTP_POST 2
10-
#define HTTP_HEAD 3
21+
#define HTTP_GET (1)
22+
#define HTTP_POST (2)
23+
#define HTTP_HEAD (3)
1124

1225
// HTTP error response codes
1326
// These codes compliment ordinary HTTP response codes returned in 'response_code'
1427
// (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error)
15-
#define HTTP_ERROR_BAD_HOST 1
16-
#define HTTP_ERROR_NO_SOCKET 2
17-
#define HTTP_ERROR_CANT_CONNECT 3
18-
#define HTTP_ERROR_CANT_WRITE 4
19-
#define HTTP_ERROR_CONTENT_TOO_BIG 5
20-
#define HTTP_ERROR_MALFORMED_RESPONSE 6
28+
#define HTTP_ERROR_BAD_HOST (1)
29+
#define HTTP_ERROR_NO_SOCKET (2)
30+
#define HTTP_ERROR_CANT_CONNECT (3)
31+
#define HTTP_ERROR_CANT_WRITE (4)
32+
#define HTTP_ERROR_CONTENT_TOO_BIG (5)
33+
#define HTTP_ERROR_MALFORMED_RESPONSE (6)
2134

2235
/// <summary>Sends a threaded HTTP request.</summary>
2336
/// <param name="index">ID used to differentiate requests that are sent to the same callback (useful for playerids)</param>
@@ -50,3 +63,4 @@
5063
native HTTP(index, type, const url[], const data[], const callback[]);
5164

5265
// example HTTP callback: public MyHttpResponse(index, response_code, data[]) { ... }
66+

0 commit comments

Comments
 (0)