11/* SA-MP Functions
22 *
3- * (c) Copyright 2005-2015 , SA-MP Team
3+ * (c) Copyright 2005-2012 , SA-MP Team
44 *
55 */
66
2323#include < a_players>
2424#include < a_vehicles>
2525#include < a_objects>
26- #include < a_actor>
2726#include < a_sampdb>
2827
2928// Limits and internal constants
3029# define MAX_PLAYER_NAME (24 )
31- # define MAX_PLAYERS (1000 )
30+ # define MAX_PLAYERS (500 )
3231# define MAX_VEHICLES (2000 )
33- # define MAX_ACTORS (1000 )
3432# define INVALID_PLAYER_ID (0x FFFF )
3533# define INVALID_VEHICLE_ID (0x FFFF )
36- # define INVALID_ACTOR_ID (0x FFFF )
3734# define NO_TEAM (255 )
3835# define MAX_OBJECTS (1000 )
3936# define INVALID_OBJECT_ID (0x FFFF )
@@ -61,8 +58,7 @@ native SendClientMessage(playerid, color, const message[]);
6158native SendClientMessageToAll (color, const message[]);
6259native SendPlayerMessageToPlayer (playerid, senderid, const message[]);
6360native SendPlayerMessageToAll (senderid, const message[]);
64- native SendDeathMessage (killer, killee, weapon);
65- native SendDeathMessageToPlayer (playerid, killer, killee, weapon);
61+ native SendDeathMessage (killer,killee,weapon);
6662native GameTextForAll (const string[],time,style);
6763native GameTextForPlayer (playerid,const string[],time,style);
6864native SetTimer (funcname[], interval, repeating);
@@ -77,39 +73,14 @@ native Float:asin(Float:value);
7773native Float: acos (Float: value);
7874native Float: atan (Float: value);
7975native 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[]);
10576
10677// Game
10778native SetGameModeText (const string[]);
10879native SetTeamCount (count);
10980native AddPlayerClass (modelid, Float: spawn_x, Float: spawn_y, Float: spawn_z, Float: z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
11081native AddPlayerClassEx (teamid, modelid, Float: spawn_x, Float: spawn_y, Float: spawn_z, Float: z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
11182native 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);
11384native AddStaticPickup (model, type, Float: X, Float: Y, Float: Z, virtualworld = 0 );
11485native CreatePickup (model, type, Float: X, Float: Y, Float: Z, virtualworld = 0 );
11586native DestroyPickup (pickup);
@@ -144,20 +115,12 @@ native Kick(playerid);
144115native Ban (playerid);
145116native BanEx (playerid, const reason[]);
146117native 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:
154118native GetServerVarAsString (const varname[], buffer[], len);
155119native GetServerVarAsInt (const varname[]);
156120native 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
161124
162125// Extended admin network stats
163126native GetServerTickRate ();
@@ -235,12 +198,10 @@ native DeletePlayer3DTextLabel(playerid, PlayerText3D:id);
235198native UpdatePlayer3DTextLabelText (playerid, PlayerText3D: id, color, text[]);
236199
237200// 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
244205
245206native ShowPlayerDialog (playerid, dialogid, style, caption[], info[], button1[], button2[]);
246207
@@ -371,7 +332,7 @@ forward OnEnterExitModShop(playerid, enterexit, interiorid);
371332forward OnVehiclePaintjob (playerid, vehicleid, paintjobid);
372333forward OnVehicleRespray (playerid, vehicleid, color1, color2);
373334forward 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);
375336forward OnPlayerSelectedMenuRow (playerid, row);
376337forward OnPlayerExitedMenu (playerid);
377338forward OnPlayerInteriorChange (playerid, newinteriorid, oldinteriorid);
@@ -382,19 +343,12 @@ forward OnPlayerStreamIn(playerid, forplayerid);
382343forward OnPlayerStreamOut (playerid, forplayerid);
383344forward OnVehicleStreamIn (vehicleid, forplayerid);
384345forward OnVehicleStreamOut (vehicleid, forplayerid);
385- forward OnActorStreamIn (actorid, forplayerid);
386- forward OnActorStreamOut (actorid, forplayerid);
387346forward OnDialogResponse (playerid, dialogid, response, listitem, inputtext[]);
388347forward OnPlayerTakeDamage (playerid, issuerid, Float: amount, weaponid, bodypart);
389348forward OnPlayerGiveDamage (playerid, damagedid, Float: amount, weaponid, bodypart);
390- forward OnPlayerGiveDamageActor (playerid, damaged_actorid, Float: amount, weaponid, bodypart);
391349forward OnPlayerClickMap (playerid, Float: fX, Float: fY, Float: fZ);
392350forward OnPlayerClickTextDraw (playerid, Text: clickedid);
393351forward 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);
398352
399353# define CLICK_SOURCE_SCOREBOARD 0
400354forward OnPlayerClickPlayer (playerid, clickedplayerid, source);
0 commit comments