Skip to content

Commit 45e6e71

Browse files
SouthclawsSouthclaws
authored andcommitted
added 0.3.7 latest libraries, updated readme with reason why this repo exists
1 parent fdc4abd commit 45e6e71

File tree

15 files changed

+1469
-1
lines changed

15 files changed

+1469
-1
lines changed

0.3.7-R2-2-1/a_actor.inc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/* SA-MP Actor Functions
2+
*
3+
* (c) Copyright 2015, SA-MP Team
4+
*
5+
*/
6+
7+
#if defined _actor_included
8+
#endinput
9+
#endif
10+
#define _actor_included
11+
#pragma library actors
12+
13+
native CreateActor(modelid, Float:X, Float:Y, Float:Z, Float:Rotation);
14+
native DestroyActor(actorid);
15+
16+
native IsActorStreamedIn(actorid, forplayerid);
17+
18+
native SetActorVirtualWorld(actorid, vworld);
19+
native GetActorVirtualWorld(actorid);
20+
21+
native ApplyActorAnimation(actorid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time);
22+
native ClearActorAnimations(actorid);
23+
24+
native SetActorPos(actorid, Float:X, Float:Y, Float:Z);
25+
native GetActorPos(actorid, &Float:X, &Float:Y, &Float:Z);
26+
native SetActorFacingAngle(actorid, Float:ang);
27+
native GetActorFacingAngle(actorid, &Float:ang);
28+
29+
native SetActorHealth(actorid, Float:health);
30+
native GetActorHealth(actorid, &Float:health);
31+
native SetActorInvulnerable(actorid, invulnerable = true);
32+
native IsActorInvulnerable(actorid);
33+
34+
native IsValidActor(actorid);

0.3.7-R2-2-1/a_http.inc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* SA-MP threaded HTTP/1.0 client for pawn
2+
*
3+
* (c) Copyright 2010, SA-MP Team
4+
*
5+
*/
6+
7+
// HTTP requests
8+
#define HTTP_GET 1
9+
#define HTTP_POST 2
10+
#define HTTP_HEAD 3
11+
12+
// HTTP error response codes
13+
// These codes compliment ordinary HTTP response codes returned in 'response_code'
14+
// (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
21+
22+
native HTTP(index, type, url[], data[], callback[]);
23+
24+
// example HTTP callback: public MyHttpResponse(index, response_code, data[]) { ... }

