1
1
/* SA-MP Functions
2
2
*
3
- * (c) Copyright 2005-2015 , SA-MP Team
3
+ * (c) Copyright 2005-2012 , SA-MP Team
4
4
*
5
5
*/
6
6
23
23
#include < a_players>
24
24
#include < a_vehicles>
25
25
#include < a_objects>
26
- #include < a_actor>
27
26
#include < a_sampdb>
28
27
29
28
// Limits and internal constants
30
29
# define MAX_PLAYER_NAME (24 )
31
- # define MAX_PLAYERS (1000 )
30
+ # define MAX_PLAYERS (500 )
32
31
# define MAX_VEHICLES (2000 )
33
- # define MAX_ACTORS (1000 )
34
32
# define INVALID_PLAYER_ID (0x FFFF )
35
33
# define INVALID_VEHICLE_ID (0x FFFF )
36
- # define INVALID_ACTOR_ID (0x FFFF )
37
34
# define NO_TEAM (255 )
38
35
# define MAX_OBJECTS (1000 )
39
36
# define INVALID_OBJECT_ID (0x FFFF )
@@ -61,8 +58,7 @@ native SendClientMessage(playerid, color, const message[]);
61
58
native SendClientMessageToAll (color, const message[]);
62
59
native SendPlayerMessageToPlayer (playerid, senderid, const message[]);
63
60
native SendPlayerMessageToAll (senderid, const message[]);
64
- native SendDeathMessage (killer, killee, weapon);
65
- native SendDeathMessageToPlayer (playerid, killer, killee, weapon);
61
+ native SendDeathMessage (killer,killee,weapon);
66
62
native GameTextForAll (const string[],time,style);
67
63
native GameTextForPlayer (playerid,const string[],time,style);
68
64
native SetTimer (funcname[], interval, repeating);
@@ -77,39 +73,14 @@ native Float:asin(Float:value);
77
73
native Float: acos (Float: value);
78
74
native Float: atan (Float: value);
79
75
native Float: atan2 (Float: x, Float: y);
80
- native GetPlayerPoolSize ();
81
- native GetVehiclePoolSize ();
82
- native GetActorPoolSize ();
83
-
84
- // Hash
85
- native SHA256_PassHash (password[], salt[], ret_hash[], ret_hash_len); // SHA256 for password hashing
86
-
87
- // Server wide persistent variable system (SVars)
88
- native SetSVarInt (varname[], int_value);
89
- native GetSVarInt (varname[]);
90
- native SetSVarString (varname[], string_value[]);
91
- native GetSVarString (varname[], string_return[], len);
92
- native SetSVarFloat (varname[], Float: float_value);
93
- native Float: GetSVarFloat (varname[]);
94
- native DeleteSVar (varname[]);
95
-
96
- // SVar enumeration
97
- # define SERVER_VARTYPE_NONE 0
98
- # define SERVER_VARTYPE_INT 1
99
- # define SERVER_VARTYPE_STRING 2
100
- # define SERVER_VARTYPE_FLOAT 3
101
-
102
- native GetSVarsUpperIndex ();
103
- native GetSVarNameAtIndex (index, ret_varname[], ret_len);
104
- native GetSVarType (varname[]);
105
76
106
77
// Game
107
78
native SetGameModeText (const string[]);
108
79
native SetTeamCount (count);
109
80
native AddPlayerClass (modelid, Float: spawn_x, Float: spawn_y, Float: spawn_z, Float: z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
110
81
native AddPlayerClassEx (teamid, modelid, Float: spawn_x, Float: spawn_y, Float: spawn_z, Float: z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
111
82
native AddStaticVehicle (modelid, Float: spawn_x, Float: spawn_y, Float: spawn_z, Float: z_angle, color1, color2);
112
- native AddStaticVehicleEx (modelid, Float: spawn_x, Float: spawn_y, Float: spawn_z, Float: z_angle, color1, color2, respawn_delay, addsiren = 0 );
83
+ native AddStaticVehicleEx (modelid, Float: spawn_x, Float: spawn_y, Float: spawn_z, Float: z_angle, color1, color2, respawn_delay);
113
84
native AddStaticPickup (model, type, Float: X, Float: Y, Float: Z, virtualworld = 0 );
114
85
native CreatePickup (model, type, Float: X, Float: Y, Float: Z, virtualworld = 0 );
115
86
native DestroyPickup (pickup);
@@ -144,20 +115,12 @@ native Kick(playerid);
144
115
native Ban (playerid);
145
116
native BanEx (playerid, const reason[]);
146
117
native SendRconCommand (command[]);
147
- native GetPlayerNetworkStats (playerid, retstr[], retstr_size);
148
- native GetNetworkStats (retstr[], retstr_size);
149
- native GetPlayerVersion (playerid, const version[], len); // Returns the SA-MP client revision as reported by the player
150
- native BlockIpAddress (ip_address[], timems);
151
- native UnBlockIpAddress (ip_address[]);
152
-
153
- // Deprecated:
154
118
native GetServerVarAsString (const varname[], buffer[], len);
155
119
native GetServerVarAsInt (const varname[]);
156
120
native GetServerVarAsBool (const varname[]);
157
- // These are the same 3 functions as above although they avoid the name ambiguity/conflict with the SVar system.
158
- native GetConsoleVarAsString (const varname[], buffer[], len);
159
- native GetConsoleVarAsInt (const varname[]);
160
- native GetConsoleVarAsBool (const varname[]);
121
+ native GetPlayerNetworkStats (playerid, retstr[], retstr_size);
122
+ native GetNetworkStats (retstr[], retstr_size);
123
+ native GetPlayerVersion (playerid, const version[], len); // Returns the SA-MP client revision as reported by the player
161
124
162
125
// Extended admin network stats
163
126
native GetServerTickRate ();
@@ -235,12 +198,10 @@ native DeletePlayer3DTextLabel(playerid, PlayerText3D:id);
235
198
native UpdatePlayer3DTextLabelText (playerid, PlayerText3D: id, color, text[]);
236
199
237
200
// Player GUI Dialog
238
- # define DIALOG_STYLE_MSGBOX 0
239
- # define DIALOG_STYLE_INPUT 1
240
- # define DIALOG_STYLE_LIST 2
241
- # define DIALOG_STYLE_PASSWORD 3
242
- # define DIALOG_STYLE_TABLIST 4
243
- # define DIALOG_STYLE_TABLIST_HEADERS 5
201
+ # define DIALOG_STYLE_MSGBOX 0
202
+ # define DIALOG_STYLE_INPUT 1
203
+ # define DIALOG_STYLE_LIST 2
204
+ # define DIALOG_STYLE_PASSWORD 3
244
205
245
206
native ShowPlayerDialog (playerid, dialogid, style, caption[], info[], button1[], button2[]);
246
207
@@ -371,7 +332,7 @@ forward OnEnterExitModShop(playerid, enterexit, interiorid);
371
332
forward OnVehiclePaintjob (playerid, vehicleid, paintjobid);
372
333
forward OnVehicleRespray (playerid, vehicleid, color1, color2);
373
334
forward OnVehicleDamageStatusUpdate (vehicleid, playerid);
374
- forward OnUnoccupiedVehicleUpdate (vehicleid, playerid, passenger_seat, Float: new_x, Float: new_y, Float: new_z, Float: vel_x, Float: vel_y, Float: vel_z );
335
+ forward OnUnoccupiedVehicleUpdate (vehicleid, playerid, passenger_seat, Float: new_x, Float: new_y, Float: new_z);
375
336
forward OnPlayerSelectedMenuRow (playerid, row);
376
337
forward OnPlayerExitedMenu (playerid);
377
338
forward OnPlayerInteriorChange (playerid, newinteriorid, oldinteriorid);
@@ -382,19 +343,12 @@ forward OnPlayerStreamIn(playerid, forplayerid);
382
343
forward OnPlayerStreamOut (playerid, forplayerid);
383
344
forward OnVehicleStreamIn (vehicleid, forplayerid);
384
345
forward OnVehicleStreamOut (vehicleid, forplayerid);
385
- forward OnActorStreamIn (actorid, forplayerid);
386
- forward OnActorStreamOut (actorid, forplayerid);
387
346
forward OnDialogResponse (playerid, dialogid, response, listitem, inputtext[]);
388
347
forward OnPlayerTakeDamage (playerid, issuerid, Float: amount, weaponid, bodypart);
389
348
forward OnPlayerGiveDamage (playerid, damagedid, Float: amount, weaponid, bodypart);
390
- forward OnPlayerGiveDamageActor (playerid, damaged_actorid, Float: amount, weaponid, bodypart);
391
349
forward OnPlayerClickMap (playerid, Float: fX, Float: fY, Float: fZ);
392
350
forward OnPlayerClickTextDraw (playerid, Text: clickedid);
393
351
forward OnPlayerClickPlayerTextDraw (playerid, PlayerText: playertextid);
394
- forward OnIncomingConnection (playerid, ip_address[], port);
395
- forward OnTrailerUpdate (playerid, vehicleid);
396
- forward OnVehicleSirenStateChange (playerid, vehicleid, newstate);
397
- forward OnPlayerFinishedDownloading (playerid, virtualworld);
398
352
399
353
# define CLICK_SOURCE_SCOREBOARD 0
400
354
forward OnPlayerClickPlayer (playerid, clickedplayerid, source);
0 commit comments