0.3.7-R2-2-1/a_npc.inc

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
/* SA-MP NPC Functions
2+
*
3+
* (c) Copyright 2009, SA-MP Team
4+
*
5+
*/
6+
7+
#if defined _samp_included
8+
#endinput
9+
#endif
10+
#define _samp_included
11+
#pragma library samp
12+
13+
#pragma tabsize 4
14+
15+
#include <core>
16+
#include <float>
17+
#include <string>
18+
#include <file>
19+
#include <time>
20+
#include <datagram>
21+
22+
// --------------------------------------------------
23+
// Natives
24+
// --------------------------------------------------
25+
26+
// Util
27+
native print(const string[]);
28+
native printf(const format[], {Float,_}:...);
29+
native format(output[], len, const format[], {Float,_}:...);
30+
native SetTimer(funcname[], interval, repeating);
31+
native KillTimer(timerid);
32+
native GetTickCount();
33+
native Float:asin(Float:value);
34+
native Float:acos(Float:value);
35+
native Float:atan(Float:value);
36+
native Float:atan2(Float:x, Float:y);
37+
38+
native SendChat(msg[]);
39+
native SendCommand(commandtext[]);
40+
41+
native GetPlayerState(playerid);
42+
native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z);
43+
native GetPlayerVehicleID(playerid);
44+
native GetPlayerArmedWeapon(playerid);
45+
native GetPlayerHealth(playerid);
46+
native GetPlayerArmour(playerid);
47+
native GetPlayerSpecialAction(playerid);
48+
native IsPlayerStreamedIn(playerid);
49+
native IsVehicleStreamedIn(vehicleid);
50+
native GetPlayerKeys(playerid, &keys, &updown, &leftright);
51+
native GetPlayerFacingAngle(playerid, &Float:ang);
52+
native GetMyPos(&Float:x, &Float:y, &Float:z);
53+
native SetMyPos(Float:x, Float:y, Float:z);
54+
native GetMyFacingAngle(&Float:ang);
55+
native SetMyFacingAngle(Float:ang);
56+
57+
native GetDistanceFromMeToPoint(Float:X, Float:Y, Float:Z, &Float:Distance);
58+
native IsPlayerInRangeOfPoint(playerid, Float:range, Float:X, Float:Y, Float:Z);
59+
60+
native GetPlayerName(playerid, const name[], len);
61+
native IsPlayerConnected(playerid);
62+
63+
#define PLAYER_RECORDING_TYPE_NONE 0
64+
#define PLAYER_RECORDING_TYPE_DRIVER 1
65+
#define PLAYER_RECORDING_TYPE_ONFOOT 2
66+
67+
native StartRecordingPlayback(playbacktype, recordname[]);
68+
native StopRecordingPlayback();
69+
native PauseRecordingPlayback();
70+
native ResumeRecordingPlayback();
71+
72+
// --------------------------------------------------
73+
// Defines
74+
// --------------------------------------------------
75+
76+
// States
77+
#define PLAYER_STATE_NONE (0)
78+
#define PLAYER_STATE_ONFOOT (1)
79+
#define PLAYER_STATE_DRIVER (2)
80+
#define PLAYER_STATE_PASSENGER (3)
81+
#define PLAYER_STATE_WASTED (7)
82+
#define PLAYER_STATE_SPAWNED (8)
83+
#define PLAYER_STATE_SPECTATING (9)
84+
85+
// Misc
86+
#define MAX_PLAYER_NAME (24)
87+
#define MAX_PLAYERS (500)
88+
#define MAX_VEHICLES (2000)
89+
#define INVALID_PLAYER_ID (0xFFFF)
90+
#define INVALID_VEHICLE_ID (0xFFFF)
91+
#define NO_TEAM (255)
92+
#define MAX_OBJECTS (150)
93+
#define INVALID_OBJECT_ID (255)
94+
#define MAX_GANG_ZONES (1024)
95+
#define MAX_TEXT_DRAWS (1024)
96+
#define MAX_MENUS (128)
97+
#define INVALID_MENU (0xFF)
98+
#define INVALID_TEXT_DRAW (0xFFFF)
99+
#define INVALID_GANG_ZONE (-1)
100+
101+
// Weapons
102+
#define WEAPON_BRASSKNUCKLE (1)
103+
#define WEAPON_GOLFCLUB (2)
104+
#define WEAPON_NITESTICK (3)
105+
#define WEAPON_KNIFE (4)
106+
#define WEAPON_BAT (5)
107+
#define WEAPON_SHOVEL (6)
108+
#define WEAPON_POOLSTICK (7)
109+
#define WEAPON_KATANA (8)
110+
#define WEAPON_CHAINSAW (9)
111+
#define WEAPON_DILDO (10)
112+
#define WEAPON_DILDO2 (11)
113+
#define WEAPON_VIBRATOR (12)
114+
#define WEAPON_VIBRATOR2 (13)
115+
#define WEAPON_FLOWER (14)
116+
#define WEAPON_CANE (15)
117+
#define WEAPON_GRENADE (16)
118+
#define WEAPON_TEARGAS (17)
119+
#define WEAPON_MOLTOV (18)
120+
#define WEAPON_COLT45 (22)
121+
#define WEAPON_SILENCED (23)
122+
#define WEAPON_DEAGLE (24)
123+
#define WEAPON_SHOTGUN (25)
124+
#define WEAPON_SAWEDOFF (26)
125+
#define WEAPON_SHOTGSPA (27)
126+
#define WEAPON_UZI (28)
127+
#define WEAPON_MP5 (29)
128+
#define WEAPON_AK47 (30)
129+
#define WEAPON_M4 (31)
130+
#define WEAPON_TEC9 (32)
131+
#define WEAPON_RIFLE (33)
132+
#define WEAPON_SNIPER (34)
133+
#define WEAPON_ROCKETLAUNCHER (35)
134+
#define WEAPON_HEATSEEKER (36)
135+
#define WEAPON_FLAMETHROWER (37)
136+
#define WEAPON_MINIGUN (38)
137+
#define WEAPON_SATCHEL (39)
138+
#define WEAPON_BOMB (40)
139+
#define WEAPON_SPRAYCAN (41)
140+
#define WEAPON_FIREEXTINGUISHER (42)
141+
#define WEAPON_CAMERA (43)
142+
#define WEAPON_PARACHUTE (46)
143+
#define WEAPON_VEHICLE (49)
144+
#define WEAPON_DROWN (53)
145+
#define WEAPON_COLLISION (54)
146+
147+
// Keys
148+
#define KEY_ACTION (1)
149+
#define KEY_CROUCH (2)
150+
#define KEY_FIRE (4)
151+
#define KEY_SPRINT (8)
152+
#define KEY_SECONDARY_ATTACK (16)
153+
#define KEY_JUMP (32)
154+
#define KEY_LOOK_RIGHT (64)
155+
#define KEY_HANDBRAKE (128)
156+
#define KEY_LOOK_LEFT (256)
157+
#define KEY_SUBMISSION (512)
158+
#define KEY_LOOK_BEHIND (512)
159+
#define KEY_WALK (1024)
160+
#define KEY_ANALOG_UP (2048)
161+
#define KEY_ANALOG_DOWN (4096)
162+
#define KEY_ANALOG_RIGHT (16384)
163+
#define KEY_ANALOG_LEFT (8192)
164+
165+
#define KEY_UP (-128)
166+
#define KEY_DOWN (128)
167+
#define KEY_LEFT (-128)
168+
#define KEY_RIGHT (128)
169+
170+
// --------------------------------------------------
171+
// Forwards (Callback declarations)
172+
// --------------------------------------------------
173+
174+
forward OnNPCModeInit();
175+
forward OnNPCModeExit();
176+
forward OnNPCConnect(myplayerid);
177+
forward OnNPCDisconnect(reason[]);
178+
forward OnNPCSpawn();
179+
forward OnNPCEnterVehicle(vehicleid, seatid);
180+
forward OnNPCExitVehicle();
181+
forward OnClientMessage(color, text[]);
182+
forward OnPlayerDeath(playerid);
183+
forward OnPlayerText(playerid, text[]);
184+
forward OnPlayerStreamIn(playerid);
185+
forward OnPlayerStreamOut(playerid);
186+
forward OnVehicleStreamIn(vehicleid);
187+
forward OnVehicleStreamOut(vehicleid);
188+
forward OnRecordingPlaybackEnd();
189+
190+
// --------------------------------------------------

0.3.7-R2-2-1/a_objects.inc

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/* SA-MP Object Functions
2+
*
3+
* (c) Copyright 2005-2015, SA-MP Team
4+
*
5+
*/
6+
7+
#if defined _objects_included
8+
#endinput
9+
#endif
10+
#define _objects_included
11+
#pragma library objects
12+
13+
// Objects
14+
15+
native CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0);
16+
native AttachObjectToVehicle(objectid, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ);
17+
native AttachObjectToObject(objectid, attachtoid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ, SyncRotation = 1);
18+
native AttachObjectToPlayer(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ);
19+
native SetObjectPos(objectid, Float:X, Float:Y, Float:Z);
20+
native GetObjectPos(objectid, &Float:X, &Float:Y, &Float:Z);
21+
native SetObjectRot(objectid, Float:RotX, Float:RotY, Float:RotZ);
22+
native GetObjectRot(objectid, &Float:RotX, &Float:RotY, &Float:RotZ);
23+
native GetObjectModel(objectid);
24+
native SetObjectNoCameraCol(objectid);
25+
native IsValidObject(objectid);
26+
native DestroyObject(objectid);
27+
native MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0);
28+
native StopObject(objectid);
29+
native IsObjectMoving(objectid);
30+
native EditObject(playerid, objectid);
31+
native EditPlayerObject(playerid, objectid);
32+
native SelectObject(playerid);
33+
native CancelEdit(playerid);
34+
native CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0);
35+
native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:RotZ);
36+
native SetPlayerObjectPos(playerid, objectid, Float:X, Float:Y, Float:Z);
37+
native GetPlayerObjectPos(playerid, objectid, &Float:X, &Float:Y, &Float:Z);
38+
native SetPlayerObjectRot(playerid, objectid, Float:RotX, Float:RotY, Float:RotZ);
39+
native GetPlayerObjectRot(playerid, objectid, &Float:RotX, &Float:RotY, &Float:RotZ);
40+
native GetPlayerObjectModel(playerid, objectid);
41+
native SetPlayerObjectNoCameraCol(playerid, objectid);
42+
native IsValidPlayerObject(playerid, objectid);
43+
native DestroyPlayerObject(playerid, objectid);
44+
native MovePlayerObject(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0);
45+
native StopPlayerObject(playerid, objectid);
46+
native IsPlayerObjectMoving(playerid, objectid);
47+
native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
48+
49+
#define OBJECT_MATERIAL_SIZE_32x32 10
50+
#define OBJECT_MATERIAL_SIZE_64x32 20
51+
#define OBJECT_MATERIAL_SIZE_64x64 30
52+
#define OBJECT_MATERIAL_SIZE_128x32 40
53+
#define OBJECT_MATERIAL_SIZE_128x64 50
54+
#define OBJECT_MATERIAL_SIZE_128x128 60
55+
#define OBJECT_MATERIAL_SIZE_256x32 70
56+
#define OBJECT_MATERIAL_SIZE_256x64 80
57+
#define OBJECT_MATERIAL_SIZE_256x128 90
58+
#define OBJECT_MATERIAL_SIZE_256x256 100
59+
#define OBJECT_MATERIAL_SIZE_512x64 110
60+
#define OBJECT_MATERIAL_SIZE_512x128 120
61+
#define OBJECT_MATERIAL_SIZE_512x256 130
62+
#define OBJECT_MATERIAL_SIZE_512x512 140
63+
64+
#define OBJECT_MATERIAL_TEXT_ALIGN_LEFT 0
65+
#define OBJECT_MATERIAL_TEXT_ALIGN_CENTER 1
66+
#define OBJECT_MATERIAL_TEXT_ALIGN_RIGHT 2
67+
68+
native SetObjectMaterial(objectid, materialindex, modelid, txdname[], texturename[], materialcolor=0);
69+
native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, txdname[], texturename[], materialcolor=0);
70+
71+
native SetObjectMaterialText(objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
72+
native SetPlayerObjectMaterialText(playerid, objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
73+
74+
native SetObjectsDefaultCameraCol(disable);

0 commit comments

Comments
 (0)