From d1ae3256e88ffe6acdeba679d6bad7c2074d3e64 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 27 Apr 2021 22:15:51 +0100 Subject: [PATCH 001/104] Consistency improvements: * No `_` in parameter names. * ` = ` not `=` in defaults. * `sizeof (param)`. * Removed excess blank lines. * No Hungarian `f` on floats. --- a_actor.inc | 13 +-- a_http.inc | 4 +- a_npc.inc | 7 +- a_objects.inc | 20 ++-- a_players.inc | 130 ++++++++++----------- a_samp.inc | 310 ++++++++++++++++++++++++------------------------- a_sampdb.inc | 24 ++-- a_vehicles.inc | 11 +- pawn.json | 0 9 files changed, 246 insertions(+), 273 deletions(-) mode change 100755 => 100644 a_http.inc mode change 100755 => 100644 a_npc.inc mode change 100755 => 100644 a_objects.inc mode change 100755 => 100644 a_players.inc mode change 100755 => 100644 a_samp.inc mode change 100755 => 100644 a_sampdb.inc mode change 100755 => 100644 a_vehicles.inc mode change 100755 => 100644 pawn.json diff --git a/a_actor.inc b/a_actor.inc index 2f5aae4..e2c091a 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -64,7 +64,6 @@ native CreateActor(modelid, Float:X, Float:Y, Float:Z, Float:Rotation); /// native DestroyActor(actorid); - /// Checks if an actor is streamed in for a player. /// The ID of the actor /// The ID of the player @@ -74,7 +73,6 @@ native DestroyActor(actorid); /// 1 if the actor is streamed in for the player, or 0 if it is not. native IsActorStreamedIn(actorid, forplayerid); - /// Set the virtual world of an actor. Only players in the same world will see the actor. /// The ID of the actor (returned by CreateActor) to set the virtual world of /// The virtual world to put the actor ID @@ -98,10 +96,10 @@ native GetActorVirtualWorld(actorid); /// The ID of the actor to apply the animation to /// The animation library from which to apply an animation /// The name of the animation to apply, within the specified library -/// The speed to play the animation (use 4.1) +/// The speed to play the animation (use 4.1) /// If set to 1, the animation will loop. If set to 0, the animation will play once -/// If set to 0, the actor is returned to their old X coordinate once the animation is complete (for animations that move the actor such as walking). 1 will not return them to their old position -/// Same as above but for the Y axis. Should be kept the same as the previous parameter +/// If set to 0, the actor is returned to their old X coordinate once the animation is complete (for animations that move the actor such as walking). 1 will not return them to their old position +/// Same as above but for the Y axis. Should be kept the same as the previous parameter /// Setting this to 1 will freeze an actor at the end of the animation. 0 will not /// Timer in milliseconds. For a never-ending loop it should be 0 /// @@ -111,7 +109,7 @@ native GetActorVirtualWorld(actorid); /// 1: The function executed successfully.

/// 0: The function failed to execute. The actor specified does not exist. /// -native ApplyActorAnimation(actorid, const animlib[], const animname[], Float:fDelta, loop, lockx, locky, freeze, time); +native ApplyActorAnimation(actorid, const animlib[], const animname[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); ///

Clear any animations applied to an actor. /// The ID of the actor (returned by CreateActor) to clear the animations for @@ -123,7 +121,6 @@ native ApplyActorAnimation(actorid, const animlib[], const animname[], Float:fDe /// native ClearActorAnimations(actorid); - /// Set the position of an actor. /// The ID of the actor to set the position of. Returned by CreateActor /// The X coordinate to position the actor at @@ -178,7 +175,6 @@ native SetActorFacingAngle(actorid, Float:ang); /// native GetActorFacingAngle(actorid, &Float:ang); - /// Set the health of an actor. /// The ID of the actor to set the health of /// The value to set the actors's health to @@ -220,7 +216,6 @@ native SetActorInvulnerable(actorid, invulnerable = true); /// 1 if the actor is invulnerable, 0 otherwise. native IsActorInvulnerable(actorid); - /// Checks if an actor ID is valid. /// The ID of the actor to check /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! diff --git a/a_http.inc b/a_http.inc old mode 100755 new mode 100644 index f313769..90296e2 --- a/a_http.inc +++ b/a_http.inc @@ -23,7 +23,7 @@ #define HTTP_HEAD (3) // HTTP error response codes -// These codes compliment ordinary HTTP response codes returned in 'response_code' +// These codes compliment ordinary HTTP response codes returned in 'responseCode' // (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error) #define HTTP_ERROR_BAD_HOST (1) #define HTTP_ERROR_NO_SOCKET (2) @@ -62,5 +62,5 @@ /// native HTTP(index, type, const url[], const data[], const callback[]); -// example HTTP callback: public MyHttpResponse(index, response_code, const data[]) { ... } +// example HTTP callback: public MyHttpResponse(index, responseCode, const data[]) { ... } diff --git a/a_npc.inc b/a_npc.inc old mode 100755 new mode 100644 index 06b367d..d24a6d9 --- a/a_npc.inc +++ b/a_npc.inc @@ -296,7 +296,7 @@ open.mp releases can use `A` as the first digit. /// /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) -native format(output[], len = sizeof output, const format[], {Float,_}:...); +native format(output[], len = sizeof (output), const format[], {Float,_}:...); /// Sets a 'timer' to call a function after some time. Can be set to repeat. /// Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server @@ -352,7 +352,6 @@ native Float:atan(Float:value); /// The angle in degrees. native Float:atan2(Float:y, Float:x); - /// This will send a player text by the bot, just like using SendPlayerMessageToAll, but this function is to be used inside the NPC scripts. /// The text to be sent by the NPC /// @@ -484,7 +483,6 @@ native GetMyFacingAngle(&Float:ang); /// This function does not return any specific values. native SetMyFacingAngle(Float:ang); - /// Get the distance between the NPC and a point. /// The X coordinate of the point /// The Y coordinate of the point @@ -520,7 +518,7 @@ native IsPlayerInRangeOfPoint(playerid, Float:range, Float:X, Float:Y, Float:Z); /// /// A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. /// The length of the player's name. 0 if player specified doesn't exist. -native GetPlayerName(playerid, name[], len = sizeof name); +native GetPlayerName(playerid, name[], len = sizeof (name)); /// Checks if a player is connected (if an ID is taken by a connected player). /// The ID of the player to check @@ -557,7 +555,6 @@ native ResumeRecordingPlayback(); // Forwards (Callback declarations) // -------------------------------------------------- - /// Gets called when a NPC script is loaded. /// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! diff --git a/a_objects.inc b/a_objects.inc old mode 100755 new mode 100644 index 7e1e529..7bb3996 --- a/a_objects.inc +++ b/a_objects.inc @@ -129,7 +129,6 @@ native AttachObjectToObject(objectid, attachtoid, Float:OffsetX, Float:OffsetY, /// This function always returns 0. native AttachObjectToPlayer(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ); - /// Change the position of an object. /// The ID of the object to set the position of. Returned by CreateObject /// The X coordinate to position the object at @@ -334,19 +333,18 @@ native CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX /// The ID of the player the object was created for /// The ID of the object to attach to the vehicle /// The ID of the vehicle to attach the object to -/// The X position offset for attachment -/// The Y position offset for attachment -/// The Z position offset for attachment -/// The X rotation offset for attachment -/// The Y rotation offset for attachment +/// The X position offset for attachment +/// The Y position offset for attachment +/// The Z position offset for attachment +/// The X rotation offset for attachment +/// The Y rotation offset for attachment /// The Z rotation offset for attachment /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You need to create the object before attempting to attach it to a vehicle. -native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:RotZ); - +native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:RotZ); /// Sets the position of a player-object to the specified coordinates. /// The ID of the player whose player-object to set the position of @@ -521,7 +519,7 @@ native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:Of /// 1: The function executed successfully.

/// 0: The function failed to execute. /// -native SetObjectMaterial(objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor=0); +native SetObjectMaterial(objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor = 0); ///

Replace the texture of a player-object with the texture from another model in the game. /// The ID of the player the object is associated to @@ -535,8 +533,7 @@ native SetObjectMaterial(objectid, materialindex, modelid, const txdname[], cons /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Vertex lightning of the object will disappear if material color is changed. -native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor=0); - +native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor = 0); /// Replace the texture of an object with text. /// The ID of the object to replace the texture of with text @@ -631,7 +628,6 @@ native SetObjectMaterialText(objectid, const text[], materialindex = 0, material /// native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0); - /// Allows camera collisions with newly created objects to be disabled by default. /// 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) /// diff --git a/a_players.inc b/a_players.inc old mode 100755 new mode 100644 index ca0450e..c79e81e --- a/a_players.inc +++ b/a_players.inc @@ -253,7 +253,6 @@ native SetPlayerInterior(playerid, interiorid); /// The interior ID the player is currently in. native GetPlayerInterior(playerid); - /// Set the health of a player. /// The ID of the player to set the health of /// The value to set the player's health to. Max health that can be displayed in the HUD is 100, though higher values are valid @@ -611,7 +610,7 @@ native GetPlayerState(playerid); /// /// This function does not work when used in OnPlayerDisconnect because the player is already disconnected. It will return an invalid IP (255.255.255.255). Save players' IPs under OnPlayerConnect if they need to be used under OnPlayerDisconnect. /// 1 on success and 0 on failure. -native GetPlayerIp(playerid, ip[], len = sizeof ip); +native GetPlayerIp(playerid, ip[], len = sizeof (ip)); /// Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back. /// The ID of the player to get the ping of @@ -653,7 +652,7 @@ native GetPlayerKeys(playerid, &keys, &updown, &leftright); /// /// A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. /// The length of the player's name. 0 if player specified doesn't exist. -native GetPlayerName(playerid, name[], len = sizeof name); +native GetPlayerName(playerid, name[], len = sizeof (name)); /// Sets the game time for a player. If a player's clock is enabled (TogglePlayerClock) the time displayed by it will update automatically. /// The ID of the player to set the game time of @@ -789,7 +788,7 @@ native SetPlayerVelocity(playerid, Float:X, Float:Y, Float:Z); /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native GetPlayerVelocity( playerid, &Float:X, &Float:Y, &Float:Z ); +native GetPlayerVelocity(playerid, &Float:X, &Float:Y, &Float:Z); /// This function plays a crime report for a player - just like in single-player when CJ commits a crime. /// The ID of the player that will hear the crime report @@ -911,26 +910,26 @@ native GetPlayerSurfingObjectID(playerid); /// Removes a standard San Andreas model for a single player within a specified range. /// The ID of the player to remove the objects for /// The model to remove -/// The X coordinate around which the objects will be removed -/// The Y coordinate around which the objects will be removed -/// The Z coordinate around which the objects will be removed -/// The radius around the specified point to remove objects with the specified model +/// The X coordinate around which the objects will be removed +/// The Y coordinate around which the objects will be removed +/// The Z coordinate around which the objects will be removed +/// The radius around the specified point to remove objects with the specified model /// /// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// There appears to be a limit of around 1000 lines/objects. There is no workaround. /// When removing the same object for a player, they will crash. Commonly, players crash when reconnecting to the server because the server removes buildings on OnPlayerConnect. /// In SA-MP 0.3.7 you can use -1 for the modelid to remove all objects within the specified radius. -native RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius); +native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, Float:centerZ, Float:radius); /// Retrieves the start and end (hit) position of the last bullet a player fired. /// The ID of the player to get the last bullet shot information of -/// A float variable in which to save the X coordinate of where the bullet originated from -/// A float variable in which to save the Y coordinate of where the bullet originated from -/// A float variable in which to save the Z coordinate of where the bullet originated from -/// A float variable in which to save the X coordinate of where the bullet hit -/// A float variable in which to save the Y coordinate of where the bullet hit -/// A float variable in which to save the Z coordinate of where the bullet hit +/// A float variable in which to save the X coordinate of where the bullet originated from +/// A float variable in which to save the Y coordinate of where the bullet originated from +/// A float variable in which to save the Z coordinate of where the bullet originated from +/// A float variable in which to save the X coordinate of where the bullet hit +/// A float variable in which to save the Y coordinate of where the bullet hit +/// A float variable in which to save the Z coordinate of where the bullet hit /// /// /// @@ -942,7 +941,7 @@ native RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, /// 1: The function executed successfully.

/// 0: The function failed to execute. The player specified does not exist.

/// -native GetPlayerLastShotVectors(playerid, &Float:fOriginX, &Float:fOriginY, &Float:fOriginZ, &Float:fHitPosX, &Float:fHitPosY, &Float:fHitPosZ); +native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float:originZ, &Float:hitPosX, &Float:hitPosY, &Float:hitPosZ); // Attached to bone objects #if MAX_PLAYER_ATTACHED_OBJECTS < 1 || MAX_PLAYER_ATTACHED_OBJECTS > 10 @@ -954,15 +953,15 @@ native GetPlayerLastShotVectors(playerid, &Float:fOriginX, &Float:fOriginY, &Flo /// The index (slot) to assign the object to (0-9 since 0.3d, 0-4 in previous versions) /// The model to attach /// The bone to attach the object to -/// X axis offset for the object position (optional=0.0) -/// Y axis offset for the object position (optional=0.0) -/// Z axis offset for the object position (optional=0.0) -/// X axis rotation of the object (optional=0.0) -/// Y axis rotation of the object (optional=0.0) -/// Z axis rotation of the object (optional=0.0) -/// X axis scale of the object (optional=1.0) -/// Y axis scale of the object (optional=1.0) -/// Z axis scale of the object (optional=1.0) +/// X axis offset for the object position (optional=0.0) +/// Y axis offset for the object position (optional=0.0) +/// Z axis offset for the object position (optional=0.0) +/// X axis rotation of the object (optional=0.0) +/// Y axis rotation of the object (optional=0.0) +/// Z axis rotation of the object (optional=0.0) +/// X axis scale of the object (optional=1.0) +/// Y axis scale of the object (optional=1.0) +/// Z axis scale of the object (optional=1.0) /// The first object color to set ARGB (optional=0) /// The second object color to set ARGB (optional=0) /// @@ -995,7 +994,7 @@ native GetPlayerLastShotVectors(playerid, &Float:fOriginX, &Float:fOriginY, &Flo /// /// /// 1 on success, 0 on failure. -native SetPlayerAttachedObject(playerid, index, modelid, bone, Float:fOffsetX = 0.0, Float:fOffsetY = 0.0, Float:fOffsetZ = 0.0, Float:fRotX = 0.0, Float:fRotY = 0.0, Float:fRotZ = 0.0, Float:fScaleX = 1.0, Float:fScaleY = 1.0, Float:fScaleZ = 1.0, materialcolor1 = 0, materialcolor2 = 0); +native SetPlayerAttachedObject(playerid, index, modelid, bone, Float:offsetX = 0.0, Float:offsetY = 0.0, Float:offsetZ = 0.0, Float:rotX = 0.0, Float:rotY = 0.0, Float:rotZ = 0.0, Float:scaleX = 1.0, Float:scaleY = 1.0, Float:scaleZ = 1.0, materialcolor1 = 0, materialcolor2 = 0); ///

Remove an attached object from a player. /// The ID of the player to remove the object from @@ -1463,10 +1462,10 @@ native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelindex); /// Sets the rotation and zoom of a 3D model preview player-textdraw. /// The ID of the player whose player-textdraw to change /// The ID of the player-textdraw to change -/// The X rotation value -/// The Y rotation value -/// The Z rotation value -/// The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) +/// The X rotation value +/// The Y rotation value +/// The Z rotation value +/// The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) /// /// /// @@ -1474,7 +1473,7 @@ native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelindex); /// /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW and already have a model set in order for this function to have effect. -native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fZoom = 1.0); +native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); /// Set the color of a vehicle in a player-textdraw model preview (if a vehicle is shown). /// The ID of the player whose player-textdraw to change @@ -1493,8 +1492,8 @@ native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, color1, color2) /// Set an integer player variable. /// The ID of the player whose player variable will be set -/// The name of the player variable -/// The integer to be set +/// The name of the player variable +/// The integer to be set /// /// /// @@ -1506,11 +1505,11 @@ native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, color1, color2) /// 1: The function executed successfully.

/// 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. /// -native SetPVarInt(playerid, const varname[], int_value); +native SetPVarInt(playerid, const pvar[], value); ///

Gets an integer player variable's value. /// The ID of the player whose player variable to get -/// The name of the player variable (case-insensitive). Assigned in SetPVarInt +/// The name of the player variable (case-insensitive). Assigned in SetPVarInt /// /// /// @@ -1518,24 +1517,24 @@ native SetPVarInt(playerid, const varname[], int_value); /// /// /// The integer value of the specified player variable. It will still return 0 if the variable is not set, or the player does not exist. -native GetPVarInt(playerid, const varname[]); +native GetPVarInt(playerid, const pvar[]); /// Saves a string into a player variable. /// The ID of the player whose player variable will be set -/// The name of the player variable -/// The string you want to save in the player variable +/// The name of the player variable +/// The string you want to save in the player variable /// /// /// /// /// /// -native SetPVarString(playerid, const varname[], const string_value[]); +native SetPVarString(playerid, const pvar[], const value[]); /// Gets a player variable as a string. /// The ID of the player whose player variable to get -/// The name of the player variable, set by SetPVarString -/// The array in which to store the string value in, passed by reference +/// The name of the player variable, set by SetPVarString +/// The array in which to store the string value in, passed by reference /// The maximum length of the returned string /// /// @@ -1543,14 +1542,14 @@ native SetPVarString(playerid, const varname[], const string_value[]); /// /// /// -/// If length of string is zero (value not set), string_return text will not be updated or set to anything and will remain with old data, neccesying that you clear the variable to blank value if GetPVarString returns 0 if that behavior is undesired +/// If length of string is zero (value not set), output text will not be updated or set to anything and will remain with old data, neccesying that you clear the variable to blank value if GetPVarString returns 0 if that behavior is undesired /// The length of the string. -native GetPVarString(playerid, const varname[], string_return[], len = sizeof string_return); +native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); /// Set a float player variable's value. /// The ID of the player whose player variable will be set -/// The name of the player variable -/// The float you want to save in the player variable +/// The name of the player variable +/// The float you want to save in the player variable /// /// /// @@ -1561,11 +1560,11 @@ native GetPVarString(playerid, const varname[], string_return[], len = sizeof st /// 1: The function executed successfully.

/// 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. /// -native SetPVarFloat(playerid, const varname[], Float:float_value); +native SetPVarFloat(playerid, const pvar[], Float:value); ///

Gets a player variable as a float. /// The ID of the player whose player variable you want to get -/// The name of the player variable +/// The name of the player variable /// /// /// @@ -1573,11 +1572,11 @@ native SetPVarFloat(playerid, const varname[], Float:float_value); /// /// /// The float from the specified player variable. -native Float:GetPVarFloat(playerid, const varname[]); +native Float:GetPVarFloat(playerid, const pvar[]); /// Deletes a previously set player variable. /// The ID of the player whose player variable to delete -/// The name of the player variable to delete +/// The name of the player variable to delete /// /// /// @@ -1589,7 +1588,7 @@ native Float:GetPVarFloat(playerid, const varname[]); /// 1: The function executed successfully.

/// 0: The function failed to execute. Either the player specified isn't connected or there is no variable set with the given name. /// -native DeletePVar(playerid, const varname[]); +native DeletePVar(playerid, const pvar[]); ///

Each PVar (player-variable) has its own unique identification number for lookup, this function returns the highest ID set for a player. /// The ID of the player to get the upper PVar index of @@ -1601,17 +1600,17 @@ native GetPVarsUpperIndex(playerid); /// Retrieve the name of a player's pVar via the index. /// The ID of the player whose player variable to get the name of /// The index of the player's pVar -/// A string to store the pVar's name in, passed by reference -/// The max length of the returned string +/// A string to store the pVar's name in, passed by reference +/// The max length of the returned string /// /// /// /// -native GetPVarNameAtIndex(playerid, index, ret_varname[], ret_len = sizeof ret_varname); +native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); /// Gets the type (integer, float or string) of a player variable. /// The ID of the player whose player variable to get the type of -/// The name of the player variable to get the type of +/// The name of the player variable to get the type of /// /// /// @@ -1629,7 +1628,7 @@ native GetPVarNameAtIndex(playerid, index, ret_varname[], ret_len = sizeof ret_v /// /// /// Returns the type of the PVar. See table below. -native GetPVarType(playerid, const varname[]); +native GetPVarType(playerid, const pvar[]); #if MAX_CHATBUBBLE_LENGTH < 1 || MAX_CHATBUBBLE_LENGTH > 144 #error MAX_CHATBUBBLE_LENGTH must be >= 1 and <= 144 @@ -1736,10 +1735,10 @@ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); /// The ID of the player to apply the animation to /// The animation library from which to apply an animation /// The name of the animation to apply, within the specified library -/// The speed to play the animation (use 4.1) +/// The speed to play the animation (use 4.1) /// If set to 1, the animation will loop. If set to 0, the animation will play once -/// If set to 0, the player is returned to their old X coordinate once the animation is complete (for animations that move the player such as walking). 1 will not return them to their old position -/// Same as above but for the Y axis. Should be kept the same as the previous parameter +/// If set to 0, the player is returned to their old X coordinate once the animation is complete (for animations that move the player such as walking). 1 will not return them to their old position +/// Same as above but for the Y axis. Should be kept the same as the previous parameter /// Setting this to 1 will freeze the player at the end of the animation. 0 will not /// Timer in milliseconds. For a never-ending loop it should be 0 /// Set to 1 to make server sync the animation with all other players in streaming radius. 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) (optional=0) @@ -1748,7 +1747,7 @@ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); /// The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. /// An invalid animation library will crash the player's game. /// This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). -native ApplyAnimation(playerid, const animlib[], const animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0); +native ApplyAnimation(playerid, const animlib[], const animname[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, bool:forcesync = false); /// Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). /// The ID of the player to clear the animations of @@ -1775,7 +1774,7 @@ native GetPlayerAnimationIndex(playerid); // return the index of any running app /// /// This function was added in SA-MP 0.3b and will not work in earlier versions! /// 1 on success, 0 on failure. -native GetAnimationName(index, animlib[], len1 = sizeof animlib, animname[], len2 = sizeof animname); // get the animation lib/name for the index +native GetAnimationName(index, animlib[], len1 = sizeof (animlib), animname[], len2 = sizeof (animname)); // get the animation lib/name for the index /// Retrieves a player's current special action. /// The ID of the player to get the special action of @@ -1955,15 +1954,15 @@ native DisablePlayerRaceCheckpoint(playerid); /// Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in). /// The ID of the player to set the world boundaries of -/// The maximum X coordinate the player can go to -/// The minimum X coordinate the player can go to -/// The maximum Y coordinate the player can go to -/// The minimum Y coordinate the player can go to +/// The maximum X coordinate the player can go to +/// The minimum X coordinate the player can go to +/// The maximum Y coordinate the player can go to +/// The minimum Y coordinate the player can go to /// /// This function does not work if used in OnPlayerConnect /// A player's world boundaries can be reset by setting them to 20000.0, -20000.0, 20000.0, -20000.0. These are the default values. /// This function doesn't work in interiors! -native SetPlayerWorldBounds(playerid, Float:x_max,Float:x_min,Float:y_max,Float:y_min); +native SetPlayerWorldBounds(playerid, Float:maxX,Float:minX,Float:maxY,Float:minY); /// Change the colour of a player's nametag and radar blip for another player. /// The player that will see the player's changed blip/nametag color @@ -2209,7 +2208,6 @@ native AttachCameraToObject(playerid, objectid); /// The player-object must be created before attempting to attach the player's camera to it. native AttachCameraToPlayerObject(playerid, playerobjectid); - /// Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes. /// The ID of the player the camera should be moved for /// The X position the camera should start to move from diff --git a/a_samp.inc b/a_samp.inc old mode 100755 new mode 100644 index 8521eac..4dcc9b8 --- a/a_samp.inc +++ b/a_samp.inc @@ -393,7 +393,7 @@ open.mp releases can use `A` as the first digit. /// /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) -native format(output[], len = sizeof output, const format[], {Float,_}:...); +native format(output[], len = sizeof (output), const format[], {Float,_}:...); /// This function sends a message to a specific player with a chosen color in the chat. The whole line in the chatbox will be in the set color unless color embedding is used (since 0.3c). /// The ID of the player to display the message to @@ -590,7 +590,6 @@ native CallRemoteFunction(const function[], const format[], {Float,_}:...); /// native CallLocalFunction(const function[], const format[], {Float,_}:...); - /// Returns the norm (length) of the provided vector. /// The vector's magnitude on the X axis /// The vector's magnitude on the Y axis @@ -629,7 +628,6 @@ native Float:atan(Float:value); /// The angle in degrees. native Float:atan2(Float:y, Float:x); - /// Gets the highest playerid currently in use on the server. /// /// @@ -656,18 +654,19 @@ native GetActorPoolSize(); /// Hashes a password using the SHA-256 hashing algorithm. Includes a salt. The output is always 256 bytes in length, or the equivalent of 64 Pawn cells. /// The password to hash /// The salt to use in the hash -/// The returned hash -/// The returned hash maximum length +/// The returned hash +/// The returned hash maximum length /// This function was added in SA-MP 0.3.7-R1 and will not work in earlier versions! /// The salt is appended to the end of the password, meaning password 'foo' and salt 'bar' would form 'foobar'. /// The salt should be random, unique for each player and at least as long as the hashed password. It is to be stored alongside the actual hash in the player's account. -native SHA256_PassHash(const password[], const salt[], ret_hash[], ret_hash_len = sizeof ret_hash); // SHA256 for password hashing +#pragma deprecated Use BCrypt for hashing passwords. +native SHA256_PassHash(const password[], const salt[], output[], size = sizeof (output)); // SHA256 for password hashing // Server wide persistent variable system (SVars) /// Set an integer server variable. -/// The name of the server variable -/// The integer to be set +/// The name of the server variable +/// The integer to be set /// /// /// @@ -679,10 +678,10 @@ native SHA256_PassHash(const password[], const salt[], ret_hash[], ret_hash_len /// 1: The function executed successfully.

/// 0: The function failed to execute. The variable name is null or over 40 characters. /// -native SetSVarInt(const varname[], int_value); +native SetSVarInt(const svar[], value); ///

Gets an integer server variable's value. -/// The name of the server variable (case-insensitive). Assigned in SetSVarInt +/// The name of the server variable (case-insensitive). Assigned in SetSVarInt /// /// /// @@ -691,11 +690,11 @@ native SetSVarInt(const varname[], int_value); /// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// The integer value of the specified server variable. It will still return 0 if the variable is not set. -native GetSVarInt(const varname[]); +native GetSVarInt(const svar[]); /// Set a string server variable. -/// The name of the server variable -/// The string to be set +/// The name of the server variable +/// The string to be set /// /// /// @@ -707,11 +706,11 @@ native GetSVarInt(const varname[]); /// 1: The function executed successfully.

/// 0: The function failed to execute. The variable name is null or over 40 characters. /// -native SetSVarString(const varname[], const string_value[]); +native SetSVarString(const svar[], const value[]); ///

Gets a string server variable's value. -/// The name of the server variable (case-insensitive). Assigned in SetSVarString -/// The array in which to store the string value in, passed by reference +/// The name of the server variable (case-insensitive). Assigned in SetSVarString +/// The array in which to store the string value in, passed by reference /// The maximum length of the returned string /// /// @@ -721,11 +720,11 @@ native SetSVarString(const varname[], const string_value[]); /// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// The length of the string. -native GetSVarString(const varname[], string_return[], len = sizeof string_return); +native GetSVarString(const svar[], output[], len = sizeof (output)); /// Set a float server variable. -/// The name of the server variable -/// The float to be set +/// The name of the server variable +/// The float to be set /// /// /// @@ -737,10 +736,10 @@ native GetSVarString(const varname[], string_return[], len = sizeof string_retur /// 1: The function executed successfully.

/// 0: The function failed to execute. The variable name is null or over 40 characters. /// -native SetSVarFloat(const varname[], Float:float_value); +native SetSVarFloat(const svar[], Float:value); ///

Gets a float server variable's value. -/// The name of the server variable (case-insensitive). Assigned in SetSVarFloat +/// The name of the server variable (case-insensitive). Assigned in SetSVarFloat /// /// /// @@ -749,10 +748,10 @@ native SetSVarFloat(const varname[], Float:float_value); /// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// The float value of the specified server variable. It will still return 0 if the variable is not set. -native Float:GetSVarFloat(const varname[]); +native Float:GetSVarFloat(const svar[]); /// Deletes a previously set server variable. -/// The name of the server variable to delete +/// The name of the server variable to delete /// /// /// @@ -764,7 +763,7 @@ native Float:GetSVarFloat(const varname[]); /// 1: The function executed successfully.

/// 0: The function failed to execute. There is no variable set with the given name. /// -native DeleteSVar(const varname[]); +native DeleteSVar(const svar[]); ///

Each SVar (server-variable) has its own unique identification number for lookup, this function returns the highest ID. /// @@ -774,16 +773,16 @@ native GetSVarsUpperIndex(); /// Retrieve the name of a sVar via the index. /// The index of the sVar -/// A string to store the sVar's name in, passed by reference -/// The max length of the returned string +/// A string to store the sVar's name in, passed by reference +/// The max length of the returned string /// /// /// /// -native GetSVarNameAtIndex(index, ret_varname[], ret_len = sizeof ret_varname); +native GetSVarNameAtIndex(index, output[], size = sizeof (output)); /// Gets the type (integer, float or string) of a server variable. -/// The name of the server variable to get the type of +/// The name of the server variable to get the type of /// /// /// @@ -801,7 +800,7 @@ native GetSVarNameAtIndex(index, ret_varname[], ret_len = sizeof ret_varname); /// /// /// Returns the type of the SVar. See table below. -native GetSVarType(const varname[]); +native GetSVarType(const svar[]); // Game @@ -809,7 +808,6 @@ native GetSVarType(const varname[]); /// The gamemode name to display native SetGameModeText(const string[]); - /// This function is used to change the amount of teams used in the gamemode. It has no obvious way of being used, but can help to indicate the number of teams used for better (more effective) internal handling. This function should only be used in the OnGameModeInit callback. Important: You can pass 2 billion here if you like, this function has no effect at all. /// Number of teams the gamemode knows /// @@ -818,16 +816,16 @@ native SetTeamCount(count); /// Adds a class to class selection. Classes are used so players may spawn with a skin of their choice. /// The skin which the player will spawn with -/// The X coordinate of the spawnpoint of this class -/// The Y coordinate of the spawnpoint of this class -/// The Z coordinate of the spawnpoint of this class -/// The direction in which the player should face after spawning +/// The X coordinate of the spawnpoint of this class +/// The Y coordinate of the spawnpoint of this class +/// The Z coordinate of the spawnpoint of this class +/// The direction in which the player should face after spawning /// The first spawn-weapon for the player -/// The amount of ammunition for the primary spawn weapon +/// The amount of ammunition for the primary spawn weapon /// The second spawn-weapon for the player -/// The amount of ammunition for the second spawn weapon +/// The amount of ammunition for the second spawn weapon /// The third spawn-weapon for the player -/// The amount of ammunition for the third spawn weapon +/// The amount of ammunition for the third spawn weapon /// ///
    ///
  • The ID of the class which was just added.
  • @@ -841,21 +839,21 @@ native SetTeamCount(count); /// /// /// -native AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); +native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /// This function is exactly the same as the AddPlayerClass function, with the addition of a team parameter. /// The team you want the player to spawn in /// The skin which the player will spawn with -/// The X coordinate of the class' spawn position -/// The Y coordinate of the class' spawn position -/// The Z coordinate of the class' spawn position -/// The direction in which the player will face after spawning +/// The X coordinate of the spawnpoint of this class +/// The Y coordinate of the spawnpoint of this class +/// The Z coordinate of the spawnpoint of this class +/// The direction in which the player should face after spawning /// The first spawn-weapon for the player -/// The amount of ammunition for the first spawn weapon +/// The amount of ammunition for the primary spawn weapon /// The second spawn-weapon for the player -/// The amount of ammunition for the second spawn weapon +/// The amount of ammunition for the second spawn weapon /// The third spawn-weapon for the player -/// The amount of ammunition for the third spawn weapon +/// The amount of ammunition for the third spawn weapon /// ///
      ///
    • The ID of the class which was just added.
    • @@ -867,14 +865,14 @@ native AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Floa /// /// /// -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); +native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /// Adds a 'static' vehicle (models are pre-loaded for players) to the gamemode. /// The Model ID for the vehicle -/// The X-coordinate for the vehicle -/// The Y-coordinate for the vehicle -/// The Z-coordinate for the vehicle -/// Direction of vehicle - angle +/// The X coordinate of the spawnpoint of this vehicle +/// The Y coordinate of the spawnpoint of this vehicle +/// The Z coordinate of the spawnpoint of this vehicle +/// Direction of vehicle - angle /// The primary color ID. -1 for random (random color chosen by client) /// The secondary color ID. -1 for random (random color chosen by client) /// @@ -887,18 +885,18 @@ native AddPlayerClassEx(teamid, modelid, Float:spawn_x, Float:spawn_y, Float:spa /// /// /// -native AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2); +native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, color1, color2); /// Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from AddStaticVehicle in only one way: allows a respawn time to be set for when the vehicle is left unoccupied by the driver. /// The Model ID for the vehicle -/// The X-coordinate for the vehicle -/// The Y-coordinate for the vehicle -/// The Z-coordinate for the vehicle -/// The facing - angle for the vehicle +/// The X coordinate of the spawnpoint of this vehicle +/// The Y coordinate of the spawnpoint of this vehicle +/// The Z coordinate of the spawnpoint of this vehicle +/// Direction of vehicle - angle /// The primary color ID. -1 for random (random color chosen by client) /// The secondary color ID. -1 for random (random color chosen by client) -/// The delay until the car is respawned without a driver, in seconds -/// Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=0) +/// The delay until the car is respawned without a driver, in seconds +/// Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=0) /// ///
        ///
      • The vehicle ID of the vehicle created (between 1 and MAX_VEHICLES).
      • @@ -909,14 +907,14 @@ native AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Fl /// /// /// -native AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay, addsiren=0); +native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, color1, color2, respawnDelay, bool:addSiren = false); /// This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically). /// The model of the pickup /// The pickup type. Determines how the pickup responds when picked up -/// The X coordinate to create the pickup at -/// The Y coordinate to create the pickup at -/// The Z coordinate to create the pickup at +/// The X coordinate to create the pickup at +/// The Y coordinate to create the pickup at +/// The Z coordinate to create the pickup at /// The virtual world ID to put the pickup in. Use -1 to show the pickup in all worlds /// /// 1 if the pickup is successfully created. @@ -927,7 +925,7 @@ native AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, /// /// /// -native AddStaticPickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0); +native AddStaticPickup(model, type, Float:x, Float:y, Float:x, virtualworld = 0); /// This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. /// The model of the pickup @@ -1028,7 +1026,7 @@ native SetWorldTime(hour); /// 1: The function executed successfully.

        /// 0: The function failed to execute. The weapon specified does not exist. /// -native GetWeaponName(weaponid, weapon[], len = sizeof weapon); +native GetWeaponName(weaponid, weapon[], len = sizeof (weapon)); /// 1 to enable, 0 to disable tire popping /// This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. @@ -1047,7 +1045,6 @@ native EnableVehicleFriendlyFire(); /// native AllowInteriorWeapons(allow); - ///

        Set the world weather for all players. /// The weather to set /// @@ -1128,20 +1125,20 @@ native SetNameTagDrawDistance(Float:distance); // Distance at which nametags wil native DisableNameTagLOS(); // Disables the nametag Line-Of-Sight checking /// Set a radius limitation for the chat. Only players at a certain distance from the player will see their message in the chat. Also changes the distance at which a player can see other players on the map at the same distance. -/// The range in which players will be able to see chat +/// The range in which players will be able to see chat /// /// /// /// -native LimitGlobalChatRadius(Float:chat_radius); +native LimitGlobalChatRadius(Float:chatRadius); /// Set the player marker radius. -/// The radius that markers will show at +/// The radius that markers will show at /// /// /// /// This Function was added in SA-MP 0.3a and will not work in earlier versions! -native LimitPlayerMarkerRadius(Float:marker_radius); +native LimitPlayerMarkerRadius(Float:markerRadius); // Npc @@ -1166,8 +1163,8 @@ native IsPlayerNPC(playerid); native AddCharModel(baseid, newid, const dffname[], const txdname[]); native AddSimpleModel(virtualworld, baseid, newid, const dffname[], const txdname[]); native AddSimpleModelTimed(virtualworld, baseid, newid, const dffname[], const txdname[], timeon, timeoff); -native FindModelFileNameFromCRC(crc, retstr[], retstr_size = sizeof retstr); -native FindTextureFileNameFromCRC(crc, retstr[], retstr_size = sizeof retstr); +native FindModelFileNameFromCRC(crc, retstr[], retstr_size = sizeof (retstr)); +native FindTextureFileNameFromCRC(crc, retstr[], retstr_size = sizeof (retstr)); native RedirectDownload(playerid, const url[]); // Admin @@ -1203,7 +1200,6 @@ native Ban(playerid); /// As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. native BanEx(playerid, const reason[]); - /// Sends an RCON (Remote Console) command. /// The RCON command to be executed /// @@ -1217,8 +1213,8 @@ native SendRconCommand(const command[]); /// Gets a player's network stats and saves them into a string. /// The ID of the player you want to get the networkstats of -/// The string to store the networkstats in, passed by reference -/// The length of the string that should be stored +/// The string to store the networkstats in, passed by reference +/// The length of the string that should be stored /// /// /// @@ -1231,11 +1227,11 @@ native SendRconCommand(const command[]); /// /// This function was added in SA-MP 0.3c R4 and will not work in earlier versions! /// This function may not return accurate data when used under OnPlayerDisconnect if the player has quit normally. It usually returns accurate data if the player has been kicked or has timed out. -native GetPlayerNetworkStats(playerid, retstr[], retstr_size = sizeof retstr); +native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); /// Gets the server's network stats and stores them in a string. -/// The string to store the network stats in, passed by reference -/// The length of the string to be stored +/// The string to store the network stats in, passed by reference +/// The length of the string to be stored /// /// /// @@ -1270,7 +1266,7 @@ native GetPlayerNetworkStats(playerid, retstr[], retstr_size = sizeof retstr); /// /// /// This function always returns 1. -native GetNetworkStats(retstr[], retstr_size = sizeof retstr); +native GetNetworkStats(output[], size = sizeof (output)); /// Returns the SA-MP client version, as reported by the player. /// The ID of the player to get the client version of @@ -1282,29 +1278,28 @@ native GetNetworkStats(retstr[], retstr_size = sizeof retstr); /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// The string the version gets stored in will be empty if playerid is an NPC. /// 1 on success and 0 on failure (if player specified doesn't exist). -native GetPlayerVersion(playerid, version[], len = sizeof version); // Returns the SA-MP client revision as reported by the player +native GetPlayerVersion(playerid, version[], len = sizeof (version)); // Returns the SA-MP client revision as reported by the player /// Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. -/// The IP to block -/// The time (in milliseconds) that the connection will be blocked for. 0 can be used for an indefinite block +/// The IP to block +/// The time (in milliseconds) that the connection will be blocked for. 0 can be used for an indefinite block /// /// /// This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! /// Wildcards can be used with this function, for example blocking the IP 6.9.*.* will block all IPs where the first two octets are 6 and 9 respectively. Any number can be in place of an asterisk. -native BlockIpAddress(const ip_address[], timems); - +native BlockIpAddress(const ipAddress[], timeMS); /// Unblock an IP address that was previously blocked using BlockIpAddress. -/// The IP address to unblock +/// The IP address to unblock /// /// /// This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! -native UnBlockIpAddress(const ip_address[]); +native UnBlockIpAddress(const ipAddress[]); // Deprecated: /// Get the string value of a server variable. -/// The name of the string variable to get the value of +/// The name of the string variable to get the value of /// An array into which to store the value, passed by reference /// The length of the string that should be stored /// @@ -1312,56 +1307,56 @@ native UnBlockIpAddress(const ip_address[]); /// This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsString /// Using this function on anything other than a string (int, bool or float) or a nonexistent server variable, will crash your server! This is a bug. /// Type 'varlist' in the server console to display a list of available server variables and their types. -/// When filterscripts or plugins is specified as the varname, this function only returns the name of the first specified filterscript or plugin. This is a bug. +/// When filterscripts or plugins is specified as the cvar, this function only returns the name of the first specified filterscript or plugin. This is a bug. /// The length of the returned string. 0 if the specified server variable is not a string or doesn't exist. -native GetServerVarAsString(const varname[], buffer[], len = sizeof buffer); +native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); /// Get the integer value of a server variable. -/// The name of the integer variable to get the value of +/// The name of the integer variable to get the value of /// /// /// This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsInt /// Type 'varlist' in the server console to display a list of available server variables and their types. /// The value of the specified server variable. 0 if the specified server variable is not an integer or doesn't exist. -native GetServerVarAsInt(const varname[]); +native GetServerVarAsInt(const cvar[]); /// Get the boolean value of a server variable. -/// The name of the boolean variable to get the value of +/// The name of the boolean variable to get the value of /// /// /// This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsBool /// Type 'varlist' in the server console to display a list of available server variables and their types. /// The value of the specified server variable. 0 if the specified server variable is not a boolean or doesn't exist. -native GetServerVarAsBool(const varname[]); +native GetServerVarAsBool(const cvar[]); // These are the same 3 functions as above although they avoid the name ambiguity/conflict with the SVar system. /// Get the string value of a console variable. -/// The name of the string variable to get the value of +/// The name of the string variable to get the value of /// An array into which to store the value, passed by reference /// The length of the string that should be stored /// /// /// Type varlist in the server console to display a list of available console variables and their types. -/// When filterscripts or plugins are specified as the varname, this function only returns the name of the first specified filterscript or plugin. +/// When filterscripts or plugins are specified as the cvar, this function only returns the name of the first specified filterscript or plugin. /// Using this function with anything other than a string (integer, boolean or float) will cause your server to crash. Using it with a nonexistent console variable will also cause your server to crash. /// The length of the returned string. 0 if the specified console variable is not a string or doesn't exist. -native GetConsoleVarAsString(const varname[], buffer[], len = sizeof buffer); +native GetConsoleVarAsString(const cvar[], buffer[], len = sizeof (buffer)); /// Get the integer value of a console variable. -/// The name of the integer variable to get the value of +/// The name of the integer variable to get the value of /// /// /// Type varlist in the server console to display a list of available console variables and their types. /// The value of the specified console variable. 0 if the specified console variable is not an integer or doesn't exist. -native GetConsoleVarAsInt(const varname[]); +native GetConsoleVarAsInt(const cvar[]); /// Get the boolean value of a console variable. -/// The name of the boolean variable to get the value of +/// The name of the boolean variable to get the value of /// /// /// Type varlist in the server console to display a list of available console variables and their types. /// The value of the specified console variable. 0 if the specified console variable is not a boolean or doesn't exist. -native GetConsoleVarAsBool(const varname[]); +native GetConsoleVarAsBool(const cvar[]); // Extended admin network stats @@ -1522,8 +1517,8 @@ native NetStats_ConnectionStatus(playerid); /// Get a player's IP and port. /// The ID of the player to get the IP and port of -/// A string array to store the IP and port in, passed by reference -/// The maximum length of the IP/port. 22 is recommended +/// A string array to store the IP and port in, passed by reference +/// The maximum length of the IP/port. 22 is recommended /// /// /// @@ -1536,7 +1531,7 @@ native NetStats_ConnectionStatus(playerid); /// /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! -native NetStats_GetIpPort(playerid, ip_port[], ip_port_len = sizeof ip_port); +native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); // Menu @@ -1857,13 +1852,13 @@ native TextDrawSetString(Text:text, const string[]); native TextDrawSetPreviewModel(Text:text, modelindex); /// Sets the rotation and zoom of a 3D model preview textdraw. -/// The X rotation value -/// The Y rotation value -/// The Z rotation value -/// The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) +/// The X rotation value +/// The Y rotation value +/// The Z rotation value +/// The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. -native TextDrawSetPreviewRot(Text:text, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fZoom = 1.0); +native TextDrawSetPreviewRot(Text:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); /// If a vehicle model is used in a 3D preview textdraw, this sets the two colour values for that vehicle. /// The textdraw id that is set to display a 3D vehicle model preview @@ -2057,7 +2052,7 @@ native GangZoneStopFlashForAll(zone); /// drawdistance seems to be a lot smaller when spectating. /// Use color embedding for multiple colors in the text. /// The ID of the newly created 3D Text Label, or INVALID_3DTEXT_ID if the 3D Text Label limit (MAX_3DTEXT_GLOBAL) was reached. -native Text3D:Create3DTextLabel(const text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS=0); +native Text3D:Create3DTextLabel(const text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS = 0); /// Delete a 3D text label (created with Create3DTextLabel). /// The ID of the 3D text label to delete @@ -2108,7 +2103,6 @@ native Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:OffsetX, Float:Offse /// Attach3DTextLabelToPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions! native Attach3DTextLabelToVehicle(Text3D:id, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ); - /// Updates a 3D Text Label text and color. /// The 3D Text Label you want to update /// The color the 3D Text Label should have from now on @@ -2148,7 +2142,7 @@ native Update3DTextLabelText(Text3D:id, color, const text[]); /// If is empty, the server/clients next to the text might crash! /// drawdistance seems to be a lot smaller when spectating. /// The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. -native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer=INVALID_PLAYER_ID, attachedvehicle=INVALID_VEHICLE_ID, testLOS=0); +native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testLOS = 0); /// Destroy a 3D text label that was created using CreatePlayer3DTextLabel. /// The ID of the player whose 3D text label to delete @@ -2189,7 +2183,7 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:id, color, const text[ /// The title at the top of the dialog. The length of the caption can not exceed more than 64 characters before it starts to cut off /// The text to display in the main dialog. Use \n to start a new line and \t to tabulate /// The text on the left button -/// The text on the right button. Leave it blank ( "" ) to hide it +/// The text on the right button. Leave it blank ("") to hide it /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -2211,7 +2205,6 @@ native gpci(playerid, serial[], maxlen); // Forwards (Callback declarations) // -------------------------------------------------- - /// This callback is triggered when the gamemode starts. /// /// @@ -2669,13 +2662,13 @@ forward OnVehicleDamageStatusUpdate(vehicleid, playerid); /// This callback is called when a player's client updates/syncs the position of a vehicle they're not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle that has no driver. /// The ID of the vehicle that's position was updated /// The ID of the player that sent a vehicle position sync update -/// The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats -/// The new X coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new Y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new Z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats +/// The new X coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new Y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new Z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version /// /// This callback was added in SA-MP 0.3c R3 and will not work in earlier versions! /// This callback is called very frequently per second per unoccupied vehicle. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. @@ -2684,7 +2677,7 @@ forward OnVehicleDamageStatusUpdate(vehicleid, playerid); /// Returning 0 in this callback will stop the vehicle's position being synced to other players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.

        /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// -forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); +forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passengerSeat, Float:newX, Float:newY, Float:newZ, Float:velX, Float:velY, Float:velZ); ///

        This callback is called when a player selects an item from a menu (ShowMenuForPlayer). /// The ID of the player that selected a menu item @@ -2770,7 +2763,7 @@ forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys); /// This callback does not handle returns.

        /// It is always called first in filterscripts. /// -forward OnRconLoginAttempt( ip[], password[], success ); +forward OnRconLoginAttempt(ip[], password[], success); ///

        This callback is called every time a client/player updates the server with their status. It is often used to create custom callbacks for client updates that aren't actively tracked by the server, such as health or armor updates or players switching weapons. /// ID of the player sending an update packet @@ -2926,8 +2919,8 @@ forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart /// This callback is called when a player gives damage to an actor. /// The ID of the player that gave damage -/// The ID of the actor that received damage -/// The amount of health/armour damaged_actorid has lost +/// The ID of the actor that received damage +/// The amount of health/armour damagedActorid has lost /// The reason that caused the damage /// The body part that was hit /// @@ -2945,13 +2938,13 @@ forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart /// 0 - Allows this callback to be called in other filterscripts.

        /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// -forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart); +forward OnPlayerGiveDamageActor(playerid, damagedActorid, Float:amount, weaponid, bodypart); ///

        OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map (by right-clicking). /// The ID of the player that placed a target/waypoint -/// The X float coordinate where the player clicked -/// The Y float coordinate where the player clicked -/// The Z float coordinate where the player clicked (inaccurate - see note below) +/// The X float coordinate where the player clicked +/// The Y float coordinate where the player clicked +/// The Z float coordinate where the player clicked (inaccurate - see note below) /// /// /// @@ -2962,7 +2955,7 @@ forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponi /// 0 - Indicates that this callback will be passed to the next filterscript.

        /// It is always called first in gamemode. /// -forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerClickMap(playerid, Float:x, Float:y, Float:z); ///

        This callback is called when a player clicks on a textdraw or cancels the select mode with the Escape key. /// The ID of the player that clicked on the textdraw @@ -2994,7 +2987,7 @@ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); /// This callback is called when an IP address attempts a connection to the server. To block incoming connections, use BlockIpAddress. /// The ID of the player attempting to connect -/// The IP address of the player attempting to connect +/// The IP address of the player attempting to connect /// The port of the attempted connection /// /// @@ -3007,7 +3000,7 @@ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); /// 0 - Indicates that this callback will be passed to the next filterscript.

        /// It is always called first in filterscripts. /// -forward OnIncomingConnection(playerid, ip_address[], port); +forward OnIncomingConnection(playerid, ipAddress[], port); ///

        This callback is called when a player sent a trailer update. /// The ID of the player who sent a trailer update @@ -3072,12 +3065,12 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, source); /// 0 if it is a global object or 1 if it is a playerobject /// The ID of the edited object /// The type of response -/// The X offset for the object that was edited -/// The Y offset for the object that was edited -/// The Z offset for the object that was edited -/// The X rotation for the object that was edited -/// The Y rotation for the object that was edited -/// The Z rotation for the object that was edited +/// The X offset for the object that was edited +/// The Y offset for the object that was edited +/// The Z offset for the object that was edited +/// The X rotation for the object that was edited +/// The Y rotation for the object that was edited +/// The Z rotation for the object that was edited /// /// /// @@ -3089,9 +3082,7 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, source); /// 0 - Indicates that this callback will be passed to the next script.

        /// It is always called first in filterscripts. /// -forward OnPlayerEditObject( playerid, playerobject, objectid, response, -Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ ); - +forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); ///

        This callback is called when a player ends attached object edition mode. /// The ID of the player that ended edition mode @@ -3099,15 +3090,15 @@ Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ ); /// The index of the attached object /// The model of the attached object that was edited /// The bone of the attached object that was edited -/// The X offset for the attached object that was edited -/// The Y offset for the attached object that was edited -/// The Z offset for the attached object that was edited -/// The X rotation for the attached object that was edited -/// The Y rotation for the attached object that was edited -/// The Z rotation for the attached object that was edited -/// The X scale for the attached object that was edited -/// The Y scale for the attached object that was edited -/// The Z scale for the attached object that was edited +/// The X offset for the attached object that was edited +/// The Y offset for the attached object that was edited +/// The Z offset for the attached object that was edited +/// The X rotation for the attached object that was edited +/// The Y rotation for the attached object that was edited +/// The Z rotation for the attached object that was edited +/// The X scale for the attached object that was edited +/// The Y scale for the attached object that was edited +/// The Z scale for the attached object that was edited /// /// /// This callback was added in SA-MP 0.3e and will not work in earlier versions! @@ -3117,19 +3108,16 @@ Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ ); /// 0 - Indicates that this callback will be passed to the next script.

        /// It is always called first in filterscripts. /// -forward OnPlayerEditAttachedObject( playerid, response, index, modelid, boneid, -Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, -Float:fRotX, Float:fRotY, Float:fRotZ, -Float:fScaleX, Float:fScaleY, Float:fScaleZ ); +forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, Float:scaleX, Float:scaleY, Float:scaleZ); ///

        This callback is called when a player selects an object after SelectObject has been used. /// The ID of the player that selected an object /// The type of selection /// The ID of the selected object /// The model ID of the selected object -/// The X position of the selected object -/// The Y position of the selected object -/// The Z position of the selected object +/// The X position of the selected object +/// The Y position of the selected object +/// The Z position of the selected object /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// @@ -3137,16 +3125,16 @@ Float:fScaleX, Float:fScaleY, Float:fScaleZ ); /// 0 - Indicates that this callback will be passed to the next script.

        /// It is always called first in filterscripts. /// -forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:x, Float:y, Float:z); ///

        This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). /// The ID of the player that shot a weapon /// The ID of the weapon shot by the player /// The type of thing the shot hit (none, player, vehicle, or (player)object) /// The ID of the player, vehicle or object that was hit -/// The X coordinate that the shot hit -/// The Y coordinate that the shot hit -/// The Z coordinate that the shot hit +/// The X coordinate that the shot hit +/// The Y coordinate that the shot hit +/// The Z coordinate that the shot hit /// /// /// This callback was added in SA-MP 0.3z and will not work in earlier versions! @@ -3162,8 +3150,8 @@ forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float: /// /// If hittype is:

        ///

          -///
        • - BULLET_HIT_TYPE_NONE: the fX, fY and fZ parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
        • -///
        • - Others: the fX, fY and fZ are offsets relative to the hitid.
        • +///
        • - BULLET_HIT_TYPE_NONE: the x, y and z parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
        • +///
        • - Others: the x, y and z are offsets relative to the hitid.
        • ///
        ///
        /// @@ -3179,7 +3167,7 @@ forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float: /// 1 - Allow the bullet to cause damage.

        /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// -forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:x, Float:y, Float:z); ///

        This callback is called when a SendClientCheck request comletes /// The ID of the player checked diff --git a/a_sampdb.inc b/a_sampdb.inc old mode 100755 new mode 100644 index d341f3a..c716c16 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -67,19 +67,19 @@ native db_num_fields(DBResult:dbresult); /// The result to get the data from; returned by db_query /// The index of the field to get the name of /// The result -/// The max length of the field +/// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Returns 1, if the function was successful, otherwise 0 if DBResult:dbresult is a NULL reference or the column index not available. -native db_field_name(DBResult:dbresult, field, result[], maxlength = sizeof result); +native db_field_name(DBResult:dbresult, field, result[], size = sizeof (result)); /// Get the content of a field from db_query. /// The result to get the data from /// The field to get the data from /// The result -/// The max length of the field +/// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Returns 1 if successful, otherwise 0 if DBResult:dbresult is a NULL reference or the column index not available. -native db_get_field(DBResult:dbresult, field, result[], maxlength = sizeof result); +native db_get_field(DBResult:dbresult, field, result[], size = sizeof (result)); /// Get the content of a field as an integer from db_query. /// The result to get the data from @@ -99,24 +99,24 @@ native Float:db_get_field_float(DBResult:result, field = 0); /// The result to get the data from /// The fieldname to get the data from /// The result -/// The max length of the field +/// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Returns 1 if successful, otherwise 0 if DBResult:dbresult is a NULL reference or the column index not available. -native db_get_field_assoc(DBResult:dbresult, const field[], result[], maxlength = sizeof result); +native db_get_field_assoc(DBResult:dbresult, const field[], result[], size = sizeof (result)); /// Get the contents of field as an integer with specified name. -/// The result to get the data from +/// The result to get the data from /// The fieldname to get the data from /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Retrieved value as integer (number). -native db_get_field_assoc_int(DBResult:result, const field[]); +native db_get_field_assoc_int(DBResult:dbresult, const field[]); /// Get the contents of field as a float with specified name. -/// The result to get the data from +/// The result to get the data from /// The fieldname to get the data from /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Retrieved value as floating point number. -native Float:db_get_field_assoc_float(DBResult:result, const field[]); +native Float:db_get_field_assoc_float(DBResult:dbresult, const field[]); /// Get memory handle for an SQLite database that was opened with db_open. /// The index of the database connection (returned by db_open) @@ -125,10 +125,10 @@ native Float:db_get_field_assoc_float(DBResult:result, const field[]); native db_get_mem_handle(DB:db); /// Get memory handle for an SQLite query that was executed with db_query. -/// The index of the query (returned by db_query) +/// The index of the query (returned by db_query) /// This function was added in SA-MP 0.3.7 R1 and will not work in earlier versions! /// Returns the memory handle for a specified query. -native db_get_result_mem_handle(DBResult:result); +native db_get_result_mem_handle(DBResult:dbresult); native db_debug_openfiles(); native db_debug_openresults(); diff --git a/a_vehicles.inc b/a_vehicles.inc old mode 100755 new mode 100644 index 2903c6a..defa3b8 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -57,8 +57,8 @@ /// The facing angle for the vehicle /// The primary color ID /// The secondary color ID -/// The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning -/// Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=0) +/// The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning +/// Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=false) /// /// /// @@ -70,7 +70,7 @@ /// The vehicle ID of the vehicle created (1 to MAX_VEHICLES).

        /// INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed). /// -native CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren=0); +native CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawnDelay, bool:addSiren = false); ///

        Destroy a vehicle. It will disappear instantly. /// The ID of the vehicle to destroy @@ -183,7 +183,7 @@ native Float:GetVehicleDistanceFromPoint(vehicleid, Float:X, Float:Y, Float:Z); /// Set the Z rotation (yaw) of a vehicle. /// The ID of the vehicle to set the rotation of -/// The Z angle to set +/// The Z angle to set /// /// /// A vehicle's X and Y (pitch and roll) rotation will be reset when this function is used. The X and Y rotations can not be set. @@ -192,7 +192,7 @@ native Float:GetVehicleDistanceFromPoint(vehicleid, Float:X, Float:Y, Float:Z); /// 1: The function executed successfully.

        /// 0: The function failed to execute. The vehicle specified does not exist. /// -native SetVehicleZAngle(vehicleid, Float:z_angle); +native SetVehicleZAngle(vehicleid, Float:angle); ///

        Set the parameters of a vehicle for a player. /// The ID of the vehicle to set the parameters of @@ -385,7 +385,6 @@ native ChangeVehicleColor(vehicleid, color1, color2); /// This function always returns 1 (success), even if the vehicle passed is not created. native ChangeVehiclePaintjob(vehicleid, paintjobid); - /// Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%). /// The ID of the vehicle to set the health of /// The health, given as a float value diff --git a/pawn.json b/pawn.json old mode 100755 new mode 100644 From c1510174e102c8d7a1617bf187e8e86dac707ba6 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 27 Apr 2021 22:20:51 +0100 Subject: [PATCH 002/104] Revert callback name changes because the compiler is picky about them. --- a_samp.inc | 88 +++++++++++++++++++++++++++--------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 4dcc9b8..cfd87b2 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -2662,13 +2662,13 @@ forward OnVehicleDamageStatusUpdate(vehicleid, playerid); /// This callback is called when a player's client updates/syncs the position of a vehicle they're not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle that has no driver. /// The ID of the vehicle that's position was updated /// The ID of the player that sent a vehicle position sync update -/// The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats -/// The new X coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new Y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new Z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats +/// The new X coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new Y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new Z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version /// /// This callback was added in SA-MP 0.3c R3 and will not work in earlier versions! /// This callback is called very frequently per second per unoccupied vehicle. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. @@ -2677,7 +2677,7 @@ forward OnVehicleDamageStatusUpdate(vehicleid, playerid); /// Returning 0 in this callback will stop the vehicle's position being synced to other players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.

        /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// -forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passengerSeat, Float:newX, Float:newY, Float:newZ, Float:velX, Float:velY, Float:velZ); +forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); ///

        This callback is called when a player selects an item from a menu (ShowMenuForPlayer). /// The ID of the player that selected a menu item @@ -2919,8 +2919,8 @@ forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart /// This callback is called when a player gives damage to an actor. /// The ID of the player that gave damage -/// The ID of the actor that received damage -/// The amount of health/armour damagedActorid has lost +/// The ID of the actor that received damage +/// The amount of health/armour damaged_actorid has lost /// The reason that caused the damage /// The body part that was hit /// @@ -2938,13 +2938,13 @@ forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart /// 0 - Allows this callback to be called in other filterscripts.

        /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// -forward OnPlayerGiveDamageActor(playerid, damagedActorid, Float:amount, weaponid, bodypart); +forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart); ///

        OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map (by right-clicking). /// The ID of the player that placed a target/waypoint -/// The X float coordinate where the player clicked -/// The Y float coordinate where the player clicked -/// The Z float coordinate where the player clicked (inaccurate - see note below) +/// The X float coordinate where the player clicked +/// The Y float coordinate where the player clicked +/// The Z float coordinate where the player clicked (inaccurate - see note below) /// /// /// @@ -2955,7 +2955,7 @@ forward OnPlayerGiveDamageActor(playerid, damagedActorid, Float:amount, weaponid /// 0 - Indicates that this callback will be passed to the next filterscript.

        /// It is always called first in gamemode. /// -forward OnPlayerClickMap(playerid, Float:x, Float:y, Float:z); +forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); ///

        This callback is called when a player clicks on a textdraw or cancels the select mode with the Escape key. /// The ID of the player that clicked on the textdraw @@ -2987,7 +2987,7 @@ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); /// This callback is called when an IP address attempts a connection to the server. To block incoming connections, use BlockIpAddress. /// The ID of the player attempting to connect -/// The IP address of the player attempting to connect +/// The IP address of the player attempting to connect /// The port of the attempted connection /// /// @@ -3000,7 +3000,7 @@ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); /// 0 - Indicates that this callback will be passed to the next filterscript.

        /// It is always called first in filterscripts. /// -forward OnIncomingConnection(playerid, ipAddress[], port); +forward OnIncomingConnection(playerid, ip_address[], port); ///

        This callback is called when a player sent a trailer update. /// The ID of the player who sent a trailer update @@ -3065,12 +3065,12 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, source); /// 0 if it is a global object or 1 if it is a playerobject /// The ID of the edited object /// The type of response -/// The X offset for the object that was edited -/// The Y offset for the object that was edited -/// The Z offset for the object that was edited -/// The X rotation for the object that was edited -/// The Y rotation for the object that was edited -/// The Z rotation for the object that was edited +/// The X offset for the object that was edited +/// The Y offset for the object that was edited +/// The Z offset for the object that was edited +/// The X rotation for the object that was edited +/// The Y rotation for the object that was edited +/// The Z rotation for the object that was edited /// /// /// @@ -3082,7 +3082,7 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, source); /// 0 - Indicates that this callback will be passed to the next script.

        /// It is always called first in filterscripts. /// -forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); ///

        This callback is called when a player ends attached object edition mode. /// The ID of the player that ended edition mode @@ -3090,15 +3090,15 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:off /// The index of the attached object /// The model of the attached object that was edited /// The bone of the attached object that was edited -/// The X offset for the attached object that was edited -/// The Y offset for the attached object that was edited -/// The Z offset for the attached object that was edited -/// The X rotation for the attached object that was edited -/// The Y rotation for the attached object that was edited -/// The Z rotation for the attached object that was edited -/// The X scale for the attached object that was edited -/// The Y scale for the attached object that was edited -/// The Z scale for the attached object that was edited +/// The X offset for the attached object that was edited +/// The Y offset for the attached object that was edited +/// The Z offset for the attached object that was edited +/// The X rotation for the attached object that was edited +/// The Y rotation for the attached object that was edited +/// The Z rotation for the attached object that was edited +/// The X scale for the attached object that was edited +/// The Y scale for the attached object that was edited +/// The Z scale for the attached object that was edited /// /// /// This callback was added in SA-MP 0.3e and will not work in earlier versions! @@ -3108,16 +3108,16 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:off /// 0 - Indicates that this callback will be passed to the next script.

        /// It is always called first in filterscripts. /// -forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, Float:scaleX, Float:scaleY, Float:scaleZ); +forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); ///

        This callback is called when a player selects an object after SelectObject has been used. /// The ID of the player that selected an object /// The type of selection /// The ID of the selected object /// The model ID of the selected object -/// The X position of the selected object -/// The Y position of the selected object -/// The Z position of the selected object +/// The X position of the selected object +/// The Y position of the selected object +/// The Z position of the selected object /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// @@ -3125,16 +3125,16 @@ forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, F /// 0 - Indicates that this callback will be passed to the next script.

        /// It is always called first in filterscripts. /// -forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:x, Float:y, Float:z); +forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ); ///

        This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). /// The ID of the player that shot a weapon /// The ID of the weapon shot by the player /// The type of thing the shot hit (none, player, vehicle, or (player)object) /// The ID of the player, vehicle or object that was hit -/// The X coordinate that the shot hit -/// The Y coordinate that the shot hit -/// The Z coordinate that the shot hit +/// The X coordinate that the shot hit +/// The Y coordinate that the shot hit +/// The Z coordinate that the shot hit /// /// /// This callback was added in SA-MP 0.3z and will not work in earlier versions! @@ -3150,8 +3150,8 @@ forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:x, Float:y /// /// If hittype is:

        ///

          -///
        • - BULLET_HIT_TYPE_NONE: the x, y and z parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
        • -///
        • - Others: the x, y and z are offsets relative to the hitid.
        • +///
        • - BULLET_HIT_TYPE_NONE: the fX, fY and fZ parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
        • +///
        • - Others: the fX, fY and fZ are offsets relative to the hitid.
        • ///
        ///
        /// @@ -3167,7 +3167,7 @@ forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:x, Float:y /// 1 - Allow the bullet to cause damage.

        /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// -forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:x, Float:y, Float:z); +forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ); ///

        This callback is called when a SendClientCheck request comletes /// The ID of the player checked From 8bad002ad0cc494560352252508ddc6e64e82bad Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 27 Apr 2021 22:33:06 +0100 Subject: [PATCH 003/104] More `camelCase` parameter names. --- a_actor.inc | 36 +++---- a_npc.inc | 38 ++++---- a_objects.inc | 212 ++++++++++++++++++++-------------------- a_players.inc | 258 ++++++++++++++++++++++++------------------------- a_samp.inc | 190 ++++++++++++++++++------------------ a_sampdb.inc | 54 +++++------ a_vehicles.inc | 78 +++++++-------- 7 files changed, 433 insertions(+), 433 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index e2c091a..0716b34 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -16,10 +16,10 @@ /// 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. /// The model ID (skin ID) the actor should have -/// The X coordinate to create the actor at -/// The Y coordinate to create the actor at -/// The Z coordinate to create the actor at -/// The facing angle (rotation) for the actor to have +/// The x coordinate to create the actor at +/// The y coordinate to create the actor at +/// The z coordinate to create the actor at +/// The facing angle (rotation) for the actor to have /// /// /// @@ -52,7 +52,7 @@ /// The created Actor ID (start at 0).

        /// INVALID_ACTOR_ID (65535) If the actor limit (1000) is reached. /// -native CreateActor(modelid, Float:X, Float:Y, Float:Z, Float:Rotation); +native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); ///

        Destroy an actor which was created with CreateActor. /// The ID of the actor to destroy. Returned by CreateActor @@ -94,12 +94,12 @@ native GetActorVirtualWorld(actorid); /// Apply an animation to an actor. /// The ID of the actor to apply the animation to -/// The animation library from which to apply an animation -/// The name of the animation to apply, within the specified library +/// The animation library from which to apply an animation +/// The name of the animation to apply, within the specified library /// The speed to play the animation (use 4.1) /// If set to 1, the animation will loop. If set to 0, the animation will play once -/// If set to 0, the actor is returned to their old X coordinate once the animation is complete (for animations that move the actor such as walking). 1 will not return them to their old position -/// Same as above but for the Y axis. Should be kept the same as the previous parameter +/// If set to 0, the actor is returned to their old x coordinate once the animation is complete (for animations that move the actor such as walking). 1 will not return them to their old position +/// Same as above but for the y axis. Should be kept the same as the previous parameter /// Setting this to 1 will freeze an actor at the end of the animation. 0 will not /// Timer in milliseconds. For a never-ending loop it should be 0 /// @@ -109,7 +109,7 @@ native GetActorVirtualWorld(actorid); /// 1: The function executed successfully.

        /// 0: The function failed to execute. The actor specified does not exist. /// -native ApplyActorAnimation(actorid, const animlib[], const animname[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); +native ApplyActorAnimation(actorid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); ///

        Clear any animations applied to an actor. /// The ID of the actor (returned by CreateActor) to clear the animations for @@ -123,9 +123,9 @@ native ClearActorAnimations(actorid); /// Set the position of an actor. /// The ID of the actor to set the position of. Returned by CreateActor -/// The X coordinate to position the actor at -/// The Y coordinate to position the actor at -/// The Z coordinate to position the actor at +/// The x coordinate to position the actor at +/// The y coordinate to position the actor at +/// The z coordinate to position the actor at /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! @@ -134,20 +134,20 @@ native ClearActorAnimations(actorid); /// 1: The function executed successfully.

        /// 0: The function failed to execute. The actor specified does not exist. /// -native SetActorPos(actorid, Float:X, Float:Y, Float:Z); +native SetActorPos(actorid, Float:x, Float:y, Float:z); ///

        Get the position of an actor. /// The ID of the actor to get the position of. Returned by CreateActor -/// A float variable, passed by reference, in which to store the X coordinate of the actor -/// A float variable, passed by reference, in which to store the Y coordinate of the actor -/// A float variable, passed by reference, in which to store the Z coordinate of the actor +/// A float variable, passed by reference, in which to store the x coordinate of the actor +/// A float variable, passed by reference, in which to store the y coordinate of the actor +/// A float variable, passed by reference, in which to store the z coordinate of the actor /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.

        /// 0: The function failed to execute. The actor specified does not exist.

        /// -native GetActorPos(actorid, &Float:X, &Float:Y, &Float:Z); +native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); ///

        Set the facing angle of an actor. /// The ID of the actor to set the facing angle of. Returned by CreateActor diff --git a/a_npc.inc b/a_npc.inc index d24a6d9..f1d183c 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -387,11 +387,11 @@ native SendCommand(const commandtext[]); /// The player's current state as an integer. native GetPlayerState(playerid); -/// Get the position of a player, represented by X, Y and Z coordinates. +/// Get the position of a player, represented by x, y and z coordinates. /// The ID of the player to get the position of -/// A float variable in which to store the X coordinate in, passed by reference -/// A float variable in which to store the Y coordinate in, passed by reference -/// A float variable in which to store the Z coordinate in, passed by reference +/// A float variable in which to store the x coordinate in, passed by reference +/// A float variable in which to store the y coordinate in, passed by reference +/// A float variable in which to store the z coordinate in, passed by reference /// /// /// @@ -453,18 +453,18 @@ native GetPlayerKeys(playerid, &keys, &updown, &leftright); native GetPlayerFacingAngle(playerid, &Float:ang); /// Get the current location of the NPC. -/// A float to save the X coordinate, passed by reference -/// A float to save the Y coordinate, passed by reference -/// A float to save the Z coordinate, passed by reference +/// A float to save the x coordinate, passed by reference +/// A float to save the y coordinate, passed by reference +/// A float to save the z coordinate, passed by reference /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! native GetMyPos(&Float:x, &Float:y, &Float:z); /// Set the position of the NPC. -/// The X coordinate to put the NPC at -/// The Y coordinate to put the NPC at -/// The Z coordinate to put the NPC at +/// The x coordinate to put the NPC at +/// The y coordinate to put the NPC at +/// The z coordinate to put the NPC at /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -484,28 +484,28 @@ native GetMyFacingAngle(&Float:ang); native SetMyFacingAngle(Float:ang); /// Get the distance between the NPC and a point. -/// The X coordinate of the point -/// The Y coordinate of the point -/// The Z coordinate of the point -/// A float to save the distance in, passed by reference +/// The x coordinate of the point +/// The y coordinate of the point +/// The z coordinate of the point +/// A float to save the distance in, passed by reference /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// This function does not return any specific values. -native GetDistanceFromMeToPoint(Float:X, Float:Y, Float:Z, &Float:Distance); +native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); /// Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. /// The ID of the player /// The furthest distance the player can be from the point to be in range -/// The X coordinate of the point to check the range to -/// The Y coordinate of the point to check the range to -/// The Z coordinate of the point to check the range to +/// The x coordinate of the point to check the range to +/// The y coordinate of the point to check the range to +/// The z coordinate of the point to check the range to /// /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is in range, 0 if not. -native IsPlayerInRangeOfPoint(playerid, Float:range, Float:X, Float:Y, Float:Z); +native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); /// Get a player's name. /// The ID of the player to get the name of diff --git a/a_objects.inc b/a_objects.inc index 7bb3996..a39db91 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -41,13 +41,13 @@ /// Creates an object at specified coordinates in the game world. /// The model to create -/// The X coordinate to create the object at -/// The Y coordinate to create the object at -/// The Z coordinate to create the object at -/// The X rotation of the object -/// The Y rotation of the object -/// The Z rotation of the object -/// The distance that San Andreas renders objects at. 0.0 will cause objects to render at their default distances. Usable since 0.3b, limited to 300 prior to 0.3x (optional=0.0) +/// The x coordinate to create the object at +/// The y coordinate to create the object at +/// The z coordinate to create the object at +/// The x rotation of the object +/// The y rotation of the object +/// The z rotation of the object +/// The distance that San Andreas renders objects at. 0.0 will cause objects to render at their default distances. Usable since 0.3b, limited to 300 prior to 0.3x (optional=0.0) /// /// /// @@ -60,23 +60,23 @@ /// /// /// -/// Objects that emit light (lampposts, police lights, bollard lights, neons etc.) that have a greater rotation than 16.26 degrees (or -16.26) on either the X or Y axis will stop shining. This effect also applies to light objects attached to other objects, players and vehicles. +/// Objects that emit light (lampposts, police lights, bollard lights, neons etc.) that have a greater rotation than 16.26 degrees (or -16.26) on either the x or y axis will stop shining. This effect also applies to light objects attached to other objects, players and vehicles. /// If a light object is attached to a car and the car is rotated over 16.26 degrees (like in a rollover), the object will also stop emitting light. This is a GTA:SA issue and is not caused by a bug in SA-MP. /// /// In case the light is attached to another object, one fix for this is to set SyncRotation to false in AttachObjectToObject. This will ensure the light stays at 0 rotation. This would only really work for objects that consist ONLY of light, so wouldn't work for the police light for example. /// There is a limit of 1000 objects (MAX_OBJECTS). To circumvent this limit, you can use a streamer /// The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. -native CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0); +native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); /// Attach an object to a vehicle. /// The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first /// The ID of the vehicle to attach the object to -/// The X axis offset from the vehicle to attach the object to -/// The Y axis offset from the vehicle to attach the object to -/// The Z axis offset from the vehicle to attach the object to -/// The X rotation offset for the object -/// The Y rotation offset for the object -/// The Z rotation offset for the object +/// The x axis offset from the vehicle to attach the object to +/// The y axis offset from the vehicle to attach the object to +/// The z axis offset from the vehicle to attach the object to +/// The x rotation offset for the object +/// The y rotation offset for the object +/// The z rotation offset for the object /// /// /// @@ -84,18 +84,18 @@ native CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Floa /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// The object must be created first. /// When the vehicle is destroyed or respawned, the attached objects won't be destroyed with it; they will remain stationary at the position the vehicle disappeared and be reattached to the next vehicle to claim the vehicle ID that the objects were attached to. -native AttachObjectToVehicle(objectid, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ); +native AttachObjectToVehicle(objectid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// You can use this function to attach objects to other objects. The objects will folow the main object. /// The object to attach to another object /// The object to attach the object to -/// The distance between the main object and the object in the X direction -/// The distance between the main object and the object in the Y direction -/// The distance between the main object and the object in the Z direction -/// The X rotation between the object and the main object -/// The Y rotation between the object and the main object -/// The Z rotation between the object and the main object -/// If set to 0, objectid's rotation will not change with 's (optional=1) +/// The distance between the main object and the object in the x direction +/// The distance between the main object and the object in the y direction +/// The distance between the main object and the object in the z direction +/// The x rotation between the object and the main object +/// The y rotation between the object and the main object +/// The z rotation between the object and the main object +/// If set to 0, objectid's rotation will not change with 's (optional=1) /// /// /// @@ -110,42 +110,42 @@ native AttachObjectToVehicle(objectid, vehicleid, Float:OffsetX, Float:OffsetY, /// 1: The function executed successfully.

        /// 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. /// -native AttachObjectToObject(objectid, attachtoid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ, SyncRotation = 1); +native AttachObjectToObject(objectid, attachtoid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); ///

        Attach an object to a player. /// The ID of the object to attach to the player /// The ID of the player to attach the object to -/// The distance between the player and the object in the X direction -/// The distance between the player and the object in the Y direction -/// The distance between the player and the object in the Z direction -/// The X rotation between the object and the player -/// The Y rotation between the object and the player -/// The Z rotation between the object and the player +/// The distance between the player and the object in the x direction +/// The distance between the player and the object in the y direction +/// The distance between the player and the object in the z direction +/// The x rotation between the object and the player +/// The y rotation between the object and the player +/// The z rotation between the object and the player /// /// /// /// /// /// This function always returns 0. -native AttachObjectToPlayer(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ); +native AttachObjectToPlayer(objectid, playerid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// Change the position of an object. /// The ID of the object to set the position of. Returned by CreateObject -/// The X coordinate to position the object at -/// The Y coordinate to position the object at -/// The Z coordinate to position the object at +/// The x coordinate to position the object at +/// The y coordinate to position the object at +/// The z coordinate to position the object at /// /// /// /// /// This function always returns 1, even if the object specified does not exist. -native SetObjectPos(objectid, Float:X, Float:Y, Float:Z); +native SetObjectPos(objectid, Float:x, Float:y, Float:z); /// Get the position of an object. /// The ID of the object to get the position of. -/// A variable in which to store the X coordinate, passed by reference -/// A variable in which to store the Y coordinate, passed by reference -/// A variable in which to store the Z coordinate, passed by reference +/// A variable in which to store the x coordinate, passed by reference +/// A variable in which to store the y coordinate, passed by reference +/// A variable in which to store the z coordinate, passed by reference /// /// /// @@ -154,31 +154,31 @@ native SetObjectPos(objectid, Float:X, Float:Y, Float:Z); /// 1: The function executed successfully.

        /// 0: The function failed to execute. The specified object does not exist. /// -native GetObjectPos(objectid, &Float:X, &Float:Y, &Float:Z); +native GetObjectPos(objectid, &Float:x, &Float:y, &Float:z); -///

        Set the rotation of an object on the three axes (X, Y and Z). +/// Set the rotation of an object on the three axes (x, y and z). /// The ID of the object to set the rotation of -/// The X rotation -/// The Y rotation -/// The Z rotation +/// The x rotation +/// The y rotation +/// The z rotation /// /// /// /// /// This function always returns 1, even if the object doesn't exist. -native SetObjectRot(objectid, Float:RotX, Float:RotY, Float:RotZ); +native SetObjectRot(objectid, Float:rotX, Float:rotY, Float:rotZ); -/// Use this function to get the objects current rotation. The rotation is saved by reference in three RotX/RotY/RotZ variables. +/// Use this function to get the objects current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. /// The objectid of the object you want to get the rotation from -/// The variable to store the X rotation, passed by reference -/// The variable to store the Y rotation, passed by reference -/// The variable to store the Z rotation, passed by reference +/// The variable to store the x rotation, passed by reference +/// The variable to store the y rotation, passed by reference +/// The variable to store the z rotation, passed by reference /// /// /// /// /// The object's rotation is stored in the referenced variables, not in the return value. -native GetObjectRot(objectid, &Float:RotX, &Float:RotY, &Float:RotZ); +native GetObjectRot(objectid, &Float:rotX, &Float:rotY, &Float:rotZ); /// Get the model ID of an object. /// The ID of the object to get the model of @@ -218,13 +218,13 @@ native DestroyObject(objectid); /// Move an object to a new position with a set speed. Players/vehicles will 'surf' the object as it moves. /// The ID of the object to move -/// The X coordinate to move the object to -/// The Y coordinate to move the object to -/// The Z coordinate to move the object to -/// The speed at which to move the object (units per second) -/// The FINAL X rotation (optional=-1000.0) -/// The FINAL Y rotation (optional=-1000.0) -/// The FINAL Z rotation (optional=-1000.0) +/// The x coordinate to move the object to +/// The y coordinate to move the object to +/// The z coordinate to move the object to +/// The speed at which to move the object (units per second) +/// The FINAL x rotation (optional=-1000.0) +/// The FINAL y rotation (optional=-1000.0) +/// The FINAL z rotation (optional=-1000.0) /// /// /// @@ -233,9 +233,9 @@ native DestroyObject(objectid); /// /// /// This function can be used to make objects rotate smoothly. In order to achieve this however, the object must also be moved. The specified rotation is the rotation the object will have after the movement. Hence the object will not rotate when no movement is applied. For a script example take a look at the ferriswheel.pwn filterscript made by Kye included in the server package (SA-MP 0.3d and above). -/// To fully understand the above note, you can (but not limited to) increase the z position by (+0.001) and then (-0.001) after moving it again, as not changing the X, Y or Z will not rotate the object. +/// To fully understand the above note, you can (but not limited to) increase the z position by (+0.001) and then (-0.001) after moving it again, as not changing the x, y or z will not rotate the object. /// The time it will take for the object to move in milliseconds. -native MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0); +native MoveObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); /// Stop a moving object after MoveObject has been used. /// The ID of the object to stop moving @@ -307,13 +307,13 @@ native CancelEdit(playerid); /// Creates an object which will be visible to only one player. /// The ID of the player to create the object for /// The model to create -/// The X coordinate to create the object at -/// The Y coordinate to create the object at -/// The Z coordinate to create the object at -/// The X rotation of the object -/// The Y rotation of the object -/// The Z rotation of the object -/// The distance from which objects will appear to players. 0.0 will cause an object to render at its default distance. Leaving this parameter out will cause objects to be rendered at their default distance. The maximum usable distance is 300 in versions prior to 0.3x, in which drawdistance can be unlimited (optional=0.0) +/// The x coordinate to create the object at +/// The y coordinate to create the object at +/// The z coordinate to create the object at +/// The x rotation of the object +/// The y rotation of the object +/// The z rotation of the object +/// The distance from which objects will appear to players. 0.0 will cause an object to render at its default distance. Leaving this parameter out will cause objects to be rendered at their default distance. The maximum usable distance is 300 in versions prior to 0.3x, in which drawdistance can be unlimited (optional=0.0) /// /// /// @@ -327,31 +327,31 @@ native CancelEdit(playerid); /// /// The 'DrawDistance' parameter was added in 0.3b. It must be left out in scripts for older versions of SA:MP. /// The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. -native CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0); +native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); /// Attach a player object to a vehicle. /// The ID of the player the object was created for /// The ID of the object to attach to the vehicle /// The ID of the vehicle to attach the object to -/// The X position offset for attachment -/// The Y position offset for attachment -/// The Z position offset for attachment -/// The X rotation offset for attachment -/// The Y rotation offset for attachment -/// The Z rotation offset for attachment +/// The x position offset for attachment +/// The y position offset for attachment +/// The z position offset for attachment +/// The x rotation offset for attachment +/// The y rotation offset for attachment +/// The z rotation offset for attachment /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You need to create the object before attempting to attach it to a vehicle. -native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:RotZ); +native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// Sets the position of a player-object to the specified coordinates. /// The ID of the player whose player-object to set the position of /// The ID of the player-object to set the position of. Returned by CreatePlayerObject -/// The X coordinate to put the object at -/// The Y coordinate to put the object at -/// The Z coordinate to put the object at +/// The x coordinate to put the object at +/// The y coordinate to put the object at +/// The z coordinate to put the object at /// /// /// @@ -360,14 +360,14 @@ native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:offsetX, /// 1: The function executed successfully.

        /// 0: The function failed to execute. Player and/or object do not exist. /// -native SetPlayerObjectPos(playerid, objectid, Float:X, Float:Y, Float:Z); +native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); ///

        Get the position of a player object (CreatePlayerObject). /// The ID of the player whose player object to get the position of /// The object's id of which you want the current location -/// A float variable in which to store the X coordinate, passed by reference -/// A float variable in which to store the Y coordinate, passed by reference -/// A float variable in which to store the Z coordinate, passed by reference +/// A float variable in which to store the x coordinate, passed by reference +/// A float variable in which to store the y coordinate, passed by reference +/// A float variable in which to store the z coordinate, passed by reference /// /// /// @@ -378,14 +378,14 @@ native SetPlayerObjectPos(playerid, objectid, Float:X, Float:Y, Float:Z); /// 0: The function failed to execute. The player and/or the object don't exist.

        /// The object's position is stored in the specified variables. /// -native GetPlayerObjectPos(playerid, objectid, &Float:X, &Float:Y, &Float:Z); +native GetPlayerObjectPos(playerid, objectid, &Float:x, &Float:y, &Float:z); -///

        Set the rotation of an object on the X, Y and Z axis. +/// Set the rotation of an object on the x, y and z axis. /// The ID of the player whose player-object to rotate /// The ID of the player-object to rotate -/// The X rotation to set -/// The Y rotation to set -/// The Z rotation to set +/// The x rotation to set +/// The y rotation to set +/// The z rotation to set /// /// /// @@ -395,20 +395,20 @@ native GetPlayerObjectPos(playerid, objectid, &Float:X, &Float:Y, &Float:Z); /// 1: The function executed successfully.

        /// 0: The function failed to execute. /// -native SetPlayerObjectRot(playerid, objectid, Float:RotX, Float:RotY, Float:RotZ); +native SetPlayerObjectRot(playerid, objectid, Float:rotX, Float:rotY, Float:rotZ); -///

        Use this function to get the object's current rotation. The rotation is saved by reference in three RotX/RotY/RotZ variables. +/// Use this function to get the object's current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. /// The player you associated this object to /// The objectid of the object you want to get the rotation from -/// The variable to store the X rotation, passed by reference -/// The variable to store the Y rotation, passed by reference -/// The variable to store the Z rotation, passed by reference +/// The variable to store the x rotation, passed by reference +/// The variable to store the y rotation, passed by reference +/// The variable to store the z rotation, passed by reference /// /// /// /// /// The object's rotation is stored in the specified variables. -native GetPlayerObjectRot(playerid, objectid, &Float:RotX, &Float:RotY, &Float:RotZ); +native GetPlayerObjectRot(playerid, objectid, &Float:rotX, &Float:rotY, &Float:rotZ); /// Retrieve the model ID of a player-object. /// The ID of the player whose player-object to get the model of @@ -449,13 +449,13 @@ native DestroyPlayerObject(playerid, objectid); /// Move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects. /// The ID of the player whose player-object to move /// The ID of the object to move -/// The X coordinate to move the object to -/// The Y coordinate to move the object to -/// The Z coordinate to move the object to -/// The speed at which to move the object -/// The final X rotation (optional=-1000.0) -/// The final Y rotation (optional=-1000.0) -/// The final Z rotation (optional=-1000.0) +/// The x coordinate to move the object to +/// The y coordinate to move the object to +/// The z coordinate to move the object to +/// The speed at which to move the object +/// The final x rotation (optional=-1000.0) +/// The final y rotation (optional=-1000.0) +/// The final z rotation (optional=-1000.0) /// /// /// @@ -465,7 +465,7 @@ native DestroyPlayerObject(playerid, objectid); /// /// 0.3d R2 and older versions do not have the rotational parameters. /// The time it will take for the object to move in milliseconds. -native MovePlayerObject(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0); +native MovePlayerObject(playerid, objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); /// Stop a moving player-object after MovePlayerObject has been used. /// The ID of the player whose player-object to stop @@ -491,18 +491,18 @@ native IsPlayerObjectMoving(playerid, objectid); /// The id of the player which is linked with the object /// The objectid you want to attach to the player /// The id of the player you want to attach to the object -/// The distance between the player and the object in the X direction -/// The distance between the player and the object in the Y direction -/// The distance between the player and the object in the Z direction -/// The X rotation -/// The Y rotation -/// The Z rotation +/// The distance between the player and the object in the x direction +/// The distance between the player and the object in the y direction +/// The distance between the player and the object in the z direction +/// The x rotation +/// The y rotation +/// The z rotation /// /// /// /// /// This function was removed in SA-MP 0.3. -native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ); +native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rX, Float:rY, Float:rZ); /// Replace the texture of an object with the texture from another model in the game. /// The ID of the object to change the texture of diff --git a/a_players.inc b/a_players.inc index c79e81e..54c0a75 100644 --- a/a_players.inc +++ b/a_players.inc @@ -99,9 +99,9 @@ /// The PlayerID of who you want to set the spawn information /// The Team-ID of the chosen player /// The skin which the player will spawn with -/// The X-coordinate of the player's spawn position -/// The Y-coordinate of the player's spawn position -/// The Z-coordinate of the player's spawn position +/// The x-coordinate of the player's spawn position +/// The y-coordinate of the player's spawn position +/// The z-coordinate of the player's spawn position /// The direction in which the player needs to be facing after spawning /// The first spawn-weapon for the player /// The amount of ammunition for the primary spawnweapon @@ -130,9 +130,9 @@ native SpawnPlayer(playerid); /// Set a player's position. /// The ID of the player to set the position of -/// The X coordinate to position the player at -/// The Y coordinate to position the player at -/// The Z coordinate to position the player at +/// The x coordinate to position the player at +/// The y coordinate to position the player at +/// The z coordinate to position the player at /// /// /// @@ -147,23 +147,23 @@ native SetPlayerPos(playerid, Float:x, Float:y, Float:z); /// This sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position. /// The ID of the player to set the position of -/// The X coordinate to position the player at -/// The X coordinate to position the player at -/// The Z coordinate to position the player at +/// The x coordinate to position the player at +/// The x coordinate to position the player at +/// The z coordinate to position the player at /// /// -/// This function does not work if the new coordinates are far away from where the player currently is. The Z height will be 0, which will likely put them underground. It is highly recommended that the MapAndreas plugin be used instead. +/// This function does not work if the new coordinates are far away from where the player currently is. The z height will be 0, which will likely put them underground. It is highly recommended that the MapAndreas plugin be used instead. /// /// 1: The function executed successfully.

        /// 0: The function failed to execute. This means the player specified does not exist. /// native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); -///

        Get the position of a player, represented by X, Y and Z coordinates. +/// Get the position of a player, represented by x, y and z coordinates. /// The ID of the player to get the position of -/// A float variable in which to store the X coordinate in, passed by reference -/// A float variable in which to store the Y coordinate in, passed by reference -/// A float variable in which to store the Z coordinate in, passed by reference +/// A float variable in which to store the x coordinate in, passed by reference +/// A float variable in which to store the y coordinate in, passed by reference +/// A float variable in which to store the z coordinate in, passed by reference /// /// /// @@ -172,7 +172,7 @@ native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); /// true on success, false on failure (i.e. player not connected). native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); -/// Set a player's facing angle (Z rotation). +/// Set a player's facing angle (z rotation). /// The ID of the player to set the facing angle of /// The angle the player should face /// @@ -196,9 +196,9 @@ native GetPlayerFacingAngle(playerid, &Float:ang); /// Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. /// The ID of the player /// The furthest distance the player can be from the point to be in range -/// The X coordinate of the point to check the range to -/// The Y coordinate of the point to check the range to -/// The Z coordinate of the point to check the range to +/// The x coordinate of the point to check the range to +/// The y coordinate of the point to check the range to +/// The z coordinate of the point to check the range to /// /// /// @@ -208,15 +208,15 @@ native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); /// Calculate the distance between a player and a map coordinate. /// The ID of the player to calculate the distance from -/// The X map coordinate -/// The Y map coordinate -/// The Z map coordinate +/// The x map coordinate +/// The y map coordinate +/// The z map coordinate /// /// /// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// The distance between the player and the point as a float. -native Float:GetPlayerDistanceFromPoint(playerid, Float:X, Float:Y, Float:Z); +native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); /// Checks if a player is streamed in another player's client. /// The ID of the player to check is streamed in @@ -554,7 +554,7 @@ native ResetPlayerMoney(playerid); /// Sets the name of a player. /// The ID of the player to set the name of -/// The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-Z, [], (), $, @, ., _, =) +/// The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-z, [], (), $, @, ., _, =) /// /// Changing the players' name to the same name but with different character cases (e.g. "John" to "JOHN") will not work. /// If used in OnPlayerConnect, the new name will not be shown for the connecting player. @@ -764,11 +764,11 @@ native SetPlayerFightingStyle(playerid, style); /// The ID of the fighting style of the player. native GetPlayerFightingStyle(playerid); -/// Set a player's velocity on the X, Y and Z axes. +/// Set a player's velocity on the x, y and z axes. /// The player to apply the speed to -/// The velocity (speed) on the X axis -/// The velocity (speed) on the Y axis -/// The velocity (speed) on the Z axis +/// The velocity (speed) on the x axis +/// The velocity (speed) on the y axis +/// The velocity (speed) on the z axis /// /// /// @@ -777,18 +777,18 @@ native GetPlayerFightingStyle(playerid); /// 1: The function executed successfully.

        /// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerVelocity(playerid, Float:X, Float:Y, Float:Z); +native SetPlayerVelocity(playerid, Float:x, Float:y, Float:z); -///

        Get the velocity (speed) of a player on the X, Y and Z axes. +/// Get the velocity (speed) of a player on the x, y and z axes. /// The player to get the speed from -/// A float variable in which to store the velocity on the X axis, passed by reference -/// A float variable in which to store the velocity on the Y axis, passed by reference -/// A float variable in which to store the velocity on the Z axis, passed by reference +/// A float variable in which to store the velocity on the x axis, passed by reference +/// A float variable in which to store the velocity on the y axis, passed by reference +/// A float variable in which to store the velocity on the z axis, passed by reference /// /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native GetPlayerVelocity(playerid, &Float:X, &Float:Y, &Float:Z); +native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); /// This function plays a crime report for a player - just like in single-player when CJ commits a crime. /// The ID of the player that will hear the crime report @@ -825,9 +825,9 @@ native PlayCrimeReportForPlayer(playerid, suspectid, crime); /// Play an 'audio stream' for a player. Normal audio files also work (e.g. MP3). /// The ID of the player to play the audio for /// The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist -/// The X position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) -/// The Y position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) -/// The Z position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) +/// The x position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) +/// The y position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) +/// The z position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) /// The distance over which the audio will be heard. Has no effect unless usepos is set to 1 (optional=50.0) /// Use the positions and distance specified. (optional=0) /// @@ -837,7 +837,7 @@ native PlayCrimeReportForPlayer(playerid, suspectid, crime); /// 1: The function executed successfully.

        /// 0: The function failed to execute. The player specified does not exist. /// -native PlayAudioStreamForPlayer(playerid, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0); +native PlayAudioStreamForPlayer(playerid, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, bool:usepos = false); ///

        Stops the current audio stream for a player. /// The player you want to stop the audio stream for @@ -910,9 +910,9 @@ native GetPlayerSurfingObjectID(playerid); /// Removes a standard San Andreas model for a single player within a specified range. /// The ID of the player to remove the objects for /// The model to remove -/// The X coordinate around which the objects will be removed -/// The Y coordinate around which the objects will be removed -/// The Z coordinate around which the objects will be removed +/// The x coordinate around which the objects will be removed +/// The y coordinate around which the objects will be removed +/// The z coordinate around which the objects will be removed /// The radius around the specified point to remove objects with the specified model /// /// @@ -924,12 +924,12 @@ native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, /// Retrieves the start and end (hit) position of the last bullet a player fired. /// The ID of the player to get the last bullet shot information of -/// A float variable in which to save the X coordinate of where the bullet originated from -/// A float variable in which to save the Y coordinate of where the bullet originated from -/// A float variable in which to save the Z coordinate of where the bullet originated from -/// A float variable in which to save the X coordinate of where the bullet hit -/// A float variable in which to save the Y coordinate of where the bullet hit -/// A float variable in which to save the Z coordinate of where the bullet hit +/// A float variable in which to save the x coordinate of where the bullet originated from +/// A float variable in which to save the y coordinate of where the bullet originated from +/// A float variable in which to save the z coordinate of where the bullet originated from +/// A float variable in which to save the x coordinate of where the bullet hit +/// A float variable in which to save the y coordinate of where the bullet hit +/// A float variable in which to save the z coordinate of where the bullet hit /// /// /// @@ -953,15 +953,15 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float /// The index (slot) to assign the object to (0-9 since 0.3d, 0-4 in previous versions) /// The model to attach /// The bone to attach the object to -/// X axis offset for the object position (optional=0.0) -/// Y axis offset for the object position (optional=0.0) -/// Z axis offset for the object position (optional=0.0) -/// X axis rotation of the object (optional=0.0) -/// Y axis rotation of the object (optional=0.0) -/// Z axis rotation of the object (optional=0.0) -/// X axis scale of the object (optional=1.0) -/// Y axis scale of the object (optional=1.0) -/// Z axis scale of the object (optional=1.0) +/// x axis offset for the object position (optional=0.0) +/// y axis offset for the object position (optional=0.0) +/// z axis offset for the object position (optional=0.0) +/// x axis rotation of the object (optional=0.0) +/// y axis rotation of the object (optional=0.0) +/// z axis rotation of the object (optional=0.0) +/// x axis scale of the object (optional=1.0) +/// y axis scale of the object (optional=1.0) +/// z axis scale of the object (optional=1.0) /// The first object color to set ARGB (optional=0) /// The second object color to set ARGB (optional=0) /// @@ -1029,7 +1029,7 @@ native IsPlayerAttachedObjectSlotUsed(playerid, index); /// You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. /// /// There are 7 clickable buttons in edition mode.

        -/// The three single icons that have X/Y/Z on them can be dragged to edit position/rotation/scale.

        +/// The three single icons that have x/y/z on them can be dragged to edit position/rotation/scale.

        /// The four buttons in a row are to select the edition mode and save edition: [Move] [Rotate] [Scale] [Save].

        /// Clicking save will call OnPlayerEditAttachedObject. /// @@ -1041,8 +1041,8 @@ native EditAttachedObject(playerid, index); ///

        Creates a textdraw for a single player. This can be used as a way around the global text-draw limit. /// The ID of the player to create the textdraw for -/// X-Coordinate -/// Y-Coordinate +/// x-Coordinate +/// y-Coordinate /// The text in the textdraw /// /// @@ -1123,15 +1123,15 @@ native PlayerTextDrawDestroy(playerid, PlayerText:text); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -/// When using this function purely for the benefit of affecting the textdraw box, multiply 'Y' by 0.135 to convert to TextDrawTextSize-like measurements -/// Fonts appear to look the best with an X to Y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). +/// When using this function purely for the benefit of affecting the textdraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements +/// Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:x, Float:y); /// Change the size of a player-textdraw (box if PlayerTextDrawUseBox is enabled and/or clickable area for use with PlayerTextDrawSetSelectable). /// The ID of the player whose player-textdraw to set the size of /// The ID of the player-textdraw to set the size of -/// The size on the X axis (left/right) following the same 640x480 grid as TextDrawCreate -/// The size on the Y axis (up/down) following the same 640x480 grid as TextDrawCreate +/// The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate +/// The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate /// /// /// @@ -1157,7 +1157,7 @@ native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:x, Float:y); ///
      /// /// -/// Using font type 4 (sprite) and 5 (model preview) converts X and Y of this function from corner coordinates to WIDTH and HEIGHT (offsets).

      +/// Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).

      /// The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).

      /// This function defines the clickable area for use with PlayerTextDrawSetSelectable, whether a box is shown or not. /// @@ -1462,9 +1462,9 @@ native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelindex); ///

      Sets the rotation and zoom of a 3D model preview player-textdraw. /// The ID of the player whose player-textdraw to change /// The ID of the player-textdraw to change -/// The X rotation value -/// The Y rotation value -/// The Z rotation value +/// The x rotation value +/// The y rotation value +/// The z rotation value /// The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) /// /// @@ -1718,9 +1718,9 @@ native TogglePlayerControllable(playerid, toggle); /// Plays the specified sound for a player. /// The ID of the player for whom to play the sound /// The sound to play -/// X coordinate for the sound to play at. (0 for no position) -/// Y coordinate for the sound to play at. (0 for no position) -/// Z coordinate for the sound to play at. (0 for no position) +/// x coordinate for the sound to play at. (0 for no position) +/// y coordinate for the sound to play at. (0 for no position) +/// z coordinate for the sound to play at. (0 for no position) /// /// /// @@ -1733,30 +1733,30 @@ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); /// Apply an animation to a player. /// The ID of the player to apply the animation to -/// The animation library from which to apply an animation -/// The name of the animation to apply, within the specified library +/// The animation library from which to apply an animation +/// The name of the animation to apply, within the specified library /// The speed to play the animation (use 4.1) /// If set to 1, the animation will loop. If set to 0, the animation will play once -/// If set to 0, the player is returned to their old X coordinate once the animation is complete (for animations that move the player such as walking). 1 will not return them to their old position -/// Same as above but for the Y axis. Should be kept the same as the previous parameter +/// If set to 0, the player is returned to their old x coordinate once the animation is complete (for animations that move the player such as walking). 1 will not return them to their old position +/// Same as above but for the y axis. Should be kept the same as the previous parameter /// Setting this to 1 will freeze the player at the end of the animation. 0 will not /// Timer in milliseconds. For a never-ending loop it should be 0 -/// Set to 1 to make server sync the animation with all other players in streaming radius. 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) (optional=0) +/// Set to 1 to make server sync the animation with all other players in streaming radius. 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) (optional=0) /// /// -/// The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. +/// The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. /// An invalid animation library will crash the player's game. /// This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). -native ApplyAnimation(playerid, const animlib[], const animname[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, bool:forcesync = false); +native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, bool:forceSync = false); /// Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). /// The ID of the player to clear the animations of -/// Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) +/// Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) /// /// ClearAnimations doesn't do anything when the animation ends if we pass 1 for the freeze parameter in ApplyAnimation. /// Unlike some other ways to remove player from a vehicle, this will also reset the vehicle's velocity to zero, instantly stopping the car. Player will appear on top of the vehicle with the same location as he was in his car seat. /// This function always returns 1, even when the player specified is not connected. -native ClearAnimations(playerid, forcesync = 0); +native ClearAnimations(playerid, bool:forceSync = false); /// Returns the index of any running applied animations. /// ID of the player of whom you want to get the animation index of @@ -1767,14 +1767,14 @@ native GetPlayerAnimationIndex(playerid); // return the index of any running app /// Get the animation library/name for the index. /// The animation index, returned by GetPlayerAnimationIndex -/// String variable that stores the animation library +/// String variable that stores the animation library /// Size of the string that stores the animation library -/// String variable that stores the animation name +/// String variable that stores the animation name /// Size of the string that stores the animation name /// /// This function was added in SA-MP 0.3b and will not work in earlier versions! /// 1 on success, 0 on failure. -native GetAnimationName(index, animlib[], len1 = sizeof (animlib), animname[], len2 = sizeof (animname)); // get the animation lib/name for the index +native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibrary), animationName[], len2 = sizeof (animationName)); // get the animation lib/name for the index /// Retrieves a player's current special action. /// The ID of the player to get the special action of @@ -1877,9 +1877,9 @@ native DisableRemoteVehicleCollisions(playerid, disable); /// Sets a checkpoint (red cylinder) for a player. Also shows a red blip on the radar. When players enter a checkpoint, OnPlayerEnterCheckpoint is called and actions can be performed. /// The ID of the player for whom to set a checkpoint -/// The X coordinate to set the checkpoint at -/// The Y coordinate to set the checkpoint at -/// The Z coordinate to set the checkpoint at +/// The x coordinate to set the checkpoint at +/// The y coordinate to set the checkpoint at +/// The z coordinate to set the checkpoint at /// The size of the checkpoint /// /// If a checkpoint is already set it will use the size of that checkpoint instead of the new one.

      @@ -1912,12 +1912,12 @@ native DisablePlayerCheckpoint(playerid); ///

      Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint callback is called. /// The ID of the player to set the checkpoint for /// Type of checkpoint. 0-Normal, 1-Finish, 2-Nothing(Only the checkpoint without anything on it), 3-Air normal, 4-Air finish, 5-Air (rotates and stops), 6-Air (increases, decreases and disappears), 7-Air (swings down and up), 8-Air (swings up and down) -/// X-Coordinate -/// Y-Coordinate -/// Z-Coordinate -/// X-Coordinate of the next point, for the arrow facing direction -/// Y-Coordinate of the next point, for the arrow facing direction -/// Z-Coordinate of the next point, for the arrow facing direction +/// x-Coordinate +/// y-Coordinate +/// z-Coordinate +/// x-Coordinate of the next point, for the arrow facing direction +/// y-Coordinate of the next point, for the arrow facing direction +/// z-Coordinate of the next point, for the arrow facing direction /// Size (diameter) of the checkpoint /// /// @@ -1954,10 +1954,10 @@ native DisablePlayerRaceCheckpoint(playerid); /// Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in). /// The ID of the player to set the world boundaries of -/// The maximum X coordinate the player can go to -/// The minimum X coordinate the player can go to -/// The maximum Y coordinate the player can go to -/// The minimum Y coordinate the player can go to +/// The maximum x coordinate the player can go to +/// The minimum x coordinate the player can go to +/// The maximum y coordinate the player can go to +/// The minimum y coordinate the player can go to /// /// This function does not work if used in OnPlayerConnect /// A player's world boundaries can be reset by setting them to 20000.0, -20000.0, 20000.0, -20000.0. These are the default values. @@ -1987,9 +1987,9 @@ native ShowPlayerNameTagForPlayer(playerid, showplayerid, show); /// Place an icon/marker on a player's map. Can be used to mark locations such as banks and hospitals to players. /// The ID of the player to set the map icon for /// The player's icon ID, ranging from 0 to 99. This means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon -/// The X coordinate to place the map icon at -/// The Y coordinate to place the map icon at -/// The Z coordinate to place the map icon at +/// The x coordinate to place the map icon at +/// The y coordinate to place the map icon at +/// The z coordinate to place the map icon at /// The icon to set /// The color of the icon (RGBA). This should only be used with the square icon (ID: 0) /// The style of icon (optional=MAPICON_LOCAL) @@ -2035,9 +2035,9 @@ native AllowPlayerTeleport(playerid, allow); /// Sets the camera to a specific position for a player. /// ID of the player -/// The X coordinate to place the camera at -/// The Y coordinate to place the camera at -/// The Z coordinate to place the camera at +/// The x coordinate to place the camera at +/// The y coordinate to place the camera at +/// The z coordinate to place the camera at /// /// /// You may also have to use SetPlayerCameraLookAt with this function in order to work properly. @@ -2051,9 +2051,9 @@ native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); /// Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos. /// The ID of the player whose camera to set -/// The X coordinate for the player's camera to look at -/// The Y coordinate for the player's camera to look at -/// The Z coordinate for the player's camera to look at +/// The x coordinate for the player's camera to look at +/// The y coordinate for the player's camera to look at +/// The z coordinate for the player's camera to look at /// The style of the change. Can be used to interpolate (change slowly) from old pos to new pos using CAMERA_MOVE. Added in 0.3e. Leave out for older versions (optional=CAMERA_CUT) /// /// @@ -2074,9 +2074,9 @@ native SetCameraBehindPlayer(playerid); /// Get the position of the player's camera. /// The ID of the player to get the camera position of -/// A float variable to store the X coordinate in, passed by reference -/// A float variable to store the Y coordinate in, passed by reference -/// A float variable to store the Z coordinate in, passed by reference +/// A float variable to store the x coordinate in, passed by reference +/// A float variable to store the y coordinate in, passed by reference +/// A float variable to store the z coordinate in, passed by reference /// /// /// @@ -2089,9 +2089,9 @@ native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z); /// This function will return the current direction of player's aiming in 3-D space, the coords are relative to the camera position, see GetPlayerCameraPos. /// The ID of the player you want to obtain the camera front vector of -/// A float to store the X coordinate, passed by reference -/// A float to store the Y coordinate, passed by reference -/// A float to store the Z coordinate, passed by reference +/// A float to store the x coordinate, passed by reference +/// A float to store the y coordinate, passed by reference +/// A float to store the z coordinate, passed by reference /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// In 0.3a the camera front vector is only obtainable when player is inside a rhino, S.W.A.T tank, fire truck, or on foot. @@ -2210,12 +2210,12 @@ native AttachCameraToPlayerObject(playerid, playerobjectid); /// Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes. /// The ID of the player the camera should be moved for -/// The X position the camera should start to move from -/// The Y position the camera should start to move from -/// The Z position the camera should start to move from -/// The X position the camera should move to -/// The Y position the camera should move to -/// The Z position the camera should move to +/// The x position the camera should start to move from +/// The y position the camera should start to move from +/// The z position the camera should start to move from +/// The x position the camera should move to +/// The y position the camera should move to +/// The z position the camera should move to /// Time in milliseconds /// The jumpcut to use. Set to CAMERA_MOVE for a smooth movement (optional=CAMERA_CUT) /// @@ -2223,16 +2223,16 @@ native AttachCameraToPlayerObject(playerid, playerobjectid); /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraPos(playerid, Float:FromX, Float:FromY, Float:FromZ, Float:ToX, Float:ToY, Float:ToZ, time, cut = CAMERA_CUT); +native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); /// Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. /// The ID of the player the camera should be moved for -/// The X position the camera should start to move from -/// The Y position the camera should start to move from -/// The Z position the camera should start to move from -/// The X position the camera should move to -/// The Y position the camera should move to -/// The Z position the camera should move to +/// The x position the camera should start to move from +/// The y position the camera should start to move from +/// The z position the camera should start to move from +/// The x position the camera should move to +/// The y position the camera should move to +/// The z position the camera should move to /// Time in milliseconds to complete interpolation /// The 'jumpcut' to use. Set to CAMERA_MOVE for interpolation (optional=CAMERA_CUT) /// @@ -2240,7 +2240,7 @@ native InterpolateCameraPos(playerid, Float:FromX, Float:FromY, Float:FromZ, Flo /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraLookAt(playerid, Float:FromX, Float:FromY, Float:FromZ, Float:ToX, Float:ToY, Float:ToZ, time, cut = CAMERA_CUT); +native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); // Player conditionals @@ -2328,7 +2328,7 @@ native GetPlayerVirtualWorld(playerid); /// 1: The function executed successfully.

      /// 0: The function failed to execute. The player is not connected. /// -native EnableStuntBonusForPlayer(playerid, enable); +native EnableStuntBonusForPlayer(playerid, bool:enable); ///

      Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie). /// 1 to enable stunt bonuses or 0 to disable them @@ -2425,16 +2425,16 @@ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mou /// Creates an explosion that is only visible to a single player. This can be used to isolate explosions from other players or to make them only appear in specific virtual worlds. /// The ID of the player to create the explosion for -/// The X coordinate of the explosion -/// The Y coordinate of the explosion -/// The Z coordinate of the explosion +/// The x coordinate of the explosion +/// The y coordinate of the explosion +/// The z coordinate of the explosion /// The explosion type -/// The radius of the explosion +/// The radius of the explosion /// /// This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! /// There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. /// This function always returns 1, even if the function failed to excute (player doesn't exist, invalid radius, or invalid explosion type). -native CreateExplosionForPlayer(playerid, Float:X, Float:Y, Float:Z, type, Float:Radius); +native CreateExplosionForPlayer(playerid, Float:x, Float:y, Float:z, type, Float:radius); /// Perform a memory check on the client. /// The ID of the player to check diff --git a/a_samp.inc b/a_samp.inc index cfd87b2..f61602b 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -591,9 +591,9 @@ native CallRemoteFunction(const function[], const format[], {Float,_}:...); native CallLocalFunction(const function[], const format[], {Float,_}:...); /// Returns the norm (length) of the provided vector. -/// The vector's magnitude on the X axis -/// The vector's magnitude on the Y axis -/// The vector's magnitude on the Z axis +/// The vector's magnitude on the x axis +/// The vector's magnitude on the y axis +/// The vector's magnitude on the z axis /// /// /// @@ -816,9 +816,9 @@ native SetTeamCount(count); /// Adds a class to class selection. Classes are used so players may spawn with a skin of their choice. /// The skin which the player will spawn with -/// The X coordinate of the spawnpoint of this class -/// The Y coordinate of the spawnpoint of this class -/// The Z coordinate of the spawnpoint of this class +/// The x coordinate of the spawnpoint of this class +/// The y coordinate of the spawnpoint of this class +/// The z coordinate of the spawnpoint of this class /// The direction in which the player should face after spawning /// The first spawn-weapon for the player /// The amount of ammunition for the primary spawn weapon @@ -844,9 +844,9 @@ native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:a /// This function is exactly the same as the AddPlayerClass function, with the addition of a team parameter. /// The team you want the player to spawn in /// The skin which the player will spawn with -/// The X coordinate of the spawnpoint of this class -/// The Y coordinate of the spawnpoint of this class -/// The Z coordinate of the spawnpoint of this class +/// The x coordinate of the spawnpoint of this class +/// The y coordinate of the spawnpoint of this class +/// The z coordinate of the spawnpoint of this class /// The direction in which the player should face after spawning /// The first spawn-weapon for the player /// The amount of ammunition for the primary spawn weapon @@ -869,9 +869,9 @@ native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawn /// Adds a 'static' vehicle (models are pre-loaded for players) to the gamemode. /// The Model ID for the vehicle -/// The X coordinate of the spawnpoint of this vehicle -/// The Y coordinate of the spawnpoint of this vehicle -/// The Z coordinate of the spawnpoint of this vehicle +/// The x coordinate of the spawnpoint of this vehicle +/// The y coordinate of the spawnpoint of this vehicle +/// The z coordinate of the spawnpoint of this vehicle /// Direction of vehicle - angle /// The primary color ID. -1 for random (random color chosen by client) /// The secondary color ID. -1 for random (random color chosen by client) @@ -889,9 +889,9 @@ native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float /// Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from AddStaticVehicle in only one way: allows a respawn time to be set for when the vehicle is left unoccupied by the driver. /// The Model ID for the vehicle -/// The X coordinate of the spawnpoint of this vehicle -/// The Y coordinate of the spawnpoint of this vehicle -/// The Z coordinate of the spawnpoint of this vehicle +/// The x coordinate of the spawnpoint of this vehicle +/// The y coordinate of the spawnpoint of this vehicle +/// The z coordinate of the spawnpoint of this vehicle /// Direction of vehicle - angle /// The primary color ID. -1 for random (random color chosen by client) /// The secondary color ID. -1 for random (random color chosen by client) @@ -912,9 +912,9 @@ native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Flo /// This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically). /// The model of the pickup /// The pickup type. Determines how the pickup responds when picked up -/// The X coordinate to create the pickup at -/// The Y coordinate to create the pickup at -/// The Z coordinate to create the pickup at +/// The x coordinate to create the pickup at +/// The y coordinate to create the pickup at +/// The z coordinate to create the pickup at /// The virtual world ID to put the pickup in. Use -1 to show the pickup in all worlds /// /// 1 if the pickup is successfully created. @@ -930,16 +930,16 @@ native AddStaticPickup(model, type, Float:x, Float:y, Float:x, virtualworld = 0) /// This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. /// The model of the pickup /// The pickup spawn type (see table under remarks) -/// The X coordinate to create the pickup at -/// The Y coordinate to create the pickup at -/// The Z coordinate to create the pickup at +/// The x coordinate to create the pickup at +/// The y coordinate to create the pickup at +/// The z coordinate to create the pickup at /// The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds (optional=0) /// /// /// /// /// Known Bugs:

      -/// Pickups that have a X or Y lower than -4096.0 or bigger than 4096.0 won't show up and won't trigger OnPlayerPickUpPickup either. +/// Pickups that have a x or y lower than -4096.0 or bigger than 4096.0 won't show up and won't trigger OnPlayerPickUpPickup either. /// /// /// The only type of pickup that can be picked up from inside a vehicle is 14 (except for special pickups such as bribes).

      @@ -969,7 +969,7 @@ native AddStaticPickup(model, type, Float:x, Float:y, Float:x, virtualworld = 0) ///

    /// /// The ID of the created pickup, -1 on failure (pickup max limit). -native CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0); +native CreatePickup(model, type, Float:x, Float:y, Float:z, virtualworld = 0); /// Destroys a pickup created with CreatePickup. /// The ID of the pickup to destroy (returned by CreatePickup) @@ -1080,15 +1080,15 @@ native AllowAdminTeleport(allow); native SetDeathDropAmount(amount); /// Create an explosion at the specified coordinates. -/// The X coordinate of the explosion -/// The Y coordinate of the explosion -/// The Z coordinate of the explosion +/// The x coordinate of the explosion +/// The y coordinate of the explosion +/// The z coordinate of the explosion /// The type of explosion -/// The explosion radius +/// The explosion radius /// /// There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. /// This function always returns 1, even when the explosion type and/or radius values are invalid. -native CreateExplosion(Float:X, Float:Y, Float:Z, type, Float:Radius); +native CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); /// This function allows to turn on zone / area names such as the "Vinewood" or "Doherty" text at the bottom-right of the screen as they enter the area. This is a gamemode option and should be set in the callback OnGameModeInit. /// A toggle option for whether or not you'd like zone names on or off @@ -1538,8 +1538,8 @@ native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); /// Creates a menu. /// The title for the new menu /// How many colums shall the new menu have -/// The X position of the menu (640x460 canvas - 0 would put the menu at the far left) -/// The Y position of the menu (640x460 canvas - 0 would put the menu at the far top) +/// The x position of the menu (640x460 canvas - 0 would put the menu at the far left) +/// The y position of the menu (640x460 canvas - 0 would put the menu at the far top) /// The width for the first column /// The width for the second column (optional=0.0) /// @@ -1671,8 +1671,8 @@ native DisableMenuRow(Menu:menuid, row); native Menu:GetPlayerMenu(playerid); /// Creates a textdraw. Textdraws are, as the name implies, text (mainly - there can be boxes, sprites and model previews (skins/vehicles/weapons/objects too) that is drawn on a player's screens. -/// The X (left/right) coordinate to create the textdraw at -/// The Y (up/down) coordinate to create the textdraw at +/// The x (left/right) coordinate to create the textdraw at +/// The y (up/down) coordinate to create the textdraw at /// The text that will appear in the textdraw /// /// If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.

    @@ -1702,15 +1702,15 @@ native TextDrawDestroy(Text:text); /// The TextDraw to change /// Width of a char /// Height of a char -/// When using this function purely for the benefit of affecting the TextDraw box, multiply 'Y' by 0.135 to convert to TextDrawTextSize-like measurements. Hint: it is easier and extremely precise to use LD_SPAC:white sprite for box-only textdraws, TextDrawTextSize will have regular offsets. +/// When using this function purely for the benefit of affecting the TextDraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements. Hint: it is easier and extremely precise to use LD_SPAC:white sprite for box-only textdraws, TextDrawTextSize will have regular offsets. /// If you want to change the letter size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. -/// Fonts appear to look the best with an X to Y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). +/// Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). native TextDrawLetterSize(Text:text, Float:x, Float:y); ///

    Change the size of a textdraw (box if TextDrawUseBox is enabled and/or clickable area for use with TextDrawSetSelectable). /// The TextDraw to set the size of -/// The size on the X axis (left/right) following the same 640x480 grid as TextDrawCreate -/// The size on the Y axis (up/down) following the same 640x480 grid as TextDrawCreate +/// The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate +/// The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate /// /// The x and y have different meanings with different TextDrawAlignment values:

    ///

      @@ -1720,7 +1720,7 @@ native TextDrawLetterSize(Text:text, Float:x, Float:y); ///
    ///
    /// -/// Using font type 4 (sprite) and 5 (model preview) converts X and Y of this function from corner coordinates to WIDTH and HEIGHT (offsets).

    +/// Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).

    /// The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).

    /// This function defines the clickable area for use with TextDrawSetSelectable, whether a box is shown or not. /// @@ -1852,9 +1852,9 @@ native TextDrawSetString(Text:text, const string[]); native TextDrawSetPreviewModel(Text:text, modelindex); ///

    Sets the rotation and zoom of a 3D model preview textdraw. -/// The X rotation value -/// The Y rotation value -/// The Z rotation value +/// The x rotation value +/// The y rotation value +/// The z rotation value /// The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. @@ -1871,10 +1871,10 @@ native TextDrawSetPreviewVehCol(Text:text, color1, color2); // Gang Zones /// Create a gangzone (colored radar area). -/// The X coordinate for the west side of the gangzone -/// The Y coordinate for the south side of the gangzone -/// The X coordinate for the east side of the gangzone -/// The Y coordinate for the north side of the gangzone +/// The x coordinate for the west side of the gangzone +/// The y coordinate for the south side of the gangzone +/// The x coordinate for the east side of the gangzone +/// The y coordinate for the north side of the gangzone /// /// /// @@ -2031,10 +2031,10 @@ native GangZoneStopFlashForAll(zone); /// Creates a 3D Text Label at a specific location in the world. /// The initial text string /// The text Color, as an integer or hex in RGBA color format -/// X-Coordinate -/// Y-Coordinate -/// Z-Coordinate -/// The distance from where you are able to see the 3D Text Label +/// x-Coordinate +/// y-Coordinate +/// z-Coordinate +/// The distance from where you are able to see the 3D Text Label /// The virtual world in which you are able to see the 3D Text /// Test the line-of-sight so this text can't be seen through objects (optional=0) /// @@ -2052,7 +2052,7 @@ native GangZoneStopFlashForAll(zone); /// drawdistance seems to be a lot smaller when spectating. /// Use color embedding for multiple colors in the text. /// The ID of the newly created 3D Text Label, or INVALID_3DTEXT_ID if the 3D Text Label limit (MAX_3DTEXT_GLOBAL) was reached. -native Text3D:Create3DTextLabel(const text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS = 0); +native Text3D:Create3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawDistance, virtualworld, bool:testLOS = false); /// Delete a 3D text label (created with Create3DTextLabel). /// The ID of the 3D text label to delete @@ -2070,9 +2070,9 @@ native Delete3DTextLabel(Text3D:id); /// Attach a 3D text label to a player. /// The ID of the 3D text label to attach. Returned by Create3DTextLabel /// The ID of the player to attach the label to -/// The X offset from the player -/// The Y offset from the player -/// The Z offset from the player +/// The x offset from the player +/// The y offset from the player +/// The z offset from the player /// /// /// @@ -2085,14 +2085,14 @@ native Delete3DTextLabel(Text3D:id); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player and/or label do not exist. /// -native Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ); +native Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:offsetX, Float:offsetY, Float:offsetZ); ///

    Attaches a 3D Text Label to a specific vehicle. /// The ID of the 3D text label to attach. Returned by Create3DTextLabel /// The vehicle you want to attach the 3D Text Label to -/// The Offset-X coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). -/// The Offset-Y coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). -/// The Offset-Z coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). +/// The offset-x coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). +/// The offset-y coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). +/// The offset-z coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). /// /// /// @@ -2101,7 +2101,7 @@ native Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:OffsetX, Float:Offse /// /// /// Attach3DTextLabelToPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions! -native Attach3DTextLabelToVehicle(Text3D:id, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ); +native Attach3DTextLabelToVehicle(Text3D:id, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ); /// Updates a 3D Text Label text and color. /// The 3D Text Label you want to update @@ -2124,12 +2124,12 @@ native Update3DTextLabelText(Text3D:id, color, const text[]); /// The player which should see the newly created 3DText Label /// The text to display /// The text color -/// X Coordinate (or offset if attached) -/// Y Coordinate (or offset if attached) -/// Z Coordinate (or offset if attached) -/// The distance where you are able to see the 3D Text Label -/// The player you want to attach the 3D Text Label to. (optional=INVALID_PLAYER_ID) -/// The vehicle you want to attach the 3D Text Label to. (optional=INVALID_VEHICLE_ID) +/// x Coordinate (or offset if attached) +/// y Coordinate (or offset if attached) +/// z Coordinate (or offset if attached) +/// The distance where you are able to see the 3D Text Label +/// The player you want to attach the 3D Text Label to. (optional=INVALID_PLAYER_ID) +/// The vehicle you want to attach the 3D Text Label to. (optional=INVALID_VEHICLE_ID) /// Test the line-of-sight so this text can't be seen through walls (optional=0) /// /// @@ -2142,7 +2142,7 @@ native Update3DTextLabelText(Text3D:id, color, const text[]); /// If is empty, the server/clients next to the text might crash! /// drawdistance seems to be a lot smaller when spectating. /// The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. -native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testLOS = 0); +native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], color, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayer = INVALID_PLAYER_ID, parentVehicle = INVALID_VEHICLE_ID, bool:testLOS = false); /// Destroy a 3D text label that was created using CreatePlayer3DTextLabel. /// The ID of the player whose 3D text label to delete @@ -2663,12 +2663,12 @@ forward OnVehicleDamageStatusUpdate(vehicleid, playerid); /// The ID of the vehicle that's position was updated /// The ID of the player that sent a vehicle position sync update /// The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats -/// The new X coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new Y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new Z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The new x coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new x velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The new y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The new z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version /// /// This callback was added in SA-MP 0.3c R3 and will not work in earlier versions! /// This callback is called very frequently per second per unoccupied vehicle. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. @@ -2942,14 +2942,14 @@ forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponi /// OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map (by right-clicking). /// The ID of the player that placed a target/waypoint -/// The X float coordinate where the player clicked -/// The Y float coordinate where the player clicked -/// The Z float coordinate where the player clicked (inaccurate - see note below) +/// The x float coordinate where the player clicked +/// The y float coordinate where the player clicked +/// The z float coordinate where the player clicked (inaccurate - see note below) /// /// /// /// This callback was added in SA-MP 0.3d and will not work in earlier versions! -/// The Z value returned will be 0 (invalid) if it is far away from the player; use the MapAndreas plugin to get a more accurate Z coordinate. +/// The z value returned will be 0 (invalid) if it is far away from the player; use the MapAndreas plugin to get a more accurate z coordinate. /// /// 1 - Will prevent other filterscripts from receiving this callback.

    /// 0 - Indicates that this callback will be passed to the next filterscript.

    @@ -3065,12 +3065,12 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, source); /// 0 if it is a global object or 1 if it is a playerobject /// The ID of the edited object /// The type of response -/// The X offset for the object that was edited -/// The Y offset for the object that was edited -/// The Z offset for the object that was edited -/// The X rotation for the object that was edited -/// The Y rotation for the object that was edited -/// The Z rotation for the object that was edited +/// The x offset for the object that was edited +/// The y offset for the object that was edited +/// The z offset for the object that was edited +/// The x rotation for the object that was edited +/// The y rotation for the object that was edited +/// The z rotation for the object that was edited /// /// /// @@ -3090,15 +3090,15 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, /// The index of the attached object /// The model of the attached object that was edited /// The bone of the attached object that was edited -/// The X offset for the attached object that was edited -/// The Y offset for the attached object that was edited -/// The Z offset for the attached object that was edited -/// The X rotation for the attached object that was edited -/// The Y rotation for the attached object that was edited -/// The Z rotation for the attached object that was edited -/// The X scale for the attached object that was edited -/// The Y scale for the attached object that was edited -/// The Z scale for the attached object that was edited +/// The x offset for the attached object that was edited +/// The y offset for the attached object that was edited +/// The z offset for the attached object that was edited +/// The x rotation for the attached object that was edited +/// The y rotation for the attached object that was edited +/// The z rotation for the attached object that was edited +/// The x scale for the attached object that was edited +/// The y scale for the attached object that was edited +/// The z scale for the attached object that was edited /// /// /// This callback was added in SA-MP 0.3e and will not work in earlier versions! @@ -3115,9 +3115,9 @@ forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, F /// The type of selection /// The ID of the selected object /// The model ID of the selected object -/// The X position of the selected object -/// The Y position of the selected object -/// The Z position of the selected object +/// The x position of the selected object +/// The y position of the selected object +/// The z position of the selected object /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// @@ -3132,9 +3132,9 @@ forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float: /// The ID of the weapon shot by the player /// The type of thing the shot hit (none, player, vehicle, or (player)object) /// The ID of the player, vehicle or object that was hit -/// The X coordinate that the shot hit -/// The Y coordinate that the shot hit -/// The Z coordinate that the shot hit +/// The x coordinate that the shot hit +/// The y coordinate that the shot hit +/// The z coordinate that the shot hit /// /// /// This callback was added in SA-MP 0.3z and will not work in earlier versions! diff --git a/a_sampdb.inc b/a_sampdb.inc index c716c16..d295d34 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -41,45 +41,45 @@ native db_close(DB:db); native DBResult:db_query(DB:db, const query[]); ///

    Frees result memory allocated from db_query. -/// The result to free +/// The result to free /// If DBResult:dbhandle is a valid handle, it returns 1, otherwise 0 if DBResult:dbhandle is a NULL reference. -native db_free_result(DBResult:dbresult); +native db_free_result(DBResult:result); /// Returns the number of rows from a db_query. -/// The result of db_query +/// The result of db_query /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// The number of rows in the result. -native db_num_rows(DBResult:dbresult); +native db_num_rows(DBResult:result); /// Moves to the next row of the result allocated from db_query. -/// The result of db_query +/// The result of db_query /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Returns 1 on success, otherwise 0 if DBResult:dbresult is a NULL reference or the last row is reached. -native db_next_row(DBResult:dbresult); +/// Returns 1 on success, otherwise 0 if DBResult:result is a NULL reference or the last row is reached. +native db_next_row(DBResult:result); /// Get the number of fields in a result. -/// The result of db_query +/// The result of db_query /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// The number of fields in the result. -native db_num_fields(DBResult:dbresult); +native db_num_fields(DBResult:result); /// Returns the name of a field at a particular index. -/// The result to get the data from; returned by db_query +/// The result to get the data from; returned by db_query /// The index of the field to get the name of -/// The result +/// The returned value /// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Returns 1, if the function was successful, otherwise 0 if DBResult:dbresult is a NULL reference or the column index not available. -native db_field_name(DBResult:dbresult, field, result[], size = sizeof (result)); +/// Returns 1, if the function was successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. +native db_field_name(DBResult:result, field, output[], size = sizeof (output)); /// Get the content of a field from db_query. -/// The result to get the data from +/// The result to get the data from /// The field to get the data from -/// The result +/// The returned value /// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Returns 1 if successful, otherwise 0 if DBResult:dbresult is a NULL reference or the column index not available. -native db_get_field(DBResult:dbresult, field, result[], size = sizeof (result)); +/// Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. +native db_get_field(DBResult:result, field, output[], size = sizeof (output)); /// Get the content of a field as an integer from db_query. /// The result to get the data from @@ -96,27 +96,27 @@ native db_get_field_int(DBResult:result, field = 0); native Float:db_get_field_float(DBResult:result, field = 0); /// Get the contents of field with specified name. -/// The result to get the data from +/// The result to get the data from /// The fieldname to get the data from -/// The result +/// The returned value /// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Returns 1 if successful, otherwise 0 if DBResult:dbresult is a NULL reference or the column index not available. -native db_get_field_assoc(DBResult:dbresult, const field[], result[], size = sizeof (result)); +/// Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. +native db_get_field_assoc(DBResult:result, const field[], output[], size = sizeof (output)); /// Get the contents of field as an integer with specified name. -/// The result to get the data from +/// The result to get the data from /// The fieldname to get the data from /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Retrieved value as integer (number). -native db_get_field_assoc_int(DBResult:dbresult, const field[]); +native db_get_field_assoc_int(DBResult:result, const field[]); /// Get the contents of field as a float with specified name. -/// The result to get the data from +/// The result to get the data from /// The fieldname to get the data from /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Retrieved value as floating point number. -native Float:db_get_field_assoc_float(DBResult:dbresult, const field[]); +native Float:db_get_field_assoc_float(DBResult:result, const field[]); /// Get memory handle for an SQLite database that was opened with db_open. /// The index of the database connection (returned by db_open) @@ -125,10 +125,10 @@ native Float:db_get_field_assoc_float(DBResult:dbresult, const field[]); native db_get_mem_handle(DB:db); /// Get memory handle for an SQLite query that was executed with db_query. -/// The index of the query (returned by db_query) +/// The index of the query (returned by db_query) /// This function was added in SA-MP 0.3.7 R1 and will not work in earlier versions! /// Returns the memory handle for a specified query. -native db_get_result_mem_handle(DBResult:dbresult); +native db_get_result_mem_handle(DBResult:result); native db_debug_openfiles(); native db_debug_openresults(); diff --git a/a_vehicles.inc b/a_vehicles.inc index defa3b8..00e79f7 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -51,9 +51,9 @@ /// Creates a vehicle in the world. Can be used in place of AddStaticVehicleEx at any time in the script. /// The model for the vehicle -/// The X coordinate for the vehicle -/// The Y coordinate for the vehicle -/// The Z coordinate for the vehicle +/// The x coordinate for the vehicle +/// The y coordinate for the vehicle +/// The z coordinate for the vehicle /// The facing angle for the vehicle /// The primary color ID /// The secondary color ID @@ -100,9 +100,9 @@ native IsVehicleStreamedIn(vehicleid, forplayerid); /// Gets the position of a vehicle. /// The ID of the vehicle to get the position of -/// A float variable in which to store the X coordinate, passed by reference -/// A float variable in which to store the Y coordinate, passed by reference -/// A float variable in which to store the Z coordinate, passed by reference +/// A float variable in which to store the x coordinate, passed by reference +/// A float variable in which to store the y coordinate, passed by reference +/// A float variable in which to store the z coordinate, passed by reference /// /// /// @@ -114,9 +114,9 @@ native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); /// Set a vehicle's position. /// Vehicle ID that you want set new position -/// The X coordinate to position the vehicle at -/// The Y coordinate to position the vehicle at -/// The Z coordinate to position the vehicle at +/// The x coordinate to position the vehicle at +/// The y coordinate to position the vehicle at +/// The z coordinate to position the vehicle at /// /// /// @@ -127,9 +127,9 @@ native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); ///
    native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); -/// Get the rotation of a vehicle on the Z axis (yaw). -/// The ID of the vehicle to get the Z angle of -/// A float variable in which to store the Z rotation, passed by reference +/// Get the rotation of a vehicle on the z axis (yaw). +/// The ID of the vehicle to get the z angle of +/// A float variable in which to store the z rotation, passed by reference /// /// /// @@ -162,7 +162,7 @@ native GetVehicleZAngle(vehicleid, &Float:z_angle); /// } /// ///
    -/// There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart from the Z angle) +/// There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart from the z angle) /// This function may return incorrect values for unoccupied vehicles. The reason is that the third row of the vehicle's internal rotation matrix gets corrupted if it gets updated while unoccupied. /// /// 1: The function executed successfully.

    @@ -172,21 +172,21 @@ native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z) ///

    This function can be used to calculate the distance (as a float) between a vehicle and another map coordinate. This can be useful to detect how far a vehicle away is from a location. /// The ID of the vehicle to calculate the distance for -/// The X map coordinate -/// The Y map coordinate -/// The Z map coordinate +/// The x map coordinate +/// The y map coordinate +/// The z map coordinate /// /// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// A float containing the distance from the point specified in the coordinates. -native Float:GetVehicleDistanceFromPoint(vehicleid, Float:X, Float:Y, Float:Z); +native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); -/// Set the Z rotation (yaw) of a vehicle. +/// Set the z rotation (yaw) of a vehicle. /// The ID of the vehicle to set the rotation of -/// The Z angle to set +/// The z angle to set /// /// -/// A vehicle's X and Y (pitch and roll) rotation will be reset when this function is used. The X and Y rotations can not be set. +/// A vehicle's x and y (pitch and roll) rotation will be reset when this function is used. The x and y rotations can not be set. /// This function does not work on unoccupied vehicles. /// /// 1: The function executed successfully.

    @@ -557,11 +557,11 @@ native GetVehicleComponentType(component); // Find CARMODTYPE_* for component id /// native RepairVehicle(vehicleid); // Repairs the damage model and resets the health -///

    Get the velocity of a vehicle on the X, Y and Z axes. +/// Get the velocity of a vehicle on the x, y and z axes. /// The ID of the vehicle to get the velocity of -/// A float variable in to which to store the vehicle's X velocity, passed by reference -/// A float variable in to which to store the vehicle's Y velocity, passed by reference -/// A float variable in to which to store the vehicle's Z velocity, passed by reference +/// A float variable in to which to store the vehicle's x velocity, passed by reference +/// A float variable in to which to store the vehicle's y velocity, passed by reference +/// A float variable in to which to store the vehicle's z velocity, passed by reference /// /// /// @@ -571,26 +571,26 @@ native RepairVehicle(vehicleid); // Repairs the damage model and resets the heal /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle specified does not exist.

    /// -native GetVehicleVelocity(vehicleid, &Float:X, &Float:Y, &Float:Z); +native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); -///

    Sets the X, Y and Z velocity of a vehicle. +/// Sets the x, y and z velocity of a vehicle. /// The ID of the vehicle to set the velocity of -/// The velocity in the X direction -/// The velocity in the Y direction -/// The velocity in the Z direction +/// The velocity in the x direction +/// The velocity in the y direction +/// The velocity in the z direction /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// This function has no affect on un-occupied vehicles and does not affect trains. /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle does not exist. /// -native SetVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z); +native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); -///

    Sets the angular X, Y and Z velocity of a vehicle. +/// Sets the angular x, y and z velocity of a vehicle. /// The ID of the vehicle to set the velocity of -/// The amount of velocity in the angular X direction -/// The amount of velocity in the angular Y direction -/// The amount of velocity in the angular Z direction +/// The amount of velocity in the angular x direction +/// The amount of velocity in the angular y direction +/// The amount of velocity in the angular z direction /// /// /// This function was added in SA-MP 0.3b and will not work in earlier versions! @@ -599,7 +599,7 @@ native SetVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle does not exist. /// -native SetVehicleAngularVelocity(vehicleid, Float:X, Float:Y, Float:Z); +native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); ///

    Retrieve the damage statuses of a vehicle. /// The ID of the vehicle to get the damage statuses of @@ -700,9 +700,9 @@ native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); /// Retrieve information about a specific vehicle model such as the size or position of seats. /// The vehicle model to get info of /// The type of information to retrieve -/// A float to store the X value -/// A float to store the Y value -/// A float to store the Z value +/// A float to store the x value +/// A float to store the y value +/// A float to store the z value /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// @@ -719,7 +719,7 @@ native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); ///
  • VEHICLE_MODEL_INFO_REAR_BUMPER_Z - height of the rear bumper
  • ///
/// -native GetVehicleModelInfo(vehiclemodel, infotype, &Float:X, &Float:Y, &Float:Z); +native GetVehicleModelInfo(vehiclemodel, infotype, &Float:x, &Float:y, &Float:z); // Virtual Worlds From 78ef1caaeeb0f410d9c3d59be7187e8c9214b84b Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 27 Apr 2021 22:47:04 +0100 Subject: [PATCH 004/104] `id` -> `ID` --- a_actor.inc | 66 ++--- a_npc.inc | 96 +++---- a_objects.inc | 228 +++++++-------- a_players.inc | 758 ++++++++++++++++++++++++------------------------- a_samp.inc | 724 +++++++++++++++++++++++----------------------- a_vehicles.inc | 224 +++++++-------- 6 files changed, 1048 insertions(+), 1048 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 0716b34..89c6f89 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -15,7 +15,7 @@ #pragma tabsize 4 /// 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. -/// The model ID (skin ID) the actor should have +/// The model ID (skin ID) the actor should have /// The x coordinate to create the actor at /// The y coordinate to create the actor at /// The z coordinate to create the actor at @@ -52,29 +52,29 @@ /// The created Actor ID (start at 0).

/// INVALID_ACTOR_ID (65535) If the actor limit (1000) is reached. /// -native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); +native CreateActor(modelID, Float:x, Float:y, Float:z, Float:angle); ///

Destroy an actor which was created with CreateActor. -/// The ID of the actor to destroy. Returned by CreateActor +/// The ID of the actor to destroy. Returned by CreateActor /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.

/// 0: The function failed to execute. The actor with the ID specified does not exist. /// -native DestroyActor(actorid); +native DestroyActor(actorID); ///

Checks if an actor is streamed in for a player. -/// The ID of the actor -/// The ID of the player +/// The ID of the actor +/// The ID of the player /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 if the actor is streamed in for the player, or 0 if it is not. -native IsActorStreamedIn(actorid, forplayerid); +native IsActorStreamedIn(actorID, forplayerID); /// Set the virtual world of an actor. Only players in the same world will see the actor. -/// The ID of the actor (returned by CreateActor) to set the virtual world of +/// The ID of the actor (returned by CreateActor) to set the virtual world of /// The virtual world to put the actor ID /// /// @@ -83,17 +83,17 @@ native IsActorStreamedIn(actorid, forplayerid); /// 1: The function executed successfully.

/// 0: The function failed to execute. The actor specified does not exist. /// -native SetActorVirtualWorld(actorid, vworld); +native SetActorVirtualWorld(actorID, vworld); ///

Get the virtual world of an actor. -/// The ID of the actor to get the virtual world of +/// The ID of the actor to get the virtual world of /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The virtual world of the actor. By default this is 0. Also returns 0 if actor specified does not exist. -native GetActorVirtualWorld(actorid); +native GetActorVirtualWorld(actorID); /// Apply an animation to an actor. -/// The ID of the actor to apply the animation to +/// The ID of the actor to apply the animation to /// The animation library from which to apply an animation /// The name of the animation to apply, within the specified library /// The speed to play the animation (use 4.1) @@ -109,20 +109,20 @@ native GetActorVirtualWorld(actorid); /// 1: The function executed successfully.

/// 0: The function failed to execute. The actor specified does not exist. /// -native ApplyActorAnimation(actorid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); +native ApplyActorAnimation(actorID, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); ///

Clear any animations applied to an actor. -/// The ID of the actor (returned by CreateActor) to clear the animations for +/// The ID of the actor (returned by CreateActor) to clear the animations for /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.

/// 0: The function failed to execute. The actor specified does not exist. /// -native ClearActorAnimations(actorid); +native ClearActorAnimations(actorID); ///

Set the position of an actor. -/// The ID of the actor to set the position of. Returned by CreateActor +/// The ID of the actor to set the position of. Returned by CreateActor /// The x coordinate to position the actor at /// The y coordinate to position the actor at /// The z coordinate to position the actor at @@ -134,10 +134,10 @@ native ClearActorAnimations(actorid); /// 1: The function executed successfully.

/// 0: The function failed to execute. The actor specified does not exist. /// -native SetActorPos(actorid, Float:x, Float:y, Float:z); +native SetActorPos(actorID, Float:x, Float:y, Float:z); ///

Get the position of an actor. -/// The ID of the actor to get the position of. Returned by CreateActor +/// The ID of the actor to get the position of. Returned by CreateActor /// A float variable, passed by reference, in which to store the x coordinate of the actor /// A float variable, passed by reference, in which to store the y coordinate of the actor /// A float variable, passed by reference, in which to store the z coordinate of the actor @@ -147,10 +147,10 @@ native SetActorPos(actorid, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

/// 0: The function failed to execute. The actor specified does not exist.

/// -native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); +native GetActorPos(actorID, &Float:x, &Float:y, &Float:z); ///

Set the facing angle of an actor. -/// The ID of the actor to set the facing angle of. Returned by CreateActor +/// The ID of the actor to set the facing angle of. Returned by CreateActor /// The facing angle to set for the actor /// /// @@ -161,10 +161,10 @@ native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); /// 1: The function executed successfully.

/// 0: The function failed to execute. The actor specified does not exist. /// -native SetActorFacingAngle(actorid, Float:ang); +native SetActorFacingAngle(actorID, Float:ang); ///

Get the facing angle of an actor. -/// The ID of the actor to get the facing angle of. Returned by CreateActor +/// The ID of the actor to get the facing angle of. Returned by CreateActor /// A float variable, passed by reference, in to which the actor's facing angle will be stored /// /// @@ -173,30 +173,30 @@ native SetActorFacingAngle(actorid, Float:ang); /// 1: The function executed successfully.

/// 0: The function failed to execute. The actor specified does not exist. /// -native GetActorFacingAngle(actorid, &Float:ang); +native GetActorFacingAngle(actorID, &Float:ang); ///

Set the health of an actor. -/// The ID of the actor to set the health of +/// The ID of the actor to set the health of /// The value to set the actors's health to /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1 on success.

/// 0 on failure (i.e. actor is not created). /// -native SetActorHealth(actorid, Float:health); +native SetActorHealth(actorID, Float:health); ///

Get the health of an actor. -/// The ID of the actor to get the health of +/// The ID of the actor to get the health of /// A float variable, passed by reference, in to which to store the actor's health /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1 - success.

/// 0 - failure (i.e. actor is not created).

/// -native GetActorHealth(actorid, &Float:health); +native GetActorHealth(actorID, &Float:health); ///

Toggle an actor's invulnerability. -/// The ID of the actor to set invulnerability +/// The ID of the actor to set invulnerability /// false to make them vulnerable, true to make them invulnerable (optional=true) /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// Once set invulnerable, the actor does not call OnPlayerGiveDamageActor. @@ -205,20 +205,20 @@ native GetActorHealth(actorid, &Float:health); /// 1 - Success.

/// 0 - Failure (i.e. Actor is not created). /// -native SetActorInvulnerable(actorid, invulnerable = true); +native SetActorInvulnerable(actorID, invulnerable = true); ///

Check if an actor is invulnerable. -/// The ID of the actor to check +/// The ID of the actor to check /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 if the actor is invulnerable, 0 otherwise. -native IsActorInvulnerable(actorid); +native IsActorInvulnerable(actorID); /// Checks if an actor ID is valid. -/// The ID of the actor to check +/// The ID of the actor to check /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 if the actor is valid, 0 if not. -native IsValidActor(actorid); +native IsValidActor(actorID); diff --git a/a_npc.inc b/a_npc.inc index f1d183c..850e49a 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -312,11 +312,11 @@ native format(output[], len = sizeof (output), const format[], {Float,_}:...); native SetTimer(const funcname[], interval, repeating); /// Kills (stops) a running timer. -/// The ID of the timer to kill (returned by SetTimer or SetTimerEx) +/// The ID of the timer to kill (returned by SetTimer or SetTimerEx) /// /// /// This function always returns 0. -native KillTimer(timerid); +native KillTimer(timerID); /// Returns the uptime of the actual server (not the SA-MP server) in milliseconds. /// @@ -365,7 +365,7 @@ native SendChat(const msg[]); native SendCommand(const commandtext[]); /// Get a player's current state. -/// The ID of the player to get the current state of +/// The ID of the player to get the current state of /// /// /// @@ -385,10 +385,10 @@ native SendCommand(const commandtext[]); /// /// /// The player's current state as an integer. -native GetPlayerState(playerid); +native GetPlayerState(playerID); /// Get the position of a player, represented by x, y and z coordinates. -/// The ID of the player to get the position of +/// The ID of the player to get the position of /// A float variable in which to store the x coordinate in, passed by reference /// A float variable in which to store the y coordinate in, passed by reference /// A float variable in which to store the z coordinate in, passed by reference @@ -398,44 +398,44 @@ native GetPlayerState(playerid); /// /// This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. /// true on success, false on failure (i.e. player not connected). -native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); +native GetPlayerPos(playerID, &Float:x, &Float:y, &Float:z); -/// This function gets the ID of the vehicle the player is currently in. Note: NOT the model id of the vehicle. See GetVehicleModel for that. -/// The ID of the player in the vehicle that you want to get the ID of +/// This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. +/// The ID of the player in the vehicle that you want to get the ID of /// /// /// /// /// ID of the vehicle or 0 if not in a vehicle. -native GetPlayerVehicleID(playerid); -native GetPlayerArmedWeapon(playerid); +native GetPlayerVehicleID(playerID); +native GetPlayerArmedWeapon(playerID); -native GetPlayerHealth(playerid); -native GetPlayerArmour(playerid); +native GetPlayerHealth(playerID); +native GetPlayerArmour(playerID); /// Retrieves a player's current special action. -/// The ID of the player to get the special action of +/// The ID of the player to get the special action of /// /// /// The special action of the player. -native GetPlayerSpecialAction(playerid); +native GetPlayerSpecialAction(playerID); /// Checks if a player is streamed in for an NPC. Only nearby players are streamed in. -/// The ID of the player to check +/// The ID of the player to check /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is streamed in, 0 if not. -native IsPlayerStreamedIn(playerid); +native IsPlayerStreamedIn(playerID); /// Checks if a vehicle is streamed in for an NPC. Only nearby vehicles are streamed in. -/// The ID of the vehicle to check +/// The ID of the vehicle to check /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the vehicle is streamed in, 0 if not. -native IsVehicleStreamedIn(vehicleid); +native IsVehicleStreamedIn(vehicleID); /// Check which keys a player is pressing. -/// The ID of the player to get the keys of +/// The ID of the player to get the keys of /// Bitmask containing the player's key states. List of keys /// Up/down state /// Left/right state @@ -443,14 +443,14 @@ native IsVehicleStreamedIn(vehicleid); /// Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). /// As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. /// The keys are stored in the specified variables. -native GetPlayerKeys(playerid, &keys, &updown, &leftright); +native GetPlayerKeys(playerID, &keys, &updown, &leftright); /// Gets the angle a player is facing. -/// The player you want to get the angle of +/// The player you want to get the angle of /// The Float to store the angle in, passed by reference /// Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. /// Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. -native GetPlayerFacingAngle(playerid, &Float:ang); +native GetPlayerFacingAngle(playerID, &Float:ang); /// Get the current location of the NPC. /// A float to save the x coordinate, passed by reference @@ -495,7 +495,7 @@ native SetMyFacingAngle(Float:ang); native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); /// Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. -/// The ID of the player +/// The ID of the player /// The furthest distance the player can be from the point to be in range /// The x coordinate of the point to check the range to /// The y coordinate of the point to check the range to @@ -505,10 +505,10 @@ native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is in range, 0 if not. -native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); +native IsPlayerInRangeOfPoint(playerID, Float:range, Float:x, Float:y, Float:z); /// Get a player's name. -/// The ID of the player to get the name of +/// The ID of the player to get the name of /// An array into which to store the name, passed by reference /// The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME /// @@ -518,16 +518,16 @@ native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); /// /// A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. /// The length of the player's name. 0 if player specified doesn't exist. -native GetPlayerName(playerid, name[], len = sizeof (name)); +native GetPlayerName(playerID, name[], len = sizeof (name)); /// Checks if a player is connected (if an ID is taken by a connected player). -/// The ID of the player to check +/// The ID of the player to check /// /// /// /// This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. /// 1 if the player is connected, 0 if not. -native IsPlayerConnected(playerid); +native IsPlayerConnected(playerID); /// This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. /// The type of recording to be loaded @@ -566,12 +566,12 @@ forward OnNPCModeInit(); forward OnNPCModeExit(); /// Gets called when a NPC successfully connects to the server. -/// The playerid the NPC has been given +/// The playerID the NPC has been given /// /// /// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnNPCConnect(myplayerid); +forward OnNPCConnect(myplayerID); /// Gets called when the NPC gets disconnected from the server. /// The reason why the bot has disconnected from the server @@ -586,11 +586,11 @@ forward OnNPCDisconnect(reason[]); forward OnNPCSpawn(); /// Gets called when a NPC enters a vehicle. -/// The vehicleid from the Vehicle the NPC enters -/// The seatid the NPC uses +/// The vehicleID from the Vehicle the NPC enters +/// The seatID the NPC uses /// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnNPCEnterVehicle(vehicleid, seatid); +forward OnNPCEnterVehicle(vehicleID, seatID); /// Gets called when a NPC leaves a vehicle. /// @@ -598,42 +598,42 @@ forward OnNPCEnterVehicle(vehicleid, seatid); forward OnNPCExitVehicle(); /// This callback gets called whenever the NPC sees a ClientMessage. This will be everytime a SendClientMessageToAll function is used and everytime a SendClientMessage function is sent towards the NPC. This callback won't be called when someone says something. For a version of this with player text, see OnPlayerText. -/// The color the ClientMessage is +/// The colour the ClientMessage is /// The actual message /// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnClientMessage(color, text[]); +forward OnClientMessage(colour, text[]); /// Just as the player version of the callback, this callback is called when any player dies. -/// The player who has died +/// The player who has died /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnPlayerDeath(playerid); +forward OnPlayerDeath(playerID); /// Opposed to the player version of this callback, this callback is called everytime anyone says anything in the chat. This includes any player, any other NPC, or the same NPC himself. -/// The player who has written something in the chat -/// The text written by playerid +/// The player who has written something in the chat +/// The text written by playerID /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnPlayerText(playerid, text[]); +forward OnPlayerText(playerID, text[]); /// This callback is called when a player is streamed in for an NPC. Only nearby players are streamed in. -/// The ID of the player that is now streamed in for the NPC +/// The ID of the player that is now streamed in for the NPC /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnPlayerStreamIn(playerid); +forward OnPlayerStreamIn(playerID); /// This callback is called when a player is streamed out the NPC. -/// The player who has been destreamed +/// The player who has been destreamed /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnPlayerStreamOut(playerid); +forward OnPlayerStreamOut(playerID); /// This callback is called when a vehicle is streamed by the NPC. A simpler definition would be when the NPC sees the grey vehicle icon appear on his map. -/// The vehicle that has been streamed +/// The vehicle that has been streamed /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnVehicleStreamIn(vehicleid); +forward OnVehicleStreamIn(vehicleID); /// This callback is called when a vehicle is streamed out for an NPC. -/// The vehicle that was streamed out +/// The vehicle that was streamed out /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnVehicleStreamOut(vehicleid); +forward OnVehicleStreamOut(vehicleID); /// This callback is called when a recorded file being reproduced with StartRecordingPlayback has reached to its end. /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! diff --git a/a_objects.inc b/a_objects.inc index a39db91..eab0c83 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -40,7 +40,7 @@ // Objects /// Creates an object at specified coordinates in the game world. -/// The model to create +/// The model to create /// The x coordinate to create the object at /// The y coordinate to create the object at /// The z coordinate to create the object at @@ -66,11 +66,11 @@ /// In case the light is attached to another object, one fix for this is to set SyncRotation to false in AttachObjectToObject. This will ensure the light stays at 0 rotation. This would only really work for objects that consist ONLY of light, so wouldn't work for the police light for example. /// There is a limit of 1000 objects (MAX_OBJECTS). To circumvent this limit, you can use a streamer /// The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. -native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); +native CreateObject(modelID, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); /// Attach an object to a vehicle. -/// The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first -/// The ID of the vehicle to attach the object to +/// The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first +/// The ID of the vehicle to attach the object to /// The x axis offset from the vehicle to attach the object to /// The y axis offset from the vehicle to attach the object to /// The z axis offset from the vehicle to attach the object to @@ -84,18 +84,18 @@ native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rX, Float:rY, Floa /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// The object must be created first. /// When the vehicle is destroyed or respawned, the attached objects won't be destroyed with it; they will remain stationary at the position the vehicle disappeared and be reattached to the next vehicle to claim the vehicle ID that the objects were attached to. -native AttachObjectToVehicle(objectid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +native AttachObjectToVehicle(objectID, vehicleID, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// You can use this function to attach objects to other objects. The objects will folow the main object. -/// The object to attach to another object -/// The object to attach the object to +/// The object to attach to another object +/// The object to attach the object to /// The distance between the main object and the object in the x direction /// The distance between the main object and the object in the y direction /// The distance between the main object and the object in the z direction /// The x rotation between the object and the main object /// The y rotation between the object and the main object /// The z rotation between the object and the main object -/// If set to 0, objectid's rotation will not change with 's (optional=1) +/// If set to 0, objectID's rotation will not change with 's (optional=1) /// /// /// @@ -108,13 +108,13 @@ native AttachObjectToVehicle(objectid, vehicleid, Float:offsetX, Float:offsetY, /// /// /// 1: The function executed successfully.

-/// 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. +/// 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. /// -native AttachObjectToObject(objectid, attachtoid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); +native AttachObjectToObject(objectID, attachtoID, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); ///

Attach an object to a player. -/// The ID of the object to attach to the player -/// The ID of the player to attach the object to +/// The ID of the object to attach to the player +/// The ID of the player to attach the object to /// The distance between the player and the object in the x direction /// The distance between the player and the object in the y direction /// The distance between the player and the object in the z direction @@ -127,10 +127,10 @@ native AttachObjectToObject(objectid, attachtoid, Float:offsetX, Float:offsetY, /// /// /// This function always returns 0. -native AttachObjectToPlayer(objectid, playerid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +native AttachObjectToPlayer(objectID, playerID, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// Change the position of an object. -/// The ID of the object to set the position of. Returned by CreateObject +/// The ID of the object to set the position of. Returned by CreateObject /// The x coordinate to position the object at /// The y coordinate to position the object at /// The z coordinate to position the object at @@ -139,10 +139,10 @@ native AttachObjectToPlayer(objectid, playerid, Float:offsetX, Float:offsetY, Fl /// /// /// This function always returns 1, even if the object specified does not exist. -native SetObjectPos(objectid, Float:x, Float:y, Float:z); +native SetObjectPos(objectID, Float:x, Float:y, Float:z); /// Get the position of an object. -/// The ID of the object to get the position of. +/// The ID of the object to get the position of. /// A variable in which to store the x coordinate, passed by reference /// A variable in which to store the y coordinate, passed by reference /// A variable in which to store the z coordinate, passed by reference @@ -154,10 +154,10 @@ native SetObjectPos(objectid, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

/// 0: The function failed to execute. The specified object does not exist. /// -native GetObjectPos(objectid, &Float:x, &Float:y, &Float:z); +native GetObjectPos(objectID, &Float:x, &Float:y, &Float:z); ///

Set the rotation of an object on the three axes (x, y and z). -/// The ID of the object to set the rotation of +/// The ID of the object to set the rotation of /// The x rotation /// The y rotation /// The z rotation @@ -166,10 +166,10 @@ native GetObjectPos(objectid, &Float:x, &Float:y, &Float:z); /// /// /// This function always returns 1, even if the object doesn't exist. -native SetObjectRot(objectid, Float:rotX, Float:rotY, Float:rotZ); +native SetObjectRot(objectID, Float:rotX, Float:rotY, Float:rotZ); /// Use this function to get the objects current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. -/// The objectid of the object you want to get the rotation from +/// The objectID of the object you want to get the rotation from /// The variable to store the x rotation, passed by reference /// The variable to store the y rotation, passed by reference /// The variable to store the z rotation, passed by reference @@ -178,18 +178,18 @@ native SetObjectRot(objectid, Float:rotX, Float:rotY, Float:rotZ); /// /// /// The object's rotation is stored in the referenced variables, not in the return value. -native GetObjectRot(objectid, &Float:rotX, &Float:rotY, &Float:rotZ); +native GetObjectRot(objectID, &Float:rotX, &Float:rotY, &Float:rotZ); /// Get the model ID of an object. -/// The ID of the object to get the model of +/// The ID of the object to get the model of /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The model ID of the object. -1 if does not exist. -native GetObjectModel(objectid); +/// The model ID of the object. -1 if does not exist. +native GetObjectModel(objectID); /// Disable collisions between players' cameras and the specified object. -/// The ID of the object to disable camera collisions on +/// The ID of the object to disable camera collisions on /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! @@ -198,26 +198,26 @@ native GetObjectModel(objectid); /// 1: The function executed successfully.

/// 0: The function failed to execute. The object specified does not exist. /// -native SetObjectNoCameraCol(objectid); +native SetObjectNoCameraCol(objectID); ///

Checks if an object with the ID provided exists. -/// The ID of the object to check the existence of +/// The ID of the object to check the existence of /// /// /// /// This is to check if an object exists, not if a model is valid. /// 1 if the object exists, 0 if not. -native IsValidObject(objectid); +native IsValidObject(objectID); /// Destroys (removes) an object that was created using CreateObject. -/// The ID of the object to destroy. Returned by CreateObject +/// The ID of the object to destroy. Returned by CreateObject /// /// /// -native DestroyObject(objectid); +native DestroyObject(objectID); /// Move an object to a new position with a set speed. Players/vehicles will 'surf' the object as it moves. -/// The ID of the object to move +/// The ID of the object to move /// The x coordinate to move the object to /// The y coordinate to move the object to /// The z coordinate to move the object to @@ -235,29 +235,29 @@ native DestroyObject(objectid); /// This function can be used to make objects rotate smoothly. In order to achieve this however, the object must also be moved. The specified rotation is the rotation the object will have after the movement. Hence the object will not rotate when no movement is applied. For a script example take a look at the ferriswheel.pwn filterscript made by Kye included in the server package (SA-MP 0.3d and above). /// To fully understand the above note, you can (but not limited to) increase the z position by (+0.001) and then (-0.001) after moving it again, as not changing the x, y or z will not rotate the object. /// The time it will take for the object to move in milliseconds. -native MoveObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); +native MoveObject(objectID, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); /// Stop a moving object after MoveObject has been used. -/// The ID of the object to stop moving +/// The ID of the object to stop moving /// /// /// /// -native StopObject(objectid); +native StopObject(objectID); -/// Checks if the given objectid is moving. -/// The objectid you want to check if is moving +/// Checks if the given objectID is moving. +/// The objectID you want to check if is moving /// /// /// /// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// 1 if the object is moving, 0 if not. -native IsObjectMoving(objectid); +native IsObjectMoving(objectID); /// Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical User Interface). -/// The ID of the player that should edit the object -/// The ID of the object to be edited by the player +/// The ID of the player that should edit the object +/// The ID of the object to be edited by the player /// /// /// @@ -268,11 +268,11 @@ native IsObjectMoving(objectid); /// 1: The function executed successfully. Success is reported when a non-existent object is specified, but nothing will happen.

/// 0: The function failed to execute. The player is not connected. /// -native EditObject(playerid, objectid); +native EditObject(playerID, objectID); ///

Allows players to edit a player-object (position and rotation) with a GUI and their mouse. -/// The ID of the player that should edit the object -/// The object to be edited by the player +/// The ID of the player that should edit the object +/// The object to be edited by the player /// /// /// @@ -283,30 +283,30 @@ native EditObject(playerid, objectid); /// 1: The function executed successfully.

/// 0: The function failed to execute. Player or object not valid. /// -native EditPlayerObject(playerid, objectid); +native EditPlayerObject(playerID, objectID); ///

Display the cursor and allow the player to select an object. OnPlayerSelectObject is called when the player selects an object. -/// The ID of the player that should be able to select the object +/// The ID of the player that should be able to select the object /// /// /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! -native SelectObject(playerid); +native SelectObject(playerID); /// Cancel object edition mode for a player. -/// The ID of the player to cancel edition for +/// The ID of the player to cancel edition for /// /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! -native CancelEdit(playerid); +native CancelEdit(playerID); /// Creates an object which will be visible to only one player. -/// The ID of the player to create the object for -/// The model to create +/// The ID of the player to create the object for +/// The model to create /// The x coordinate to create the object at /// The y coordinate to create the object at /// The z coordinate to create the object at @@ -327,12 +327,12 @@ native CancelEdit(playerid); /// /// The 'DrawDistance' parameter was added in 0.3b. It must be left out in scripts for older versions of SA:MP. /// The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. -native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); +native CreatePlayerObject(playerID, modelID, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); /// Attach a player object to a vehicle. -/// The ID of the player the object was created for -/// The ID of the object to attach to the vehicle -/// The ID of the vehicle to attach the object to +/// The ID of the player the object was created for +/// The ID of the object to attach to the vehicle +/// The ID of the vehicle to attach the object to /// The x position offset for attachment /// The y position offset for attachment /// The z position offset for attachment @@ -344,11 +344,11 @@ native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rX /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You need to create the object before attempting to attach it to a vehicle. -native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +native AttachPlayerObjectToVehicle(playerID, objectID, vehicleID, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// Sets the position of a player-object to the specified coordinates. -/// The ID of the player whose player-object to set the position of -/// The ID of the player-object to set the position of. Returned by CreatePlayerObject +/// The ID of the player whose player-object to set the position of +/// The ID of the player-object to set the position of. Returned by CreatePlayerObject /// The x coordinate to put the object at /// The y coordinate to put the object at /// The z coordinate to put the object at @@ -360,11 +360,11 @@ native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:offsetX, /// 1: The function executed successfully.

/// 0: The function failed to execute. Player and/or object do not exist. /// -native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); +native SetPlayerObjectPos(playerID, objectID, Float:x, Float:y, Float:z); ///

Get the position of a player object (CreatePlayerObject). -/// The ID of the player whose player object to get the position of -/// The object's id of which you want the current location +/// The ID of the player whose player object to get the position of +/// The object's ID of which you want the current location /// A float variable in which to store the x coordinate, passed by reference /// A float variable in which to store the y coordinate, passed by reference /// A float variable in which to store the z coordinate, passed by reference @@ -378,11 +378,11 @@ native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); /// 0: The function failed to execute. The player and/or the object don't exist.

/// The object's position is stored in the specified variables. /// -native GetPlayerObjectPos(playerid, objectid, &Float:x, &Float:y, &Float:z); +native GetPlayerObjectPos(playerID, objectID, &Float:x, &Float:y, &Float:z); ///

Set the rotation of an object on the x, y and z axis. -/// The ID of the player whose player-object to rotate -/// The ID of the player-object to rotate +/// The ID of the player whose player-object to rotate +/// The ID of the player-object to rotate /// The x rotation to set /// The y rotation to set /// The z rotation to set @@ -395,11 +395,11 @@ native GetPlayerObjectPos(playerid, objectid, &Float:x, &Float:y, &Float:z); /// 1: The function executed successfully.

/// 0: The function failed to execute. /// -native SetPlayerObjectRot(playerid, objectid, Float:rotX, Float:rotY, Float:rotZ); +native SetPlayerObjectRot(playerID, objectID, Float:rotX, Float:rotY, Float:rotZ); ///

Use this function to get the object's current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. -/// The player you associated this object to -/// The objectid of the object you want to get the rotation from +/// The player you associated this object to +/// The objectID of the object you want to get the rotation from /// The variable to store the x rotation, passed by reference /// The variable to store the y rotation, passed by reference /// The variable to store the z rotation, passed by reference @@ -408,47 +408,47 @@ native SetPlayerObjectRot(playerid, objectid, Float:rotX, Float:rotY, Float:rotZ /// /// /// The object's rotation is stored in the specified variables. -native GetPlayerObjectRot(playerid, objectid, &Float:rotX, &Float:rotY, &Float:rotZ); +native GetPlayerObjectRot(playerID, objectID, &Float:rotX, &Float:rotY, &Float:rotZ); /// Retrieve the model ID of a player-object. -/// The ID of the player whose player-object to get the model of -/// The ID of the player-object of which to retrieve the model ID +/// The ID of the player whose player-object to get the model of +/// The ID of the player-object of which to retrieve the model ID /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The model ID of the player object. If the player or object don't exist, it will return -1 or 0 if the player or object does not exist. -native GetPlayerObjectModel(playerid, objectid); +native GetPlayerObjectModel(playerID, objectID); /// Toggles a player object camera collision. -/// The playerID the object belongs to -/// The ID of the object you want to toggle +/// The playerID the object belongs to +/// The ID of the object you want to toggle /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). /// 1 regardless of if the object exists or not. -native SetPlayerObjectNoCameraCol(playerid, objectid); +native SetPlayerObjectNoCameraCol(playerID, objectID); /// Checks if the given object ID is valid for the given player. -/// The ID of the player whose player-object to validate -/// The ID of the object to validate +/// The ID of the player whose player-object to validate +/// The ID of the object to validate /// /// /// /// 1 if the object exists, 0 if not. -native IsValidPlayerObject(playerid, objectid); +native IsValidPlayerObject(playerID, objectID); /// Destroy a player-object created using CreatePlayerObject. -/// The ID of the player whose player-object to destroy -/// The ID of the player-object to destroy. Returned by CreatePlayerObject +/// The ID of the player whose player-object to destroy +/// The ID of the player-object to destroy. Returned by CreatePlayerObject /// /// /// -native DestroyPlayerObject(playerid, objectid); +native DestroyPlayerObject(playerID, objectID); /// Move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects. -/// The ID of the player whose player-object to move -/// The ID of the object to move +/// The ID of the player whose player-object to move +/// The ID of the object to move /// The x coordinate to move the object to /// The y coordinate to move the object to /// The z coordinate to move the object to @@ -465,32 +465,32 @@ native DestroyPlayerObject(playerid, objectid); /// /// 0.3d R2 and older versions do not have the rotational parameters. /// The time it will take for the object to move in milliseconds. -native MovePlayerObject(playerid, objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); +native MovePlayerObject(playerID, objectID, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); /// Stop a moving player-object after MovePlayerObject has been used. -/// The ID of the player whose player-object to stop -/// The ID of the player-object to stop +/// The ID of the player whose player-object to stop +/// The ID of the player-object to stop /// /// /// /// -native StopPlayerObject(playerid, objectid); +native StopPlayerObject(playerID, objectID); -/// Checks if the given player objectid is moving. -/// The ID of the player whose player-object is checked -/// The player objectid you want to check if is moving +/// Checks if the given player objectID is moving. +/// The ID of the player whose player-object is checked +/// The player objectID you want to check if is moving /// /// /// /// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// 1 if the player object is moving, 0 if not. -native IsPlayerObjectMoving(playerid, objectid); +native IsPlayerObjectMoving(playerID, objectID); /// The same as AttachObjectToPlayer but for objects which were created for player. -/// The id of the player which is linked with the object -/// The objectid you want to attach to the player -/// The id of the player you want to attach to the object +/// The ID of the player which is linked with the object +/// The objectID you want to attach to the player +/// The ID of the player you want to attach to the object /// The distance between the player and the object in the x direction /// The distance between the player and the object in the y direction /// The distance between the player and the object in the z direction @@ -502,54 +502,54 @@ native IsPlayerObjectMoving(playerid, objectid); /// /// /// This function was removed in SA-MP 0.3. -native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rX, Float:rY, Float:rZ); +native AttachPlayerObjectToPlayer(objectplayer, objectID, attachplayer, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rX, Float:rY, Float:rZ); /// Replace the texture of an object with the texture from another model in the game. -/// The ID of the object to change the texture of +/// The ID of the object to change the texture of /// The material index on the object to change (0 to 15) -/// The modelid on which the replacement texture is located. Use 0 for alpha. Use -1 to change the material color without altering the texture +/// The modelID on which the replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the texture /// The name of the txd file which contains the replacement texture (use "none" if not required) /// The name of the texture to use as the replacement (use "none" if not required) -/// The object color to set, as an integer or hex in ARGB color format. Using 0 keeps the existing material color (optional=0) +/// The object colour to set, as an integer or hex in ARGB colour format. Using 0 keeps the existing material colour (optional=0) /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// Vertex lightning of the object will disappear if material color is changed. +/// Vertex lightning of the object will disappear if material colour is changed. /// /// 1: The function executed successfully.

/// 0: The function failed to execute. /// -native SetObjectMaterial(objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor = 0); +native SetObjectMaterial(objectID, materialindex, modelID, const txdname[], const texturename[], materialColour = 0); ///

Replace the texture of a player-object with the texture from another model in the game. -/// The ID of the player the object is associated to -/// The ID of the object to replace the texture of +/// The ID of the player the object is associated to +/// The ID of the object to replace the texture of /// The material index on the object to change (0 to 15) -/// The modelid on which replacement texture is located. Use 0 for alpha. Use -1 to change the material color without altering the existing texture +/// The modelID on which replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the existing texture /// The name of the txd file which contains the replacement texture (use "none" if not required) /// The name of the texture to use as the replacement (use "none" if not required) -/// The object color to set (ARGB). Using 0 keeps the existing material color (optional=0) +/// The object colour to set (ARGB). Using 0 keeps the existing material colour (optional=0) /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// Vertex lightning of the object will disappear if material color is changed. -native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor = 0); +/// Vertex lightning of the object will disappear if material colour is changed. +native SetPlayerObjectMaterial(playerID, objectID, materialindex, modelID, const txdname[], const texturename[], materialColour = 0); /// Replace the texture of an object with text. -/// The ID of the object to replace the texture of with text +/// The ID of the object to replace the texture of with text /// The text to show on the object. (MAX 2048 characters) /// The object's material index to replace with text (optional=0) /// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) /// The font to use (optional="Arial") /// The size of the text (MAX 255) (optional=24) /// Bold text. Set to 1 for bold, 0 for not (optional=1) -/// The color of the text, in ARGB format (optional=-1) -/// The background color, in ARGB format (optional=0) +/// The colour of the text, in ARGB format (optional=-1) +/// The background colour, in ARGB format (optional=0) /// The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// Color embedding can be used for multiple colors in the text. +/// Color embedding can be used for multiple colours in the text. /// /// Alignment:

///

    @@ -581,24 +581,24 @@ native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, const /// 1: The function executed successfully.

    /// 0: The function failed to execute. /// -native SetObjectMaterialText(objectid, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0); +native SetObjectMaterialText(objectID, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backColour = 0, textalignment = 0); ///

    Replace the texture of a player object with text. -/// The ID of the player whose player object to set the text of -/// The ID of the object on which to place the text +/// The ID of the player whose player object to set the text of +/// The ID of the object on which to place the text /// The text to set /// The material index to replace with text (optional=0) /// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) /// The font to use (optional="Arial") /// The size of the text (MAX 255) (optional=24) /// Bold text. Set to 1 for bold, 0 for not (optional=1) -/// The color of the text (optional=-1) -/// The background color (optional=0) +/// The colour of the text (optional=-1) +/// The background colour (optional=0) /// The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// Color embedding can be used for multiple colors in the text. +/// Color embedding can be used for multiple colours in the text. /// /// Alignment:

    ///

      @@ -626,7 +626,7 @@ native SetObjectMaterialText(objectid, const text[], materialindex = 0, material ///
    • OBJECT_MATERIAL_SIZE_512x512 140
    • ///
    ///
    -native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0); +native SetPlayerObjectMaterialText(playerID, objectID, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backColour = 0, textalignment = 0); /// Allows camera collisions with newly created objects to be disabled by default. /// 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) diff --git a/a_players.inc b/a_players.inc index 54c0a75..affff23 100644 --- a/a_players.inc +++ b/a_players.inc @@ -96,7 +96,7 @@ // Player /// This function can be used to change the spawn information of a specific player. It allows you to automatically set someone's spawn weapons, their team, skin and spawn position, normally used in case of minigames or automatic-spawn systems. This function is more crash-safe then using SetPlayerSkin in OnPlayerSpawn and/or OnPlayerRequestClass, even though this has been fixed in 0.2. -/// The PlayerID of who you want to set the spawn information +/// The PlayerID of who you want to set the spawn information /// The Team-ID of the chosen player /// The skin which the player will spawn with /// The x-coordinate of the player's spawn position @@ -112,10 +112,10 @@ /// /// /// -native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); +native SetSpawnInfo(playerID, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); /// (Re)Spawns a player. -/// The ID of the player to spawn +/// The ID of the player to spawn /// /// /// @@ -124,12 +124,12 @@ native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotat /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native SpawnPlayer(playerid); +native SpawnPlayer(playerID); // Player info ///

    Set a player's position. -/// The ID of the player to set the position of +/// The ID of the player to set the position of /// The x coordinate to position the player at /// The y coordinate to position the player at /// The z coordinate to position the player at @@ -143,10 +143,10 @@ native SpawnPlayer(playerid); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerPos(playerid, Float:x, Float:y, Float:z); +native SetPlayerPos(playerID, Float:x, Float:y, Float:z); ///

    This sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position. -/// The ID of the player to set the position of +/// The ID of the player to set the position of /// The x coordinate to position the player at /// The x coordinate to position the player at /// The z coordinate to position the player at @@ -157,10 +157,10 @@ native SetPlayerPos(playerid, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); +native SetPlayerPosFindZ(playerID, Float:x, Float:y, Float:z); ///

    Get the position of a player, represented by x, y and z coordinates. -/// The ID of the player to get the position of +/// The ID of the player to get the position of /// A float variable in which to store the x coordinate in, passed by reference /// A float variable in which to store the y coordinate in, passed by reference /// A float variable in which to store the z coordinate in, passed by reference @@ -170,10 +170,10 @@ native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); /// /// This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. /// true on success, false on failure (i.e. player not connected). -native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); +native GetPlayerPos(playerID, &Float:x, &Float:y, &Float:z); /// Set a player's facing angle (z rotation). -/// The ID of the player to set the facing angle of +/// The ID of the player to set the facing angle of /// The angle the player should face /// /// @@ -182,19 +182,19 @@ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native SetPlayerFacingAngle(playerid, Float:ang); +native SetPlayerFacingAngle(playerID, Float:ang); ///

    Gets the angle a player is facing. -/// The player you want to get the angle of +/// The player you want to get the angle of /// The Float to store the angle in, passed by reference /// /// /// Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. /// Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. -native GetPlayerFacingAngle(playerid, &Float:ang); +native GetPlayerFacingAngle(playerID, &Float:ang); /// Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. -/// The ID of the player +/// The ID of the player /// The furthest distance the player can be from the point to be in range /// The x coordinate of the point to check the range to /// The y coordinate of the point to check the range to @@ -204,10 +204,10 @@ native GetPlayerFacingAngle(playerid, &Float:ang); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is in range, 0 if not. -native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); +native IsPlayerInRangeOfPoint(playerID, Float:range, Float:x, Float:y, Float:z); /// Calculate the distance between a player and a map coordinate. -/// The ID of the player to calculate the distance from +/// The ID of the player to calculate the distance from /// The x map coordinate /// The y map coordinate /// The z map coordinate @@ -216,11 +216,11 @@ native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); /// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// The distance between the player and the point as a float. -native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); +native Float:GetPlayerDistanceFromPoint(playerID, Float:x, Float:y, Float:z); /// Checks if a player is streamed in another player's client. -/// The ID of the player to check is streamed in -/// The ID of the player to check if playerid is streamed in for +/// The ID of the player to check is streamed in +/// The ID of the player to check if playerID is streamed in for /// /// /// @@ -228,14 +228,14 @@ native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// Players aren't streamed in on their own client, so if playerid is the same as forplayerid it will return false! +/// Players aren't streamed in on their own client, so if playerID is the same as forplayerID it will return false! /// Players stream out if they are more than 150 meters away (see server.cfg - stream_distance) /// 1 if the player is streamed in, 0 if not. -native IsPlayerStreamedIn(playerid, forplayerid); +native IsPlayerStreamedIn(playerID, forplayerID); /// Set a player's interior. A list of currently known interiors and their positions can be found here. -/// The ID of the player to set the interior of -/// The interior ID to set the player in +/// The ID of the player to set the interior of +/// The interior ID to set the player in /// /// /// @@ -243,18 +243,18 @@ native IsPlayerStreamedIn(playerid, forplayerid); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerInterior(playerid, interiorid); +native SetPlayerInterior(playerID, interiorID); ///

    Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page. -/// The player to get the interior ID of +/// The player to get the interior ID of /// /// /// Always returns 0 for NPCs. /// The interior ID the player is currently in. -native GetPlayerInterior(playerid); +native GetPlayerInterior(playerID); /// Set the health of a player. -/// The ID of the player to set the health of +/// The ID of the player to set the health of /// The value to set the player's health to. Max health that can be displayed in the HUD is 100, though higher values are valid /// /// @@ -266,10 +266,10 @@ native GetPlayerInterior(playerid); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerHealth(playerid, Float:health); +native SetPlayerHealth(playerID, Float:health); ///

    The function GetPlayerHealth allows you to retrieve the health of a player. Useful for cheat detection, among other things. -/// The ID of the player +/// The ID of the player /// Float to store health, passed by reference /// /// @@ -282,10 +282,10 @@ native SetPlayerHealth(playerid, Float:health); /// 1 - success.

    /// 0 - failure (i.e. player not connected).

    /// -native GetPlayerHealth(playerid, &Float:health); +native GetPlayerHealth(playerID, &Float:health); ///

    Set a player's armor level. -/// The ID of the player to set the armour of +/// The ID of the player to set the armour of /// The amount of armour to set, as a percentage (float). Values larger than 100 are valid, but won't be displayed in the HUD's armour bar /// /// @@ -296,10 +296,10 @@ native GetPlayerHealth(playerid, &Float:health); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerArmour(playerid, Float:armour); +native SetPlayerArmour(playerID, Float:armour); ///

    This function stores the armour of a player into a variable. -/// The ID of the player that you want to get the armour of +/// The ID of the player that you want to get the armour of /// The float to to store the armour in, passed by reference /// /// @@ -311,10 +311,10 @@ native SetPlayerArmour(playerid, Float:armour); /// 1 - success.

    /// 0 - failure (i.e. player not connected).

    /// -native GetPlayerArmour(playerid, &Float:armour); +native GetPlayerArmour(playerID, &Float:armour); ///

    Set the ammo of a player's weapon. -/// The ID of the player to set the weapon ammo of +/// The ID of the player to set the weapon ammo of /// The ID of the weapon slot to set the ammo of. /// The amount of ammo to set /// @@ -325,18 +325,18 @@ native GetPlayerArmour(playerid, &Float:armour); /// 1: The function executed successfully. Success is also returned when the weapon slot specified is invalid (not 0-12).

    /// 0: The function failed to execute. The player isn't connected.

    /// -native SetPlayerAmmo(playerid, weaponslot, ammo); +native SetPlayerAmmo(playerID, weaponslot, ammo); ///

    Gets the amount of ammo in a player's current weapon. -/// The ID of the player whose ammo to get +/// The ID of the player whose ammo to get /// /// /// The ammo can hold 16-bit values, therefore values over 32767 will return erroneous values. /// The amount of ammo in the player's current weapon. -native GetPlayerAmmo(playerid); +native GetPlayerAmmo(playerID); /// Check the state of a player's weapon. -/// The ID of the player to obtain the weapon state of +/// The ID of the player to obtain the weapon state of /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// @@ -350,10 +350,10 @@ native GetPlayerAmmo(playerid); ///
///
/// The state of the player's weapon. 0 if player specified does not exist. -native GetPlayerWeaponState(playerid); +native GetPlayerWeaponState(playerID); /// Check who a player is aiming at. -/// The ID of the player to get the target of +/// The ID of the player to get the target of /// /// /// @@ -361,10 +361,10 @@ native GetPlayerWeaponState(playerid); /// Does not work for joypads/controllers, and after a certain distance. /// Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. /// The ID of the target player, or INVALID_PLAYER_ID if none. -native GetPlayerTargetPlayer(playerid); +native GetPlayerTargetPlayer(playerID); -/// Gets id of an actor which is aimed by certain player. -/// The ID of the player to get the target of +/// Gets ID of an actor which is aimed by certain player. +/// The ID of the player to get the target of /// /// /// @@ -372,20 +372,20 @@ native GetPlayerTargetPlayer(playerid); /// Does not work for joypads/controllers, and after a certain distance. /// Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. /// The ID of the targeted actor, or INVALID_ACTOR_ID if none. -native GetPlayerTargetActor(playerid); +native GetPlayerTargetActor(playerID); /// Set the team of a player. -/// The ID of the player you want to set the team of -/// The team to put the player in. Use NO_TEAM to remove the player from any team +/// The ID of the player you want to set the team of +/// The team to put the player in. Use NO_TEAM to remove the player from any team /// /// /// /// Players can not damage/kill players on the same team unless they use a knife to slit their throat. As of SA-MP 0.3x, players are also unable to damage vehicles driven by a player from the same team. This can be enabled with EnableVehicleFriendlyFire. /// 255 (or NO_TEAM) is the default team to be able to shoot other players, not 0. -native SetPlayerTeam(playerid, teamid); +native SetPlayerTeam(playerID, teamID); /// Get the ID of the team the player is on. -/// The ID of the player to get the team of +/// The ID of the player to get the team of /// /// /// @@ -393,37 +393,37 @@ native SetPlayerTeam(playerid, teamid); /// 255: Defined as NO_TEAM. The player is not on any team.

/// -1: The function failed to execute. Player is not connected. /// -native GetPlayerTeam(playerid); +native GetPlayerTeam(playerID); ///

Set a player's score. Players' scores are shown in the scoreboard (shown by holding the TAB key). -/// The ID of the player to set the score of +/// The ID of the player to set the score of /// The value to set the player's score to /// /// /// 1: The function executed successfully.

/// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerScore(playerid, score); +native SetPlayerScore(playerID, score); ///

This function returns a player's score as it was set using SetPlayerScore. -/// The player to get the score of +/// The player to get the score of /// /// /// The player's score. -native GetPlayerScore(playerid); +native GetPlayerScore(playerID); /// /// Checks the player's level of drunkenness. If the level is less than 2000, the player is sober. The player's level of drunkness goes down slowly automatically (1 level per frame) but will always reach 2000 at the end (in 0.3b it will stop at 0). /// The higher drunkenness levels affect the player's camera, and the car driving handling. The level of drunkenness increases when the player drinks from a bottle (You can use SetPlayerSpecialAction to give them bottles). /// -/// The player you want to check the drunkenness level of +/// The player you want to check the drunkenness level of /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// An integer with the level of drunkenness of the player. -native GetPlayerDrunkLevel(playerid); +native GetPlayerDrunkLevel(playerID); /// Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control. -/// The ID of the player to set the drunkenness of +/// The ID of the player to set the drunkenness of /// The level of drunkenness to set /// /// @@ -437,29 +437,29 @@ native GetPlayerDrunkLevel(playerid); /// 1: The function executed successfully.

/// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerDrunkLevel(playerid, level); +native SetPlayerDrunkLevel(playerID, level); ///

Set the colour of a player's nametag and marker (radar blip). -/// The ID of the player whose color to set -/// The color to set. Supports alpha values (RGBA) +/// The ID of the player whose colour to set +/// The colour to set. Supports alpha values (RGBA) /// /// /// -/// This function will change player's color for everyone, even if player's color was changed with SetPlayerMarkerForPlayer for any other player. -/// If used under OnPlayerConnect, the affecting player will not see the color in the TAB menu. -native SetPlayerColor(playerid, color); +/// This function will change player's colour for everyone, even if player's colour was changed with SetPlayerMarkerForPlayer for any other player. +/// If used under OnPlayerConnect, the affecting player will not see the colour in the TAB menu. +native SetPlayerColor(playerID, colour); -/// Gets the color of the player's name and radar marker. Only works after SetPlayerColor. -/// The ID of the player to get the color of +/// Gets the colour of the player's name and radar marker. Only works after SetPlayerColor. +/// The ID of the player to get the colour of /// /// /// GetPlayerColor will return 0 unless SetPlayerColor has been used first. -/// The player's color. 0 if no color set or player not connected. -native GetPlayerColor(playerid); +/// The player's colour. 0 if no colour set or player not connected. +native GetPlayerColor(playerID); /// Set the skin of a player. A player's skin is their character model. -/// The ID of the player to set the skin of -/// The skin the player should use +/// The ID of the player to set the skin of +/// The skin the player should use /// /// /// If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, they will become frozen or otherwise glitched. This can be fixed by using TogglePlayerControllable. Players can be detected as being crouched through GetPlayerSpecialAction (SPECIAL_ACTION_DUCK). @@ -469,21 +469,21 @@ native GetPlayerColor(playerid); /// 1: The function executed successfully.

/// 0: The function failed to execute. This means the player specified does not exist.

/// -native SetPlayerSkin(playerid, skinid); +native SetPlayerSkin(playerID, skinID); ///

Returns the class of the players skin. -/// The player you want to get the skin from +/// The player you want to get the skin from /// /// Returns the new skin after SetSpawnInfo is called but before the player actually respawns to get the new skin. /// Returns the old skin if the player was spawned through SpawnPlayer function. -/// The skin id (0 if invalid). -native GetPlayerSkin(playerid); +/// The skin ID (0 if invalid). +native GetPlayerSkin(playerID); -native GetPlayerCustomSkin(playerid); +native GetPlayerCustomSkin(playerID); /// Give a player a weapon with a specified amount of ammo. -/// The ID of the player to give a weapon to -/// The ID of the weapon to give to the player +/// The ID of the player to give a weapon to +/// The ID of the weapon to give to the player /// The amount of ammo to give to the player /// /// @@ -491,10 +491,10 @@ native GetPlayerCustomSkin(playerid); /// 1: The function executed successfully.

/// 0: The function failed to execute. This means the player is not connected.

/// -native GivePlayerWeapon(playerid, weaponid, ammo); +native GivePlayerWeapon(playerID, weaponID, ammo); ///

Removes all weapons from a player. -/// The ID of the player whose weapons to remove +/// The ID of the player whose weapons to remove /// /// /// To remove individual weapons from a player, set their ammo to 0 using SetPlayerAmmo. @@ -502,11 +502,11 @@ native GivePlayerWeapon(playerid, weaponid, ammo); /// 1: The function executed successfully.

/// 0: The function failed to execute. This means the player specified does not exist. /// -native ResetPlayerWeapons(playerid); +native ResetPlayerWeapons(playerID); ///

Sets which weapon (that a player already has) the player is holding. -/// The ID of the player to arm with a weapon -/// The ID of the weapon that the player should be armed with +/// The ID of the player to arm with a weapon +/// The ID of the weapon that the player should be armed with /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -515,10 +515,10 @@ native ResetPlayerWeapons(playerid); /// 1: The function executed successfully. Success is returned even when the function fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).

/// 0: The function failed to execute. The player is not connected. /// -native SetPlayerArmedWeapon(playerid, weaponid); +native SetPlayerArmedWeapon(playerID, weaponID); ///

Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot). -/// The ID of the player whose weapon data to retrieve +/// The ID of the player whose weapon data to retrieve /// The weapon slot to get data for (0-12) /// A variable in which to store the weapon ID, passed by reference /// A variable in which to store the ammo, passed by reference @@ -529,10 +529,10 @@ native SetPlayerArmedWeapon(playerid, weaponid); /// 1: The function executed successfully.

/// 0: The function failed to execute. The player isn't connected and/or the weapon slot specified is invalid (valid is 0-12). /// -native GetPlayerWeaponData(playerid, slot, &weapons, &ammo); +native GetPlayerWeaponData(playerID, slot, &weapons, &ammo); ///

Give money to or take money from a player. -/// The ID of the player to give money to or take money from +/// The ID of the player to give money to or take money from /// The amount of money to give the player. Use a minus value to take money /// /// @@ -540,20 +540,20 @@ native GetPlayerWeaponData(playerid, slot, &weapons, &ammo); /// 1: The function executed successfully.

/// 0: The function failed to execute. This means the player is not connected. /// -native GivePlayerMoney(playerid, money); +native GivePlayerMoney(playerID, money); ///

Reset a player's money to $0. -/// The ID of the player to reset the money of +/// The ID of the player to reset the money of /// /// /// /// 1: The function executed successfully.

/// 0: The function failed to execute. This means the player is not connected. /// -native ResetPlayerMoney(playerid); +native ResetPlayerMoney(playerID); ///

Sets the name of a player. -/// The ID of the player to set the name of +/// The ID of the player to set the name of /// The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-z, [], (), $, @, ., _, =) /// /// Changing the players' name to the same name but with different character cases (e.g. "John" to "JOHN") will not work. @@ -565,17 +565,17 @@ native ResetPlayerMoney(playerid); /// 0 The player already has that name.

/// -1 The name can not be changed (it's already in use, too long or has invalid characters). /// -native SetPlayerName(playerid, const name[]); +native SetPlayerName(playerID, const name[]); ///

Retrieves the amount of money a player has. -/// The ID of the player to get the money of +/// The ID of the player to get the money of /// /// /// The amount of money the player has. -native GetPlayerMoney(playerid); +native GetPlayerMoney(playerID); /// Get a player's current state. -/// The ID of the player to get the current state of +/// The ID of the player to get the current state of /// /// /// @@ -595,10 +595,10 @@ native GetPlayerMoney(playerid); /// ///
/// The player's current state as an integer. -native GetPlayerState(playerid); +native GetPlayerState(playerID); /// Get the specified player's IP address and store it in a string. -/// The ID of the player to get the IP address of +/// The ID of the player to get the IP address of /// An array into which to store the player's IP address, passed by reference /// The maximum length of the IP address (recommended 16) /// @@ -610,28 +610,28 @@ native GetPlayerState(playerid); /// /// This function does not work when used in OnPlayerDisconnect because the player is already disconnected. It will return an invalid IP (255.255.255.255). Save players' IPs under OnPlayerConnect if they need to be used under OnPlayerDisconnect. /// 1 on success and 0 on failure. -native GetPlayerIp(playerid, ip[], len = sizeof (ip)); +native GetPlayerIp(playerID, ip[], len = sizeof (ip)); /// Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back. -/// The ID of the player to get the ping of +/// The ID of the player to get the ping of /// /// /// /// Player's ping may be 65535 for a while after a player connects /// The current ping of the player (expressed in milliseconds). -native GetPlayerPing(playerid); +native GetPlayerPing(playerID); /// Returns the ID of the weapon a player is currently holding. -/// The ID of the player to get the currently held weapon of +/// The ID of the player to get the currently held weapon of /// /// /// /// Prior to version 0.3z R1-2, when the player state is PLAYER_STATE_PASSENGER this function returns the weapon held by the player before they entered the vehicle. If a cheat is used to spawn a weapon inside a vehicle, this function will not report it. /// The ID of the player's current weapon. Returns -1 if the player specified does not exist. -native GetPlayerWeapon(playerid); +native GetPlayerWeapon(playerID); /// Check which keys a player is pressing. -/// The ID of the player to get the keys of +/// The ID of the player to get the keys of /// Bitmask containing the player's key states. List of keys /// Up/down state /// Left/right state @@ -639,10 +639,10 @@ native GetPlayerWeapon(playerid); /// Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). /// As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. /// The keys are stored in the specified variables. -native GetPlayerKeys(playerid, &keys, &updown, &leftright); +native GetPlayerKeys(playerID, &keys, &updown, &leftright); /// Get a player's name. -/// The ID of the player to get the name of +/// The ID of the player to get the name of /// An array into which to store the name, passed by reference /// The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME /// @@ -652,10 +652,10 @@ native GetPlayerKeys(playerid, &keys, &updown, &leftright); /// /// A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. /// The length of the player's name. 0 if player specified doesn't exist. -native GetPlayerName(playerid, name[], len = sizeof (name)); +native GetPlayerName(playerID, name[], len = sizeof (name)); /// Sets the game time for a player. If a player's clock is enabled (TogglePlayerClock) the time displayed by it will update automatically. -/// The ID of the player to set the game time of +/// The ID of the player to set the game time of /// Hour to set (0-23) /// Minutes to set (0-59) /// @@ -666,10 +666,10 @@ native GetPlayerName(playerid, name[], len = sizeof (name)); /// 1: The function executed successfully.

/// 0: The function failed to execute. The player specified does not exist. /// -native SetPlayerTime(playerid, hour, minute); +native SetPlayerTime(playerID, hour, minute); ///

Get the player's current game time. Set by SetWorldTime or SetPlayerTime, or by the game automatically if TogglePlayerClock is used. -/// The ID of the player to get the game time of +/// The ID of the player to get the game time of /// A variable in which to store the hour, passed by reference /// A variable in which to store the minutes, passed by reference /// @@ -679,10 +679,10 @@ native SetPlayerTime(playerid, hour, minute); /// 1: The function executed successfully.

/// 0: The function failed to execute. The player specified does not exist.

/// -native GetPlayerTime(playerid, &hour, &minute); +native GetPlayerTime(playerID, &hour, &minute); ///

Toggle the in-game clock (top-right corner) for a specific player. When this is enabled, time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) when set using SetWeather/SetPlayerWeather. -/// The player whose clock you want to enable/disable +/// The player whose clock you want to enable/disable /// 1 to show and 0 to hide. Hidden by default /// Time is not synced with other players! Time can be synced using SetPlayerTime. /// Time will automatically advance 6 hours when the player dies. @@ -690,27 +690,27 @@ native GetPlayerTime(playerid, &hour, &minute); /// 1: The function executed successfully.

/// 0: The function failed to execute. The specified player does not exist. /// -native TogglePlayerClock(playerid, toggle); +native TogglePlayerClock(playerID, toggle); ///

Set a player's weather. -/// The ID of the player whose weather to set +/// The ID of the player whose weather to set /// The weather to set /// /// /// If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. -native SetPlayerWeather(playerid, weather); +native SetPlayerWeather(playerID, weather); /// Forces a player to go back to class selection. -/// The player to send back to class selection +/// The player to send back to class selection /// /// /// /// /// The player will not return to class selection until they re-spawn. This can be achieved with TogglePlayerSpectating, as seen in the below example. -native ForceClassSelection(playerid); +native ForceClassSelection(playerID); /// Set a player's wanted level (6 brown stars under HUD). -/// The ID of the player to set the wanted level of +/// The ID of the player to set the wanted level of /// The wanted level to set for the player (0-6) /// /// @@ -718,17 +718,17 @@ native ForceClassSelection(playerid); /// 1: The function executed successfully.

/// 0: The function failed to execute. The player specified does not exist. /// -native SetPlayerWantedLevel(playerid, level); +native SetPlayerWantedLevel(playerID, level); ///

Gets the wanted level of a player. -/// The ID of the player that you want to get the wanted level of +/// The ID of the player that you want to get the wanted level of /// /// /// The player's wanted level. -native GetPlayerWantedLevel(playerid); +native GetPlayerWantedLevel(playerID); /// Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default). -/// The ID of player to set the fighting style of +/// The ID of player to set the fighting style of /// The fighting style that should be set /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -744,10 +744,10 @@ native GetPlayerWantedLevel(playerid); ///
  • FIGHT_STYLE_ELBOW
  • /// /// -native SetPlayerFightingStyle(playerid, style); +native SetPlayerFightingStyle(playerID, style); /// Get the fighting style the player currently using. -/// The ID of the player to get the fighting style of +/// The ID of the player to get the fighting style of /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// @@ -762,10 +762,10 @@ native SetPlayerFightingStyle(playerid, style); /// /// /// The ID of the fighting style of the player. -native GetPlayerFightingStyle(playerid); +native GetPlayerFightingStyle(playerID); /// Set a player's velocity on the x, y and z axes. -/// The player to apply the speed to +/// The player to apply the speed to /// The velocity (speed) on the x axis /// The velocity (speed) on the y axis /// The velocity (speed) on the z axis @@ -777,10 +777,10 @@ native GetPlayerFightingStyle(playerid); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerVelocity(playerid, Float:x, Float:y, Float:z); +native SetPlayerVelocity(playerID, Float:x, Float:y, Float:z); ///

    Get the velocity (speed) of a player on the x, y and z axes. -/// The player to get the speed from +/// The player to get the speed from /// A float variable in which to store the velocity on the x axis, passed by reference /// A float variable in which to store the velocity on the y axis, passed by reference /// A float variable in which to store the velocity on the z axis, passed by reference @@ -788,11 +788,11 @@ native SetPlayerVelocity(playerid, Float:x, Float:y, Float:z); /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); +native GetPlayerVelocity(playerID, &Float:x, &Float:y, &Float:z); /// This function plays a crime report for a player - just like in single-player when CJ commits a crime. -/// The ID of the player that will hear the crime report -/// The ID of the suspect player whom will be described in the crime report +/// The ID of the player that will hear the crime report +/// The ID of the suspect player whom will be described in the crime report /// The crime ID, which will be reported as a 10-code (i.e. 10-16 if 16 was passed as the crime) /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -820,10 +820,10 @@ native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); ///
  • 22 10-7 Out of service
  • /// /// -native PlayCrimeReportForPlayer(playerid, suspectid, crime); +native PlayCrimeReportForPlayer(playerID, suspectID, crime); /// Play an 'audio stream' for a player. Normal audio files also work (e.g. MP3). -/// The ID of the player to play the audio for +/// The ID of the player to play the audio for /// The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist /// The x position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) /// The y position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) @@ -837,17 +837,17 @@ native PlayCrimeReportForPlayer(playerid, suspectid, crime); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native PlayAudioStreamForPlayer(playerid, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, bool:usepos = false); +native PlayAudioStreamForPlayer(playerID, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, bool:usepos = false); ///

    Stops the current audio stream for a player. -/// The player you want to stop the audio stream for +/// The player you want to stop the audio stream for /// /// /// This function was added in SA-MP 0.3d and will not work in earlier versions! -native StopAudioStreamForPlayer(playerid); +native StopAudioStreamForPlayer(playerID); /// Loads or unloads an interior script for a player (for example the ammunation menu). -/// The ID of the player to load the interior script for +/// The ID of the player to load the interior script for /// The shop script to load. Leave blank ("") to unload scripts /// /// @@ -866,10 +866,10 @@ native StopAudioStreamForPlayer(playerid); ///
  • "AMMUN5" Ammunation 5
  • /// /// -native SetPlayerShopName(playerid, const shopname[]); +native SetPlayerShopName(playerID, const shopname[]); /// Set the skill level of a certain weapon type for a player. -/// The ID of the player to set the weapon skill of +/// The ID of the player to set the weapon skill of /// The weapon to set the skill of /// The skill level to set for that weapon, ranging from 0 to 999. A level out of range will max it out /// @@ -891,25 +891,25 @@ native SetPlayerShopName(playerid, const shopname[]); ///
  • WEAPONSKILL_SNIPERRIFLE(10)
  • /// /// -native SetPlayerSkillLevel(playerid, skill, level); +native SetPlayerSkillLevel(playerID, skill, level); /// Get the ID of the vehicle that the player is surfing (stuck to the roof of). -/// The ID of the player you want to know the surfing vehicle ID of +/// The ID of the player you want to know the surfing vehicle ID of /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified is not connected, INVALID_VEHICLE_ID also. -native GetPlayerSurfingVehicleID(playerid); +native GetPlayerSurfingVehicleID(playerID); /// Returns the ID of the object the player is surfing on. -/// The ID of the player surfing the object +/// The ID of the player surfing the object /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// The ID of the moving object the player is surfing. If the player isn't surfing a moving object, it will return INVALID_OBJECT_ID. -native GetPlayerSurfingObjectID(playerid); +native GetPlayerSurfingObjectID(playerID); /// Removes a standard San Andreas model for a single player within a specified range. -/// The ID of the player to remove the objects for -/// The model to remove +/// The ID of the player to remove the objects for +/// The model to remove /// The x coordinate around which the objects will be removed /// The y coordinate around which the objects will be removed /// The z coordinate around which the objects will be removed @@ -919,11 +919,11 @@ native GetPlayerSurfingObjectID(playerid); /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// There appears to be a limit of around 1000 lines/objects. There is no workaround. /// When removing the same object for a player, they will crash. Commonly, players crash when reconnecting to the server because the server removes buildings on OnPlayerConnect. -/// In SA-MP 0.3.7 you can use -1 for the modelid to remove all objects within the specified radius. -native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, Float:centerZ, Float:radius); +/// In SA-MP 0.3.7 you can use -1 for the modelID to remove all objects within the specified radius. +native RemoveBuildingForPlayer(playerID, modelID, Float:centerX, Float:centerY, Float:centerZ, Float:radius); /// Retrieves the start and end (hit) position of the last bullet a player fired. -/// The ID of the player to get the last bullet shot information of +/// The ID of the player to get the last bullet shot information of /// A float variable in which to save the x coordinate of where the bullet originated from /// A float variable in which to save the y coordinate of where the bullet originated from /// A float variable in which to save the z coordinate of where the bullet originated from @@ -941,7 +941,7 @@ native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist.

    /// -native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float:originZ, &Float:hitPosX, &Float:hitPosY, &Float:hitPosZ); +native GetPlayerLastShotVectors(playerID, &Float:originX, &Float:originY, &Float:originZ, &Float:hitPosX, &Float:hitPosY, &Float:hitPosZ); // Attached to bone objects #if MAX_PLAYER_ATTACHED_OBJECTS < 1 || MAX_PLAYER_ATTACHED_OBJECTS > 10 @@ -949,9 +949,9 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float #endif ///

    Attach an object to a specific bone on a player. -/// The ID of the player to attach the object to +/// The ID of the player to attach the object to /// The index (slot) to assign the object to (0-9 since 0.3d, 0-4 in previous versions) -/// The model to attach +/// The model to attach /// The bone to attach the object to /// x axis offset for the object position (optional=0.0) /// y axis offset for the object position (optional=0.0) @@ -962,8 +962,8 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float /// x axis scale of the object (optional=1.0) /// y axis scale of the object (optional=1.0) /// z axis scale of the object (optional=1.0) -/// The first object color to set ARGB (optional=0) -/// The second object color to set ARGB (optional=0) +/// The first object colour to set ARGB (optional=0) +/// The second object colour to set ARGB (optional=0) /// /// /// @@ -994,28 +994,28 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float /// /// /// 1 on success, 0 on failure. -native SetPlayerAttachedObject(playerid, index, modelid, bone, Float:offsetX = 0.0, Float:offsetY = 0.0, Float:offsetZ = 0.0, Float:rotX = 0.0, Float:rotY = 0.0, Float:rotZ = 0.0, Float:scaleX = 1.0, Float:scaleY = 1.0, Float:scaleZ = 1.0, materialcolor1 = 0, materialcolor2 = 0); +native SetPlayerAttachedObject(playerID, index, modelID, bone, Float:offsetX = 0.0, Float:offsetY = 0.0, Float:offsetZ = 0.0, Float:rotX = 0.0, Float:rotY = 0.0, Float:rotZ = 0.0, Float:scaleX = 1.0, Float:scaleY = 1.0, Float:scaleZ = 1.0, materialColour1 = 0, materialColour2 = 0); /// Remove an attached object from a player. -/// The ID of the player to remove the object from +/// The ID of the player to remove the object from /// The index of the object to remove (set with SetPlayerAttachedObject) /// /// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// 1 on success, 0 on failure. -native RemovePlayerAttachedObject(playerid, index); +native RemovePlayerAttachedObject(playerID, index); /// Check if a player has an object attached in the specified index (slot). -/// The ID of the player to check +/// The ID of the player to check /// The index (slot) to check /// /// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// 1 if used, 0 if not. -native IsPlayerAttachedObjectSlotUsed(playerid, index); +native IsPlayerAttachedObjectSlotUsed(playerID, index); /// Enter edition mode for an attached object. -/// The ID of the player to enter in to edition mode +/// The ID of the player to enter in to edition mode /// The index (slot) of the attached object to edit /// /// @@ -1035,12 +1035,12 @@ native IsPlayerAttachedObjectSlotUsed(playerid, index); /// /// Players will be able to scale objects up to a very large or negative value size. Limits should be put in place using OnPlayerEditAttachedObject to abort the edit. /// 1 on success and 0 on failure. -native EditAttachedObject(playerid, index); +native EditAttachedObject(playerID, index); // Per-player TextDraws /// Creates a textdraw for a single player. This can be used as a way around the global text-draw limit. -/// The ID of the player to create the textdraw for +/// The ID of the player to create the textdraw for /// x-Coordinate /// y-Coordinate /// The text in the textdraw @@ -1064,12 +1064,12 @@ native EditAttachedObject(playerid, index); /// If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.

    /// must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)

    /// If the last character in the text is a space (" "), the text will all be blank.

    -/// If part of the text is off-screen, the color of the text will not show, only the shadow (if enabled) will.

    +/// If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will.

    /// /// /// This applies ONLY to sa-mp versions before 0.3z:

    /// Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.

    -/// If you use color codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.

    +/// If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.

    /// /// Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ Doesn't work beyond 255th character. /// @@ -1079,10 +1079,10 @@ native EditAttachedObject(playerid, index); /// /// Player-textdraws are automatically destroyed when a player disconnects. /// The ID of the created textdraw. -native PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[]); +native PlayerText:CreatePlayerTextDraw(playerID, Float:x, Float:y, const text[]); ///

    Destroy a player-textdraw. -/// The ID of the player who's player-textdraw to destroy +/// The ID of the player who's player-textdraw to destroy /// The ID of the textdraw to destroy /// /// @@ -1100,10 +1100,10 @@ native PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[]) /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawDestroy(playerid, PlayerText:text); +native PlayerTextDrawDestroy(playerID, PlayerText:text); /// Sets the width and height of the letters in a player-textdraw. -/// The ID of the player whose player-textdraw to set the letter size of +/// The ID of the player whose player-textdraw to set the letter size of /// The ID of the player-textdraw to change the letter size of /// Width of a char /// Height of a char @@ -1125,10 +1125,10 @@ native PlayerTextDrawDestroy(playerid, PlayerText:text); /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// When using this function purely for the benefit of affecting the textdraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements /// Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). -native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:x, Float:y); +native PlayerTextDrawLetterSize(playerID, PlayerText:text, Float:x, Float:y); /// Change the size of a player-textdraw (box if PlayerTextDrawUseBox is enabled and/or clickable area for use with PlayerTextDrawSetSelectable). -/// The ID of the player whose player-textdraw to set the size of +/// The ID of the player whose player-textdraw to set the size of /// The ID of the player-textdraw to set the size of /// The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate /// The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate @@ -1161,10 +1161,10 @@ native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:x, Float:y); /// The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).

    /// This function defines the clickable area for use with PlayerTextDrawSetSelectable, whether a box is shown or not. /// -native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:x, Float:y); +native PlayerTextDrawTextSize(playerID, PlayerText:text, Float:x, Float:y); ///

    Set the text alignment of a player-textdraw. -/// The ID of the player whose player-textdraw to set the alignment of +/// The ID of the player whose player-textdraw to set the alignment of /// The ID of the player-textdraw to set the alignment of /// 1-left 2-centered 3-right /// @@ -1184,12 +1184,12 @@ native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:x, Float:y); /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at PlayerTextDrawTextSize. -native PlayerTextDrawAlignment(playerid, PlayerText:text, alignment); +native PlayerTextDrawAlignment(playerID, PlayerText:text, alignment); -/// Sets the text color of a player-textdraw. -/// The ID of the player who's textdraw to set the color of +/// Sets the text colour of a player-textdraw. +/// The ID of the player who's textdraw to set the colour of /// The TextDraw to change -/// The color in hexadecimal format +/// The colour in hexadecimal format /// /// /// @@ -1206,12 +1206,12 @@ native PlayerTextDrawAlignment(playerid, PlayerText:text, alignment); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -/// You can also use Gametext colors in textdraws. -/// The textdraw must be re-shown to the player in order to update the color. -native PlayerTextDrawColor(playerid, PlayerText:text, color); +/// You can also use Gametext colours in textdraws. +/// The textdraw must be re-shown to the player in order to update the colour. +native PlayerTextDrawColor(playerID, PlayerText:text, colour); /// Toggle the box on a player-textdraw. -/// The ID of the player whose textdraw to toggle the box of +/// The ID of the player whose textdraw to toggle the box of /// The ID of the player-textdraw to toggle the box of /// 1 to use a box or 0 to not use a box /// @@ -1230,12 +1230,12 @@ native PlayerTextDrawColor(playerid, PlayerText:text, color); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawUseBox(playerid, PlayerText:text, use); +native PlayerTextDrawUseBox(playerID, PlayerText:text, use); -/// Sets the color of a textdraw's box (PlayerTextDrawUseBox). -/// The ID of the player whose textdraw to set the box color of -/// The ID of the player textdraw to set the box color of -/// The color to set. Alpha (transparency) is supported +/// Sets the colour of a textdraw's box (PlayerTextDrawUseBox). +/// The ID of the player whose textdraw to set the box colour of +/// The ID of the player textdraw to set the box colour of +/// The colour to set. Alpha (transparency) is supported /// /// /// @@ -1252,10 +1252,10 @@ native PlayerTextDrawUseBox(playerid, PlayerText:text, use); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawBoxColor(playerid, PlayerText:text, color); +native PlayerTextDrawBoxColor(playerID, PlayerText:text, colour); /// Show a player-textdraw to the player it was created for. -/// The ID of the player to show the textdraw for +/// The ID of the player to show the textdraw for /// The ID of the textdraw to show /// The size of the shadow. 0 will hide the shadow /// @@ -1274,10 +1274,10 @@ native PlayerTextDrawBoxColor(playerid, PlayerText:text, color); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); +native PlayerTextDrawSetShadow(playerID, PlayerText:text, size); /// Set the outline of a player-textdraw. The outline colour cannot be changed unless PlayerTextDrawBackgroundColor is used. -/// The ID of the player whose player-textdraw to set the outline of +/// The ID of the player whose player-textdraw to set the outline of /// The ID of the player-textdraw to set the outline of /// The thickness of the outline /// @@ -1296,12 +1296,12 @@ native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawSetOutline(playerid, PlayerText:text, size); +native PlayerTextDrawSetOutline(playerID, PlayerText:text, size); -/// Adjust the background color of a player-textdraw. -/// The ID of the player whose player-textdraw to set the background color of -/// The ID of the player-textdraw to set the background color of -/// The color that the textdraw should be set to +/// Adjust the background colour of a player-textdraw. +/// The ID of the player whose player-textdraw to set the background colour of +/// The ID of the player-textdraw to set the background colour of +/// The colour that the textdraw should be set to /// /// /// @@ -1318,11 +1318,11 @@ native PlayerTextDrawSetOutline(playerid, PlayerText:text, size); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -/// If PlayerTextDrawSetOutline is used with size > 0, the outline color will match the color used in PlayerTextDrawBackgroundColor. Changing the value of color seems to alter the color used in PlayerTextDrawColor -native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, color); +/// If PlayerTextDrawSetOutline is used with size > 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in PlayerTextDrawColor +native PlayerTextDrawBackgroundColor(playerID, PlayerText:text, colour); /// Change the font of a player-textdraw. -/// The ID of the player whose player-textdraw to change the font of +/// The ID of the player whose player-textdraw to change the font of /// The ID of the player-textdraw to change the font of /// There are four font styles. A font value greater than 3 does not display, and anything greater than 16 crashes the client. See http://wiki.sa-mp.com/wiki/PlayerTextDrawFont /// @@ -1341,10 +1341,10 @@ native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, color); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawFont(playerid, PlayerText:text, font); +native PlayerTextDrawFont(playerID, PlayerText:text, font); /// Appears to scale text spacing to a proportional ratio. Useful when using PlayerTextDrawLetterSize to ensure the text has even character spacing. -/// The ID of the player whose player-textdraw to set the proportionality of +/// The ID of the player whose player-textdraw to set the proportionality of /// The ID of the player-textdraw to set the proportionality of /// 1 to enable proportionality, 0 to disable /// @@ -1363,10 +1363,10 @@ native PlayerTextDrawFont(playerid, PlayerText:text, font); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawSetProportional(playerid, PlayerText:text, set); +native PlayerTextDrawSetProportional(playerID, PlayerText:text, set); /// Toggles whether a player-textdraw can be selected or not. -/// The ID of the player whose player-textdraw to set the selectability of +/// The ID of the player whose player-textdraw to set the selectability of /// The ID of the player-textdraw to set the selectability of /// Set the player-textdraw selectable (1) or non-selectable (0). By default this is 0 /// @@ -1375,10 +1375,10 @@ native PlayerTextDrawSetProportional(playerid, PlayerText:text, set); /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// PlayerTextDrawSetSelectable MUST be used BEFORE the textdraw is shown to the player. /// Use PlayerTextDrawTextSize to define the clickable area. -native PlayerTextDrawSetSelectable(playerid, PlayerText:text, set); +native PlayerTextDrawSetSelectable(playerID, PlayerText:text, set); /// Show a player-textdraw to the player it was created for. -/// The ID of the player to show the textdraw for +/// The ID of the player to show the textdraw for /// The ID of the textdraw to show /// /// @@ -1396,10 +1396,10 @@ native PlayerTextDrawSetSelectable(playerid, PlayerText:text, set); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawShow(playerid, PlayerText:text); +native PlayerTextDrawShow(playerID, PlayerText:text); /// Hide a player-textdraw from the player it was created for. -/// The ID of the player to hide the textdraw for +/// The ID of the player to hide the textdraw for /// The ID of the textdraw to hide /// /// @@ -1417,10 +1417,10 @@ native PlayerTextDrawShow(playerid, PlayerText:text); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawHide(playerid, PlayerText:text); +native PlayerTextDrawHide(playerID, PlayerText:text); /// Change the text of a player-textdraw. -/// The ID of the player who's textdraw string to set +/// The ID of the player who's textdraw string to set /// The ID of the textdraw to change /// The new string for the TextDraw /// @@ -1441,11 +1441,11 @@ native PlayerTextDrawHide(playerid, PlayerText:text); /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// There are limits to the length of textdraw strings! See Limits for more info. /// You don't have to show the TextDraw again in order to apply the changes. -native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); +native PlayerTextDrawSetString(playerID, PlayerText:text, const string[]); /// Sets a player textdraw 2D preview sprite of a specified model ID. -/// The PlayerTextDraw player ID -/// The textdraw id that will display the 3D preview +/// The PlayerTextDraw player ID +/// The textdraw ID that will display the 3D preview /// The GTA SA or SA:MP model ID to display /// /// @@ -1457,10 +1457,10 @@ native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); /// 1: The function executed successfully. If an invalid model is passed 'success' is reported, but the model will appear as a yellow/black question mark.

    /// 0: The function failed to execute. Player and/or textdraw do not exist. /// -native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelindex); +native PlayerTextDrawSetPreviewModel(playerID, PlayerText:text, modelindex); ///

    Sets the rotation and zoom of a 3D model preview player-textdraw. -/// The ID of the player whose player-textdraw to change +/// The ID of the player whose player-textdraw to change /// The ID of the player-textdraw to change /// The x rotation value /// The y rotation value @@ -1473,25 +1473,25 @@ native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelindex); /// /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW and already have a model set in order for this function to have effect. -native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); +native PlayerTextDrawSetPreviewRot(playerID, PlayerText:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); -/// Set the color of a vehicle in a player-textdraw model preview (if a vehicle is shown). -/// The ID of the player whose player-textdraw to change +/// Set the colour of a vehicle in a player-textdraw model preview (if a vehicle is shown). +/// The ID of the player whose player-textdraw to change /// The ID of the player's player-textdraw to change -/// The color to set the vehicle's primary color to -/// The color to set the vehicle's secondary color to +/// The colour to set the vehicle's primary colour to +/// The colour to set the vehicle's secondary colour to /// /// /// /// /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font TEXT_DRAW_FONT_MODEL_PREVIEW and be showing a vehicle in order for this function to have effect. -native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, color1, color2); +native PlayerTextDrawSetPreviewVehCol(playerID, PlayerText:text, colour1, colour2); // Per-player variable system (PVars) /// Set an integer player variable. -/// The ID of the player whose player variable will be set +/// The ID of the player whose player variable will be set /// The name of the player variable /// The integer to be set /// @@ -1505,10 +1505,10 @@ native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, color1, color2) /// 1: The function executed successfully.

    /// 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. /// -native SetPVarInt(playerid, const pvar[], value); +native SetPVarInt(playerID, const pvar[], value); ///

    Gets an integer player variable's value. -/// The ID of the player whose player variable to get +/// The ID of the player whose player variable to get /// The name of the player variable (case-insensitive). Assigned in SetPVarInt /// /// @@ -1517,10 +1517,10 @@ native SetPVarInt(playerid, const pvar[], value); /// /// /// The integer value of the specified player variable. It will still return 0 if the variable is not set, or the player does not exist. -native GetPVarInt(playerid, const pvar[]); +native GetPVarInt(playerID, const pvar[]); /// Saves a string into a player variable. -/// The ID of the player whose player variable will be set +/// The ID of the player whose player variable will be set /// The name of the player variable /// The string you want to save in the player variable /// @@ -1529,10 +1529,10 @@ native GetPVarInt(playerid, const pvar[]); /// /// /// -native SetPVarString(playerid, const pvar[], const value[]); +native SetPVarString(playerID, const pvar[], const value[]); /// Gets a player variable as a string. -/// The ID of the player whose player variable to get +/// The ID of the player whose player variable to get /// The name of the player variable, set by SetPVarString /// The array in which to store the string value in, passed by reference /// The maximum length of the returned string @@ -1544,10 +1544,10 @@ native SetPVarString(playerid, const pvar[], const value[]); /// /// If length of string is zero (value not set), output text will not be updated or set to anything and will remain with old data, neccesying that you clear the variable to blank value if GetPVarString returns 0 if that behavior is undesired /// The length of the string. -native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); +native GetPVarString(playerID, const pvar[], output[], len = sizeof (output)); /// Set a float player variable's value. -/// The ID of the player whose player variable will be set +/// The ID of the player whose player variable will be set /// The name of the player variable /// The float you want to save in the player variable /// @@ -1560,10 +1560,10 @@ native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); /// 1: The function executed successfully.

    /// 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. /// -native SetPVarFloat(playerid, const pvar[], Float:value); +native SetPVarFloat(playerID, const pvar[], Float:value); ///

    Gets a player variable as a float. -/// The ID of the player whose player variable you want to get +/// The ID of the player whose player variable you want to get /// The name of the player variable /// /// @@ -1572,10 +1572,10 @@ native SetPVarFloat(playerid, const pvar[], Float:value); /// /// /// The float from the specified player variable. -native Float:GetPVarFloat(playerid, const pvar[]); +native Float:GetPVarFloat(playerID, const pvar[]); /// Deletes a previously set player variable. -/// The ID of the player whose player variable to delete +/// The ID of the player whose player variable to delete /// The name of the player variable to delete /// /// @@ -1588,17 +1588,17 @@ native Float:GetPVarFloat(playerid, const pvar[]); /// 1: The function executed successfully.

    /// 0: The function failed to execute. Either the player specified isn't connected or there is no variable set with the given name. /// -native DeletePVar(playerid, const pvar[]); +native DeletePVar(playerID, const pvar[]); ///

    Each PVar (player-variable) has its own unique identification number for lookup, this function returns the highest ID set for a player. -/// The ID of the player to get the upper PVar index of +/// The ID of the player to get the upper PVar index of /// /// /// The highest set PVar ID. -native GetPVarsUpperIndex(playerid); +native GetPVarsUpperIndex(playerID); /// Retrieve the name of a player's pVar via the index. -/// The ID of the player whose player variable to get the name of +/// The ID of the player whose player variable to get the name of /// The index of the player's pVar /// A string to store the pVar's name in, passed by reference /// The max length of the returned string @@ -1606,10 +1606,10 @@ native GetPVarsUpperIndex(playerid); /// /// /// -native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); +native GetPVarNameAtIndex(playerID, index, output[], size = sizeof (output)); /// Gets the type (integer, float or string) of a player variable. -/// The ID of the player whose player variable to get the type of +/// The ID of the player whose player variable to get the type of /// The name of the player variable to get the type of /// /// @@ -1628,29 +1628,29 @@ native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); /// /// /// Returns the type of the PVar. See table below. -native GetPVarType(playerid, const pvar[]); +native GetPVarType(playerID, const pvar[]); #if MAX_CHATBUBBLE_LENGTH < 1 || MAX_CHATBUBBLE_LENGTH > 144 #error MAX_CHATBUBBLE_LENGTH must be >= 1 and <= 144 #endif /// Creates a chat bubble above a player's name tag. -/// The player which should have the chat bubble +/// The player which should have the chat bubble /// The text to display -/// The text color +/// The text colour /// The distance from where players are able to see the chat bubble /// The time in miliseconds the bubble should be displayed for /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// You can't see your own chatbubbles. The same applies to attached 3D text labels. -/// You can use color embedding for multiple colors in the message. -native SetPlayerChatBubble(playerid, const text[], color, Float:drawdistance, expiretime); +/// You can use colour embedding for multiple colours in the message. +native SetPlayerChatBubble(playerID, const text[], colour, Float:drawdistance, expiretime); // Player control /// Puts a player in a vehicle. -/// The ID of the player to put in a vehicle -/// The ID of the vehicle to put the player in -/// The ID of the seat to put the player in +/// The ID of the player to put in a vehicle +/// The ID of the vehicle to put the player in +/// The ID of the seat to put the player in /// /// /// @@ -1672,28 +1672,28 @@ native SetPlayerChatBubble(playerid, const text[], color, Float:drawdistance, ex /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player or vehicle don't exist. /// -native PutPlayerInVehicle(playerid, vehicleid, seatid); +native PutPlayerInVehicle(playerID, vehicleID, seatID); -///

    This function gets the ID of the vehicle the player is currently in. Note: NOT the model id of the vehicle. See GetVehicleModel for that. -/// The ID of the player in the vehicle that you want to get the ID of +/// This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. +/// The ID of the player in the vehicle that you want to get the ID of /// /// /// /// /// ID of the vehicle or 0 if not in a vehicle. -native GetPlayerVehicleID(playerid); +native GetPlayerVehicleID(playerID); /// Find out which seat a player is in. -/// The ID of the player you want to get the seat of +/// The ID of the player you want to get the seat of /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// Sometimes the result can be 128 which is an invalid seat ID. Circumstances of this are not yet known, but it is best to discard information when returned seat number is 128. /// The ID of the seat the player is in. -1 is not in vehicle, 0 is the driver, 1 is the front passenger, and 2 & 3 are the rear passengers. -native GetPlayerVehicleSeat(playerid); +native GetPlayerVehicleSeat(playerID); /// Removes/ejects a player from their vehicle. -/// The ID of the player to remove from their vehicle +/// The ID of the player to remove from their vehicle /// /// /// The exiting animation is not synced for other players.

    @@ -1704,20 +1704,20 @@ native GetPlayerVehicleSeat(playerid); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native RemovePlayerFromVehicle(playerid); +native RemovePlayerFromVehicle(playerID); ///

    Toggles whether a player can control their character or not. The player will also be unable to move their camera. -/// The ID of the player to toggle the controllability of +/// The ID of the player to toggle the controllability of /// 0 to make them uncontrollable, 1 to make them controllable /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native TogglePlayerControllable(playerid, toggle); +native TogglePlayerControllable(playerID, toggle); ///

    Plays the specified sound for a player. -/// The ID of the player for whom to play the sound -/// The sound to play +/// The ID of the player for whom to play the sound +/// The sound to play /// x coordinate for the sound to play at. (0 for no position) /// y coordinate for the sound to play at. (0 for no position) /// z coordinate for the sound to play at. (0 for no position) @@ -1729,10 +1729,10 @@ native TogglePlayerControllable(playerid, toggle); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); +native PlayerPlaySound(playerID, soundID, Float:x, Float:y, Float:z); ///

    Apply an animation to a player. -/// The ID of the player to apply the animation to +/// The ID of the player to apply the animation to /// The animation library from which to apply an animation /// The name of the animation to apply, within the specified library /// The speed to play the animation (use 4.1) @@ -1744,26 +1744,26 @@ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); /// Set to 1 to make server sync the animation with all other players in streaming radius. 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) (optional=0) /// /// -/// The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. +/// The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. /// An invalid animation library will crash the player's game. /// This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). -native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, bool:forceSync = false); +native ApplyAnimation(playerID, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, bool:forceSync = false); /// Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). -/// The ID of the player to clear the animations of -/// Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) +/// The ID of the player to clear the animations of +/// Set to 1 to force playerID to sync the animation with other players in streaming radius (optional=0) /// /// ClearAnimations doesn't do anything when the animation ends if we pass 1 for the freeze parameter in ApplyAnimation. /// Unlike some other ways to remove player from a vehicle, this will also reset the vehicle's velocity to zero, instantly stopping the car. Player will appear on top of the vehicle with the same location as he was in his car seat. /// This function always returns 1, even when the player specified is not connected. -native ClearAnimations(playerid, bool:forceSync = false); +native ClearAnimations(playerID, bool:forceSync = false); /// Returns the index of any running applied animations. -/// ID of the player of whom you want to get the animation index of +/// ID of the player of whom you want to get the animation index of /// /// This function was added in SA-MP 0.3b and will not work in earlier versions! /// 0 if there is no animation applied. -native GetPlayerAnimationIndex(playerid); // return the index of any running applied animations (0 if none are running) +native GetPlayerAnimationIndex(playerID); // return the index of any running applied animations (0 if none are running) /// Get the animation library/name for the index. /// The animation index, returned by GetPlayerAnimationIndex @@ -1777,7 +1777,7 @@ native GetPlayerAnimationIndex(playerid); // return the index of any running app native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibrary), animationName[], len2 = sizeof (animationName)); // get the animation lib/name for the index /// Retrieves a player's current special action. -/// The ID of the player to get the special action of +/// The ID of the player to get the special action of /// /// /// @@ -1815,11 +1815,11 @@ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibra /// /// /// The special action of the player. -native GetPlayerSpecialAction(playerid); +native GetPlayerSpecialAction(playerID); /// This function allows to set players special action. -/// The player that should perform the action -/// The action that should be performed +/// The player that should perform the action +/// The action that should be performed /// /// /// Removing jetpacks from players by setting their special action to 0 causes the sound to stay until death. @@ -1861,22 +1861,22 @@ native GetPlayerSpecialAction(playerid); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerSpecialAction(playerid, actionid); +native SetPlayerSpecialAction(playerID, actionID); ///

    Disables collisions between occupied vehicles for a player. -/// The ID of the player for whom you want to disable collisions +/// The ID of the player for whom you want to disable collisions /// 1 to disable collisions, 0 to enable collisions /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native DisableRemoteVehicleCollisions(playerid, disable); +native DisableRemoteVehicleCollisions(playerID, disable); // Player world/map related ///

    Sets a checkpoint (red cylinder) for a player. Also shows a red blip on the radar. When players enter a checkpoint, OnPlayerEnterCheckpoint is called and actions can be performed. -/// The ID of the player for whom to set a checkpoint +/// The ID of the player for whom to set a checkpoint /// The x coordinate to set the checkpoint at /// The y coordinate to set the checkpoint at /// The z coordinate to set the checkpoint at @@ -1890,10 +1890,10 @@ native DisableRemoteVehicleCollisions(playerid, disable); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); +native SetPlayerCheckpoint(playerID, Float:x, Float:y, Float:z, Float:size); ///

    Disables (hides/destroys) a player's set checkpoint. Players can only have a single checkpoint set at a time. Checkpoints don't need to be disabled before setting another one. -/// The ID of the player whose checkpoint to disable +/// The ID of the player whose checkpoint to disable /// /// /// @@ -1907,10 +1907,10 @@ native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); /// 1: The function executed successfully. Success is also returned if the player doesn't have a checkpoint shown already.

    /// 0: The function failed to execute. This means the player is not connected. /// -native DisablePlayerCheckpoint(playerid); +native DisablePlayerCheckpoint(playerID); ///

    Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint callback is called. -/// The ID of the player to set the checkpoint for +/// The ID of the player to set the checkpoint for /// Type of checkpoint. 0-Normal, 1-Finish, 2-Nothing(Only the checkpoint without anything on it), 3-Air normal, 4-Air finish, 5-Air (rotates and stops), 6-Air (increases, decreases and disappears), 7-Air (swings down and up), 8-Air (swings up and down) /// x-Coordinate /// y-Coordinate @@ -1937,10 +1937,10 @@ native DisablePlayerCheckpoint(playerid); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerRaceCheckpoint(playerid, type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size); +native SetPlayerRaceCheckpoint(playerID, type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size); ///

    Disable any initialized race checkpoints for a specific player, since you can only have one at any given time. -/// The player to disable the current checkpoint for +/// The player to disable the current checkpoint for /// /// /// @@ -1950,10 +1950,10 @@ native SetPlayerRaceCheckpoint(playerid, type, Float:x, Float:y, Float:z, Float: /// /// /// -native DisablePlayerRaceCheckpoint(playerid); +native DisablePlayerRaceCheckpoint(playerID); /// Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in). -/// The ID of the player to set the world boundaries of +/// The ID of the player to set the world boundaries of /// The maximum x coordinate the player can go to /// The minimum x coordinate the player can go to /// The maximum y coordinate the player can go to @@ -1962,36 +1962,36 @@ native DisablePlayerRaceCheckpoint(playerid); /// This function does not work if used in OnPlayerConnect /// A player's world boundaries can be reset by setting them to 20000.0, -20000.0, 20000.0, -20000.0. These are the default values. /// This function doesn't work in interiors! -native SetPlayerWorldBounds(playerid, Float:maxX,Float:minX,Float:maxY,Float:minY); +native SetPlayerWorldBounds(playerID, Float:maxX,Float:minX,Float:maxY,Float:minY); /// Change the colour of a player's nametag and radar blip for another player. -/// The player that will see the player's changed blip/nametag color -/// The player whose color will be changed -/// New color. (RGBA) +/// The player that will see the player's changed blip/nametag colour +/// The player whose colour will be changed +/// New colour. (RGBA) /// /// /// /// -native SetPlayerMarkerForPlayer(playerid, showplayerid, color); +native SetPlayerMarkerForPlayer(playerID, showplayerID, colour); /// This functions allows you to toggle the drawing of player nametags, healthbars and armor bars which display above their head. For use of a similar function like this on a global level, ShowNameTags function. -/// Player who will see the results of this function -/// Player whose name tag will be shown or hidden +/// Player who will see the results of this function +/// Player whose name tag will be shown or hidden /// 1-show name tag, 0-hide name tag /// /// /// -/// ShowNameTags must be set to 1 to be able to show name tags with ShowPlayerNameTagForPlayer, that means that in order to be effective you need to ShowPlayerNameTagForPlayer(forplayerid, playerid, 0) ahead of time(OnPlayerStreamIn is a good spot). -native ShowPlayerNameTagForPlayer(playerid, showplayerid, show); +/// ShowNameTags must be set to 1 to be able to show name tags with ShowPlayerNameTagForPlayer, that means that in order to be effective you need to ShowPlayerNameTagForPlayer(forplayerID, playerID, 0) ahead of time(OnPlayerStreamIn is a good spot). +native ShowPlayerNameTagForPlayer(playerID, showplayerID, show); /// Place an icon/marker on a player's map. Can be used to mark locations such as banks and hospitals to players. -/// The ID of the player to set the map icon for -/// The player's icon ID, ranging from 0 to 99. This means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon +/// The ID of the player to set the map icon for +/// The player's icon ID, ranging from 0 to 99. This means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon /// The x coordinate to place the map icon at /// The y coordinate to place the map icon at /// The z coordinate to place the map icon at /// The icon to set -/// The color of the icon (RGBA). This should only be used with the square icon (ID: 0) +/// The colour of the icon (RGBA). This should only be used with the square icon (ID: 0) /// The style of icon (optional=MAPICON_LOCAL) /// /// @@ -2011,30 +2011,30 @@ native ShowPlayerNameTagForPlayer(playerid, showplayerid, show); /// 1: The function executed successfully.

    /// 0: The function failed to execute. Player is not connected. /// -native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markertype, color, style = MAPICON_LOCAL); +native SetPlayerMapIcon(playerID, iconID, Float:x, Float:y, Float:z, markertype, colour, style = MAPICON_LOCAL); ///

    Removes a map icon that was set earlier for a player using SetPlayerMapIcon. -/// The ID of the player whose icon to remove -/// The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon +/// The ID of the player whose icon to remove +/// The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon /// /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. /// -native RemovePlayerMapIcon(playerid, iconid); +native RemovePlayerMapIcon(playerID, iconID); ///

    Enable/Disable the teleporting ability for a player by right-clicking on the map. -/// The ID of the player to allow teleport +/// The ID of the player to allow teleport /// 1 to allow, 0 to disallow /// This function, as of 0.3d, is deprecated. Check OnPlayerClickMap. /// This function will work only if AllowAdminTeleport is enabled, and you have to be an admin. /// -native AllowPlayerTeleport(playerid, allow); +native AllowPlayerTeleport(playerID, allow); // Player camera /// Sets the camera to a specific position for a player. -/// ID of the player +/// ID of the player /// The x coordinate to place the camera at /// The y coordinate to place the camera at /// The z coordinate to place the camera at @@ -2047,10 +2047,10 @@ native AllowPlayerTeleport(playerid, allow); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified doesn't exist. /// -native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); +native SetPlayerCameraPos(playerID, Float:x, Float:y, Float:z); ///

    Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos. -/// The ID of the player whose camera to set +/// The ID of the player whose camera to set /// The x coordinate for the player's camera to look at /// The y coordinate for the player's camera to look at /// The z coordinate for the player's camera to look at @@ -2064,16 +2064,16 @@ native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, cut = CAMERA_CUT); +native SetPlayerCameraLookAt(playerID, Float:x, Float:y, Float:z, cut = CAMERA_CUT); ///

    Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos. -/// The player you want to restore the camera for +/// The player you want to restore the camera for /// /// -native SetCameraBehindPlayer(playerid); +native SetCameraBehindPlayer(playerID); /// Get the position of the player's camera. -/// The ID of the player to get the camera position of +/// The ID of the player to get the camera position of /// A float variable to store the x coordinate in, passed by reference /// A float variable to store the y coordinate in, passed by reference /// A float variable to store the z coordinate in, passed by reference @@ -2085,10 +2085,10 @@ native SetCameraBehindPlayer(playerid); /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// Player's camera positions are only updated once a second, unless aiming. /// It is recommended to set a 1 second timer if you wish to take action that relies on a player's camera position. -native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z); +native GetPlayerCameraPos(playerID, &Float:x, &Float:y, &Float:z); /// This function will return the current direction of player's aiming in 3-D space, the coords are relative to the camera position, see GetPlayerCameraPos. -/// The ID of the player you want to obtain the camera front vector of +/// The ID of the player you want to obtain the camera front vector of /// A float to store the x coordinate, passed by reference /// A float to store the y coordinate, passed by reference /// A float to store the z coordinate, passed by reference @@ -2097,10 +2097,10 @@ native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z); /// In 0.3a the camera front vector is only obtainable when player is inside a rhino, S.W.A.T tank, fire truck, or on foot. /// Since 0.3b the camera data can be obtained when the player is in any vehicle or on foot. /// The position is stored in the specified variables. -native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z); +native GetPlayerCameraFrontVector(playerID, &Float:x, &Float:y, &Float:z); /// Returns the current GTA camera mode for the requested player. The camera modes are useful in determining whether a player is aiming, doing a passenger driveby etc. -/// The ID of the player whose camera mode to retrieve +/// The ID of the player whose camera mode to retrieve /// /// /// @@ -2108,10 +2108,10 @@ native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z); /// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// The camera mode as an integer (or -1 if player is not connected). -native GetPlayerCameraMode(playerid); +native GetPlayerCameraMode(playerID); /// Toggle camera targeting functions for a player. Disabled by default to save bandwidth. -/// The ID of the player to toggle camera targeting functions for +/// The ID of the player to toggle camera targeting functions for /// 1 to enable camera targeting functions and 0 to disable them /// /// @@ -2121,20 +2121,20 @@ native GetPlayerCameraMode(playerid); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player is not connected. /// -native EnablePlayerCameraTarget(playerid, enable); +native EnablePlayerCameraTarget(playerID, enable); ///

    Allows you to retrieve the ID of the object the player is looking at. -/// The ID of the player to check +/// The ID of the player to check /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. -/// The ID of the object playerid is looking at. If INVALID_OBJECT_ID (65535) is returned, playerid isn't looking at any object. -native GetPlayerCameraTargetObject(playerid); +/// The ID of the object playerID is looking at. If INVALID_OBJECT_ID (65535) is returned, playerID isn't looking at any object. +native GetPlayerCameraTargetObject(playerID); /// Get the ID of the vehicle the player is looking at. -/// The ID of the player to check +/// The ID of the player to check /// /// /// @@ -2143,22 +2143,22 @@ native GetPlayerCameraTargetObject(playerid); /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. /// This function can (obviously) only return one vehicle ID at a time, while the player may be looking at multiple. It generally seems to detect the closest vehicle first. /// The vehicle ID of the vehicle the player is looking at. INVALID_VEHICLE_ID if none. -native GetPlayerCameraTargetVehicle(playerid); +native GetPlayerCameraTargetVehicle(playerID); -/// Allows you to retrieve the ID of the player the playerid is looking at. -/// The ID of the player to check +/// Allows you to retrieve the ID of the player the playerID is looking at. +/// The ID of the player to check /// /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. -/// Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerid is aming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerid is looking at (reference point is the center of the screen). -/// The ID of the player the playerid is looking at. -native GetPlayerCameraTargetPlayer(playerid); +/// Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerID is aming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerID is looking at (reference point is the center of the screen). +/// The ID of the player the playerID is looking at. +native GetPlayerCameraTargetPlayer(playerID); /// Allows you to retrieve the ID of the actor the player is looking at (if any). -/// The ID of the player to get the target actor of +/// The ID of the player to get the target actor of /// /// /// @@ -2168,48 +2168,48 @@ native GetPlayerCameraTargetPlayer(playerid); /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. /// This function only tells you which actor (if any) the player is looking at. To find out if they are aiming at them, you need to use GetPlayerTargetActor. /// The ID of the actor the player is looking at. -native GetPlayerCameraTargetActor(playerid); +native GetPlayerCameraTargetActor(playerID); /// Retrieves the aspect ratio of a player's camera. -/// The ID of the player to get the camera aspect ratio of +/// The ID of the player to get the camera aspect ratio of /// /// /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// The return value of this function represents the value of the "widescreen" option in the game's display settings, not the actual aspect ratio of the player's display. /// The aspect ratio of the player's camera, as a float. The aspect ratio can be one of three values: 4:3 (1.3333334, Float:0x3FAAAAAB) when widescreen is turned off, 5:4 (1.2470589, Float:0x3F9F9FA0) when letterbox mode is turned on, and 16:9 (1.7764707, Float:0x3FE36364) when widescreen is turned on regardless of the letterbox mode. -native Float:GetPlayerCameraAspectRatio(playerid); +native Float:GetPlayerCameraAspectRatio(playerID); /// Retrieves the game camera zoom level for a given player. -/// The ID of the player to get the camera zoom level of +/// The ID of the player to get the camera zoom level of /// /// /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This retrieves the zoom level of the GAME camera, not the camera WEAPON. /// The player's camera zoom level (camera, sniper etc.), a float. -native Float:GetPlayerCameraZoom(playerid); +native Float:GetPlayerCameraZoom(playerID); /// You can use this function to attach the player camera to objects. -/// The ID of the player which will have your camera attached on object -/// The object id which you want to attach the player camera +/// The ID of the player which will have your camera attached on object +/// The object ID which you want to attach the player camera /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You need to create the object first, before attempting to attach a player camera for that. -native AttachCameraToObject(playerid, objectid); +native AttachCameraToObject(playerID, objectID); /// Attaches a player's camera to a player-object. The player is able to move their camera while it is attached to an object. Can be used with MovePlayerObject and AttachPlayerObjectToVehicle. -/// The ID of the player which will have their camera attached to a player-object -/// The ID of the player-object to which the player's camera will be attached +/// The ID of the player which will have their camera attached to a player-object +/// The ID of the player-object to which the player's camera will be attached /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// The player-object must be created before attempting to attach the player's camera to it. -native AttachCameraToPlayerObject(playerid, playerobjectid); +native AttachCameraToPlayerObject(playerID, playerobjectID); /// Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes. -/// The ID of the player the camera should be moved for +/// The ID of the player the camera should be moved for /// The x position the camera should start to move from /// The y position the camera should start to move from /// The z position the camera should start to move from @@ -2223,10 +2223,10 @@ native AttachCameraToPlayerObject(playerid, playerobjectid); /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); +native InterpolateCameraPos(playerID, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); /// Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. -/// The ID of the player the camera should be moved for +/// The ID of the player the camera should be moved for /// The x position the camera should start to move from /// The y position the camera should start to move from /// The z position the camera should start to move from @@ -2240,36 +2240,36 @@ native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Flo /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); +native InterpolateCameraLookAt(playerID, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); // Player conditionals /// Checks if a player is connected (if an ID is taken by a connected player). -/// The ID of the player to check +/// The ID of the player to check /// /// /// /// This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. /// 1 if the player is connected, 0 if not. -native IsPlayerConnected(playerid); +native IsPlayerConnected(playerID); /// Checks if a player is in a specific vehicle. -/// ID of the player -/// ID of the vehicle +/// ID of the player +/// ID of the vehicle /// /// /// 1 if the player is in the vehicle, 0 if not. -native IsPlayerInVehicle(playerid, vehicleid); +native IsPlayerInVehicle(playerID, vehicleID); /// Check if a player is inside any vehicle (as a driver or passenger). -/// The ID of the player to check +/// The ID of the player to check /// /// /// 1 if the player is in a vehicle, 0 if not. -native IsPlayerInAnyVehicle(playerid); +native IsPlayerInAnyVehicle(playerID); /// Check if the player is currently inside a checkpoint, this could be used for properties or teleport points for example. -/// The player you want to know the status of +/// The player you want to know the status of /// /// /// @@ -2280,10 +2280,10 @@ native IsPlayerInAnyVehicle(playerid); /// /// /// 0 if player isn't in his checkpoint else 1. -native IsPlayerInCheckpoint(playerid); +native IsPlayerInCheckpoint(playerID); /// Check if the player is inside their current set race checkpoint (SetPlayerRaceCheckpoint). -/// The ID of the player to check +/// The ID of the player to check /// /// /// @@ -2294,13 +2294,13 @@ native IsPlayerInCheckpoint(playerid); /// /// /// 1 is the player is in a race checkpoint, 0 if not. -native IsPlayerInRaceCheckpoint(playerid); +native IsPlayerInRaceCheckpoint(playerID); // Virtual Worlds /// Set the virtual world of a player. They can only see other players or vehicles that are in that same world. -/// The ID of the player you want to set the virtual world of -/// The virtual world ID to put the player in +/// The ID of the player you want to set the virtual world of +/// The virtual world ID to put the player in /// /// /// The default virtual world is 0 @@ -2308,27 +2308,27 @@ native IsPlayerInRaceCheckpoint(playerid); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerVirtualWorld(playerid, worldid); +native SetPlayerVirtualWorld(playerID, worldID); ///

    Retrieves the current virtual world the player is in. -/// The ID of the player to get the virtual world of +/// The ID of the player to get the virtual world of /// /// /// /// The ID of the virtual world the player is currently in. -native GetPlayerVirtualWorld(playerid); +native GetPlayerVirtualWorld(playerID); // Insane Stunts /// Toggle stunt bonuses for a player. Enabled by default. -/// The ID of the player to toggle stunt bonuses for +/// The ID of the player to toggle stunt bonuses for /// 1 to enable stunt bonuses and 0 to disable them /// /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player is not connected. /// -native EnableStuntBonusForPlayer(playerid, bool:enable); +native EnableStuntBonusForPlayer(playerID, bool:enable); ///

    Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie). /// 1 to enable stunt bonuses or 0 to disable them @@ -2336,7 +2336,7 @@ native EnableStuntBonusForPlayer(playerid, bool:enable); native EnableStuntBonusForAll(enable); /// Toggle whether a player is in spectator mode or not. While in spectator mode a player can spectate (watch) other players and vehicles. After using this function, either PlayerSpectatePlayer or PlayerSpectateVehicle needs to be used. -/// The ID of the player who should spectate +/// The ID of the player who should spectate /// 1 to enable spectating and 0 to disable /// /// @@ -2347,16 +2347,16 @@ native EnableStuntBonusForAll(enable); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player does not exist. /// -native TogglePlayerSpectating(playerid, toggle); +native TogglePlayerSpectating(playerID, toggle); ///

    Makes a player spectate (watch) another player. -/// The ID of the player that will spectate -/// The ID of the player that should be spectated +/// The ID of the player that will spectate +/// The ID of the player that should be spectated /// The mode to spectate with (optional=SPECTATE_MODE_NORMAL) /// /// /// Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. -/// playerid and targetplayerid's virtual world and interior must be the same for this function to work properly. +/// playerID and targetplayerID's virtual world and interior must be the same for this function to work properly. /// /// Spectate modes:

    ///

      @@ -2369,39 +2369,39 @@ native TogglePlayerSpectating(playerid, toggle); /// 1: The function executed successfully.

      /// 0: The function failed to execute. One of the players specified does not exist. /// -native PlayerSpectatePlayer(playerid, targetplayerid, mode = SPECTATE_MODE_NORMAL); +native PlayerSpectatePlayer(playerID, targetplayerID, mode = SPECTATE_MODE_NORMAL); ///

      Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. -/// The ID of the player who should spectate a vehicle -/// The ID of the vehicle the player should spectate +/// The ID of the player who should spectate a vehicle +/// The ID of the vehicle the player should spectate /// The spectate mode. Can generally be left blank as it defaults to 'normal' /// /// /// Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. -/// playerid and targetvehicleid have to be in the same interior for this function to work properly. +/// playerID and targetvehicleID have to be in the same interior for this function to work properly. /// /// 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.

      /// 0: The function failed to execute. The player, vehicle, or both don't exist. /// -native PlayerSpectateVehicle(playerid, targetvehicleid, mode = SPECTATE_MODE_NORMAL); +native PlayerSpectateVehicle(playerID, targetvehicleID, mode = SPECTATE_MODE_NORMAL); ///

      Starts recording a player's movements to a file, which can then be reproduced by an NPC. -/// The ID of the player to record +/// The ID of the player to record /// The type of recording /// The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native StartRecordingPlayerData(playerid, recordtype, const recordname[]); +native StartRecordingPlayerData(playerID, recordtype, const recordname[]); /// Stops all the recordings that had been started with StartRecordingPlayerData for a specific player. -/// The player you want to stop the recordings of +/// The player you want to stop the recordings of /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native StopRecordingPlayerData(playerid); +native StopRecordingPlayerData(playerID); /// Display the cursor and allow the player to select a textdraw. -/// The ID of the player that should be able to select a textdraw -/// The color of the textdraw when hovering over with mouse (RGBA) +/// The ID of the player that should be able to select a textdraw +/// The colour of the textdraw when hovering over with mouse (RGBA) /// /// /// @@ -2410,21 +2410,21 @@ native StopRecordingPlayerData(playerid); /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// TextDrawSetSelectable or PlayerTextDrawSetSelectable MUST be used first, to allow a textdraw to be selectable. /// It is the TEXT which will be highlighted when hovered over, NOT the box (if one is shown). -native SelectTextDraw(playerid, hovercolor); // enables the mouse so the player can select a textdraw +native SelectTextDraw(playerID, hoverColour); // enables the mouse so the player can select a textdraw /// Cancel textdraw selection with the mouse. -/// The ID of the player that should be the textdraw selection disabled +/// The ID of the player that should be the textdraw selection disabled /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// This function calls OnPlayerClickTextDraw with INVALID_TEXT_DRAW (65535). Using this function inside OnPlayerClickTextDraw without catching this case will cause clients to go into an infinite loop. -native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mouse +native CancelSelectTextDraw(playerID); // cancel textdraw selection with the mouse // Explosion /// Creates an explosion that is only visible to a single player. This can be used to isolate explosions from other players or to make them only appear in specific virtual worlds. -/// The ID of the player to create the explosion for +/// The ID of the player to create the explosion for /// The x coordinate of the explosion /// The y coordinate of the explosion /// The z coordinate of the explosion @@ -2434,13 +2434,13 @@ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mou /// This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! /// There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. /// This function always returns 1, even if the function failed to excute (player doesn't exist, invalid radius, or invalid explosion type). -native CreateExplosionForPlayer(playerid, Float:x, Float:y, Float:z, type, Float:radius); +native CreateExplosionForPlayer(playerID, Float:x, Float:y, Float:z, type, Float:radius); /// Perform a memory check on the client. -/// The ID of the player to check +/// The ID of the player to check /// The type of check to perform /// The base address to check /// The offset from the base address /// The number of bytes to check -native SendClientCheck(playerid, type, memAddr, memOffset, byteCount); +native SendClientCheck(playerID, type, memAddr, memOffset, byteCount); diff --git a/a_samp.inc b/a_samp.inc index f61602b..64222ff 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -395,50 +395,50 @@ open.mp releases can use `A` as the first digit. /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) native format(output[], len = sizeof (output), const format[], {Float,_}:...); -/// This function sends a message to a specific player with a chosen color in the chat. The whole line in the chatbox will be in the set color unless color embedding is used (since 0.3c). -/// The ID of the player to display the message to -/// The color of the message (RGBA) +/// This function sends a message to a specific player with a chosen colour in the chat. The whole line in the chatbox will be in the set colour unless colour embedding is used (since 0.3c). +/// The ID of the player to display the message to +/// The colour of the message (RGBA) /// The text that will be displayed (max 144 characters) /// /// /// /// If a message is longer than 144 characters, it will not be sent. Truncation can be used to prevent this. Displaying a message on multiple lines will also solve this issue. -/// Avoid using the percent sign (or format specifiers) in the actual message text without properly escaping it (like %%). It will result in crashes otherwise. -/// You can use color embedding for multiple colors in the message. +/// AvoID using the percent sign (or format specifiers) in the actual message text without properly escaping it (like %%). It will result in crashes otherwise. +/// You can use colour embedding for multiple colours in the message. /// /// 1: The function executed successfully. Success is reported when the string is over 144 characters, but the message won't be sent.

      /// 0: The function failed to execute. The player is not connected. /// -native SendClientMessage(playerid, color, const message[]); +native SendClientMessage(playerID, colour, const message[]); ///

      Displays a message in chat to all players. This is a multi-player equivalent of SendClientMessage. -/// The color of the message (RGBA) +/// The colour of the message (RGBA) /// The message to show (max 144 characters) /// /// -/// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. +/// AvoID using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. /// This function always returns 1. -native SendClientMessageToAll(color, const message[]); +native SendClientMessageToAll(colour, const message[]); -/// Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their color, followed by the message in white. -/// The ID of the player who will receive the message -/// The sender's ID. If invalid, the message will not be sent +/// Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. +/// The ID of the player who will receive the message +/// The sender's ID. If invalid, the message will not be sent /// The message that will be sent /// /// /// /// -/// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. -native SendPlayerMessageToPlayer(playerid, senderid, const message[]); +/// AvoID using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. +native SendPlayerMessageToPlayer(playerID, senderID, const message[]); -/// Sends a message in the name of a player to all other players on the server. The line will start with the sender's name in their color, followed by the message in white. -/// The ID of the sender. If invalid, the message will not be sent +/// Sends a message in the name of a player to all other players on the server. The line will start with the sender's name in their colour, followed by the message in white. +/// The ID of the sender. If invalid, the message will not be sent /// The message that will be sent /// /// /// -/// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. -native SendPlayerMessageToAll(senderid, const message[]); +/// AvoID using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. +native SendPlayerMessageToAll(senderID, const message[]); /// Adds a death to the 'killfeed' on the right-hand side of the screen for all players. /// The ID of the killer (can be INVALID_PLAYER_ID) @@ -453,7 +453,7 @@ native SendPlayerMessageToAll(senderid, const message[]); native SendDeathMessage(killer, killee, weapon); /// Adds a death to the 'killfeed' on the right-hand side of the screen for a single player. -/// The ID of the player to send the death message to +/// The ID of the player to send the death message to /// The ID of the killer (can be INVALID_PLAYER_ID) /// The ID of the player that died /// The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) @@ -464,7 +464,7 @@ native SendDeathMessage(killer, killee, weapon); /// 1: The function executed successfully.

      /// 0: The function failed to execute. /// -native SendDeathMessageToPlayer(playerid, killer, killee, weapon); +native SendDeathMessageToPlayer(playerID, killer, killee, weapon); ///

      Shows 'game text' (on-screen text) for a certain length of time for all players. /// The text to be displayed @@ -476,7 +476,7 @@ native SendDeathMessageToPlayer(playerid, killer, killee, weapon); native GameTextForAll(const string[], time, style); /// Shows 'game text' (on-screen text) for a certain length of time for a specific player. -/// The ID of the player to show the gametext for +/// The ID of the player to show the gametext for /// The text to be displayed /// The duration of the text being shown in milliseconds /// The style of text to be displayed @@ -486,7 +486,7 @@ native GameTextForAll(const string[], time, style); /// 1: The function executed successfully. Success is reported when the style and/or time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.

      /// 0: The function failed to execute. This means either the string is null or the player is not connected. /// -native GameTextForPlayer(playerid, const string[], time, style); +native GameTextForPlayer(playerID, const string[], time, style); ///

      Sets a 'timer' to call a function after some time. Can be set to repeat. /// Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server @@ -530,11 +530,11 @@ native SetTimer(const funcname[], interval, repeating); native SetTimerEx(const funcname[], interval, repeating, const format[], {Float,_}:...); /// Kills (stops) a running timer. -/// The ID of the timer to kill (returned by SetTimer or SetTimerEx) +/// The ID of the timer to kill (returned by SetTimer or SetTimerEx) /// /// /// This function always returns 0. -native KillTimer(timerid); +native KillTimer(timerID); /// Returns the uptime of the actual server (not the SA-MP server) in milliseconds. /// @@ -628,25 +628,25 @@ native Float:atan(Float:value); /// The angle in degrees. native Float:atan2(Float:y, Float:x); -/// Gets the highest playerid currently in use on the server. +/// Gets the highest playerID currently in use on the server. /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The highest playerid currently in use on the server or 0 if there are no connected players. +/// The highest playerID currently in use on the server or 0 if there are no connected players. native GetPlayerPoolSize(); -/// Gets the highest vehicleid currently in use on the server. +/// Gets the highest vehicleID currently in use on the server. /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The highest vehicleid currently in use on the server or 0 if there are no created vehicles. +/// The highest vehicleID currently in use on the server or 0 if there are no created vehicles. native GetVehiclePoolSize(); -/// Gets the highest actorid created on the server. +/// Gets the highest actorID created on the server. /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The highest actorid created on the server or 0 if there are no created actors. +/// The highest actorID created on the server or 0 if there are no created actors. native GetActorPoolSize(); // Hash @@ -815,7 +815,7 @@ native SetGameModeText(const string[]); native SetTeamCount(count); /// Adds a class to class selection. Classes are used so players may spawn with a skin of their choice. -/// The skin which the player will spawn with +/// The skin which the player will spawn with /// The x coordinate of the spawnpoint of this class /// The y coordinate of the spawnpoint of this class /// The z coordinate of the spawnpoint of this class @@ -839,11 +839,11 @@ native SetTeamCount(count); /// /// /// -native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); +native AddPlayerClass(modelID, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /// This function is exactly the same as the AddPlayerClass function, with the addition of a team parameter. -/// The team you want the player to spawn in -/// The skin which the player will spawn with +/// The team you want the player to spawn in +/// The skin which the player will spawn with /// The x coordinate of the spawnpoint of this class /// The y coordinate of the spawnpoint of this class /// The z coordinate of the spawnpoint of this class @@ -865,16 +865,16 @@ native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:a /// /// /// -native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); +native AddPlayerClassEx(teamID, modelID, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /// Adds a 'static' vehicle (models are pre-loaded for players) to the gamemode. -/// The Model ID for the vehicle +/// The Model ID for the vehicle /// The x coordinate of the spawnpoint of this vehicle /// The y coordinate of the spawnpoint of this vehicle /// The z coordinate of the spawnpoint of this vehicle /// Direction of vehicle - angle -/// The primary color ID. -1 for random (random color chosen by client) -/// The secondary color ID. -1 for random (random color chosen by client) +/// The primary colour ID. -1 for random (random colour chosen by client) +/// The secondary colour ID. -1 for random (random colour chosen by client) /// ///
        ///
      • The vehicle ID of the vehicle created (between 1 and MAX_VEHICLES).
      • @@ -885,16 +885,16 @@ native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawn /// /// /// -native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, color1, color2); +native AddStaticVehicle(modelID, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2); /// Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from AddStaticVehicle in only one way: allows a respawn time to be set for when the vehicle is left unoccupied by the driver. -/// The Model ID for the vehicle +/// The Model ID for the vehicle /// The x coordinate of the spawnpoint of this vehicle /// The y coordinate of the spawnpoint of this vehicle /// The z coordinate of the spawnpoint of this vehicle /// Direction of vehicle - angle -/// The primary color ID. -1 for random (random color chosen by client) -/// The secondary color ID. -1 for random (random color chosen by client) +/// The primary colour ID. -1 for random (random colour chosen by client) +/// The secondary colour ID. -1 for random (random colour chosen by client) /// The delay until the car is respawned without a driver, in seconds /// Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=0) /// @@ -907,7 +907,7 @@ native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float /// /// /// -native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, color1, color2, respawnDelay, bool:addSiren = false); +native AddStaticVehicleEx(modelID, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2, respawnDelay, bool:addSiren = false); /// This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically). /// The model of the pickup @@ -915,7 +915,7 @@ native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Flo /// The x coordinate to create the pickup at /// The y coordinate to create the pickup at /// The z coordinate to create the pickup at -/// The virtual world ID to put the pickup in. Use -1 to show the pickup in all worlds +/// The virtual world ID to put the pickup in. Use -1 to show the pickup in all worlds /// /// 1 if the pickup is successfully created. ///

        @@ -925,7 +925,7 @@ native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Flo /// /// /// -native AddStaticPickup(model, type, Float:x, Float:y, Float:x, virtualworld = 0); +native AddStaticPickup(model, type, Float:x, Float:y, Float:x, virtualWorld = 0); ///

        This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. /// The model of the pickup @@ -933,7 +933,7 @@ native AddStaticPickup(model, type, Float:x, Float:y, Float:x, virtualworld = 0) /// The x coordinate to create the pickup at /// The y coordinate to create the pickup at /// The z coordinate to create the pickup at -/// The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds (optional=0) +/// The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds (optional=0) /// /// /// @@ -969,7 +969,7 @@ native AddStaticPickup(model, type, Float:x, Float:y, Float:x, virtualworld = 0) ///
      /// /// The ID of the created pickup, -1 on failure (pickup max limit). -native CreatePickup(model, type, Float:x, Float:y, Float:z, virtualworld = 0); +native CreatePickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0); /// Destroys a pickup created with CreatePickup. /// The ID of the pickup to destroy (returned by CreatePickup) @@ -999,7 +999,7 @@ native ShowNameTags(show); ///
    • PLAYER_MARKERS_MODE_STREAMED 2
    • ///
    ///
    -/// It is also possible to set a player's color to a color that has full transparency (no alpha value). This makes it possible to show markers on a per-player basis. +/// It is also possible to set a player's colour to a colour that has full transparency (no alpha value). This makes it possible to show markers on a per-player basis. native ShowPlayerMarkers(mode); /// Ends the current gamemode. @@ -1016,7 +1016,7 @@ native GameModeExit(); native SetWorldTime(hour); /// Get the name of a weapon. -/// The ID of the weapon to get the name of +/// The ID of the weapon to get the name of /// An array to store the weapon's name in, passed by reference /// The maximum length of the weapon name to store. /// @@ -1026,7 +1026,7 @@ native SetWorldTime(hour); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The weapon specified does not exist. /// -native GetWeaponName(weaponid, weapon[], len = sizeof (weapon)); +native GetWeaponName(weaponID, weapon[], len = sizeof (weapon)); /// 1 to enable, 0 to disable tire popping /// This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. @@ -1046,11 +1046,11 @@ native EnableVehicleFriendlyFire(); native AllowInteriorWeapons(allow); ///

    Set the world weather for all players. -/// The weather to set +/// The weather to set /// /// /// If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. -native SetWeather(weatherid); +native SetWeather(weatherID); /// Get the currently set gravity. /// @@ -1153,66 +1153,66 @@ native LimitPlayerMarkerRadius(Float:markerRadius); native ConnectNPC(const name[], const script[]); /// Check if a player is an actual player or an NPC. -/// The ID of the player to check +/// The ID of the player to check /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is an NPC, 0 if not. -native IsPlayerNPC(playerid); +native IsPlayerNPC(playerID); -native AddCharModel(baseid, newid, const dffname[], const txdname[]); -native AddSimpleModel(virtualworld, baseid, newid, const dffname[], const txdname[]); -native AddSimpleModelTimed(virtualworld, baseid, newid, const dffname[], const txdname[], timeon, timeoff); +native AddCharModel(baseID, newID, const dffname[], const txdname[]); +native AddSimpleModel(virtualWorld, baseID, newID, const dffname[], const txdname[]); +native AddSimpleModelTimed(virtualWorld, baseID, newID, const dffname[], const txdname[], timeon, timeoff); native FindModelFileNameFromCRC(crc, retstr[], retstr_size = sizeof (retstr)); native FindTextureFileNameFromCRC(crc, retstr[], retstr_size = sizeof (retstr)); -native RedirectDownload(playerid, const url[]); +native RedirectDownload(playerID, const url[]); // Admin /// Check if a player is logged in as an RCON admin. -/// The ID of the player to check +/// The ID of the player to check /// /// /// 1 if the player is an RCON admin, 0 if not. -native IsPlayerAdmin(playerid); +native IsPlayerAdmin(playerID); /// Kicks a player from the server. They will have to quit the game and re-connect if they wish to continue playing. -/// The ID of the player to kick +/// The ID of the player to kick /// /// /// As of SA-MP 0.3x, any action taken directly before Kick() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the kick. /// This function always returns 1, even if the function failed to execute (player specified doesn't exist). -native Kick(playerid); +native Kick(playerID); /// Ban a player who is currently in the server. They will be unable to join the server ever again. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. BanEx can be used to give a reason for the ban. IP bans can be added/removed using the RCON banip and unbanip commands (SendRconCommand). -/// The ID of the player to ban +/// The ID of the player to ban /// /// /// As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. /// -native Ban(playerid); +native Ban(playerID); /// Ban a player with a reason. -/// The ID of the player to ban +/// The ID of the player to ban /// The reason for the ban /// /// /// As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. -native BanEx(playerid, const reason[]); +native BanEx(playerID, const reason[]); /// Sends an RCON (Remote Console) command. /// The RCON command to be executed /// /// /// -/// Does not support login, due to the lack of a 'playerid' parameter. +/// Does not support login, due to the lack of a 'playerID' parameter. /// 'password 0' will remove the server's password if one is set. /// This function always returns 1. /// This function will result in OnRconCommand being called. native SendRconCommand(const command[]); /// Gets a player's network stats and saves them into a string. -/// The ID of the player you want to get the networkstats of +/// The ID of the player you want to get the networkstats of /// The string to store the networkstats in, passed by reference /// The length of the string that should be stored /// @@ -1227,7 +1227,7 @@ native SendRconCommand(const command[]); /// /// This function was added in SA-MP 0.3c R4 and will not work in earlier versions! /// This function may not return accurate data when used under OnPlayerDisconnect if the player has quit normally. It usually returns accurate data if the player has been kicked or has timed out. -native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); +native GetPlayerNetworkStats(playerID, output[], size = sizeof (output)); /// Gets the server's network stats and stores them in a string. /// The string to store the network stats in, passed by reference @@ -1269,16 +1269,16 @@ native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); native GetNetworkStats(output[], size = sizeof (output)); /// Returns the SA-MP client version, as reported by the player. -/// The ID of the player to get the client version of +/// The ID of the player to get the client version of /// The string to store the player's version in, passed by reference /// The maximum length of the version /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// The string the version gets stored in will be empty if playerid is an NPC. +/// The string the version gets stored in will be empty if playerID is an NPC. /// 1 on success and 0 on failure (if player specified doesn't exist). -native GetPlayerVersion(playerid, version[], len = sizeof (version)); // Returns the SA-MP client revision as reported by the player +native GetPlayerVersion(playerID, version[], len = sizeof (version)); // Returns the SA-MP client revision as reported by the player /// Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. /// The IP to block @@ -1328,7 +1328,7 @@ native GetServerVarAsInt(const cvar[]); /// Type 'varlist' in the server console to display a list of available server variables and their types. /// The value of the specified server variable. 0 if the specified server variable is not a boolean or doesn't exist. native GetServerVarAsBool(const cvar[]); -// These are the same 3 functions as above although they avoid the name ambiguity/conflict with the SVar system. +// These are the same 3 functions as above although they avoID the name ambiguity/conflict with the SVar system. /// Get the string value of a console variable. /// The name of the string variable to get the value of @@ -1367,7 +1367,7 @@ native GetConsoleVarAsBool(const cvar[]); native GetServerTickRate(); /// Gets the amount of time (in milliseconds) that a player has been connected to the server for. -/// The ID of the player to get the connected time of +/// The ID of the player to get the connected time of /// /// /// @@ -1381,10 +1381,10 @@ native GetServerTickRate(); /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// The return value is not reset to zero after changing the game mode (using the RCON command "gmx"). /// This function returns the amount of time (in milliseconds) that a player has been connected to the server for. 0 is returned if the player is not connected. -native NetStats_GetConnectedTime(playerid); +native NetStats_GetConnectedTime(playerID); /// Gets the number of messages the server has received from the player. -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1397,10 +1397,10 @@ native NetStats_GetConnectedTime(playerid); /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This function returns the number of messages the server has received from the player. 0 is returned if the player is not connected. -native NetStats_MessagesReceived(playerid); +native NetStats_MessagesReceived(playerID); /// Gets the amount of data (in bytes) that the server has received from the player. -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1413,10 +1413,10 @@ native NetStats_MessagesReceived(playerid); /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This function returns the number of bytes the server has received from the player. 0 is returned if the player is not connected. -native NetStats_BytesReceived(playerid); +native NetStats_BytesReceived(playerID); /// Gets the number of messages the server has sent to the player. -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1429,10 +1429,10 @@ native NetStats_BytesReceived(playerid); /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// The number of messages the server has sent to the player. -native NetStats_MessagesSent(playerid); +native NetStats_MessagesSent(playerID); /// Gets the amount of data (in bytes) that the server has sent to the player. -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1445,10 +1445,10 @@ native NetStats_MessagesSent(playerid); /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This function returns the number of bytes the server has sent to the player. 0 is returned if the player is not connected. -native NetStats_BytesSent(playerid); +native NetStats_BytesSent(playerID); /// Gets the number of messages the player has received in the last second. -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1461,10 +1461,10 @@ native NetStats_BytesSent(playerid); /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// the number of messages the player has received in the last second. -native NetStats_MessagesRecvPerSecond(playerid); +native NetStats_MessagesRecvPerSecond(playerID); /// Gets the packet loss percentage of a player. Packet loss means data the player is sending to the server is being lost (or vice-versa). -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1480,10 +1480,10 @@ native NetStats_MessagesRecvPerSecond(playerid); /// This function has been found to be currently unreliable the output is not as expected when compared to the client. Therefore this function should not be used as a packet loss kicker. /// A more accurate packetloss function can be found here: http://forum.sa-mp.com/showpost.php?p=2488911&postcount=984 /// The percentage packet loss as a float. 0.0 if player not connected. -native Float:NetStats_PacketLossPercent(playerid); +native Float:NetStats_PacketLossPercent(playerID); /// Gets the player's current connection status. -/// The ID of the player to get the connection status of +/// The ID of the player to get the connection status of /// /// /// @@ -1513,10 +1513,10 @@ native Float:NetStats_PacketLossPercent(playerid); /// ///
    /// The player's connection status, as an integer value. -native NetStats_ConnectionStatus(playerid); +native NetStats_ConnectionStatus(playerID); /// Get a player's IP and port. -/// The ID of the player to get the IP and port of +/// The ID of the player to get the IP and port of /// A string array to store the IP and port in, passed by reference /// The maximum length of the IP/port. 22 is recommended /// @@ -1531,7 +1531,7 @@ native NetStats_ConnectionStatus(playerid); /// /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! -native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); +native NetStats_GetIpPort(playerID, output[], size = sizeof (output)); // Menu @@ -1559,25 +1559,25 @@ native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); native Menu:CreateMenu(const title[], columns, Float:x, Float:y, Float:col1width, Float:col2width = 0.0); /// Destroys the specified menu. -/// The menu ID to destroy +/// The menu ID to destroy /// /// /// /// /// /// 1 if the destroying was successful, otherwise 0. -native DestroyMenu(Menu:menuid); +native DestroyMenu(Menu:menuID); /// Adds an item to a specified menu. -/// The menu id to add an item to +/// The menu ID to add an item to /// The column to add the item to /// The text for the new menu item /// ///
      ///
    • Crashes when passed an invalid menu ID.
    • -///
    • You can only have 12 items per menu (13th goes to the right side of the header of column name (colored), 14th and higher not display at all).
    • +///
    • You can only have 12 items per menu (13th goes to the right side of the header of column name (coloured), 14th and higher not display at all).
    • ///
    • You can only use 2 columns (0 and 1).
    • -///
    • You can only add 8 color codes per one item (~r~, ~g~ etc.).
    • +///
    • You can only add 8 colour codes per one item (~r~, ~g~ etc.).
    • ///
    • Maximum length of menu item is 31 symbols.
    • ///
    ///
    @@ -1587,10 +1587,10 @@ native DestroyMenu(Menu:menuid); /// /// /// -native AddMenuItem(Menu:menuid, column, const menutext[]); +native AddMenuItem(Menu:menuID, column, const menutext[]); /// Sets the caption of a column in a menu. -/// ID of the menu to change +/// ID of the menu to change /// The column (0 or 1) to set the header of /// The caption text for the column /// @@ -1598,11 +1598,11 @@ native AddMenuItem(Menu:menuid, column, const menutext[]); /// /// Crashes when passed an invalid menu ID. /// Note that you can add only 12 items with AddMenuItem. The 13th object of a menu would replace the header of the column which is correctly set with this function. -native SetMenuColumnHeader(Menu:menuid, column, const columnheader[]); +native SetMenuColumnHeader(Menu:menuID, column, const columnheader[]); /// Shows a previously created menu for a player. -/// The ID of the menu to show. Returned by CreateMenu -/// The ID of the player to whom the menu will be shown +/// The ID of the menu to show. Returned by CreateMenu +/// The ID of the player to whom the menu will be shown /// /// /// @@ -1614,11 +1614,11 @@ native SetMenuColumnHeader(Menu:menuid, column, const columnheader[]); /// 1: The function executed successfully.

    /// 0: The function failed to execute. Menu and/or player doesn't exist. /// -native ShowMenuForPlayer(Menu:menuid, playerid); +native ShowMenuForPlayer(Menu:menuID, playerID); ///

    Hides a menu for a player. -/// The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow -/// The ID of the player that the menu will be hidden for +/// The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow +/// The ID of the player that the menu will be hidden for /// /// /// @@ -1627,25 +1627,25 @@ native ShowMenuForPlayer(Menu:menuid, playerid); /// 1: The function executed successfully.

    /// 0: The function failed to execute. /// -native HideMenuForPlayer(Menu:menuid, playerid); +native HideMenuForPlayer(Menu:menuID, playerID); ///

    Check if a menu ID is vliad. -/// The menu to check for existance +/// The menu to check for existance /// /// /// 1 if the menu is valid, otherwise 0. -native IsValidMenu(Menu:menuid); +native IsValidMenu(Menu:menuID); /// Disable a menu. -/// The ID of the menu to disable +/// The ID of the menu to disable /// /// /// /// Crashes when passed an invalid menu ID. -native DisableMenu(Menu:menuid); +native DisableMenu(Menu:menuID); /// Disable a specific row in a menu for all players. It will be greyed-out and can't be selected by players. -/// The ID of the menu to disable a row of. Ensure this is valid, as an invalid menu ID will crash the entire server +/// The ID of the menu to disable a row of. Ensure this is valid, as an invalid menu ID will crash the entire server /// The ID of the row to disable (rows start at 0) /// /// @@ -1655,10 +1655,10 @@ native DisableMenu(Menu:menuid); /// This function disabled the specified menu row for all players. There is no function to disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, and one without. Or one per player. /// /// This function always returns 1, even if the function fails. If an invalid row is specified, nothing will happen. If an invalid menu ID is specified, the server will crash. -native DisableMenuRow(Menu:menuid, row); +native DisableMenuRow(Menu:menuID, row); /// Gets the ID of the menu the player is currently viewing (shown by ShowMenuForPlayer). -/// The ID of the player to get the current menu of +/// The ID of the player to get the current menu of /// /// /// @@ -1668,7 +1668,7 @@ native DisableMenuRow(Menu:menuid, row); /// /// Returns previous menu when none is displayed. /// The ID of the player's currently shown menu, or INVALID_MENU (255) if no menu shown. -native Menu:GetPlayerMenu(playerid); +native Menu:GetPlayerMenu(playerID); /// Creates a textdraw. Textdraws are, as the name implies, text (mainly - there can be boxes, sprites and model previews (skins/vehicles/weapons/objects too) that is drawn on a player's screens. /// The x (left/right) coordinate to create the textdraw at @@ -1678,12 +1678,12 @@ native Menu:GetPlayerMenu(playerid); /// If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.

    /// text[] must not be empty or the server will crash! If you need a textdraw that shows nothing, use a space underscore. Now it's fixed.

    /// If the last character in the text is a space, the text will all be blank.

    -/// If part of the text is off-screen, the color of the text will not show, only the shadow (if enabled) will. +/// If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will. /// /// /// This applies ONLY to sa-mp versions before 0.3z:

    /// Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.

    -/// If you use color codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw. +/// If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw. /// /// /// The x,y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using TextDrawAlignment with alignment 3 (right), the x,y coordinate is the top right coordinate for the text draw.

    @@ -1733,12 +1733,12 @@ native TextDrawTextSize(Text:text, Float:x, Float:y); /// For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at TextDrawTextSize, also position coordinate become position of center of textdraw and not left/top edges. native TextDrawAlignment(Text:text, alignment); -///

    Sets the text color of a textdraw. -/// The ID of the textdraw to change the color of. -/// The color to set the textdraw to +/// Sets the text colour of a textdraw. +/// The ID of the textdraw to change the colour of. +/// The colour to set the textdraw to /// You can also use GameText Colors in TextDraws. /// If the TextDraw is already shown, it must be re-shown (TextDrawShowForAll/TextDrawShowForPlayer) for the changes of this function to take effect. -native TextDrawColor(Text:text, color); +native TextDrawColor(Text:text, colour); /// Toggle whether a textdraw uses a box or not. /// The ID of the text textdraw to toggle the box of @@ -1752,9 +1752,9 @@ native TextDrawUseBox(Text:text, use); /// Adjusts the text box colour (only used if TextDrawUseBox 'use' parameter is 1). /// The TextDraw to change -/// The colour (RGBA) +/// The colour (RGBA) /// If you want to change the boxcolour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. -native TextDrawBoxColor(Text:text, color); +native TextDrawBoxColor(Text:text, colour); /// Sets the size of a textdraw's text's shadow. /// The ID of the textdraw to set the shadow size of @@ -1767,18 +1767,18 @@ native TextDrawBoxColor(Text:text, color); ///
    native TextDrawSetShadow(Text:text, size); -/// Sets the thickness of a textdraw's text's outline. TextDrawBackgroundColor can be used to change the color. +/// Sets the thickness of a textdraw's text's outline. TextDrawBackgroundColor can be used to change the colour. /// The ID of the text draw to set the outline thickness of /// The thickness of the outline, as an integer. 0 for no outline /// If you want to change the outline of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. native TextDrawSetOutline(Text:text, size); -/// Adjusts the text draw area background color (the outline/shadow - NOT the box. For box color, see TextDrawBoxColor). -/// The ID of the textdraw to set the background color of -/// The color that the textdraw should be set to -/// If TextDrawSetOutline is used with size > 0, the outline color will match the color used in TextDrawBackgroundColor. Changing the value of color seems to alter the color used in TextDrawColor +/// Adjusts the text draw area background colour (the outline/shadow - NOT the box. For box colour, see TextDrawBoxColor). +/// The ID of the textdraw to set the background colour of +/// The colour that the textdraw should be set to +/// If TextDrawSetOutline is used with size > 0, the outline colour will match the colour used in TextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in TextDrawColor /// If you want to change the background colour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. -native TextDrawBackgroundColor(Text:text, color); +native TextDrawBackgroundColor(Text:text, colour); /// Changes the text font. /// The TextDraw to change @@ -1802,22 +1802,22 @@ native TextDrawSetProportional(Text:text, set); native TextDrawSetSelectable(Text:text, set); /// Shows a textdraw for a specific player. -/// The ID of the player to show the textdraw for +/// The ID of the player to show the textdraw for /// The ID of the textdraw to show. Returned by TextDrawCreate /// If only a single player will see a textdraw, it might be wise to use player-textdraws instead. This is also useful for textdraws that need to show information specific for an individual player. /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means either the player and/or textdraw specified does not exist. /// -native TextDrawShowForPlayer(playerid, Text:text); +native TextDrawShowForPlayer(playerID, Text:text); ///

    Hides a textdraw for a specific player. -/// The ID of the player that the textdraw should be hidden for +/// The ID of the player that the textdraw should be hidden for /// The ID of the textdraw to hide /// /// /// -native TextDrawHideForPlayer(playerid, Text:text); +native TextDrawHideForPlayer(playerID, Text:text); /// Shows a textdraw for all players. /// The ID of the textdraw to show. Returned by TextDrawCreate @@ -1844,11 +1844,11 @@ native TextDrawHideForAll(Text:text); native TextDrawSetString(Text:text, const string[]); /// Set the model for a textdraw model preview. Click here to see this function's effect. -/// The textdraw id that will display the 3D preview +/// The textdraw ID that will display the 3D preview /// The GTA SA or SA:MP model ID to display /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. -/// Use TextDrawBackgroundColor to set the background color behind the model. +/// Use TextDrawBackgroundColor to set the background colour behind the model. native TextDrawSetPreviewModel(Text:text, modelindex); /// Sets the rotation and zoom of a 3D model preview textdraw. @@ -1861,16 +1861,16 @@ native TextDrawSetPreviewModel(Text:text, modelindex); native TextDrawSetPreviewRot(Text:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); /// If a vehicle model is used in a 3D preview textdraw, this sets the two colour values for that vehicle. -/// The textdraw id that is set to display a 3D vehicle model preview -/// The primary Color ID to set the vehicle to -/// The secondary Color ID to set the vehicle to +/// The textdraw ID that is set to display a 3D vehicle model preview +/// The primary Color ID to set the vehicle to +/// The secondary Color ID to set the vehicle to /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. -native TextDrawSetPreviewVehCol(Text:text, color1, color2); +native TextDrawSetPreviewVehCol(Text:text, colour1, colour2); // Gang Zones -/// Create a gangzone (colored radar area). +/// Create a gangzone (coloured radar area). /// The x coordinate for the west side of the gangzone /// The y coordinate for the south side of the gangzone /// The x coordinate for the east side of the gangzone @@ -1906,9 +1906,9 @@ native GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy); native GangZoneDestroy(zone); /// Show a gangzone for a player. Must be created with GangZoneCreate first. -/// The ID of the player you would like to show the gangzone for. +/// The ID of the player you would like to show the gangzone for. /// The ID of the gang zone to show for the player. Returned by GangZoneCreate -/// The color to show the gang zone, as an integer or hex in RGBA color format. Alpha transparency supported +/// The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported /// /// /// @@ -1919,11 +1919,11 @@ native GangZoneDestroy(zone); /// /// /// 1 if the gangzone was shown, otherwise 0 (non-existant). -native GangZoneShowForPlayer(playerid, zone, color); +native GangZoneShowForPlayer(playerID, zone, colour); -/// Shows a gangzone with the desired color to all players. +/// Shows a gangzone with the desired colour to all players. /// The ID of the gangzone to show (returned by GangZoneCreate) -/// The color to show the gang zone, as an integer or hex in RGBA color format. Alpha transparency supported +/// The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported /// /// /// @@ -1937,10 +1937,10 @@ native GangZoneShowForPlayer(playerid, zone, color); /// 1: The function executed successfully. The gang zone was shown for all players.

    /// 0: The function failed to execute. The gangzone does not exist. /// -native GangZoneShowForAll(zone, color); +native GangZoneShowForAll(zone, colour); ///

    Hides a gangzone for a player. -/// The ID of the player to hide the gangzone for +/// The ID of the player to hide the gangzone for /// The ID of the zone to hide /// /// @@ -1951,7 +1951,7 @@ native GangZoneShowForAll(zone, color); /// /// /// -native GangZoneHideForPlayer(playerid, zone); +native GangZoneHideForPlayer(playerID, zone); /// GangZoneHideForAll hides a gangzone from all players. /// The zone to hide @@ -1967,9 +1967,9 @@ native GangZoneHideForPlayer(playerid, zone); native GangZoneHideForAll(zone); /// Makes a gangzone flash for a player. -/// The ID of the player to flash the gangzone for +/// The ID of the player to flash the gangzone for /// The ID of the zone to flash -/// The color to flash the gang zone, as an integer or hex in RGBA color format. Alpha transparency supported +/// The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported /// /// /// @@ -1979,11 +1979,11 @@ native GangZoneHideForAll(zone); /// /// /// -native GangZoneFlashForPlayer(playerid, zone, flashcolor); +native GangZoneFlashForPlayer(playerID, zone, flashColour); /// GangZoneFlashForAll flashes a gangzone for all players. /// The zone to flash -/// The color to flash the gang zone, as an integer or hex in RGBA color format. Alpha transparency supported +/// The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported /// /// /// @@ -1993,10 +1993,10 @@ native GangZoneFlashForPlayer(playerid, zone, flashcolor); /// /// /// -native GangZoneFlashForAll(zone, flashcolor); +native GangZoneFlashForAll(zone, flashColour); /// Stops a gangzone flashing for a player. -/// The ID of the player to stop the gangzone flashing for +/// The ID of the player to stop the gangzone flashing for /// The ID of the gangzonezone to stop flashing /// /// @@ -2007,7 +2007,7 @@ native GangZoneFlashForAll(zone, flashcolor); /// /// /// -native GangZoneStopFlashForPlayer(playerid, zone); +native GangZoneStopFlashForPlayer(playerID, zone); /// Stops a gangzone flashing for all players. /// The ID of the zone to stop flashing. Returned by GangZoneCreate @@ -2030,12 +2030,12 @@ native GangZoneStopFlashForAll(zone); /// Creates a 3D Text Label at a specific location in the world. /// The initial text string -/// The text Color, as an integer or hex in RGBA color format +/// The text Color, as an integer or hex in RGBA colour format /// x-Coordinate /// y-Coordinate /// z-Coordinate /// The distance from where you are able to see the 3D Text Label -/// The virtual world in which you are able to see the 3D Text +/// The virtual world in which you are able to see the 3D Text /// Test the line-of-sight so this text can't be seen through objects (optional=0) /// /// @@ -2047,15 +2047,15 @@ native GangZoneStopFlashForAll(zone); /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// If is empty, the server/clients next to the text might crash!

    -/// If the virtualworld is set as -1 the text will not appear. +/// If the virtualWorld is set as -1 the text will not appear. /// /// drawdistance seems to be a lot smaller when spectating. -/// Use color embedding for multiple colors in the text. +/// Use colour embedding for multiple colours in the text. /// The ID of the newly created 3D Text Label, or INVALID_3DTEXT_ID if the 3D Text Label limit (MAX_3DTEXT_GLOBAL) was reached. -native Text3D:Create3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawDistance, virtualworld, bool:testLOS = false); +native Text3D:Create3DTextLabel(const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, virtualWorld, bool:testLOS = false); ///

    Delete a 3D text label (created with Create3DTextLabel). -/// The ID of the 3D text label to delete +/// The ID of the 3D text label to delete /// /// /// @@ -2065,11 +2065,11 @@ native Text3D:Create3DTextLabel(const text[], color, Float:x, Float:y, Float:z, /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the 3D text label was deleted, otherwise 0. -native Delete3DTextLabel(Text3D:id); +native Delete3DTextLabel(Text3D:textID); /// Attach a 3D text label to a player. -/// The ID of the 3D text label to attach. Returned by Create3DTextLabel -/// The ID of the player to attach the label to +/// The ID of the 3D text label to attach. Returned by Create3DTextLabel +/// The ID of the player to attach the label to /// The x offset from the player /// The y offset from the player /// The z offset from the player @@ -2085,11 +2085,11 @@ native Delete3DTextLabel(Text3D:id); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player and/or label do not exist. /// -native Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:offsetX, Float:offsetY, Float:offsetZ); +native Attach3DTextLabelToPlayer(Text3D:textID, playerID, Float:offsetX, Float:offsetY, Float:offsetZ); ///

    Attaches a 3D Text Label to a specific vehicle. -/// The ID of the 3D text label to attach. Returned by Create3DTextLabel -/// The vehicle you want to attach the 3D Text Label to +/// The ID of the 3D text label to attach. Returned by Create3DTextLabel +/// The vehicle you want to attach the 3D Text Label to /// The offset-x coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). /// The offset-y coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). /// The offset-z coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). @@ -2101,11 +2101,11 @@ native Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:offsetX, Float:offse /// /// /// Attach3DTextLabelToPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions! -native Attach3DTextLabelToVehicle(Text3D:id, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ); +native Attach3DTextLabelToVehicle(Text3D:textID, vehicleID, Float:offsetX, Float:offsetY, Float:offsetZ); -/// Updates a 3D Text Label text and color. -/// The 3D Text Label you want to update -/// The color the 3D Text Label should have from now on +/// Updates a 3D Text Label text and colour. +/// The 3D Text Label you want to update +/// The colour the 3D Text Label should have from now on /// The new text which the 3D Text Label should have from now on /// /// @@ -2116,14 +2116,14 @@ native Attach3DTextLabelToVehicle(Text3D:id, vehicleid, Float:offsetX, Float:off /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// If is empty, the server/clients next to the text might crash! -native Update3DTextLabelText(Text3D:id, color, const text[]); +native Update3DTextLabelText(Text3D:textID, colour, const text[]); // Per-player 3D Text Labels /// Creates a 3D Text Label only for a specific player. -/// The player which should see the newly created 3DText Label +/// The player which should see the newly created 3DText Label /// The text to display -/// The text color +/// The text colour /// x Coordinate (or offset if attached) /// y Coordinate (or offset if attached) /// z Coordinate (or offset if attached) @@ -2142,11 +2142,11 @@ native Update3DTextLabelText(Text3D:id, color, const text[]); /// If is empty, the server/clients next to the text might crash! /// drawdistance seems to be a lot smaller when spectating. /// The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. -native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], color, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayer = INVALID_PLAYER_ID, parentVehicle = INVALID_VEHICLE_ID, bool:testLOS = false); +native PlayerText3D:CreatePlayer3DTextLabel(playerID, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayer = INVALID_PLAYER_ID, parentVehicle = INVALID_VEHICLE_ID, bool:testLOS = false); /// Destroy a 3D text label that was created using CreatePlayer3DTextLabel. -/// The ID of the player whose 3D text label to delete -/// The ID of the player's 3D text label to delete +/// The ID of the player whose 3D text label to delete +/// The ID of the player's 3D text label to delete /// /// /// @@ -2158,12 +2158,12 @@ native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], color, Float /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the label specified doesn't exist. /// -native DeletePlayer3DTextLabel(playerid, PlayerText3D:id); +native DeletePlayer3DTextLabel(playerID, PlayerText3D:textID); -///

    Updates a player 3D Text Label's text and color. -/// The ID of the player for which the 3D Text Label was created -/// The 3D Text Label you want to update -/// The color the 3D Text Label should have from now on +/// Updates a player 3D Text Label's text and colour. +/// The ID of the player for which the 3D Text Label was created +/// The 3D Text Label you want to update +/// The colour the 3D Text Label should have from now on /// The new text which the 3D Text Label should have from now on /// /// @@ -2174,11 +2174,11 @@ native DeletePlayer3DTextLabel(playerid, PlayerText3D:id); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// If is empty, the server/clients next to the text might crash! -native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:id, color, const text[]); +native UpdatePlayer3DTextLabelText(playerID, PlayerText3D:textID, colour, const text[]); /// Shows the player a synchronous (only one at a time) dialog box. -/// The ID of the player to show the dialog to -/// An ID to assign this dialog to, so responses can be processed. Max dialogid is 32767. Using negative values will close any open dialog +/// The ID of the player to show the dialog to +/// An ID to assign this dialog to, so responses can be processed. Max dialogID is 32767. Using negative values will close any open dialog /// The style of the dialog /// The title at the top of the dialog. The length of the caption can not exceed more than 64 characters before it starts to cut off /// The text to display in the main dialog. Use \n to start a new line and \t to tabulate @@ -2187,19 +2187,19 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:id, color, const text[ /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// Use color embedding for multiple colors in the text. -/// Using -1 as dialogid closes all dialogs currently shown on the client's screen. +/// Use colour embedding for multiple colours in the text. +/// Using -1 as dialogID closes all dialogs currently shown on the client's screen. /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected.

    /// -native ShowPlayerDialog(playerid, dialogid, style, const caption[], const info[], const button1[], const button2[]); +native ShowPlayerDialog(playerID, dialogID, style, const caption[], const info[], const button1[], const button2[]); ///

    Get a players unique ID. -/// The player to get the unique ID of +/// The player to get the unique ID of /// Where to save the unique ID /// The size of "serial" -native gpci(playerid, serial[], maxlen); +native gpci(playerID, serial[], maxlen); // -------------------------------------------------- // Forwards (Callback declarations) @@ -2247,7 +2247,7 @@ forward OnFilterScriptInit(); forward OnFilterScriptExit(); /// This callback is called when a player connects to the server. -/// The ID of the player that connected +/// The ID of the player that connected /// /// /// @@ -2257,10 +2257,10 @@ forward OnFilterScriptExit(); /// 1 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnPlayerConnect(playerid); +forward OnPlayerConnect(playerID); ///

    This callback is called when a player disconnects from the server. -/// The ID of the player that disconnected +/// The ID of the player that disconnected /// The reason for the disconnection. See table below /// /// @@ -2280,10 +2280,10 @@ forward OnPlayerConnect(playerid); /// 1 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnPlayerDisconnect(playerid, reason); +forward OnPlayerDisconnect(playerID, reason); ///

    This callback is called when a player spawns.(i.e. after caling SpawnPlayer function). -/// The ID of the player that spawned +/// The ID of the player that spawned /// /// /// @@ -2296,11 +2296,11 @@ forward OnPlayerDisconnect(playerid, reason); /// 1 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnPlayerSpawn(playerid); +forward OnPlayerSpawn(playerID); ///

    This callback is called when a player dies, either by suicide or by being killed by another player. -/// The ID of the player that died -/// The ID of the player that killed the player who died, or INVALID_PLAYER_ID if there was none +/// The ID of the player that died +/// The ID of the player that killed the player who died, or INVALID_PLAYER_ID if there was none /// The ID of the reason for the player's death /// /// @@ -2308,18 +2308,18 @@ forward OnPlayerSpawn(playerid); /// /// The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)

    /// The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

    -/// You do not need to check whether killerid is valid before using it in SendDeathMessage. INVALID_PLAYER_ID is a valid killerid ID parameter in that function.

    -/// playerid is the only one who can call the callback. (good to know for anti fake death) +/// You do not need to check whether killerID is valid before using it in SendDeathMessage. INVALID_PLAYER_ID is a valid killerID ID parameter in that function.

    +/// playerID is the only one who can call the callback. (good to know for anti fake death) /// /// /// 0 - Will prevent other filterscripts from receiving this callback.

    /// 1 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnPlayerDeath(playerid, killerid, reason); +forward OnPlayerDeath(playerID, killerID, reason); ///

    This callback is called when a vehicle respawns. -/// The ID of the vehicle that spawned +/// The ID of the vehicle that spawned /// /// /// @@ -2329,11 +2329,11 @@ forward OnPlayerDeath(playerid, killerid, reason); /// 1 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnVehicleSpawn(vehicleid); +forward OnVehicleSpawn(vehicleID); ///

    This callback is called when a vehicle is destroyed - either by exploding or becoming submerged in water. -/// The ID of the vehicle that was destroyed -/// The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player +/// The ID of the vehicle that was destroyed +/// The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player /// /// /// This callback can also be called by NPC. @@ -2342,10 +2342,10 @@ forward OnVehicleSpawn(vehicleid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnVehicleDeath(vehicleid, killerid); +forward OnVehicleDeath(vehicleID, killerID); ///

    Called when a player sends a chat message. -/// The ID of the player who typed the text +/// The ID of the player who typed the text /// The text the player typed /// /// @@ -2355,10 +2355,10 @@ forward OnVehicleDeath(vehicleid, killerid); /// Returning 0 in this callback will stop the text from being sent to all players.

    /// It is always called first in filterscripts so returning 0 there blocks other scripts from seeing it. /// -forward OnPlayerText(playerid, text[]); +forward OnPlayerText(playerID, text[]); ///

    This callback is called when a player enters a command into the client chat window. Commands are anything that start with a forward slash, e.g. /help. -/// The ID of the player that entered a command +/// The ID of the player that entered a command /// The command that was entered (including the forward slash) /// /// @@ -2368,11 +2368,11 @@ forward OnPlayerText(playerid, text[]); /// Return 1 if the command was processed, otherwise 0; If the command was not found both in filterscripts and in gamemode, the player will be received a message: SERVER: Unknown command.

    /// It is always called first in filterscripts so returning 1 there blocks other scripts from seeing it. /// -forward OnPlayerCommandText(playerid, cmdtext[]); +forward OnPlayerCommandText(playerID, cmdtext[]); ///

    Called when a player changes class at class selection (and when class selection first appears). -/// The ID of the player that changed class -/// The ID of the current class being viewed (returned by AddPlayerClass) +/// The ID of the player that changed class +/// The ID of the current class being viewed (returned by AddPlayerClass) /// /// /// This callback can also be called by NPC. @@ -2381,11 +2381,11 @@ forward OnPlayerCommandText(playerid, cmdtext[]); /// Returning 0 in this callback will prevent the player from spawning. The player can be forced to spawn when SpawnPlayer is used.

    /// It is always called first in filterscripts. /// -forward OnPlayerRequestClass(playerid, classid); +forward OnPlayerRequestClass(playerID, classID); ///

    This callback is called when a player starts to enter a vehicle, meaning the player is not in vehicle yet at the time this callback is called. -/// ID of the player who attempts to enter a vehicle -/// ID of the vehicle the player is attempting to enter +/// ID of the player who attempts to enter a vehicle +/// ID of the vehicle the player is attempting to enter /// 0 if entering as driver. 1 if entering as passenger /// /// @@ -2397,11 +2397,11 @@ forward OnPlayerRequestClass(playerid, classid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); +forward OnPlayerEnterVehicle(playerID, vehicleID, ispassenger); ///

    This callback is called when a player starts to exit a vehicle. -/// The ID of the player that is exiting a vehicle -/// The ID of the vehicle the player is exiting +/// The ID of the player that is exiting a vehicle +/// The ID of the vehicle the player is exiting /// /// /// @@ -2412,10 +2412,10 @@ forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerExitVehicle(playerid, vehicleid); +forward OnPlayerExitVehicle(playerID, vehicleID); ///

    This callback is called when a player changes state. For example, when a player changes from being the driver of a vehicle to being on-foot. -/// The ID of the player that changed state +/// The ID of the player that changed state /// The player's new state /// The player's previous state /// @@ -2442,10 +2442,10 @@ forward OnPlayerExitVehicle(playerid, vehicleid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerStateChange(playerid, newstate, oldstate); +forward OnPlayerStateChange(playerID, newstate, oldstate); ///

    This callback is called when a player enters the checkpoint set for that player. -/// The player who entered the checkpoint +/// The player who entered the checkpoint /// /// /// @@ -2460,10 +2460,10 @@ forward OnPlayerStateChange(playerid, newstate, oldstate); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerEnterCheckpoint(playerid); +forward OnPlayerEnterCheckpoint(playerID); ///

    This callback is called when a player leaves the checkpoint set for them by SetPlayerCheckpoint. Only one checkpoint can be set at a time. -/// The ID of the player that left their checkpoint +/// The ID of the player that left their checkpoint /// /// /// @@ -2478,10 +2478,10 @@ forward OnPlayerEnterCheckpoint(playerid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerLeaveCheckpoint(playerid); +forward OnPlayerLeaveCheckpoint(playerID); ///

    This callback is called when a player enters a race checkpoint. -/// The ID of the player who entered the race checkpoint +/// The ID of the player who entered the race checkpoint /// /// /// @@ -2496,10 +2496,10 @@ forward OnPlayerLeaveCheckpoint(playerid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerEnterRaceCheckpoint(playerid); +forward OnPlayerEnterRaceCheckpoint(playerID); ///

    This callback is called when a player leaves the race checkpoint. -/// The ID of the player that left the race checkpoint +/// The ID of the player that left the race checkpoint /// /// /// @@ -2514,7 +2514,7 @@ forward OnPlayerEnterRaceCheckpoint(playerid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerLeaveRaceCheckpoint(playerid); +forward OnPlayerLeaveRaceCheckpoint(playerID); ///

    This callback is called when a command is sent through the server console, remote RCON, or via the in-game "/rcon command". /// A string containing the command that was typed, as well as any passed parameters @@ -2532,7 +2532,7 @@ forward OnPlayerLeaveRaceCheckpoint(playerid); forward OnRconCommand(cmd[]); /// Called when a player attempts to spawn via class selection either by pressing SHIFT or clicking the 'Spawn' button. -/// The ID of the player that requested to spawn +/// The ID of the player that requested to spawn /// /// /// This callback can also be called by NPC. @@ -2541,10 +2541,10 @@ forward OnRconCommand(cmd[]); /// Returning 0 in this callback will prevent the player from spawning.

    /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// -forward OnPlayerRequestSpawn(playerid); +forward OnPlayerRequestSpawn(playerID); ///

    This callback is called when an object is moved after MoveObject (when it stops moving). -/// The ID of the object that was moved +/// The ID of the object that was moved /// /// /// @@ -2554,11 +2554,11 @@ forward OnPlayerRequestSpawn(playerid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnObjectMoved(objectid); +forward OnObjectMoved(objectID); ///

    This callback is called when a player object is moved after MovePlayerObject (when it stops moving). -/// The playerid the object is assigned to -/// The ID of the player object that was moved +/// The playerID the object is assigned to +/// The ID of the player object that was moved /// /// /// @@ -2568,23 +2568,23 @@ forward OnObjectMoved(objectid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerObjectMoved(playerid, objectid); +forward OnPlayerObjectMoved(playerID, objectID); ///

    Called when a player picks up a pickup created with CreatePickup. -/// The ID of the player that picked up the pickup -/// The ID of the pickup, returned by CreatePickup +/// The ID of the player that picked up the pickup +/// The ID of the pickup, returned by CreatePickup /// /// /// /// This callback does not handle returns.

    /// It is always called first in gamemode. /// -forward OnPlayerPickUpPickup(playerid, pickupid); +forward OnPlayerPickUpPickup(playerID, pickupID); ///

    This callback is called when a vehicle is modded. -/// The ID of the driver of the vehicle -/// The ID of the vehicle which is modded -/// The ID of the component which was added to the vehicle +/// The ID of the driver of the vehicle +/// The ID of the vehicle which is modded +/// The ID of the component which was added to the vehicle /// /// /// @@ -2594,12 +2594,12 @@ forward OnPlayerPickUpPickup(playerid, pickupid); /// Return 0 to desync the mod (or an invalid mod) from propagating and / or crashing players.

    /// It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. /// -forward OnVehicleMod(playerid, vehicleid, componentid); +forward OnVehicleMod(playerID, vehicleID, componentID); ///

    This callback is called when a player enters or exits a mod shop. -/// The ID of the player that entered or exited the modshop +/// The ID of the player that entered or exited the modshop /// 1 if the player entered or 0 if they exited -/// The interior ID of the modshop that the player is entering (or 0 if exiting) +/// The interior ID of the modshop that the player is entering (or 0 if exiting) /// /// /// @@ -2610,12 +2610,12 @@ forward OnVehicleMod(playerid, vehicleid, componentid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnEnterExitModShop(playerid, enterexit, interiorid); +forward OnEnterExitModShop(playerID, enterexit, interiorID); ///

    Called when a player previews a vehicle paintjob inside a mod shop. Watch out, this callback is not called when the player buys the paintjob. -/// The ID of the player that changed the paintjob of their vehicle -/// The ID of the vehicle that had its paintjob changed -/// The ID of the new paintjob +/// The ID of the player that changed the paintjob of their vehicle +/// The ID of the vehicle that had its paintjob changed +/// The ID of the new paintjob /// /// /// @@ -2625,13 +2625,13 @@ forward OnEnterExitModShop(playerid, enterexit, interiorid); /// This callback does not handle returns. Returning 0 won't deny the paintjob change.

    /// It is always called first in gamemode so returning 0 there blocks other filterscripts from seeing it. /// -forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); +forward OnVehiclePaintjob(playerID, vehicleID, paintJobID); -///

    This callback is called when a player exits a mod shop, even if the colors weren't changed. Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. -/// The ID of the player that is driving the vehicle -/// The ID of the vehicle that was resprayed -/// The color that the vehicle's primary color was changed to -/// The color that the vehicle's secondary color was changed to +/// This callback is called when a player exits a mod shop, even if the colours weren't changed. Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. +/// The ID of the player that is driving the vehicle +/// The ID of the vehicle that was resprayed +/// The colour that the vehicle's primary colour was changed to +/// The colour that the vehicle's secondary colour was changed to /// /// /// @@ -2643,11 +2643,11 @@ forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); /// Returning 0 in this callback will deny the colour change. Returning 1 will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.

    /// It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. /// -forward OnVehicleRespray(playerid, vehicleid, color1, color2); +forward OnVehicleRespray(playerID, vehicleID, colour1, colour2); ///

    This callback is called when a vehicle element such as doors, tires, panels, or lights change their damage status. -/// The ID of the vehicle that was changed its damage status -/// The ID of the player who synced the change in the damage status (who had the car damaged or repaired) +/// The ID of the vehicle that was changed its damage status +/// The ID of the player who synced the change in the damage status (who had the car damaged or repaired) /// /// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! @@ -2657,12 +2657,12 @@ forward OnVehicleRespray(playerid, vehicleid, color1, color2); /// 0 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts.

    /// -forward OnVehicleDamageStatusUpdate(vehicleid, playerid); +forward OnVehicleDamageStatusUpdate(vehicleID, playerID); ///

    This callback is called when a player's client updates/syncs the position of a vehicle they're not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle that has no driver. -/// The ID of the vehicle that's position was updated -/// The ID of the player that sent a vehicle position sync update -/// The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats +/// The ID of the vehicle that's position was updated +/// The ID of the player that sent a vehicle position sync update +/// The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=rearLeft 3=rearRight 4+ is for coach/bus etc. with many passenger seats /// The new x coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version /// The new y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version /// The new z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version @@ -2677,10 +2677,10 @@ forward OnVehicleDamageStatusUpdate(vehicleid, playerid); /// Returning 0 in this callback will stop the vehicle's position being synced to other players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.

    /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// -forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); +forward OnUnoccupiedVehicleUpdate(vehicleID, playerID, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); ///

    This callback is called when a player selects an item from a menu (ShowMenuForPlayer). -/// The ID of the player that selected a menu item +/// The ID of the player that selected a menu item /// The ID of the row that was selected. The first row is ID 0 /// /// @@ -2694,10 +2694,10 @@ forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new /// This callback does not handle returns.

    /// It is always called first in gamemode. /// -forward OnPlayerSelectedMenuRow(playerid, row); +forward OnPlayerSelectedMenuRow(playerID, row); ///

    Called when a player exits a menu. -/// The ID of the player that exited the menu +/// The ID of the player that exited the menu /// /// /// @@ -2705,12 +2705,12 @@ forward OnPlayerSelectedMenuRow(playerid, row); /// This callback does not handle returns.

    /// It is always called first in gamemode. /// -forward OnPlayerExitedMenu(playerid); +forward OnPlayerExitedMenu(playerID); ///

    Called when a player changes interior. Can be triggered by SetPlayerInterior or when a player enter/exits a building. -/// The playerid who changed interior -/// The interior the player is now in -/// The interior the player was in before +/// The playerID who changed interior +/// The interior the player is now in +/// The interior the player was in before /// /// /// @@ -2719,10 +2719,10 @@ forward OnPlayerExitedMenu(playerid); /// This callback does not handle returns.

    /// It is always called first in gamemode. /// -forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); +forward OnPlayerInteriorChange(playerID, newinteriorID, oldinteriorID); ///

    This callback is called when the state of any supported key is changed (pressed/released). Directional keys do not trigger OnPlayerKeyStateChange (up/down/left/right). -/// The ID of the player that pressed or released a key +/// The ID of the player that pressed or released a key /// A map (bitmask) of the keys currently held - see here /// A map (bitmask) of the keys held prior to the current change - see here /// @@ -2747,7 +2747,7 @@ forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); /// This callback does not handle returns.

    /// It is always called first in gamemode. /// -forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys); +forward OnPlayerKeyStateChange(playerID, newkeys, oldkeys); ///

    This callback is called when someone attempts to log in to RCON in-game; successful or not. /// The IP of the player that tried to log in to RCON @@ -2766,7 +2766,7 @@ forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys); forward OnRconLoginAttempt(ip[], password[], success); /// This callback is called every time a client/player updates the server with their status. It is often used to create custom callbacks for client updates that aren't actively tracked by the server, such as health or armor updates or players switching weapons. -/// ID of the player sending an update packet +/// ID of the player sending an update packet /// This callback can also be called by NPC. /// This callback is called, on average, 30 times per second, per player; only use it when you know what it's meant for (or more importantly what it's NOT meant for). /// The frequency with which this callback is called for each player varies, depending on what the player is doing. Driving or shooting will trigger a lot more updates than idling. @@ -2775,11 +2775,11 @@ forward OnRconLoginAttempt(ip[], password[], success); /// 1 - Indicates that this update can be processed normally and sent to other players.

    /// It is always called first in filterscripts. /// -forward OnPlayerUpdate(playerid); +forward OnPlayerUpdate(playerID); ///

    This callback is called when a player is streamed by some other player's client. -/// The ID of the player who has been streamed -/// The ID of the player that streamed the other player in +/// The ID of the player who has been streamed +/// The ID of the player that streamed the other player in /// /// /// @@ -2789,11 +2789,11 @@ forward OnPlayerUpdate(playerid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerStreamIn(playerid, forplayerid); +forward OnPlayerStreamIn(playerID, forplayerID); ///

    This callback is called when a player is streamed out from some other player's client. -/// The player who has been destreamed -/// The player who has destreamed the other player +/// The player who has been destreamed +/// The player who has destreamed the other player /// /// /// @@ -2803,11 +2803,11 @@ forward OnPlayerStreamIn(playerid, forplayerid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerStreamOut(playerid, forplayerid); +forward OnPlayerStreamOut(playerID, forplayerID); ///

    Called when a vehicle is streamed to a player's client. -/// The ID of the vehicle that streamed in for the player -/// The ID of the player who the vehicle streamed in for +/// The ID of the vehicle that streamed in for the player +/// The ID of the player who the vehicle streamed in for /// /// /// @@ -2817,11 +2817,11 @@ forward OnPlayerStreamOut(playerid, forplayerid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnVehicleStreamIn(vehicleid, forplayerid); +forward OnVehicleStreamIn(vehicleID, forplayerID); ///

    This callback is called when a vehicle is streamed out for a player's client (it's so far away that they can't see it). -/// The ID of the vehicle that streamed out -/// The ID of the player who is no longer streaming the vehicle +/// The ID of the vehicle that streamed out +/// The ID of the player who is no longer streaming the vehicle /// /// /// @@ -2831,33 +2831,33 @@ forward OnVehicleStreamIn(vehicleid, forplayerid); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnVehicleStreamOut(vehicleid, forplayerid); +forward OnVehicleStreamOut(vehicleID, forplayerID); ///

    This callback is called when an actor is streamed in by a player's client. -/// The ID of the actor that has been streamed in for the player -/// The ID of the player that streamed the actor in +/// The ID of the actor that has been streamed in for the player +/// The ID of the player that streamed the actor in /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This callback can also be called by NPC. /// It is always called first in filterscripts. /// This callback does not handle returns. -forward OnActorStreamIn(actorid, forplayerid); +forward OnActorStreamIn(actorID, forplayerID); /// This callback is called when an actor is streamed out by a player's client. -/// The ID of the actor that has been streamed out for the player -/// The ID of the player that streamed the actor out +/// The ID of the actor that has been streamed out for the player +/// The ID of the player that streamed the actor out /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This callback can also be called by NPC. /// It is always called first in filterscripts. /// This callback does not handle returns. -forward OnActorStreamOut(actorid, forplayerid); +forward OnActorStreamOut(actorID, forplayerID); /// This callback is called when a player responds to a dialog shown using ShowPlayerDialog by either clicking a button, pressing ENTER/ESC or double-clicking a list item (if using a list style dialog). -/// The ID of the player that responded to the dialog -/// The ID of the dialog the player responded to, assigned in ShowPlayerDialog +/// The ID of the player that responded to the dialog +/// The ID of the dialog the player responded to, assigned in ShowPlayerDialog /// 1 for left button and 0 for right button (if only one button shown, always 1) /// The ID of the list item selected by the player (starts at 0) (only if using a list style dialog) /// The text entered into the input box by the player or the selected list item text @@ -2869,59 +2869,59 @@ forward OnActorStreamOut(actorid, forplayerid); /// Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.

    /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// -forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]); +forward OnDialogResponse(playerID, dialogID, response, listitem, inputtext[]); ///

    This callback is called when a player takes damage. -/// The ID of the player that took damage -/// The ID of the player that caused the damage. INVALID_PLAYER_ID if self-inflicted +/// The ID of the player that took damage +/// The ID of the player that caused the damage. INVALID_PLAYER_ID if self-inflicted /// The amount of damage the player took (health and armour combined) -/// The ID of the weapon/reason for the damage +/// The ID of the weapon/reason for the damage /// The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) /// /// /// This callback was added in SA-MP 0.3d and will not work in earlier versions! /// GetPlayerHealth and GetPlayerArmour will return the old amounts of the player before this callback. /// -/// The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18).

    -/// The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

    -/// playerid is the only one who can call the callback.

    -/// The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. +/// The weaponID will return 37 (flame thrower) from any fire sources (e.g. molotov, 18).

    +/// The weaponID will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

    +/// playerID is the only one who can call the callback.

    +/// The amount is always the maximum damage the weaponID can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. /// /// /// 1 - Callback will not be called in other filterscripts.

    /// 0 - Allows this callback to be called in other filterscripts.

    /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// -forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart); +forward OnPlayerTakeDamage(playerID, issuerID, Float:amount, weaponID, bodypart); ///

    This callback is called when a player gives damage to another player. -/// The ID of the player that gave damage -/// The ID of the player that received damage -/// The amount of health/armour damagedid has lost (combined) -/// The reason that caused the damage +/// The ID of the player that gave damage +/// The ID of the player that received damage +/// The amount of health/armour damagedID has lost (combined) +/// The reason that caused the damage /// The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) /// /// This callback was added in SA-MP 0.3d and will not work in earlier versions! /// /// Keep in mind this function can be inaccurate in some cases.

    /// If you want to prevent certain players from damaging eachother, use SetPlayerTeam.

    -/// The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)

    -/// The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

    -/// playerid is the only one who can call the callback.

    -/// The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. +/// The weaponID will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)

    +/// The weaponID will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

    +/// playerID is the only one who can call the callback.

    +/// The amount is always the maximum damage the weaponID can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. /// /// /// 1 - Callback will not be called in other filterscripts.

    /// 0 - Allows this callback to be called in other filterscripts.

    /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// -forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart); +forward OnPlayerGiveDamage(playerID, damagedID, Float:amount, weaponID, bodypart); ///

    This callback is called when a player gives damage to an actor. -/// The ID of the player that gave damage -/// The ID of the actor that received damage -/// The amount of health/armour damaged_actorid has lost -/// The reason that caused the damage +/// The ID of the player that gave damage +/// The ID of the actor that received damage +/// The amount of health/armour damaged_actorID has lost +/// The reason that caused the damage /// The body part that was hit /// /// @@ -2938,10 +2938,10 @@ forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart /// 0 - Allows this callback to be called in other filterscripts.

    /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// -forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart); +forward OnPlayerGiveDamageActor(playerID, damaged_actorID, Float:amount, weaponID, bodypart); ///

    OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map (by right-clicking). -/// The ID of the player that placed a target/waypoint +/// The ID of the player that placed a target/waypoint /// The x float coordinate where the player clicked /// The y float coordinate where the player clicked /// The z float coordinate where the player clicked (inaccurate - see note below) @@ -2955,11 +2955,11 @@ forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponi /// 0 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in gamemode. /// -forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerClickMap(playerID, Float:fX, Float:fY, Float:fZ); ///

    This callback is called when a player clicks on a textdraw or cancels the select mode with the Escape key. -/// The ID of the player that clicked on the textdraw -/// The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection was cancelled +/// The ID of the player that clicked on the textdraw +/// The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection was cancelled /// /// /// This callback was added in SA-MP 0.3e and will not work in earlier versions! @@ -2969,11 +2969,11 @@ forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); /// Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.

    /// It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. /// -forward OnPlayerClickTextDraw(playerid, Text:clickedid); +forward OnPlayerClickTextDraw(playerID, Text:clickedID); ///

    This callback is called when a player clicks on a player-textdraw. It is not called when player cancels the select mode (ESC) - however, OnPlayerClickTextDraw is. -/// The ID of the player that selected a textdraw -/// The ID of the player-textdraw that the player selected +/// The ID of the player that selected a textdraw +/// The ID of the player-textdraw that the player selected /// /// /// @@ -2983,10 +2983,10 @@ forward OnPlayerClickTextDraw(playerid, Text:clickedid); /// Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.

    /// It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. /// -forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); +forward OnPlayerClickPlayerTextDraw(playerID, PlayerText:playertextID); ///

    This callback is called when an IP address attempts a connection to the server. To block incoming connections, use BlockIpAddress. -/// The ID of the player attempting to connect +/// The ID of the player attempting to connect /// The IP address of the player attempting to connect /// The port of the attempted connection /// @@ -3000,11 +3000,11 @@ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); /// 0 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnIncomingConnection(playerid, ip_address[], port); +forward OnIncomingConnection(playerID, ip_address[], port); ///

    This callback is called when a player sent a trailer update. -/// The ID of the player who sent a trailer update -/// The Trailer being updated +/// The ID of the player who sent a trailer update +/// The Trailer being updated /// /// /// @@ -3017,11 +3017,11 @@ forward OnIncomingConnection(playerid, ip_address[], port); /// 1 - Processes the trailer update as normal and synchronizes it between all players.

    /// It is always called first in filterscripts. /// -forward OnTrailerUpdate(playerid, vehicleid); +forward OnTrailerUpdate(playerID, vehicleID); ///

    This callback is called when a vehicle's siren is toggled. -/// The ID of the player that toggled the siren (driver) -/// The ID of the vehicle of which the siren was toggled for +/// The ID of the player that toggled the siren (driver) +/// The ID of the vehicle of which the siren was toggled for /// 0 if siren was turned off, 1 if siren was turned on /// /// This callback was added in SA-MP 0.3.7 and will not work in earlier versions! @@ -3032,23 +3032,23 @@ forward OnTrailerUpdate(playerid, vehicleid); /// 0 - Indicates that this callback will be passed to the gamemode.

    /// It is always called first in filterscripts. /// -forward OnVehicleSirenStateChange(playerid, vehicleid, newstate); +forward OnVehicleSirenStateChange(playerID, vehicleID, newstate); ///

    This callback is called when a player finishes downloading custom models. For more information on how to add custom models to your server, see the release thread and this tutorial. -/// The ID of the player that finished downloading custom models -/// The ID of the virtual world the player finished downloading custom models for +/// The ID of the player that finished downloading custom models +/// The ID of the virtual world the player finished downloading custom models for /// /// /// /// This callback was added in SA-MP 0.3DL and will not work in earlier versions! /// This callback is called every time a player changes virtual worlds, even if there are no custom models present in that world. /// This callback does not handle returns. -forward OnPlayerFinishedDownloading(playerid, virtualworld); -forward OnPlayerRequestDownload(playerid, type, crc); +forward OnPlayerFinishedDownloading(playerID, virtualWorld); +forward OnPlayerRequestDownload(playerID, type, crc); /// Called when a player double-clicks on a player on the scoreboard. -/// The ID of the player that clicked on a player on the scoreboard -/// The ID of the player that was clicked on +/// The ID of the player that clicked on a player on the scoreboard +/// The ID of the player that was clicked on /// The source of the player's click /// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! @@ -3058,12 +3058,12 @@ forward OnPlayerRequestDownload(playerid, type, crc); /// 0 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnPlayerClickPlayer(playerid, clickedplayerid, source); +forward OnPlayerClickPlayer(playerID, clickedplayerID, source); ///

    This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). -/// The ID of the player that edited an object +/// The ID of the player that edited an object /// 0 if it is a global object or 1 if it is a playerobject -/// The ID of the edited object +/// The ID of the edited object /// The type of response /// The x offset for the object that was edited /// The y offset for the object that was edited @@ -3082,14 +3082,14 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, source); /// 0 - Indicates that this callback will be passed to the next script.

    /// It is always called first in filterscripts. /// -forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); +forward OnPlayerEditObject(playerID, playerobject, objectID, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); ///

    This callback is called when a player ends attached object edition mode. -/// The ID of the player that ended edition mode +/// The ID of the player that ended edition mode /// 0 if they cancelled (ESC) or 1 if they clicked the save icon /// The index of the attached object -/// The model of the attached object that was edited -/// The bone of the attached object that was edited +/// The model of the attached object that was edited +/// The bone of the attached object that was edited /// The x offset for the attached object that was edited /// The y offset for the attached object that was edited /// The z offset for the attached object that was edited @@ -3108,13 +3108,13 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, /// 0 - Indicates that this callback will be passed to the next script.

    /// It is always called first in filterscripts. /// -forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); +forward OnPlayerEditAttachedObject(playerID, response, index, modelID, boneID, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); ///

    This callback is called when a player selects an object after SelectObject has been used. -/// The ID of the player that selected an object +/// The ID of the player that selected an object /// The type of selection -/// The ID of the selected object -/// The model ID of the selected object +/// The ID of the selected object +/// The model ID of the selected object /// The x position of the selected object /// The y position of the selected object /// The z position of the selected object @@ -3125,13 +3125,13 @@ forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, F /// 0 - Indicates that this callback will be passed to the next script.

    /// It is always called first in filterscripts. /// -forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerSelectObject(playerID, type, objectID, modelID, Float:fX, Float:fY, Float:fZ); ///

    This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). -/// The ID of the player that shot a weapon -/// The ID of the weapon shot by the player +/// The ID of the player that shot a weapon +/// The ID of the weapon shot by the player /// The type of thing the shot hit (none, player, vehicle, or (player)object) -/// The ID of the player, vehicle or object that was hit +/// The ID of the player, vehicle or object that was hit /// The x coordinate that the shot hit /// The y coordinate that the shot hit /// The z coordinate that the shot hit @@ -3151,13 +3151,13 @@ forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float: /// If hittype is:

    ///

      ///
    • - BULLET_HIT_TYPE_NONE: the fX, fY and fZ parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
    • -///
    • - Others: the fX, fY and fZ are offsets relative to the hitid.
    • +///
    • - Others: the fX, fY and fZ are offsets relative to the hitID.
    • ///
    ///
    /// /// Isn't called if you fired in vehicle as driver or if you are looking behind with the aim enabled (shooting in air).

    -/// It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitid (the hit player's vehicleid) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER at all.

    -/// Partially fixed in SA-MP 0.3.7: If fake weapon data is sent by a malicious user, other player clients may freeze or crash. To combat this, check if the reported weaponid can actually fire bullets. +/// It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitID (the hit player's vehicleID) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER at all.

    +/// Partially fixed in SA-MP 0.3.7: If fake weapon data is sent by a malicious user, other player clients may freeze or crash. To combat this, check if the reported weaponID can actually fire bullets. /// /// /// @@ -3167,22 +3167,22 @@ forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float: /// 1 - Allow the bullet to cause damage.

    /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// -forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerWeaponShot(playerID, weaponID, hittype, hitID, Float:fX, Float:fY, Float:fZ); ///

    This callback is called when a SendClientCheck request comletes -/// The ID of the player checked -/// The type of check performed +/// The ID of the player checked +/// The type of check performed /// The address requested /// The result of the check /// -forward OnClientCheckResponse(playerid, actionid, memaddr, retndata); +forward OnClientCheckResponse(playerID, actionID, memaddr, retndata); /// This callback is called when a SendClientCheck request comletes -/// The ID of the player who got cash from the game +/// The ID of the player who got cash from the game /// The amount of cash given /// Where the money came from /// Doesn't work -forward OnScriptCash(playerid, amount, source); +forward OnScriptCash(playerID, amount, source); // -------------------------------------------------- diff --git a/a_vehicles.inc b/a_vehicles.inc index 00e79f7..0700ecb 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -50,13 +50,13 @@ // Vehicle /// Creates a vehicle in the world. Can be used in place of AddStaticVehicleEx at any time in the script. -/// The model for the vehicle +/// The model for the vehicle /// The x coordinate for the vehicle /// The y coordinate for the vehicle /// The z coordinate for the vehicle /// The facing angle for the vehicle -/// The primary color ID -/// The secondary color ID +/// The primary colour ID +/// The secondary colour ID /// The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning /// Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=false) /// @@ -70,10 +70,10 @@ /// The vehicle ID of the vehicle created (1 to MAX_VEHICLES).

    /// INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed). /// -native CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawnDelay, bool:addSiren = false); +native CreateVehicle(modelID, Float:x, Float:y, Float:z, Float:rotation, colour1, colour2, respawnDelay, bool:addSiren = false); ///

    Destroy a vehicle. It will disappear instantly. -/// The ID of the vehicle to destroy +/// The ID of the vehicle to destroy /// /// /// @@ -81,11 +81,11 @@ native CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, col /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle does not exist. /// -native DestroyVehicle(vehicleid); +native DestroyVehicle(vehicleID); ///

    Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) for a player. -/// The ID of the vehicle to check -/// The ID of the player to check +/// The ID of the vehicle to check +/// The ID of the player to check /// /// /// @@ -96,10 +96,10 @@ native DestroyVehicle(vehicleid); /// 0: Vehicle is not streamed in for the player, or the function failed to execute (player and/or vehicle do not exist).

    /// 1: Vehicle is streamed in for the player. /// -native IsVehicleStreamedIn(vehicleid, forplayerid); +native IsVehicleStreamedIn(vehicleID, playerID); ///

    Gets the position of a vehicle. -/// The ID of the vehicle to get the position of +/// The ID of the vehicle to get the position of /// A float variable in which to store the x coordinate, passed by reference /// A float variable in which to store the y coordinate, passed by reference /// A float variable in which to store the z coordinate, passed by reference @@ -110,10 +110,10 @@ native IsVehicleStreamedIn(vehicleid, forplayerid); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle specified does not exist. /// -native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); +native GetVehiclePos(vehicleID, &Float:x, &Float:y, &Float:z); ///

    Set a vehicle's position. -/// Vehicle ID that you want set new position +/// Vehicle ID that you want set new position /// The x coordinate to position the vehicle at /// The y coordinate to position the vehicle at /// The z coordinate to position the vehicle at @@ -125,10 +125,10 @@ native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle specified does not exist. /// -native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); +native SetVehiclePos(vehicleID, Float:x, Float:y, Float:z); ///

    Get the rotation of a vehicle on the z axis (yaw). -/// The ID of the vehicle to get the z angle of +/// The ID of the vehicle to get the z angle of /// A float variable in which to store the z rotation, passed by reference /// /// @@ -139,10 +139,10 @@ native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle does not exist. /// -native GetVehicleZAngle(vehicleid, &Float:z_angle); +native GetVehicleZAngle(vehicleID, &Float:z_angle); ///

    Returns a vehicle's rotation on all axes as a quaternion. -/// The ID of the vehicle to get the rotation of +/// The ID of the vehicle to get the rotation of /// A float variable in which to store the first quaternion angle, passed by reference /// A float variable in which to store the second quaternion angle, passed by reference /// A float variable in which to store the third quaternion angle, passed by reference @@ -153,9 +153,9 @@ native GetVehicleZAngle(vehicleid, &Float:z_angle); /// To euler:

    /// /// //GetVehicleRotation Created by IllidanS4

    -/// stock GetVehicleRotation(vehicleid,&Float:rx,&Float:ry,&Float:rz){

    +/// stock GetVehicleRotation(vehicleID,&Float:rx,&Float:ry,&Float:rz){

    /// new Float:qw,Float:qx,Float:qy,Float:qz;

    -/// GetVehicleRotationQuat(vehicleid,qw,qx,qy,qz);

    +/// GetVehicleRotationQuat(vehicleID,qw,qx,qy,qz);

    /// rx = asin(2*qy*qz-2*qx*qw);

    /// ry = -atan2(qx*qz+qy*qw,0.5-qx*qx-qy*qy);

    /// rz = -atan2(qx*qy+qz*qw,0.5-qx*qx-qz*qz);

    @@ -168,10 +168,10 @@ native GetVehicleZAngle(vehicleid, &Float:z_angle); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle specified does not exist. /// -native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z); +native GetVehicleRotationQuat(vehicleID, &Float:w, &Float:x, &Float:y, &Float:z); ///

    This function can be used to calculate the distance (as a float) between a vehicle and another map coordinate. This can be useful to detect how far a vehicle away is from a location. -/// The ID of the vehicle to calculate the distance for +/// The ID of the vehicle to calculate the distance for /// The x map coordinate /// The y map coordinate /// The z map coordinate @@ -179,10 +179,10 @@ native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z) /// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// A float containing the distance from the point specified in the coordinates. -native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); +native Float:GetVehicleDistanceFromPoint(vehicleID, Float:x, Float:y, Float:z); /// Set the z rotation (yaw) of a vehicle. -/// The ID of the vehicle to set the rotation of +/// The ID of the vehicle to set the rotation of /// The z angle to set /// /// @@ -192,13 +192,13 @@ native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle specified does not exist. /// -native SetVehicleZAngle(vehicleid, Float:angle); +native SetVehicleZAngle(vehicleID, Float:angle); ///

    Set the parameters of a vehicle for a player. /// The ID of the vehicle to set the parameters of -/// The ID of the player to set the vehicle's parameters for +/// The ID of the player to set the vehicle's parameters for /// 0 to disable the objective or 1 to show it. This is a bobbing yellow arrow above the vehicle -/// 0 to unlock the doors or 1 to lock them +/// 0 to unlock the doors or 1 to lock them /// /// Vehicles must be respawned for the 'objective' to be removed. This can be circumvented somewhat using Get/SetVehicleParamsEx which do not require the vehicle to be respawned. It is worth noting however that the object will be disabled on a global scale, and this is only useful if only one player has the vehicle as an objective. /// Since 0.3a you will have to reapply this function when OnVehicleStreamIn is called. @@ -206,7 +206,7 @@ native SetVehicleZAngle(vehicleid, Float:angle); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player and/or vehicle specified do not exist. /// -native SetVehicleParamsForPlayer(vehicleid, playerid, objective, doorslocked); +native SetVehicleParamsForPlayer(vehicleID, playerID, objective, doors); ///

    Use this function before any player connects (OnGameModeInit) to tell all clients that the script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when players enter/exit vehicles and headlights automatically coming on when it is dark. /// @@ -218,7 +218,7 @@ native SetVehicleParamsForPlayer(vehicleid, playerid, objective, doorslocked); native ManualVehicleEngineAndLights(); /// Sets a vehicle's parameters for all players. -/// The ID of the vehicle to set the parameters of +/// The ID of the vehicle to set the parameters of /// Engine status. 0 - Off, 1 - On /// Light status. 0 - Off, 1 - On /// Vehicle alarm status. If on, the alarm starts. 0 - Off, 1 - On @@ -236,10 +236,10 @@ native ManualVehicleEngineAndLights(); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle does not exist. /// -native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); +native SetVehicleParamsEx(vehicleID, engine, lights, alarm, doors, bonnet, boot, objective); ///

    Gets a vehicle's parameters. -/// The ID of the vehicle to get the parameters from +/// The ID of the vehicle to get the parameters from /// Get the engine status. If 1, the engine is running. /// Get the vehicle's lights' state. If 1 the lights are on /// Get the vehicle's alarm state. If 1 the alarm is (or was) sounding @@ -250,91 +250,91 @@ native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, /// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset'). -native GetVehicleParamsEx(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective); +native GetVehicleParamsEx(vehicleID, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective); /// Returns a vehicle's siren state (on/off). -/// The ID of the vehicle to get the siren state of +/// The ID of the vehicle to get the siren state of /// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// -1 if unset (off), 0 if off, 1 if on -native GetVehicleParamsSirenState(vehicleid); +native GetVehicleParamsSirenState(vehicleID); /// Allows you to open and close the doors of a vehicle. -/// The ID of the vehicle to set the door state of +/// The ID of the vehicle to set the door state of /// The state of the driver's door. 1 to open, 0 to close /// The state of the passenger door. 1 to open, 0 to close -/// The state of the rear left door (if available). 1 to open, 0 to close -/// The state of the rear right door (if available). 1 to open, 0 to close +/// The state of the rear left door (if available). 1 to open, 0 to close +/// The state of the rear right door (if available). 1 to open, 0 to close /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 is open, 0 is closed -native SetVehicleParamsCarDoors(vehicleid, driver, passenger, backleft, backright); +native SetVehicleParamsCarDoors(vehicleID, driver, passenger, rearLeft, rearRight); /// Allows you to retrieve the current state of a vehicle's doors. -/// The ID of the vehicle +/// The ID of the vehicle /// The integer to save the state of the driver's door to /// The integer to save the state of the passenger's door to -/// The integer to save the state of the rear left door to (if available) -/// The integer to save the state of the rear right door to (if available) +/// The integer to save the state of the rear left door to (if available) +/// The integer to save the state of the rear right door to (if available) /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. -native GetVehicleParamsCarDoors(vehicleid, &driver, &passenger, &backleft, &backright); +native GetVehicleParamsCarDoors(vehicleID, &driver, &passenger, &rearLeft, &rearRight); /// Allows you to open and close the windows of a vehicle. -/// The ID of the vehicle to set the window state of +/// The ID of the vehicle to set the window state of /// The state of the driver's window. 0 to open, 1 to close /// The state of the passenger window. 0 to open, 1 to close -/// The state of the rear left window (if available). 0 to open, 1 to close -/// The state of the rear right window (if available). 0 to open, 1 to close +/// The state of the rear left window (if available). 0 to open, 1 to close +/// The state of the rear right window (if available). 0 to open, 1 to close /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -native SetVehicleParamsCarWindows(vehicleid, driver, passenger, backleft, backright); +native SetVehicleParamsCarWindows(vehicleID, driver, passenger, rearLeft, rearRight); /// Allows you to retrieve the current state of a vehicle's windows. -/// The ID of the vehicle +/// The ID of the vehicle /// The integer to save the state of the drivers window to /// The integer to save the state of the passengers window to -/// The integer to save the state of the rear left window to (if available) -/// The integer to save the state of the rear right window to (if available) +/// The integer to save the state of the rear left window to (if available) +/// The integer to save the state of the rear right window to (if available) /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. /// The vehicle's windows state is stored in the specified variables. -native GetVehicleParamsCarWindows(vehicleid, &driver, &passenger, &backleft, &backright); +native GetVehicleParamsCarWindows(vehicleID, &driver, &passenger, &rearLeft, &rearRight); /// Sets a vehicle back to the position at where it was created. -/// The ID of the vehicle to respawn +/// The ID of the vehicle to respawn /// /// /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle does not exist. /// -native SetVehicleToRespawn(vehicleid); +native SetVehicleToRespawn(vehicleID); ///

    Links a vehicle to an interior. Vehicles can only be seen by players in the same interior (SetPlayerInterior). -/// The ID of the vehicle to link to an interior -/// The Interior ID to link it to +/// The ID of the vehicle to link to an interior +/// The Interior ID to link it to /// /// /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle does not exist.

    /// -native LinkVehicleToInterior(vehicleid, interiorid); +native LinkVehicleToInterior(vehicleID, interiorID); ///

    Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components can be found here. -/// The ID of the vehicle to add the component to. Not to be confused with modelid -/// The ID of the component to add to the vehicle +/// The ID of the vehicle to add the component to. Not to be confused with modelID +/// The ID of the component to add to the vehicle /// ///
      ///
    • 0 - The component was not added because the vehicle does not exist.
    • @@ -347,46 +347,46 @@ native LinkVehicleToInterior(vehicleid, interiorid); /// /// /// -native AddVehicleComponent(vehicleid, componentid); +native AddVehicleComponent(vehicleID, componentID); /// Remove a component from a vehicle. -/// ID of the vehicle -/// ID of the component to remove +/// ID of the vehicle +/// ID of the component to remove /// /// /// /// /// -native RemoveVehicleComponent(vehicleid, componentid); +native RemoveVehicleComponent(vehicleID, componentID); -/// Change a vehicle's primary and secondary colors. -/// The ID of the vehicle to change the colors of -/// The new vehicle's primary Color ID -/// The new vehicle's secondary Color ID +/// Change a vehicle's primary and secondary colours. +/// The ID of the vehicle to change the colours of +/// The new vehicle's primary Color ID +/// The new vehicle's secondary Color ID /// /// -/// Some vehicles have only a primary color and some can not have the color changed at all. A few (cement, squallo) have 4 colors, of which 2 can not be changed in SA:MP +/// Some vehicles have only a primary colour and some can not have the colour changed at all. A few (cement, squallo) have 4 colours, of which 2 can not be changed in SA:MP /// -/// 1: The function executed successfully. The vehicle's color was successfully changed.

      +/// 1: The function executed successfully. The vehicle's colour was successfully changed.

      /// 0: The function failed to execute. The vehicle does not exist. /// -native ChangeVehicleColor(vehicleid, color1, color2); +native ChangeVehicleColor(vehicleID, colour1, colour2); -///

      Change a vehicle's paintjob (for plain colors see ChangeVehicleColor). -/// The ID of the vehicle to change the paintjob of -/// The ID of the Paintjob to apply. Use 3 to remove a paintjob +/// Change a vehicle's paintjob (for plain colours see ChangeVehicleColor). +/// The ID of the vehicle to change the paintjob of +/// The ID of the Paintjob to apply. Use 3 to remove a paintjob /// /// /// /// Known Bugs:

      /// This function calls OnVehicleRespray.

      -/// Vehicles change their color to white anymore when a paintjob is removed. +/// Vehicles change their colour to white anymore when a paintjob is removed. /// /// This function always returns 1 (success), even if the vehicle passed is not created. -native ChangeVehiclePaintjob(vehicleid, paintjobid); +native ChangeVehiclePaintjob(vehicleID, paintJobID); ///

      Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%). -/// The ID of the vehicle to set the health of +/// The ID of the vehicle to set the health of /// The health, given as a float value /// /// @@ -407,10 +407,10 @@ native ChangeVehiclePaintjob(vehicleid, paintjobid); /// 1: The function executed successfully.

      /// 0: The function failed to execute. This means the vehicle does not exist. /// -native SetVehicleHealth(vehicleid, Float:health); +native SetVehicleHealth(vehicleID, Float:health); ///

      Get the health of a vehicle. -/// The ID of the vehicle to get the health of +/// The ID of the vehicle to get the health of /// A float variable in which to store the vehicle's health, passed by reference /// /// @@ -430,53 +430,53 @@ native SetVehicleHealth(vehicleid, Float:health); /// 1 - success.

      /// 0 - failure (invalid vehicle ID).

      /// -native GetVehicleHealth(vehicleid, &Float:health); +native GetVehicleHealth(vehicleID, &Float:health); ///

      Attach a vehicle to another vehicle as a trailer. -/// The ID of the vehicle that will be pulled -/// The ID of the vehicle that will pull the trailer +/// The ID of the vehicle that will be pulled +/// The ID of the vehicle that will pull the trailer /// /// /// /// This will only work if both vehicles are streamed in for a player (check IsVehicleStreamedIn). /// This function always returns 1, even if neither of the vehicle IDs passed are valid. -native AttachTrailerToVehicle(trailerid, vehicleid); +native AttachTrailerToVehicle(trailerID, vehicleID); /// Detach the connection between a vehicle and its trailer, if any. -/// ID of the pulling vehicle +/// ID of the pulling vehicle /// /// /// -native DetachTrailerFromVehicle(vehicleid); +native DetachTrailerFromVehicle(vehicleID); /// Checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer to get the vehicle ID of the trailer (if any). -/// The ID of the vehicle to check for trailers +/// The ID of the vehicle to check for trailers /// /// /// /// 1 if the vehicle has a trailer attached, 0 if not. -native IsTrailerAttachedToVehicle(vehicleid); +native IsTrailerAttachedToVehicle(vehicleID); /// Get the ID of the trailer attached to a vehicle. -/// The ID of the vehicle to get the trailer of +/// The ID of the vehicle to get the trailer of /// /// /// /// The vehicle ID of the trailer or 0 if no trailer is attached. -native GetVehicleTrailer(vehicleid); +native GetVehicleTrailer(vehicleID); /// Set a vehicle numberplate. -/// The ID of the vehicle to set the number plate of +/// The ID of the vehicle to set the number plate of /// The text that should be displayed on the number plate /// /// /// /// This function was added in SA-MP 0.3c and will not work in earlier versions! -/// You can use color embedding on the number plate text. +/// You can use colour embedding on the number plate text. /// /// This function has no internal error checking. Do not assign custom number plates to vehicles without plates (boats, planes, etc) as this will result in some unneeded processing time on the client.

      /// The vehicle must be re-spawned or re-streamed for the changes to take effect.

      -/// There's a limit of 32 characters on each number plate (including embedded colors).

      +/// There's a limit of 32 characters on each number plate (including embedded colours).

      /// The text length that can be seen on the number plate is around 9 to 10 characters, more characters will cause the text to split.

      /// Some vehicle models has a backward number plate, e.g. Boxville (498) (as an alternative to this vehicle you can use vehicle model ID 609, which is a duplicated Boxville (aka Boxburg), but with a regular number plate).

      /// This function only works in versions 0.2.1, 0.2.2, 0.2x and 0.3c (and beyond). @@ -485,19 +485,19 @@ native GetVehicleTrailer(vehicleid); /// 1: The function executed successfully.

      /// 0: The function failed to execute. The vehicle does not exist.

      /// -native SetVehicleNumberPlate(vehicleid, const numberplate[]); +native SetVehicleNumberPlate(vehicleID, const numberplate[]); ///

      Gets the model ID of a vehicle. -/// The ID of the vehicle to get the model of +/// The ID of the vehicle to get the model of /// /// /// /// /// The vehicle's model ID, or 0 if the vehicle doesn't exist. -native GetVehicleModel(vehicleid); +native GetVehicleModel(vehicleID); /// Retrieves the installed component ID (modshop mod(ification)) on a vehicle in a specific slot. -/// The ID of the vehicle to check for the component +/// The ID of the vehicle to check for the component /// The component slot to check for components (see below) /// /// @@ -533,7 +533,7 @@ native GetVehicleModel(vehicleid); ///
    ///
    /// The ID of the component installed in the specified slot. Returns 0 if no component in specified vehicle's specified slot, or if vehicle doesn't exist. -native GetVehicleComponentInSlot(vehicleid, slot); // There is 1 slot for each CARMODTYPE_* +native GetVehicleComponentInSlot(vehicleID, slot); // There is 1 slot for each CARMODTYPE_* /// Find out what type of component a certain ID is. /// The component ID to check @@ -544,10 +544,10 @@ native GetVehicleComponentInSlot(vehicleid, slot); // There is 1 slot for each C /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// The component slot ID of the specified component or -1 if the component is invalid. -native GetVehicleComponentType(component); // Find CARMODTYPE_* for component id +native GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID /// Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.). -/// The ID of the vehicle to repair +/// The ID of the vehicle to repair /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -555,10 +555,10 @@ native GetVehicleComponentType(component); // Find CARMODTYPE_* for component id /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle specified does not exist. /// -native RepairVehicle(vehicleid); // Repairs the damage model and resets the health +native RepairVehicle(vehicleID); // Repairs the damage model and resets the health ///

    Get the velocity of a vehicle on the x, y and z axes. -/// The ID of the vehicle to get the velocity of +/// The ID of the vehicle to get the velocity of /// A float variable in to which to store the vehicle's x velocity, passed by reference /// A float variable in to which to store the vehicle's y velocity, passed by reference /// A float variable in to which to store the vehicle's z velocity, passed by reference @@ -571,10 +571,10 @@ native RepairVehicle(vehicleid); // Repairs the damage model and resets the heal /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle specified does not exist.

    /// -native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); +native GetVehicleVelocity(vehicleID, &Float:x, &Float:y, &Float:z); ///

    Sets the x, y and z velocity of a vehicle. -/// The ID of the vehicle to set the velocity of +/// The ID of the vehicle to set the velocity of /// The velocity in the x direction /// The velocity in the y direction /// The velocity in the z direction @@ -584,10 +584,10 @@ native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle does not exist. /// -native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); +native SetVehicleVelocity(vehicleID, Float:x, Float:y, Float:z); ///

    Sets the angular x, y and z velocity of a vehicle. -/// The ID of the vehicle to set the velocity of +/// The ID of the vehicle to set the velocity of /// The amount of velocity in the angular x direction /// The amount of velocity in the angular y direction /// The amount of velocity in the angular z direction @@ -599,10 +599,10 @@ native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle does not exist. /// -native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); +native SetVehicleAngularVelocity(vehicleID, Float:x, Float:y, Float:z); ///

    Retrieve the damage statuses of a vehicle. -/// The ID of the vehicle to get the damage statuses of +/// The ID of the vehicle to get the damage statuses of /// A variable to store the panel damage data in, passed by reference /// A variable to store the door damage data in, passed by reference /// A variable to store the light damage data in, passed by reference @@ -649,10 +649,10 @@ native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle specified does not exist. /// -native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); +native GetVehicleDamageStatus(vehicleID, &panels, &doors, &lights, &tires); ///

    Sets the various visual damage statuses of a vehicle, such as popped tires, broken lights and damaged panels. -/// The ID of the vehicle to set the damage of +/// The ID of the vehicle to set the damage of /// A set of bits containing the panel damage status /// A set of bits containing the door damage status /// A set of bits containing the light damage status @@ -695,7 +695,7 @@ native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); ///
  • only check the right states for bikes
  • /// ///
    -native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); +native UpdateVehicleDamageStatus(vehicleID, panels, doors, lights, tires); /// Retrieve information about a specific vehicle model such as the size or position of seats. /// The vehicle model to get info of @@ -724,23 +724,23 @@ native GetVehicleModelInfo(vehiclemodel, infotype, &Float:x, &Float:y, &Float:z) // Virtual Worlds /// Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their own virtual world. -/// The ID of vehicle to set the virtual world of -/// The ID of the virtual world to put the vehicle in +/// The ID of vehicle to set the virtual world of +/// The ID of the virtual world to put the vehicle in /// /// -native SetVehicleVirtualWorld(vehicleid, worldid); +native SetVehicleVirtualWorld(vehicleID, worldID); /// Get the virtual world of a vehicle. -/// The ID of the vehicle to get the virtual world of +/// The ID of the vehicle to get the virtual world of /// /// /// The virtual world that the vehicle is in. -native GetVehicleVirtualWorld(vehicleid); +native GetVehicleVirtualWorld(vehicleID); /// Check if a vehicle ID is valid. -/// The ID of the vehicle to check +/// The ID of the vehicle to check /// /// /// true or false. -native bool:IsValidVehicle(vehicleid); +native bool:IsValidVehicle(vehicleID); From 35e40a90e2e6e4f980796e3a2b09401094247a1e Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 27 Apr 2021 22:48:00 +0100 Subject: [PATCH 005/104] Revert forwards again. --- a_samp.inc | 410 ++++++++++++++++++++++++++--------------------------- 1 file changed, 205 insertions(+), 205 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 64222ff..f9b9799 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -2247,7 +2247,7 @@ forward OnFilterScriptInit(); forward OnFilterScriptExit(); /// This callback is called when a player connects to the server. -/// The ID of the player that connected +/// The ID of the player that connected /// /// /// @@ -2257,10 +2257,10 @@ forward OnFilterScriptExit(); /// 1 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnPlayerConnect(playerID); +forward OnPlayerConnect(playerid); ///

    This callback is called when a player disconnects from the server. -/// The ID of the player that disconnected +/// The ID of the player that disconnected /// The reason for the disconnection. See table below /// /// @@ -2280,10 +2280,10 @@ forward OnPlayerConnect(playerID); /// 1 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnPlayerDisconnect(playerID, reason); +forward OnPlayerDisconnect(playerid, reason); ///

    This callback is called when a player spawns.(i.e. after caling SpawnPlayer function). -/// The ID of the player that spawned +/// The ID of the player that spawned /// /// /// @@ -2296,11 +2296,11 @@ forward OnPlayerDisconnect(playerID, reason); /// 1 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnPlayerSpawn(playerID); +forward OnPlayerSpawn(playerid); ///

    This callback is called when a player dies, either by suicide or by being killed by another player. -/// The ID of the player that died -/// The ID of the player that killed the player who died, or INVALID_PLAYER_ID if there was none +/// The ID of the player that died +/// The ID of the player that killed the player who died, or INVALID_PLAYER_ID if there was none /// The ID of the reason for the player's death /// /// @@ -2308,18 +2308,18 @@ forward OnPlayerSpawn(playerID); /// /// The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)

    /// The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

    -/// You do not need to check whether killerID is valid before using it in SendDeathMessage. INVALID_PLAYER_ID is a valid killerID ID parameter in that function.

    -/// playerID is the only one who can call the callback. (good to know for anti fake death) +/// You do not need to check whether killerid is valid before using it in SendDeathMessage. INVALID_PLAYER_ID is a valid killerid ID parameter in that function.

    +/// playerid is the only one who can call the callback. (good to know for anti fake death) /// /// /// 0 - Will prevent other filterscripts from receiving this callback.

    /// 1 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnPlayerDeath(playerID, killerID, reason); +forward OnPlayerDeath(playerid, killerid, reason); ///

    This callback is called when a vehicle respawns. -/// The ID of the vehicle that spawned +/// The ID of the vehicle that spawned /// /// /// @@ -2329,11 +2329,11 @@ forward OnPlayerDeath(playerID, killerID, reason); /// 1 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnVehicleSpawn(vehicleID); +forward OnVehicleSpawn(vehicleid); ///

    This callback is called when a vehicle is destroyed - either by exploding or becoming submerged in water. -/// The ID of the vehicle that was destroyed -/// The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player +/// The ID of the vehicle that was destroyed +/// The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player /// /// /// This callback can also be called by NPC. @@ -2342,10 +2342,10 @@ forward OnVehicleSpawn(vehicleID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnVehicleDeath(vehicleID, killerID); +forward OnVehicleDeath(vehicleid, killerid); ///

    Called when a player sends a chat message. -/// The ID of the player who typed the text +/// The ID of the player who typed the text /// The text the player typed /// /// @@ -2355,10 +2355,10 @@ forward OnVehicleDeath(vehicleID, killerID); /// Returning 0 in this callback will stop the text from being sent to all players.

    /// It is always called first in filterscripts so returning 0 there blocks other scripts from seeing it. /// -forward OnPlayerText(playerID, text[]); +forward OnPlayerText(playerid, text[]); ///

    This callback is called when a player enters a command into the client chat window. Commands are anything that start with a forward slash, e.g. /help. -/// The ID of the player that entered a command +/// The ID of the player that entered a command /// The command that was entered (including the forward slash) /// /// @@ -2368,11 +2368,11 @@ forward OnPlayerText(playerID, text[]); /// Return 1 if the command was processed, otherwise 0; If the command was not found both in filterscripts and in gamemode, the player will be received a message: SERVER: Unknown command.

    /// It is always called first in filterscripts so returning 1 there blocks other scripts from seeing it. /// -forward OnPlayerCommandText(playerID, cmdtext[]); +forward OnPlayerCommandText(playerid, cmdtext[]); ///

    Called when a player changes class at class selection (and when class selection first appears). -/// The ID of the player that changed class -/// The ID of the current class being viewed (returned by AddPlayerClass) +/// The ID of the player that changed class +/// The ID of the current class being viewed (returned by AddPlayerClass) /// /// /// This callback can also be called by NPC. @@ -2381,11 +2381,11 @@ forward OnPlayerCommandText(playerID, cmdtext[]); /// Returning 0 in this callback will prevent the player from spawning. The player can be forced to spawn when SpawnPlayer is used.

    /// It is always called first in filterscripts. /// -forward OnPlayerRequestClass(playerID, classID); +forward OnPlayerRequestClass(playerid, classid); ///

    This callback is called when a player starts to enter a vehicle, meaning the player is not in vehicle yet at the time this callback is called. -/// ID of the player who attempts to enter a vehicle -/// ID of the vehicle the player is attempting to enter +/// ID of the player who attempts to enter a vehicle +/// ID of the vehicle the player is attempting to enter /// 0 if entering as driver. 1 if entering as passenger /// /// @@ -2397,11 +2397,11 @@ forward OnPlayerRequestClass(playerID, classID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerEnterVehicle(playerID, vehicleID, ispassenger); +forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); ///

    This callback is called when a player starts to exit a vehicle. -/// The ID of the player that is exiting a vehicle -/// The ID of the vehicle the player is exiting +/// The ID of the player that is exiting a vehicle +/// The ID of the vehicle the player is exiting /// /// /// @@ -2412,10 +2412,10 @@ forward OnPlayerEnterVehicle(playerID, vehicleID, ispassenger); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerExitVehicle(playerID, vehicleID); +forward OnPlayerExitVehicle(playerid, vehicleid); ///

    This callback is called when a player changes state. For example, when a player changes from being the driver of a vehicle to being on-foot. -/// The ID of the player that changed state +/// The ID of the player that changed state /// The player's new state /// The player's previous state /// @@ -2442,10 +2442,10 @@ forward OnPlayerExitVehicle(playerID, vehicleID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerStateChange(playerID, newstate, oldstate); +forward OnPlayerStateChange(playerid, newstate, oldstate); ///

    This callback is called when a player enters the checkpoint set for that player. -/// The player who entered the checkpoint +/// The player who entered the checkpoint /// /// /// @@ -2460,10 +2460,10 @@ forward OnPlayerStateChange(playerID, newstate, oldstate); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerEnterCheckpoint(playerID); +forward OnPlayerEnterCheckpoint(playerid); ///

    This callback is called when a player leaves the checkpoint set for them by SetPlayerCheckpoint. Only one checkpoint can be set at a time. -/// The ID of the player that left their checkpoint +/// The ID of the player that left their checkpoint /// /// /// @@ -2478,10 +2478,10 @@ forward OnPlayerEnterCheckpoint(playerID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerLeaveCheckpoint(playerID); +forward OnPlayerLeaveCheckpoint(playerid); ///

    This callback is called when a player enters a race checkpoint. -/// The ID of the player who entered the race checkpoint +/// The ID of the player who entered the race checkpoint /// /// /// @@ -2496,10 +2496,10 @@ forward OnPlayerLeaveCheckpoint(playerID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerEnterRaceCheckpoint(playerID); +forward OnPlayerEnterRaceCheckpoint(playerid); ///

    This callback is called when a player leaves the race checkpoint. -/// The ID of the player that left the race checkpoint +/// The ID of the player that left the race checkpoint /// /// /// @@ -2514,7 +2514,7 @@ forward OnPlayerEnterRaceCheckpoint(playerID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerLeaveRaceCheckpoint(playerID); +forward OnPlayerLeaveRaceCheckpoint(playerid); ///

    This callback is called when a command is sent through the server console, remote RCON, or via the in-game "/rcon command". /// A string containing the command that was typed, as well as any passed parameters @@ -2532,7 +2532,7 @@ forward OnPlayerLeaveRaceCheckpoint(playerID); forward OnRconCommand(cmd[]); /// Called when a player attempts to spawn via class selection either by pressing SHIFT or clicking the 'Spawn' button. -/// The ID of the player that requested to spawn +/// The ID of the player that requested to spawn /// /// /// This callback can also be called by NPC. @@ -2541,10 +2541,10 @@ forward OnRconCommand(cmd[]); /// Returning 0 in this callback will prevent the player from spawning.

    /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// -forward OnPlayerRequestSpawn(playerID); +forward OnPlayerRequestSpawn(playerid); ///

    This callback is called when an object is moved after MoveObject (when it stops moving). -/// The ID of the object that was moved +/// The ID of the object that was moved /// /// /// @@ -2554,11 +2554,11 @@ forward OnPlayerRequestSpawn(playerID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnObjectMoved(objectID); +forward OnObjectMoved(objectid); ///

    This callback is called when a player object is moved after MovePlayerObject (when it stops moving). -/// The playerID the object is assigned to -/// The ID of the player object that was moved +/// The playerid the object is assigned to +/// The ID of the player object that was moved /// /// /// @@ -2568,23 +2568,23 @@ forward OnObjectMoved(objectID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerObjectMoved(playerID, objectID); +forward OnPlayerObjectMoved(playerid, objectid); ///

    Called when a player picks up a pickup created with CreatePickup. -/// The ID of the player that picked up the pickup -/// The ID of the pickup, returned by CreatePickup +/// The ID of the player that picked up the pickup +/// The ID of the pickup, returned by CreatePickup /// /// /// /// This callback does not handle returns.

    /// It is always called first in gamemode. /// -forward OnPlayerPickUpPickup(playerID, pickupID); +forward OnPlayerPickUpPickup(playerid, pickupid); ///

    This callback is called when a vehicle is modded. -/// The ID of the driver of the vehicle -/// The ID of the vehicle which is modded -/// The ID of the component which was added to the vehicle +/// The ID of the driver of the vehicle +/// The ID of the vehicle which is modded +/// The ID of the component which was added to the vehicle /// /// /// @@ -2594,12 +2594,12 @@ forward OnPlayerPickUpPickup(playerID, pickupID); /// Return 0 to desync the mod (or an invalid mod) from propagating and / or crashing players.

    /// It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. /// -forward OnVehicleMod(playerID, vehicleID, componentID); +forward OnVehicleMod(playerid, vehicleid, componentid); ///

    This callback is called when a player enters or exits a mod shop. -/// The ID of the player that entered or exited the modshop +/// The ID of the player that entered or exited the modshop /// 1 if the player entered or 0 if they exited -/// The interior ID of the modshop that the player is entering (or 0 if exiting) +/// The interior ID of the modshop that the player is entering (or 0 if exiting) /// /// /// @@ -2610,12 +2610,12 @@ forward OnVehicleMod(playerID, vehicleID, componentID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnEnterExitModShop(playerID, enterexit, interiorID); +forward OnEnterExitModShop(playerid, enterexit, interiorid); ///

    Called when a player previews a vehicle paintjob inside a mod shop. Watch out, this callback is not called when the player buys the paintjob. -/// The ID of the player that changed the paintjob of their vehicle -/// The ID of the vehicle that had its paintjob changed -/// The ID of the new paintjob +/// The ID of the player that changed the paintjob of their vehicle +/// The ID of the vehicle that had its paintjob changed +/// The ID of the new paintjob /// /// /// @@ -2625,13 +2625,13 @@ forward OnEnterExitModShop(playerID, enterexit, interiorID); /// This callback does not handle returns. Returning 0 won't deny the paintjob change.

    /// It is always called first in gamemode so returning 0 there blocks other filterscripts from seeing it. /// -forward OnVehiclePaintjob(playerID, vehicleID, paintJobID); +forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); -///

    This callback is called when a player exits a mod shop, even if the colours weren't changed. Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. -/// The ID of the player that is driving the vehicle -/// The ID of the vehicle that was resprayed -/// The colour that the vehicle's primary colour was changed to -/// The colour that the vehicle's secondary colour was changed to +/// This callback is called when a player exits a mod shop, even if the colors weren't changed. Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. +/// The ID of the player that is driving the vehicle +/// The ID of the vehicle that was resprayed +/// The color that the vehicle's primary color was changed to +/// The color that the vehicle's secondary color was changed to /// /// /// @@ -2643,11 +2643,11 @@ forward OnVehiclePaintjob(playerID, vehicleID, paintJobID); /// Returning 0 in this callback will deny the colour change. Returning 1 will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.

    /// It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. /// -forward OnVehicleRespray(playerID, vehicleID, colour1, colour2); +forward OnVehicleRespray(playerid, vehicleid, color1, color2); ///

    This callback is called when a vehicle element such as doors, tires, panels, or lights change their damage status. -/// The ID of the vehicle that was changed its damage status -/// The ID of the player who synced the change in the damage status (who had the car damaged or repaired) +/// The ID of the vehicle that was changed its damage status +/// The ID of the player who synced the change in the damage status (who had the car damaged or repaired) /// /// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! @@ -2657,18 +2657,18 @@ forward OnVehicleRespray(playerID, vehicleID, colour1, colour2); /// 0 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts.

    /// -forward OnVehicleDamageStatusUpdate(vehicleID, playerID); +forward OnVehicleDamageStatusUpdate(vehicleid, playerid); ///

    This callback is called when a player's client updates/syncs the position of a vehicle they're not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle that has no driver. -/// The ID of the vehicle that's position was updated -/// The ID of the player that sent a vehicle position sync update -/// The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=rearLeft 3=rearRight 4+ is for coach/bus etc. with many passenger seats -/// The new x coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new x velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// The new y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// The new z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The ID of the vehicle that's position was updated +/// The ID of the player that sent a vehicle position sync update +/// The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats +/// The new X coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new Y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new Z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version +/// The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version +/// The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version /// /// This callback was added in SA-MP 0.3c R3 and will not work in earlier versions! /// This callback is called very frequently per second per unoccupied vehicle. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. @@ -2677,10 +2677,10 @@ forward OnVehicleDamageStatusUpdate(vehicleID, playerID); /// Returning 0 in this callback will stop the vehicle's position being synced to other players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.

    /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// -forward OnUnoccupiedVehicleUpdate(vehicleID, playerID, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); +forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); ///

    This callback is called when a player selects an item from a menu (ShowMenuForPlayer). -/// The ID of the player that selected a menu item +/// The ID of the player that selected a menu item /// The ID of the row that was selected. The first row is ID 0 /// /// @@ -2694,10 +2694,10 @@ forward OnUnoccupiedVehicleUpdate(vehicleID, playerID, passenger_seat, Float:new /// This callback does not handle returns.

    /// It is always called first in gamemode. /// -forward OnPlayerSelectedMenuRow(playerID, row); +forward OnPlayerSelectedMenuRow(playerid, row); ///

    Called when a player exits a menu. -/// The ID of the player that exited the menu +/// The ID of the player that exited the menu /// /// /// @@ -2705,12 +2705,12 @@ forward OnPlayerSelectedMenuRow(playerID, row); /// This callback does not handle returns.

    /// It is always called first in gamemode. /// -forward OnPlayerExitedMenu(playerID); +forward OnPlayerExitedMenu(playerid); ///

    Called when a player changes interior. Can be triggered by SetPlayerInterior or when a player enter/exits a building. -/// The playerID who changed interior -/// The interior the player is now in -/// The interior the player was in before +/// The playerid who changed interior +/// The interior the player is now in +/// The interior the player was in before /// /// /// @@ -2719,10 +2719,10 @@ forward OnPlayerExitedMenu(playerID); /// This callback does not handle returns.

    /// It is always called first in gamemode. /// -forward OnPlayerInteriorChange(playerID, newinteriorID, oldinteriorID); +forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); ///

    This callback is called when the state of any supported key is changed (pressed/released). Directional keys do not trigger OnPlayerKeyStateChange (up/down/left/right). -/// The ID of the player that pressed or released a key +/// The ID of the player that pressed or released a key /// A map (bitmask) of the keys currently held - see here /// A map (bitmask) of the keys held prior to the current change - see here /// @@ -2747,7 +2747,7 @@ forward OnPlayerInteriorChange(playerID, newinteriorID, oldinteriorID); /// This callback does not handle returns.

    /// It is always called first in gamemode. /// -forward OnPlayerKeyStateChange(playerID, newkeys, oldkeys); +forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys); ///

    This callback is called when someone attempts to log in to RCON in-game; successful or not. /// The IP of the player that tried to log in to RCON @@ -2766,7 +2766,7 @@ forward OnPlayerKeyStateChange(playerID, newkeys, oldkeys); forward OnRconLoginAttempt(ip[], password[], success); /// This callback is called every time a client/player updates the server with their status. It is often used to create custom callbacks for client updates that aren't actively tracked by the server, such as health or armor updates or players switching weapons. -/// ID of the player sending an update packet +/// ID of the player sending an update packet /// This callback can also be called by NPC. /// This callback is called, on average, 30 times per second, per player; only use it when you know what it's meant for (or more importantly what it's NOT meant for). /// The frequency with which this callback is called for each player varies, depending on what the player is doing. Driving or shooting will trigger a lot more updates than idling. @@ -2775,11 +2775,11 @@ forward OnRconLoginAttempt(ip[], password[], success); /// 1 - Indicates that this update can be processed normally and sent to other players.

    /// It is always called first in filterscripts. /// -forward OnPlayerUpdate(playerID); +forward OnPlayerUpdate(playerid); ///

    This callback is called when a player is streamed by some other player's client. -/// The ID of the player who has been streamed -/// The ID of the player that streamed the other player in +/// The ID of the player who has been streamed +/// The ID of the player that streamed the other player in /// /// /// @@ -2789,11 +2789,11 @@ forward OnPlayerUpdate(playerID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerStreamIn(playerID, forplayerID); +forward OnPlayerStreamIn(playerid, forplayerid); ///

    This callback is called when a player is streamed out from some other player's client. -/// The player who has been destreamed -/// The player who has destreamed the other player +/// The player who has been destreamed +/// The player who has destreamed the other player /// /// /// @@ -2803,11 +2803,11 @@ forward OnPlayerStreamIn(playerID, forplayerID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnPlayerStreamOut(playerID, forplayerID); +forward OnPlayerStreamOut(playerid, forplayerid); ///

    Called when a vehicle is streamed to a player's client. -/// The ID of the vehicle that streamed in for the player -/// The ID of the player who the vehicle streamed in for +/// The ID of the vehicle that streamed in for the player +/// The ID of the player who the vehicle streamed in for /// /// /// @@ -2817,11 +2817,11 @@ forward OnPlayerStreamOut(playerID, forplayerID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnVehicleStreamIn(vehicleID, forplayerID); +forward OnVehicleStreamIn(vehicleid, forplayerid); ///

    This callback is called when a vehicle is streamed out for a player's client (it's so far away that they can't see it). -/// The ID of the vehicle that streamed out -/// The ID of the player who is no longer streaming the vehicle +/// The ID of the vehicle that streamed out +/// The ID of the player who is no longer streaming the vehicle /// /// /// @@ -2831,33 +2831,33 @@ forward OnVehicleStreamIn(vehicleID, forplayerID); /// This callback does not handle returns.

    /// It is always called first in filterscripts. /// -forward OnVehicleStreamOut(vehicleID, forplayerID); +forward OnVehicleStreamOut(vehicleid, forplayerid); ///

    This callback is called when an actor is streamed in by a player's client. -/// The ID of the actor that has been streamed in for the player -/// The ID of the player that streamed the actor in +/// The ID of the actor that has been streamed in for the player +/// The ID of the player that streamed the actor in /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This callback can also be called by NPC. /// It is always called first in filterscripts. /// This callback does not handle returns. -forward OnActorStreamIn(actorID, forplayerID); +forward OnActorStreamIn(actorid, forplayerid); /// This callback is called when an actor is streamed out by a player's client. -/// The ID of the actor that has been streamed out for the player -/// The ID of the player that streamed the actor out +/// The ID of the actor that has been streamed out for the player +/// The ID of the player that streamed the actor out /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This callback can also be called by NPC. /// It is always called first in filterscripts. /// This callback does not handle returns. -forward OnActorStreamOut(actorID, forplayerID); +forward OnActorStreamOut(actorid, forplayerid); /// This callback is called when a player responds to a dialog shown using ShowPlayerDialog by either clicking a button, pressing ENTER/ESC or double-clicking a list item (if using a list style dialog). -/// The ID of the player that responded to the dialog -/// The ID of the dialog the player responded to, assigned in ShowPlayerDialog +/// The ID of the player that responded to the dialog +/// The ID of the dialog the player responded to, assigned in ShowPlayerDialog /// 1 for left button and 0 for right button (if only one button shown, always 1) /// The ID of the list item selected by the player (starts at 0) (only if using a list style dialog) /// The text entered into the input box by the player or the selected list item text @@ -2869,59 +2869,59 @@ forward OnActorStreamOut(actorID, forplayerID); /// Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.

    /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// -forward OnDialogResponse(playerID, dialogID, response, listitem, inputtext[]); +forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]); ///

    This callback is called when a player takes damage. -/// The ID of the player that took damage -/// The ID of the player that caused the damage. INVALID_PLAYER_ID if self-inflicted +/// The ID of the player that took damage +/// The ID of the player that caused the damage. INVALID_PLAYER_ID if self-inflicted /// The amount of damage the player took (health and armour combined) -/// The ID of the weapon/reason for the damage +/// The ID of the weapon/reason for the damage /// The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) /// /// /// This callback was added in SA-MP 0.3d and will not work in earlier versions! /// GetPlayerHealth and GetPlayerArmour will return the old amounts of the player before this callback. /// -/// The weaponID will return 37 (flame thrower) from any fire sources (e.g. molotov, 18).

    -/// The weaponID will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

    -/// playerID is the only one who can call the callback.

    -/// The amount is always the maximum damage the weaponID can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. +/// The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18).

    +/// The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

    +/// playerid is the only one who can call the callback.

    +/// The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. /// /// /// 1 - Callback will not be called in other filterscripts.

    /// 0 - Allows this callback to be called in other filterscripts.

    /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// -forward OnPlayerTakeDamage(playerID, issuerID, Float:amount, weaponID, bodypart); +forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart); ///

    This callback is called when a player gives damage to another player. -/// The ID of the player that gave damage -/// The ID of the player that received damage -/// The amount of health/armour damagedID has lost (combined) -/// The reason that caused the damage +/// The ID of the player that gave damage +/// The ID of the player that received damage +/// The amount of health/armour damagedid has lost (combined) +/// The reason that caused the damage /// The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) /// /// This callback was added in SA-MP 0.3d and will not work in earlier versions! /// /// Keep in mind this function can be inaccurate in some cases.

    /// If you want to prevent certain players from damaging eachother, use SetPlayerTeam.

    -/// The weaponID will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)

    -/// The weaponID will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

    -/// playerID is the only one who can call the callback.

    -/// The amount is always the maximum damage the weaponID can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. +/// The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)

    +/// The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

    +/// playerid is the only one who can call the callback.

    +/// The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. /// /// /// 1 - Callback will not be called in other filterscripts.

    /// 0 - Allows this callback to be called in other filterscripts.

    /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// -forward OnPlayerGiveDamage(playerID, damagedID, Float:amount, weaponID, bodypart); +forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart); ///

    This callback is called when a player gives damage to an actor. -/// The ID of the player that gave damage -/// The ID of the actor that received damage -/// The amount of health/armour damaged_actorID has lost -/// The reason that caused the damage +/// The ID of the player that gave damage +/// The ID of the actor that received damage +/// The amount of health/armour damaged_actorid has lost +/// The reason that caused the damage /// The body part that was hit /// /// @@ -2938,28 +2938,28 @@ forward OnPlayerGiveDamage(playerID, damagedID, Float:amount, weaponID, bodypart /// 0 - Allows this callback to be called in other filterscripts.

    /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// -forward OnPlayerGiveDamageActor(playerID, damaged_actorID, Float:amount, weaponID, bodypart); +forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart); ///

    OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map (by right-clicking). -/// The ID of the player that placed a target/waypoint -/// The x float coordinate where the player clicked -/// The y float coordinate where the player clicked -/// The z float coordinate where the player clicked (inaccurate - see note below) +/// The ID of the player that placed a target/waypoint +/// The X float coordinate where the player clicked +/// The Y float coordinate where the player clicked +/// The Z float coordinate where the player clicked (inaccurate - see note below) /// /// /// /// This callback was added in SA-MP 0.3d and will not work in earlier versions! -/// The z value returned will be 0 (invalid) if it is far away from the player; use the MapAndreas plugin to get a more accurate z coordinate. +/// The Z value returned will be 0 (invalid) if it is far away from the player; use the MapAndreas plugin to get a more accurate Z coordinate. /// /// 1 - Will prevent other filterscripts from receiving this callback.

    /// 0 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in gamemode. /// -forward OnPlayerClickMap(playerID, Float:fX, Float:fY, Float:fZ); +forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); ///

    This callback is called when a player clicks on a textdraw or cancels the select mode with the Escape key. -/// The ID of the player that clicked on the textdraw -/// The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection was cancelled +/// The ID of the player that clicked on the textdraw +/// The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection was cancelled /// /// /// This callback was added in SA-MP 0.3e and will not work in earlier versions! @@ -2969,11 +2969,11 @@ forward OnPlayerClickMap(playerID, Float:fX, Float:fY, Float:fZ); /// Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.

    /// It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. /// -forward OnPlayerClickTextDraw(playerID, Text:clickedID); +forward OnPlayerClickTextDraw(playerid, Text:clickedid); ///

    This callback is called when a player clicks on a player-textdraw. It is not called when player cancels the select mode (ESC) - however, OnPlayerClickTextDraw is. -/// The ID of the player that selected a textdraw -/// The ID of the player-textdraw that the player selected +/// The ID of the player that selected a textdraw +/// The ID of the player-textdraw that the player selected /// /// /// @@ -2983,10 +2983,10 @@ forward OnPlayerClickTextDraw(playerID, Text:clickedID); /// Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.

    /// It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. /// -forward OnPlayerClickPlayerTextDraw(playerID, PlayerText:playertextID); +forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); ///

    This callback is called when an IP address attempts a connection to the server. To block incoming connections, use BlockIpAddress. -/// The ID of the player attempting to connect +/// The ID of the player attempting to connect /// The IP address of the player attempting to connect /// The port of the attempted connection /// @@ -3000,11 +3000,11 @@ forward OnPlayerClickPlayerTextDraw(playerID, PlayerText:playertextID); /// 0 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnIncomingConnection(playerID, ip_address[], port); +forward OnIncomingConnection(playerid, ip_address[], port); ///

    This callback is called when a player sent a trailer update. -/// The ID of the player who sent a trailer update -/// The Trailer being updated +/// The ID of the player who sent a trailer update +/// The Trailer being updated /// /// /// @@ -3017,11 +3017,11 @@ forward OnIncomingConnection(playerID, ip_address[], port); /// 1 - Processes the trailer update as normal and synchronizes it between all players.

    /// It is always called first in filterscripts. /// -forward OnTrailerUpdate(playerID, vehicleID); +forward OnTrailerUpdate(playerid, vehicleid); ///

    This callback is called when a vehicle's siren is toggled. -/// The ID of the player that toggled the siren (driver) -/// The ID of the vehicle of which the siren was toggled for +/// The ID of the player that toggled the siren (driver) +/// The ID of the vehicle of which the siren was toggled for /// 0 if siren was turned off, 1 if siren was turned on /// /// This callback was added in SA-MP 0.3.7 and will not work in earlier versions! @@ -3032,23 +3032,23 @@ forward OnTrailerUpdate(playerID, vehicleID); /// 0 - Indicates that this callback will be passed to the gamemode.

    /// It is always called first in filterscripts. /// -forward OnVehicleSirenStateChange(playerID, vehicleID, newstate); +forward OnVehicleSirenStateChange(playerid, vehicleid, newstate); ///

    This callback is called when a player finishes downloading custom models. For more information on how to add custom models to your server, see the release thread and this tutorial. -/// The ID of the player that finished downloading custom models -/// The ID of the virtual world the player finished downloading custom models for +/// The ID of the player that finished downloading custom models +/// The ID of the virtual world the player finished downloading custom models for /// /// /// /// This callback was added in SA-MP 0.3DL and will not work in earlier versions! /// This callback is called every time a player changes virtual worlds, even if there are no custom models present in that world. /// This callback does not handle returns. -forward OnPlayerFinishedDownloading(playerID, virtualWorld); -forward OnPlayerRequestDownload(playerID, type, crc); +forward OnPlayerFinishedDownloading(playerid, virtualworld); +forward OnPlayerRequestDownload(playerid, type, crc); /// Called when a player double-clicks on a player on the scoreboard. -/// The ID of the player that clicked on a player on the scoreboard -/// The ID of the player that was clicked on +/// The ID of the player that clicked on a player on the scoreboard +/// The ID of the player that was clicked on /// The source of the player's click /// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! @@ -3058,19 +3058,19 @@ forward OnPlayerRequestDownload(playerID, type, crc); /// 0 - Indicates that this callback will be passed to the next filterscript.

    /// It is always called first in filterscripts. /// -forward OnPlayerClickPlayer(playerID, clickedplayerID, source); +forward OnPlayerClickPlayer(playerid, clickedplayerid, source); ///

    This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). -/// The ID of the player that edited an object +/// The ID of the player that edited an object /// 0 if it is a global object or 1 if it is a playerobject -/// The ID of the edited object +/// The ID of the edited object /// The type of response -/// The x offset for the object that was edited -/// The y offset for the object that was edited -/// The z offset for the object that was edited -/// The x rotation for the object that was edited -/// The y rotation for the object that was edited -/// The z rotation for the object that was edited +/// The X offset for the object that was edited +/// The Y offset for the object that was edited +/// The Z offset for the object that was edited +/// The X rotation for the object that was edited +/// The Y rotation for the object that was edited +/// The Z rotation for the object that was edited /// /// /// @@ -3082,23 +3082,23 @@ forward OnPlayerClickPlayer(playerID, clickedplayerID, source); /// 0 - Indicates that this callback will be passed to the next script.

    /// It is always called first in filterscripts. /// -forward OnPlayerEditObject(playerID, playerobject, objectID, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); +forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); ///

    This callback is called when a player ends attached object edition mode. -/// The ID of the player that ended edition mode +/// The ID of the player that ended edition mode /// 0 if they cancelled (ESC) or 1 if they clicked the save icon /// The index of the attached object -/// The model of the attached object that was edited -/// The bone of the attached object that was edited -/// The x offset for the attached object that was edited -/// The y offset for the attached object that was edited -/// The z offset for the attached object that was edited -/// The x rotation for the attached object that was edited -/// The y rotation for the attached object that was edited -/// The z rotation for the attached object that was edited -/// The x scale for the attached object that was edited -/// The y scale for the attached object that was edited -/// The z scale for the attached object that was edited +/// The model of the attached object that was edited +/// The bone of the attached object that was edited +/// The X offset for the attached object that was edited +/// The Y offset for the attached object that was edited +/// The Z offset for the attached object that was edited +/// The X rotation for the attached object that was edited +/// The Y rotation for the attached object that was edited +/// The Z rotation for the attached object that was edited +/// The X scale for the attached object that was edited +/// The Y scale for the attached object that was edited +/// The Z scale for the attached object that was edited /// /// /// This callback was added in SA-MP 0.3e and will not work in earlier versions! @@ -3108,16 +3108,16 @@ forward OnPlayerEditObject(playerID, playerobject, objectID, response, Float:fX, /// 0 - Indicates that this callback will be passed to the next script.

    /// It is always called first in filterscripts. /// -forward OnPlayerEditAttachedObject(playerID, response, index, modelID, boneID, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); +forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); ///

    This callback is called when a player selects an object after SelectObject has been used. -/// The ID of the player that selected an object +/// The ID of the player that selected an object /// The type of selection -/// The ID of the selected object -/// The model ID of the selected object -/// The x position of the selected object -/// The y position of the selected object -/// The z position of the selected object +/// The ID of the selected object +/// The model ID of the selected object +/// The X position of the selected object +/// The Y position of the selected object +/// The Z position of the selected object /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// @@ -3125,16 +3125,16 @@ forward OnPlayerEditAttachedObject(playerID, response, index, modelID, boneID, F /// 0 - Indicates that this callback will be passed to the next script.

    /// It is always called first in filterscripts. /// -forward OnPlayerSelectObject(playerID, type, objectID, modelID, Float:fX, Float:fY, Float:fZ); +forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ); ///

    This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). -/// The ID of the player that shot a weapon -/// The ID of the weapon shot by the player +/// The ID of the player that shot a weapon +/// The ID of the weapon shot by the player /// The type of thing the shot hit (none, player, vehicle, or (player)object) -/// The ID of the player, vehicle or object that was hit -/// The x coordinate that the shot hit -/// The y coordinate that the shot hit -/// The z coordinate that the shot hit +/// The ID of the player, vehicle or object that was hit +/// The X coordinate that the shot hit +/// The Y coordinate that the shot hit +/// The Z coordinate that the shot hit /// /// /// This callback was added in SA-MP 0.3z and will not work in earlier versions! @@ -3151,13 +3151,13 @@ forward OnPlayerSelectObject(playerID, type, objectID, modelID, Float:fX, Float: /// If hittype is:

    ///

      ///
    • - BULLET_HIT_TYPE_NONE: the fX, fY and fZ parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
    • -///
    • - Others: the fX, fY and fZ are offsets relative to the hitID.
    • +///
    • - Others: the fX, fY and fZ are offsets relative to the hitid.
    • ///
    ///
    /// /// Isn't called if you fired in vehicle as driver or if you are looking behind with the aim enabled (shooting in air).

    -/// It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitID (the hit player's vehicleID) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER at all.

    -/// Partially fixed in SA-MP 0.3.7: If fake weapon data is sent by a malicious user, other player clients may freeze or crash. To combat this, check if the reported weaponID can actually fire bullets. +/// It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitid (the hit player's vehicleid) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER at all.

    +/// Partially fixed in SA-MP 0.3.7: If fake weapon data is sent by a malicious user, other player clients may freeze or crash. To combat this, check if the reported weaponid can actually fire bullets. /// /// /// @@ -3167,22 +3167,22 @@ forward OnPlayerSelectObject(playerID, type, objectID, modelID, Float:fX, Float: /// 1 - Allow the bullet to cause damage.

    /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// -forward OnPlayerWeaponShot(playerID, weaponID, hittype, hitID, Float:fX, Float:fY, Float:fZ); +forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ); ///

    This callback is called when a SendClientCheck request comletes -/// The ID of the player checked -/// The type of check performed +/// The ID of the player checked +/// The type of check performed /// The address requested /// The result of the check /// -forward OnClientCheckResponse(playerID, actionID, memaddr, retndata); +forward OnClientCheckResponse(playerid, actionid, memaddr, retndata); /// This callback is called when a SendClientCheck request comletes -/// The ID of the player who got cash from the game +/// The ID of the player who got cash from the game /// The amount of cash given /// Where the money came from /// Doesn't work -forward OnScriptCash(playerID, amount, source); +forward OnScriptCash(playerid, amount, source); // -------------------------------------------------- From c37b66dee8128264123f2229c612603b6e04365a Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 27 Apr 2021 23:02:19 +0100 Subject: [PATCH 006/104] `ID` is bad... --- a_actor.inc | 66 ++--- a_npc.inc | 90 +++---- a_objects.inc | 204 +++++++------- a_players.inc | 706 ++++++++++++++++++++++++------------------------- a_samp.inc | 264 +++++++++--------- a_vehicles.inc | 184 ++++++------- 6 files changed, 757 insertions(+), 757 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 89c6f89..0716b34 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -15,7 +15,7 @@ #pragma tabsize 4 /// 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. -/// The model ID (skin ID) the actor should have +/// The model ID (skin ID) the actor should have /// The x coordinate to create the actor at /// The y coordinate to create the actor at /// The z coordinate to create the actor at @@ -52,29 +52,29 @@ /// The created Actor ID (start at 0).

    /// INVALID_ACTOR_ID (65535) If the actor limit (1000) is reached. /// -native CreateActor(modelID, Float:x, Float:y, Float:z, Float:angle); +native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); ///

    Destroy an actor which was created with CreateActor. -/// The ID of the actor to destroy. Returned by CreateActor +/// The ID of the actor to destroy. Returned by CreateActor /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. The actor with the ID specified does not exist. /// -native DestroyActor(actorID); +native DestroyActor(actorid); ///

    Checks if an actor is streamed in for a player. -/// The ID of the actor -/// The ID of the player +/// The ID of the actor +/// The ID of the player /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 if the actor is streamed in for the player, or 0 if it is not. -native IsActorStreamedIn(actorID, forplayerID); +native IsActorStreamedIn(actorid, forplayerid); /// Set the virtual world of an actor. Only players in the same world will see the actor. -/// The ID of the actor (returned by CreateActor) to set the virtual world of +/// The ID of the actor (returned by CreateActor) to set the virtual world of /// The virtual world to put the actor ID /// /// @@ -83,17 +83,17 @@ native IsActorStreamedIn(actorID, forplayerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The actor specified does not exist. /// -native SetActorVirtualWorld(actorID, vworld); +native SetActorVirtualWorld(actorid, vworld); ///

    Get the virtual world of an actor. -/// The ID of the actor to get the virtual world of +/// The ID of the actor to get the virtual world of /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The virtual world of the actor. By default this is 0. Also returns 0 if actor specified does not exist. -native GetActorVirtualWorld(actorID); +native GetActorVirtualWorld(actorid); /// Apply an animation to an actor. -/// The ID of the actor to apply the animation to +/// The ID of the actor to apply the animation to /// The animation library from which to apply an animation /// The name of the animation to apply, within the specified library /// The speed to play the animation (use 4.1) @@ -109,20 +109,20 @@ native GetActorVirtualWorld(actorID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The actor specified does not exist. /// -native ApplyActorAnimation(actorID, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); +native ApplyActorAnimation(actorid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); ///

    Clear any animations applied to an actor. -/// The ID of the actor (returned by CreateActor) to clear the animations for +/// The ID of the actor (returned by CreateActor) to clear the animations for /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. The actor specified does not exist. /// -native ClearActorAnimations(actorID); +native ClearActorAnimations(actorid); ///

    Set the position of an actor. -/// The ID of the actor to set the position of. Returned by CreateActor +/// The ID of the actor to set the position of. Returned by CreateActor /// The x coordinate to position the actor at /// The y coordinate to position the actor at /// The z coordinate to position the actor at @@ -134,10 +134,10 @@ native ClearActorAnimations(actorID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The actor specified does not exist. /// -native SetActorPos(actorID, Float:x, Float:y, Float:z); +native SetActorPos(actorid, Float:x, Float:y, Float:z); ///

    Get the position of an actor. -/// The ID of the actor to get the position of. Returned by CreateActor +/// The ID of the actor to get the position of. Returned by CreateActor /// A float variable, passed by reference, in which to store the x coordinate of the actor /// A float variable, passed by reference, in which to store the y coordinate of the actor /// A float variable, passed by reference, in which to store the z coordinate of the actor @@ -147,10 +147,10 @@ native SetActorPos(actorID, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The actor specified does not exist.

    /// -native GetActorPos(actorID, &Float:x, &Float:y, &Float:z); +native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); ///

    Set the facing angle of an actor. -/// The ID of the actor to set the facing angle of. Returned by CreateActor +/// The ID of the actor to set the facing angle of. Returned by CreateActor /// The facing angle to set for the actor /// /// @@ -161,10 +161,10 @@ native GetActorPos(actorID, &Float:x, &Float:y, &Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The actor specified does not exist. /// -native SetActorFacingAngle(actorID, Float:ang); +native SetActorFacingAngle(actorid, Float:ang); ///

    Get the facing angle of an actor. -/// The ID of the actor to get the facing angle of. Returned by CreateActor +/// The ID of the actor to get the facing angle of. Returned by CreateActor /// A float variable, passed by reference, in to which the actor's facing angle will be stored /// /// @@ -173,30 +173,30 @@ native SetActorFacingAngle(actorID, Float:ang); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The actor specified does not exist. /// -native GetActorFacingAngle(actorID, &Float:ang); +native GetActorFacingAngle(actorid, &Float:ang); ///

    Set the health of an actor. -/// The ID of the actor to set the health of +/// The ID of the actor to set the health of /// The value to set the actors's health to /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1 on success.

    /// 0 on failure (i.e. actor is not created). /// -native SetActorHealth(actorID, Float:health); +native SetActorHealth(actorid, Float:health); ///

    Get the health of an actor. -/// The ID of the actor to get the health of +/// The ID of the actor to get the health of /// A float variable, passed by reference, in to which to store the actor's health /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1 - success.

    /// 0 - failure (i.e. actor is not created).

    /// -native GetActorHealth(actorID, &Float:health); +native GetActorHealth(actorid, &Float:health); ///

    Toggle an actor's invulnerability. -/// The ID of the actor to set invulnerability +/// The ID of the actor to set invulnerability /// false to make them vulnerable, true to make them invulnerable (optional=true) /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// Once set invulnerable, the actor does not call OnPlayerGiveDamageActor. @@ -205,20 +205,20 @@ native GetActorHealth(actorID, &Float:health); /// 1 - Success.

    /// 0 - Failure (i.e. Actor is not created). /// -native SetActorInvulnerable(actorID, invulnerable = true); +native SetActorInvulnerable(actorid, invulnerable = true); ///

    Check if an actor is invulnerable. -/// The ID of the actor to check +/// The ID of the actor to check /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 if the actor is invulnerable, 0 otherwise. -native IsActorInvulnerable(actorID); +native IsActorInvulnerable(actorid); /// Checks if an actor ID is valid. -/// The ID of the actor to check +/// The ID of the actor to check /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 if the actor is valid, 0 if not. -native IsValidActor(actorID); +native IsValidActor(actorid); diff --git a/a_npc.inc b/a_npc.inc index 850e49a..7d2d867 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -312,11 +312,11 @@ native format(output[], len = sizeof (output), const format[], {Float,_}:...); native SetTimer(const funcname[], interval, repeating); /// Kills (stops) a running timer. -/// The ID of the timer to kill (returned by SetTimer or SetTimerEx) +/// The ID of the timer to kill (returned by SetTimer or SetTimerEx) /// /// /// This function always returns 0. -native KillTimer(timerID); +native KillTimer(timerid); /// Returns the uptime of the actual server (not the SA-MP server) in milliseconds. /// @@ -365,7 +365,7 @@ native SendChat(const msg[]); native SendCommand(const commandtext[]); /// Get a player's current state. -/// The ID of the player to get the current state of +/// The ID of the player to get the current state of /// /// /// @@ -385,10 +385,10 @@ native SendCommand(const commandtext[]); /// ///
    /// The player's current state as an integer. -native GetPlayerState(playerID); +native GetPlayerState(playerid); /// Get the position of a player, represented by x, y and z coordinates. -/// The ID of the player to get the position of +/// The ID of the player to get the position of /// A float variable in which to store the x coordinate in, passed by reference /// A float variable in which to store the y coordinate in, passed by reference /// A float variable in which to store the z coordinate in, passed by reference @@ -398,44 +398,44 @@ native GetPlayerState(playerID); /// /// This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. /// true on success, false on failure (i.e. player not connected). -native GetPlayerPos(playerID, &Float:x, &Float:y, &Float:z); +native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /// This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. -/// The ID of the player in the vehicle that you want to get the ID of +/// The ID of the player in the vehicle that you want to get the ID of /// /// /// /// /// ID of the vehicle or 0 if not in a vehicle. -native GetPlayerVehicleID(playerID); -native GetPlayerArmedWeapon(playerID); +native GetPlayerVehicleid(playerid); +native GetPlayerArmedWeapon(playerid); -native GetPlayerHealth(playerID); -native GetPlayerArmour(playerID); +native GetPlayerHealth(playerid); +native GetPlayerArmour(playerid); /// Retrieves a player's current special action. -/// The ID of the player to get the special action of +/// The ID of the player to get the special action of /// /// /// The special action of the player. -native GetPlayerSpecialAction(playerID); +native GetPlayerSpecialAction(playerid); /// Checks if a player is streamed in for an NPC. Only nearby players are streamed in. -/// The ID of the player to check +/// The ID of the player to check /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is streamed in, 0 if not. -native IsPlayerStreamedIn(playerID); +native IsPlayerStreamedIn(playerid); /// Checks if a vehicle is streamed in for an NPC. Only nearby vehicles are streamed in. -/// The ID of the vehicle to check +/// The ID of the vehicle to check /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the vehicle is streamed in, 0 if not. -native IsVehicleStreamedIn(vehicleID); +native IsVehicleStreamedIn(vehicleid); /// Check which keys a player is pressing. -/// The ID of the player to get the keys of +/// The ID of the player to get the keys of /// Bitmask containing the player's key states. List of keys /// Up/down state /// Left/right state @@ -443,14 +443,14 @@ native IsVehicleStreamedIn(vehicleID); /// Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). /// As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. /// The keys are stored in the specified variables. -native GetPlayerKeys(playerID, &keys, &updown, &leftright); +native GetPlayerKeys(playerid, &keys, &updown, &leftright); /// Gets the angle a player is facing. -/// The player you want to get the angle of +/// The player you want to get the angle of /// The Float to store the angle in, passed by reference /// Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. /// Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. -native GetPlayerFacingAngle(playerID, &Float:ang); +native GetPlayerFacingAngle(playerid, &Float:ang); /// Get the current location of the NPC. /// A float to save the x coordinate, passed by reference @@ -495,7 +495,7 @@ native SetMyFacingAngle(Float:ang); native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); /// Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. -/// The ID of the player +/// The ID of the player /// The furthest distance the player can be from the point to be in range /// The x coordinate of the point to check the range to /// The y coordinate of the point to check the range to @@ -505,10 +505,10 @@ native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is in range, 0 if not. -native IsPlayerInRangeOfPoint(playerID, Float:range, Float:x, Float:y, Float:z); +native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); /// Get a player's name. -/// The ID of the player to get the name of +/// The ID of the player to get the name of /// An array into which to store the name, passed by reference /// The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME /// @@ -518,16 +518,16 @@ native IsPlayerInRangeOfPoint(playerID, Float:range, Float:x, Float:y, Float:z); /// /// A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. /// The length of the player's name. 0 if player specified doesn't exist. -native GetPlayerName(playerID, name[], len = sizeof (name)); +native GetPlayerName(playerid, name[], len = sizeof (name)); /// Checks if a player is connected (if an ID is taken by a connected player). -/// The ID of the player to check +/// The ID of the player to check /// /// /// /// This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. /// 1 if the player is connected, 0 if not. -native IsPlayerConnected(playerID); +native IsPlayerConnected(playerid); /// This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. /// The type of recording to be loaded @@ -566,12 +566,12 @@ forward OnNPCModeInit(); forward OnNPCModeExit(); /// Gets called when a NPC successfully connects to the server. -/// The playerID the NPC has been given +/// The playerid the NPC has been given /// /// /// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnNPCConnect(myplayerID); +forward OnNPCConnect(myplayerid); /// Gets called when the NPC gets disconnected from the server. /// The reason why the bot has disconnected from the server @@ -586,11 +586,11 @@ forward OnNPCDisconnect(reason[]); forward OnNPCSpawn(); /// Gets called when a NPC enters a vehicle. -/// The vehicleID from the Vehicle the NPC enters -/// The seatID the NPC uses +/// The vehicleid from the Vehicle the NPC enters +/// The seatid the NPC uses /// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnNPCEnterVehicle(vehicleID, seatID); +forward OnNPCEnterVehicle(vehicleid, seatid); /// Gets called when a NPC leaves a vehicle. /// @@ -605,35 +605,35 @@ forward OnNPCExitVehicle(); forward OnClientMessage(colour, text[]); /// Just as the player version of the callback, this callback is called when any player dies. -/// The player who has died +/// The player who has died /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnPlayerDeath(playerID); +forward OnPlayerDeath(playerid); /// Opposed to the player version of this callback, this callback is called everytime anyone says anything in the chat. This includes any player, any other NPC, or the same NPC himself. -/// The player who has written something in the chat -/// The text written by playerID +/// The player who has written something in the chat +/// The text written by playerid /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnPlayerText(playerID, text[]); +forward OnPlayerText(playerid, text[]); /// This callback is called when a player is streamed in for an NPC. Only nearby players are streamed in. -/// The ID of the player that is now streamed in for the NPC +/// The ID of the player that is now streamed in for the NPC /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnPlayerStreamIn(playerID); +forward OnPlayerStreamIn(playerid); /// This callback is called when a player is streamed out the NPC. -/// The player who has been destreamed +/// The player who has been destreamed /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnPlayerStreamOut(playerID); +forward OnPlayerStreamOut(playerid); /// This callback is called when a vehicle is streamed by the NPC. A simpler definition would be when the NPC sees the grey vehicle icon appear on his map. -/// The vehicle that has been streamed +/// The vehicle that has been streamed /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnVehicleStreamIn(vehicleID); +forward OnVehicleStreamIn(vehicleid); /// This callback is called when a vehicle is streamed out for an NPC. -/// The vehicle that was streamed out +/// The vehicle that was streamed out /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! -forward OnVehicleStreamOut(vehicleID); +forward OnVehicleStreamOut(vehicleid); /// This callback is called when a recorded file being reproduced with StartRecordingPlayback has reached to its end. /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! diff --git a/a_objects.inc b/a_objects.inc index eab0c83..2c79146 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -40,7 +40,7 @@ // Objects /// Creates an object at specified coordinates in the game world. -/// The model to create +/// The model to create /// The x coordinate to create the object at /// The y coordinate to create the object at /// The z coordinate to create the object at @@ -66,11 +66,11 @@ /// In case the light is attached to another object, one fix for this is to set SyncRotation to false in AttachObjectToObject. This will ensure the light stays at 0 rotation. This would only really work for objects that consist ONLY of light, so wouldn't work for the police light for example. /// There is a limit of 1000 objects (MAX_OBJECTS). To circumvent this limit, you can use a streamer /// The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. -native CreateObject(modelID, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); +native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); /// Attach an object to a vehicle. -/// The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first -/// The ID of the vehicle to attach the object to +/// The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first +/// The ID of the vehicle to attach the object to /// The x axis offset from the vehicle to attach the object to /// The y axis offset from the vehicle to attach the object to /// The z axis offset from the vehicle to attach the object to @@ -84,18 +84,18 @@ native CreateObject(modelID, Float:x, Float:y, Float:z, Float:rX, Float:rY, Floa /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// The object must be created first. /// When the vehicle is destroyed or respawned, the attached objects won't be destroyed with it; they will remain stationary at the position the vehicle disappeared and be reattached to the next vehicle to claim the vehicle ID that the objects were attached to. -native AttachObjectToVehicle(objectID, vehicleID, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +native AttachObjectToVehicle(objectid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// You can use this function to attach objects to other objects. The objects will folow the main object. -/// The object to attach to another object -/// The object to attach the object to +/// The object to attach to another object +/// The object to attach the object to /// The distance between the main object and the object in the x direction /// The distance between the main object and the object in the y direction /// The distance between the main object and the object in the z direction /// The x rotation between the object and the main object /// The y rotation between the object and the main object /// The z rotation between the object and the main object -/// If set to 0, objectID's rotation will not change with 's (optional=1) +/// If set to 0, objectid's rotation will not change with 's (optional=1) /// /// /// @@ -108,13 +108,13 @@ native AttachObjectToVehicle(objectID, vehicleID, Float:offsetX, Float:offsetY, ///
    /// /// 1: The function executed successfully.

    -/// 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. +/// 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. /// -native AttachObjectToObject(objectID, attachtoID, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); +native AttachObjectToObject(objectid, attachtoid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); ///

    Attach an object to a player. -/// The ID of the object to attach to the player -/// The ID of the player to attach the object to +/// The ID of the object to attach to the player +/// The ID of the player to attach the object to /// The distance between the player and the object in the x direction /// The distance between the player and the object in the y direction /// The distance between the player and the object in the z direction @@ -127,10 +127,10 @@ native AttachObjectToObject(objectID, attachtoID, Float:offsetX, Float:offsetY, /// /// /// This function always returns 0. -native AttachObjectToPlayer(objectID, playerID, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +native AttachObjectToPlayer(objectid, playerid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// Change the position of an object. -/// The ID of the object to set the position of. Returned by CreateObject +/// The ID of the object to set the position of. Returned by CreateObject /// The x coordinate to position the object at /// The y coordinate to position the object at /// The z coordinate to position the object at @@ -139,10 +139,10 @@ native AttachObjectToPlayer(objectID, playerID, Float:offsetX, Float:offsetY, Fl /// /// /// This function always returns 1, even if the object specified does not exist. -native SetObjectPos(objectID, Float:x, Float:y, Float:z); +native SetObjectPos(objectid, Float:x, Float:y, Float:z); /// Get the position of an object. -/// The ID of the object to get the position of. +/// The ID of the object to get the position of. /// A variable in which to store the x coordinate, passed by reference /// A variable in which to store the y coordinate, passed by reference /// A variable in which to store the z coordinate, passed by reference @@ -154,10 +154,10 @@ native SetObjectPos(objectID, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The specified object does not exist. /// -native GetObjectPos(objectID, &Float:x, &Float:y, &Float:z); +native GetObjectPos(objectid, &Float:x, &Float:y, &Float:z); ///

    Set the rotation of an object on the three axes (x, y and z). -/// The ID of the object to set the rotation of +/// The ID of the object to set the rotation of /// The x rotation /// The y rotation /// The z rotation @@ -166,10 +166,10 @@ native GetObjectPos(objectID, &Float:x, &Float:y, &Float:z); /// /// /// This function always returns 1, even if the object doesn't exist. -native SetObjectRot(objectID, Float:rotX, Float:rotY, Float:rotZ); +native SetObjectRot(objectid, Float:rotX, Float:rotY, Float:rotZ); /// Use this function to get the objects current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. -/// The objectID of the object you want to get the rotation from +/// The objectid of the object you want to get the rotation from /// The variable to store the x rotation, passed by reference /// The variable to store the y rotation, passed by reference /// The variable to store the z rotation, passed by reference @@ -178,18 +178,18 @@ native SetObjectRot(objectID, Float:rotX, Float:rotY, Float:rotZ); /// /// /// The object's rotation is stored in the referenced variables, not in the return value. -native GetObjectRot(objectID, &Float:rotX, &Float:rotY, &Float:rotZ); +native GetObjectRot(objectid, &Float:rotX, &Float:rotY, &Float:rotZ); /// Get the model ID of an object. -/// The ID of the object to get the model of +/// The ID of the object to get the model of /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The model ID of the object. -1 if does not exist. -native GetObjectModel(objectID); +/// The model ID of the object. -1 if does not exist. +native GetObjectModel(objectid); /// Disable collisions between players' cameras and the specified object. -/// The ID of the object to disable camera collisions on +/// The ID of the object to disable camera collisions on /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! @@ -198,26 +198,26 @@ native GetObjectModel(objectID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The object specified does not exist. /// -native SetObjectNoCameraCol(objectID); +native SetObjectNoCameraCol(objectid); ///

    Checks if an object with the ID provided exists. -/// The ID of the object to check the existence of +/// The ID of the object to check the existence of /// /// /// /// This is to check if an object exists, not if a model is valid. /// 1 if the object exists, 0 if not. -native IsValidObject(objectID); +native IsValidObject(objectid); /// Destroys (removes) an object that was created using CreateObject. -/// The ID of the object to destroy. Returned by CreateObject +/// The ID of the object to destroy. Returned by CreateObject /// /// /// -native DestroyObject(objectID); +native DestroyObject(objectid); /// Move an object to a new position with a set speed. Players/vehicles will 'surf' the object as it moves. -/// The ID of the object to move +/// The ID of the object to move /// The x coordinate to move the object to /// The y coordinate to move the object to /// The z coordinate to move the object to @@ -235,29 +235,29 @@ native DestroyObject(objectID); /// This function can be used to make objects rotate smoothly. In order to achieve this however, the object must also be moved. The specified rotation is the rotation the object will have after the movement. Hence the object will not rotate when no movement is applied. For a script example take a look at the ferriswheel.pwn filterscript made by Kye included in the server package (SA-MP 0.3d and above). /// To fully understand the above note, you can (but not limited to) increase the z position by (+0.001) and then (-0.001) after moving it again, as not changing the x, y or z will not rotate the object. /// The time it will take for the object to move in milliseconds. -native MoveObject(objectID, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); +native MoveObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); /// Stop a moving object after MoveObject has been used. -/// The ID of the object to stop moving +/// The ID of the object to stop moving /// /// /// /// -native StopObject(objectID); +native StopObject(objectid); -/// Checks if the given objectID is moving. -/// The objectID you want to check if is moving +/// Checks if the given objectid is moving. +/// The objectid you want to check if is moving /// /// /// /// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// 1 if the object is moving, 0 if not. -native IsObjectMoving(objectID); +native IsObjectMoving(objectid); /// Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical User Interface). -/// The ID of the player that should edit the object -/// The ID of the object to be edited by the player +/// The ID of the player that should edit the object +/// The ID of the object to be edited by the player /// /// /// @@ -268,11 +268,11 @@ native IsObjectMoving(objectID); /// 1: The function executed successfully. Success is reported when a non-existent object is specified, but nothing will happen.

    /// 0: The function failed to execute. The player is not connected. /// -native EditObject(playerID, objectID); +native EditObject(playerid, objectid); ///

    Allows players to edit a player-object (position and rotation) with a GUI and their mouse. -/// The ID of the player that should edit the object -/// The object to be edited by the player +/// The ID of the player that should edit the object +/// The object to be edited by the player /// /// /// @@ -283,30 +283,30 @@ native EditObject(playerID, objectID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. Player or object not valid. /// -native EditPlayerObject(playerID, objectID); +native EditPlayerObject(playerid, objectid); ///

    Display the cursor and allow the player to select an object. OnPlayerSelectObject is called when the player selects an object. -/// The ID of the player that should be able to select the object +/// The ID of the player that should be able to select the object /// /// /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! -native SelectObject(playerID); +native SelectObject(playerid); /// Cancel object edition mode for a player. -/// The ID of the player to cancel edition for +/// The ID of the player to cancel edition for /// /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! -native CancelEdit(playerID); +native CancelEdit(playerid); /// Creates an object which will be visible to only one player. -/// The ID of the player to create the object for -/// The model to create +/// The ID of the player to create the object for +/// The model to create /// The x coordinate to create the object at /// The y coordinate to create the object at /// The z coordinate to create the object at @@ -327,12 +327,12 @@ native CancelEdit(playerID); /// /// The 'DrawDistance' parameter was added in 0.3b. It must be left out in scripts for older versions of SA:MP. /// The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. -native CreatePlayerObject(playerID, modelID, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); +native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); /// Attach a player object to a vehicle. -/// The ID of the player the object was created for -/// The ID of the object to attach to the vehicle -/// The ID of the vehicle to attach the object to +/// The ID of the player the object was created for +/// The ID of the object to attach to the vehicle +/// The ID of the vehicle to attach the object to /// The x position offset for attachment /// The y position offset for attachment /// The z position offset for attachment @@ -344,11 +344,11 @@ native CreatePlayerObject(playerID, modelID, Float:x, Float:y, Float:z, Float:rX /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You need to create the object before attempting to attach it to a vehicle. -native AttachPlayerObjectToVehicle(playerID, objectID, vehicleID, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// Sets the position of a player-object to the specified coordinates. -/// The ID of the player whose player-object to set the position of -/// The ID of the player-object to set the position of. Returned by CreatePlayerObject +/// The ID of the player whose player-object to set the position of +/// The ID of the player-object to set the position of. Returned by CreatePlayerObject /// The x coordinate to put the object at /// The y coordinate to put the object at /// The z coordinate to put the object at @@ -360,11 +360,11 @@ native AttachPlayerObjectToVehicle(playerID, objectID, vehicleID, Float:offsetX, /// 1: The function executed successfully.

    /// 0: The function failed to execute. Player and/or object do not exist. /// -native SetPlayerObjectPos(playerID, objectID, Float:x, Float:y, Float:z); +native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); ///

    Get the position of a player object (CreatePlayerObject). -/// The ID of the player whose player object to get the position of -/// The object's ID of which you want the current location +/// The ID of the player whose player object to get the position of +/// The object's ID of which you want the current location /// A float variable in which to store the x coordinate, passed by reference /// A float variable in which to store the y coordinate, passed by reference /// A float variable in which to store the z coordinate, passed by reference @@ -378,11 +378,11 @@ native SetPlayerObjectPos(playerID, objectID, Float:x, Float:y, Float:z); /// 0: The function failed to execute. The player and/or the object don't exist.

    /// The object's position is stored in the specified variables. /// -native GetPlayerObjectPos(playerID, objectID, &Float:x, &Float:y, &Float:z); +native GetPlayerObjectPos(playerid, objectid, &Float:x, &Float:y, &Float:z); ///

    Set the rotation of an object on the x, y and z axis. -/// The ID of the player whose player-object to rotate -/// The ID of the player-object to rotate +/// The ID of the player whose player-object to rotate +/// The ID of the player-object to rotate /// The x rotation to set /// The y rotation to set /// The z rotation to set @@ -395,11 +395,11 @@ native GetPlayerObjectPos(playerID, objectID, &Float:x, &Float:y, &Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. /// -native SetPlayerObjectRot(playerID, objectID, Float:rotX, Float:rotY, Float:rotZ); +native SetPlayerObjectRot(playerid, objectid, Float:rotX, Float:rotY, Float:rotZ); ///

    Use this function to get the object's current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. -/// The player you associated this object to -/// The objectID of the object you want to get the rotation from +/// The player you associated this object to +/// The objectid of the object you want to get the rotation from /// The variable to store the x rotation, passed by reference /// The variable to store the y rotation, passed by reference /// The variable to store the z rotation, passed by reference @@ -408,47 +408,47 @@ native SetPlayerObjectRot(playerID, objectID, Float:rotX, Float:rotY, Float:rotZ /// /// /// The object's rotation is stored in the specified variables. -native GetPlayerObjectRot(playerID, objectID, &Float:rotX, &Float:rotY, &Float:rotZ); +native GetPlayerObjectRot(playerid, objectid, &Float:rotX, &Float:rotY, &Float:rotZ); /// Retrieve the model ID of a player-object. -/// The ID of the player whose player-object to get the model of -/// The ID of the player-object of which to retrieve the model ID +/// The ID of the player whose player-object to get the model of +/// The ID of the player-object of which to retrieve the model ID /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The model ID of the player object. If the player or object don't exist, it will return -1 or 0 if the player or object does not exist. -native GetPlayerObjectModel(playerID, objectID); +native GetPlayerObjectModel(playerid, objectid); /// Toggles a player object camera collision. -/// The playerID the object belongs to -/// The ID of the object you want to toggle +/// The playerid the object belongs to +/// The ID of the object you want to toggle /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). /// 1 regardless of if the object exists or not. -native SetPlayerObjectNoCameraCol(playerID, objectID); +native SetPlayerObjectNoCameraCol(playerid, objectid); /// Checks if the given object ID is valid for the given player. -/// The ID of the player whose player-object to validate -/// The ID of the object to validate +/// The ID of the player whose player-object to validate +/// The ID of the object to validate /// /// /// /// 1 if the object exists, 0 if not. -native IsValidPlayerObject(playerID, objectID); +native IsValidPlayerObject(playerid, objectid); /// Destroy a player-object created using CreatePlayerObject. -/// The ID of the player whose player-object to destroy -/// The ID of the player-object to destroy. Returned by CreatePlayerObject +/// The ID of the player whose player-object to destroy +/// The ID of the player-object to destroy. Returned by CreatePlayerObject /// /// /// -native DestroyPlayerObject(playerID, objectID); +native DestroyPlayerObject(playerid, objectid); /// Move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects. -/// The ID of the player whose player-object to move -/// The ID of the object to move +/// The ID of the player whose player-object to move +/// The ID of the object to move /// The x coordinate to move the object to /// The y coordinate to move the object to /// The z coordinate to move the object to @@ -465,31 +465,31 @@ native DestroyPlayerObject(playerID, objectID); /// /// 0.3d R2 and older versions do not have the rotational parameters. /// The time it will take for the object to move in milliseconds. -native MovePlayerObject(playerID, objectID, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); +native MovePlayerObject(playerid, objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); /// Stop a moving player-object after MovePlayerObject has been used. -/// The ID of the player whose player-object to stop -/// The ID of the player-object to stop +/// The ID of the player whose player-object to stop +/// The ID of the player-object to stop /// /// /// /// -native StopPlayerObject(playerID, objectID); +native StopPlayerObject(playerid, objectid); -/// Checks if the given player objectID is moving. -/// The ID of the player whose player-object is checked -/// The player objectID you want to check if is moving +/// Checks if the given player objectid is moving. +/// The ID of the player whose player-object is checked +/// The player objectid you want to check if is moving /// /// /// /// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// 1 if the player object is moving, 0 if not. -native IsPlayerObjectMoving(playerID, objectID); +native IsPlayerObjectMoving(playerid, objectid); /// The same as AttachObjectToPlayer but for objects which were created for player. /// The ID of the player which is linked with the object -/// The objectID you want to attach to the player +/// The objectid you want to attach to the player /// The ID of the player you want to attach to the object /// The distance between the player and the object in the x direction /// The distance between the player and the object in the y direction @@ -502,12 +502,12 @@ native IsPlayerObjectMoving(playerID, objectID); /// /// /// This function was removed in SA-MP 0.3. -native AttachPlayerObjectToPlayer(objectplayer, objectID, attachplayer, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rX, Float:rY, Float:rZ); +native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rX, Float:rY, Float:rZ); /// Replace the texture of an object with the texture from another model in the game. -/// The ID of the object to change the texture of +/// The ID of the object to change the texture of /// The material index on the object to change (0 to 15) -/// The modelID on which the replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the texture +/// The modelid on which the replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the texture /// The name of the txd file which contains the replacement texture (use "none" if not required) /// The name of the texture to use as the replacement (use "none" if not required) /// The object colour to set, as an integer or hex in ARGB colour format. Using 0 keeps the existing material colour (optional=0) @@ -519,13 +519,13 @@ native AttachPlayerObjectToPlayer(objectplayer, objectID, attachplayer, Float:of /// 1: The function executed successfully.

    /// 0: The function failed to execute. /// -native SetObjectMaterial(objectID, materialindex, modelID, const txdname[], const texturename[], materialColour = 0); +native SetObjectMaterial(objectid, materialindex, modelid, const txdname[], const texturename[], materialColour = 0); ///

    Replace the texture of a player-object with the texture from another model in the game. -/// The ID of the player the object is associated to -/// The ID of the object to replace the texture of +/// The ID of the player the object is associated to +/// The ID of the object to replace the texture of /// The material index on the object to change (0 to 15) -/// The modelID on which replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the existing texture +/// The modelid on which replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the existing texture /// The name of the txd file which contains the replacement texture (use "none" if not required) /// The name of the texture to use as the replacement (use "none" if not required) /// The object colour to set (ARGB). Using 0 keeps the existing material colour (optional=0) @@ -533,10 +533,10 @@ native SetObjectMaterial(objectID, materialindex, modelID, const txdname[], cons /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Vertex lightning of the object will disappear if material colour is changed. -native SetPlayerObjectMaterial(playerID, objectID, materialindex, modelID, const txdname[], const texturename[], materialColour = 0); +native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, const txdname[], const texturename[], materialColour = 0); /// Replace the texture of an object with text. -/// The ID of the object to replace the texture of with text +/// The ID of the object to replace the texture of with text /// The text to show on the object. (MAX 2048 characters) /// The object's material index to replace with text (optional=0) /// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) @@ -581,11 +581,11 @@ native SetPlayerObjectMaterial(playerID, objectID, materialindex, modelID, const /// 1: The function executed successfully.

    /// 0: The function failed to execute. /// -native SetObjectMaterialText(objectID, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backColour = 0, textalignment = 0); +native SetObjectMaterialText(objectid, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backColour = 0, textalignment = 0); ///

    Replace the texture of a player object with text. -/// The ID of the player whose player object to set the text of -/// The ID of the object on which to place the text +/// The ID of the player whose player object to set the text of +/// The ID of the object on which to place the text /// The text to set /// The material index to replace with text (optional=0) /// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) @@ -626,7 +626,7 @@ native SetObjectMaterialText(objectID, const text[], materialindex = 0, material ///
  • OBJECT_MATERIAL_SIZE_512x512 140
  • /// ///
    -native SetPlayerObjectMaterialText(playerID, objectID, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backColour = 0, textalignment = 0); +native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backColour = 0, textalignment = 0); /// Allows camera collisions with newly created objects to be disabled by default. /// 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) diff --git a/a_players.inc b/a_players.inc index affff23..fdc0259 100644 --- a/a_players.inc +++ b/a_players.inc @@ -96,7 +96,7 @@ // Player /// This function can be used to change the spawn information of a specific player. It allows you to automatically set someone's spawn weapons, their team, skin and spawn position, normally used in case of minigames or automatic-spawn systems. This function is more crash-safe then using SetPlayerSkin in OnPlayerSpawn and/or OnPlayerRequestClass, even though this has been fixed in 0.2. -/// The PlayerID of who you want to set the spawn information +/// The Playerid of who you want to set the spawn information /// The Team-ID of the chosen player /// The skin which the player will spawn with /// The x-coordinate of the player's spawn position @@ -112,10 +112,10 @@ /// /// /// -native SetSpawnInfo(playerID, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); +native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); /// (Re)Spawns a player. -/// The ID of the player to spawn +/// The ID of the player to spawn /// /// /// @@ -124,12 +124,12 @@ native SetSpawnInfo(playerID, team, skin, Float:x, Float:y, Float:z, Float:rotat /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native SpawnPlayer(playerID); +native SpawnPlayer(playerid); // Player info ///

    Set a player's position. -/// The ID of the player to set the position of +/// The ID of the player to set the position of /// The x coordinate to position the player at /// The y coordinate to position the player at /// The z coordinate to position the player at @@ -143,10 +143,10 @@ native SpawnPlayer(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerPos(playerID, Float:x, Float:y, Float:z); +native SetPlayerPos(playerid, Float:x, Float:y, Float:z); ///

    This sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position. -/// The ID of the player to set the position of +/// The ID of the player to set the position of /// The x coordinate to position the player at /// The x coordinate to position the player at /// The z coordinate to position the player at @@ -157,10 +157,10 @@ native SetPlayerPos(playerID, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerPosFindZ(playerID, Float:x, Float:y, Float:z); +native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); ///

    Get the position of a player, represented by x, y and z coordinates. -/// The ID of the player to get the position of +/// The ID of the player to get the position of /// A float variable in which to store the x coordinate in, passed by reference /// A float variable in which to store the y coordinate in, passed by reference /// A float variable in which to store the z coordinate in, passed by reference @@ -170,10 +170,10 @@ native SetPlayerPosFindZ(playerID, Float:x, Float:y, Float:z); /// /// This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. /// true on success, false on failure (i.e. player not connected). -native GetPlayerPos(playerID, &Float:x, &Float:y, &Float:z); +native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /// Set a player's facing angle (z rotation). -/// The ID of the player to set the facing angle of +/// The ID of the player to set the facing angle of /// The angle the player should face /// /// @@ -182,19 +182,19 @@ native GetPlayerPos(playerID, &Float:x, &Float:y, &Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native SetPlayerFacingAngle(playerID, Float:ang); +native SetPlayerFacingAngle(playerid, Float:ang); ///

    Gets the angle a player is facing. -/// The player you want to get the angle of +/// The player you want to get the angle of /// The Float to store the angle in, passed by reference /// /// /// Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. /// Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. -native GetPlayerFacingAngle(playerID, &Float:ang); +native GetPlayerFacingAngle(playerid, &Float:ang); /// Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. -/// The ID of the player +/// The ID of the player /// The furthest distance the player can be from the point to be in range /// The x coordinate of the point to check the range to /// The y coordinate of the point to check the range to @@ -204,10 +204,10 @@ native GetPlayerFacingAngle(playerID, &Float:ang); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is in range, 0 if not. -native IsPlayerInRangeOfPoint(playerID, Float:range, Float:x, Float:y, Float:z); +native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); /// Calculate the distance between a player and a map coordinate. -/// The ID of the player to calculate the distance from +/// The ID of the player to calculate the distance from /// The x map coordinate /// The y map coordinate /// The z map coordinate @@ -216,11 +216,11 @@ native IsPlayerInRangeOfPoint(playerID, Float:range, Float:x, Float:y, Float:z); /// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// The distance between the player and the point as a float. -native Float:GetPlayerDistanceFromPoint(playerID, Float:x, Float:y, Float:z); +native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); /// Checks if a player is streamed in another player's client. -/// The ID of the player to check is streamed in -/// The ID of the player to check if playerID is streamed in for +/// The ID of the player to check is streamed in +/// The ID of the player to check if playerid is streamed in for /// /// /// @@ -228,14 +228,14 @@ native Float:GetPlayerDistanceFromPoint(playerID, Float:x, Float:y, Float:z); /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// Players aren't streamed in on their own client, so if playerID is the same as forplayerID it will return false! +/// Players aren't streamed in on their own client, so if playerid is the same as forplayerid it will return false! /// Players stream out if they are more than 150 meters away (see server.cfg - stream_distance) /// 1 if the player is streamed in, 0 if not. -native IsPlayerStreamedIn(playerID, forplayerID); +native IsPlayerStreamedIn(playerid, forplayerid); -/// Set a player's interior. A list of currently known interiors and their positions can be found here. -/// The ID of the player to set the interior of -/// The interior ID to set the player in +/// Set a player's interior. A list of currently known interiors and their positions can be found here. +/// The ID of the player to set the interior of +/// The interior ID to set the player in /// /// /// @@ -243,18 +243,18 @@ native IsPlayerStreamedIn(playerID, forplayerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerInterior(playerID, interiorID); +native SetPlayerInterior(playerid, interiorid); -///

    Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page. -/// The player to get the interior ID of +/// Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page. +/// The player to get the interior ID of /// /// /// Always returns 0 for NPCs. /// The interior ID the player is currently in. -native GetPlayerInterior(playerID); +native GetPlayerInterior(playerid); /// Set the health of a player. -/// The ID of the player to set the health of +/// The ID of the player to set the health of /// The value to set the player's health to. Max health that can be displayed in the HUD is 100, though higher values are valid /// /// @@ -266,10 +266,10 @@ native GetPlayerInterior(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerHealth(playerID, Float:health); +native SetPlayerHealth(playerid, Float:health); ///

    The function GetPlayerHealth allows you to retrieve the health of a player. Useful for cheat detection, among other things. -/// The ID of the player +/// The ID of the player /// Float to store health, passed by reference /// /// @@ -282,10 +282,10 @@ native SetPlayerHealth(playerID, Float:health); /// 1 - success.

    /// 0 - failure (i.e. player not connected).

    /// -native GetPlayerHealth(playerID, &Float:health); +native GetPlayerHealth(playerid, &Float:health); ///

    Set a player's armor level. -/// The ID of the player to set the armour of +/// The ID of the player to set the armour of /// The amount of armour to set, as a percentage (float). Values larger than 100 are valid, but won't be displayed in the HUD's armour bar /// /// @@ -296,10 +296,10 @@ native GetPlayerHealth(playerID, &Float:health); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerArmour(playerID, Float:armour); +native SetPlayerArmour(playerid, Float:armour); ///

    This function stores the armour of a player into a variable. -/// The ID of the player that you want to get the armour of +/// The ID of the player that you want to get the armour of /// The float to to store the armour in, passed by reference /// /// @@ -311,10 +311,10 @@ native SetPlayerArmour(playerID, Float:armour); /// 1 - success.

    /// 0 - failure (i.e. player not connected).

    /// -native GetPlayerArmour(playerID, &Float:armour); +native GetPlayerArmour(playerid, &Float:armour); ///

    Set the ammo of a player's weapon. -/// The ID of the player to set the weapon ammo of +/// The ID of the player to set the weapon ammo of /// The ID of the weapon slot to set the ammo of. /// The amount of ammo to set /// @@ -325,18 +325,18 @@ native GetPlayerArmour(playerID, &Float:armour); /// 1: The function executed successfully. Success is also returned when the weapon slot specified is invalid (not 0-12).

    /// 0: The function failed to execute. The player isn't connected.

    /// -native SetPlayerAmmo(playerID, weaponslot, ammo); +native SetPlayerAmmo(playerid, weaponslot, ammo); ///

    Gets the amount of ammo in a player's current weapon. -/// The ID of the player whose ammo to get +/// The ID of the player whose ammo to get /// /// /// The ammo can hold 16-bit values, therefore values over 32767 will return erroneous values. /// The amount of ammo in the player's current weapon. -native GetPlayerAmmo(playerID); +native GetPlayerAmmo(playerid); /// Check the state of a player's weapon. -/// The ID of the player to obtain the weapon state of +/// The ID of the player to obtain the weapon state of /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// @@ -350,10 +350,10 @@ native GetPlayerAmmo(playerID); /// /// /// The state of the player's weapon. 0 if player specified does not exist. -native GetPlayerWeaponState(playerID); +native GetPlayerWeaponState(playerid); /// Check who a player is aiming at. -/// The ID of the player to get the target of +/// The ID of the player to get the target of /// /// /// @@ -361,10 +361,10 @@ native GetPlayerWeaponState(playerID); /// Does not work for joypads/controllers, and after a certain distance. /// Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. /// The ID of the target player, or INVALID_PLAYER_ID if none. -native GetPlayerTargetPlayer(playerID); +native GetPlayerTargetPlayer(playerid); /// Gets ID of an actor which is aimed by certain player. -/// The ID of the player to get the target of +/// The ID of the player to get the target of /// /// /// @@ -372,20 +372,20 @@ native GetPlayerTargetPlayer(playerID); /// Does not work for joypads/controllers, and after a certain distance. /// Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. /// The ID of the targeted actor, or INVALID_ACTOR_ID if none. -native GetPlayerTargetActor(playerID); +native GetPlayerTargetActor(playerid); /// Set the team of a player. -/// The ID of the player you want to set the team of -/// The team to put the player in. Use NO_TEAM to remove the player from any team +/// The ID of the player you want to set the team of +/// The team to put the player in. Use NO_TEAM to remove the player from any team /// /// /// /// Players can not damage/kill players on the same team unless they use a knife to slit their throat. As of SA-MP 0.3x, players are also unable to damage vehicles driven by a player from the same team. This can be enabled with EnableVehicleFriendlyFire. /// 255 (or NO_TEAM) is the default team to be able to shoot other players, not 0. -native SetPlayerTeam(playerID, teamID); +native SetPlayerTeam(playerid, teamid); /// Get the ID of the team the player is on. -/// The ID of the player to get the team of +/// The ID of the player to get the team of /// /// /// @@ -393,37 +393,37 @@ native SetPlayerTeam(playerID, teamID); /// 255: Defined as NO_TEAM. The player is not on any team.

    /// -1: The function failed to execute. Player is not connected. /// -native GetPlayerTeam(playerID); +native GetPlayerTeam(playerid); ///

    Set a player's score. Players' scores are shown in the scoreboard (shown by holding the TAB key). -/// The ID of the player to set the score of +/// The ID of the player to set the score of /// The value to set the player's score to /// /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerScore(playerID, score); +native SetPlayerScore(playerid, score); ///

    This function returns a player's score as it was set using SetPlayerScore. -/// The player to get the score of +/// The player to get the score of /// /// /// The player's score. -native GetPlayerScore(playerID); +native GetPlayerScore(playerid); /// /// Checks the player's level of drunkenness. If the level is less than 2000, the player is sober. The player's level of drunkness goes down slowly automatically (1 level per frame) but will always reach 2000 at the end (in 0.3b it will stop at 0). /// The higher drunkenness levels affect the player's camera, and the car driving handling. The level of drunkenness increases when the player drinks from a bottle (You can use SetPlayerSpecialAction to give them bottles). /// -/// The player you want to check the drunkenness level of +/// The player you want to check the drunkenness level of /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// An integer with the level of drunkenness of the player. -native GetPlayerDrunkLevel(playerID); +native GetPlayerDrunkLevel(playerid); /// Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control. -/// The ID of the player to set the drunkenness of +/// The ID of the player to set the drunkenness of /// The level of drunkenness to set /// /// @@ -437,29 +437,29 @@ native GetPlayerDrunkLevel(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerDrunkLevel(playerID, level); +native SetPlayerDrunkLevel(playerid, level); ///

    Set the colour of a player's nametag and marker (radar blip). -/// The ID of the player whose colour to set +/// The ID of the player whose colour to set /// The colour to set. Supports alpha values (RGBA) /// /// /// /// This function will change player's colour for everyone, even if player's colour was changed with SetPlayerMarkerForPlayer for any other player. /// If used under OnPlayerConnect, the affecting player will not see the colour in the TAB menu. -native SetPlayerColor(playerID, colour); +native SetPlayerColor(playerid, colour); /// Gets the colour of the player's name and radar marker. Only works after SetPlayerColor. -/// The ID of the player to get the colour of +/// The ID of the player to get the colour of /// /// /// GetPlayerColor will return 0 unless SetPlayerColor has been used first. /// The player's colour. 0 if no colour set or player not connected. -native GetPlayerColor(playerID); +native GetPlayerColor(playerid); /// Set the skin of a player. A player's skin is their character model. -/// The ID of the player to set the skin of -/// The skin the player should use +/// The ID of the player to set the skin of +/// The skin the player should use /// /// /// If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, they will become frozen or otherwise glitched. This can be fixed by using TogglePlayerControllable. Players can be detected as being crouched through GetPlayerSpecialAction (SPECIAL_ACTION_DUCK). @@ -469,21 +469,21 @@ native GetPlayerColor(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist.

    /// -native SetPlayerSkin(playerID, skinID); +native SetPlayerSkin(playerid, skinid); ///

    Returns the class of the players skin. -/// The player you want to get the skin from +/// The player you want to get the skin from /// /// Returns the new skin after SetSpawnInfo is called but before the player actually respawns to get the new skin. /// Returns the old skin if the player was spawned through SpawnPlayer function. /// The skin ID (0 if invalid). -native GetPlayerSkin(playerID); +native GetPlayerSkin(playerid); -native GetPlayerCustomSkin(playerID); +native GetPlayerCustomSkin(playerid); /// Give a player a weapon with a specified amount of ammo. -/// The ID of the player to give a weapon to -/// The ID of the weapon to give to the player +/// The ID of the player to give a weapon to +/// The ID of the weapon to give to the player /// The amount of ammo to give to the player /// /// @@ -491,10 +491,10 @@ native GetPlayerCustomSkin(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected.

    /// -native GivePlayerWeapon(playerID, weaponID, ammo); +native GivePlayerWeapon(playerid, weaponid, ammo); ///

    Removes all weapons from a player. -/// The ID of the player whose weapons to remove +/// The ID of the player whose weapons to remove /// /// /// To remove individual weapons from a player, set their ammo to 0 using SetPlayerAmmo. @@ -502,11 +502,11 @@ native GivePlayerWeapon(playerID, weaponID, ammo); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native ResetPlayerWeapons(playerID); +native ResetPlayerWeapons(playerid); ///

    Sets which weapon (that a player already has) the player is holding. -/// The ID of the player to arm with a weapon -/// The ID of the weapon that the player should be armed with +/// The ID of the player to arm with a weapon +/// The ID of the weapon that the player should be armed with /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -515,10 +515,10 @@ native ResetPlayerWeapons(playerID); /// 1: The function executed successfully. Success is returned even when the function fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).

    /// 0: The function failed to execute. The player is not connected. /// -native SetPlayerArmedWeapon(playerID, weaponID); +native SetPlayerArmedWeapon(playerid, weaponid); ///

    Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot). -/// The ID of the player whose weapon data to retrieve +/// The ID of the player whose weapon data to retrieve /// The weapon slot to get data for (0-12) /// A variable in which to store the weapon ID, passed by reference /// A variable in which to store the ammo, passed by reference @@ -529,10 +529,10 @@ native SetPlayerArmedWeapon(playerID, weaponID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player isn't connected and/or the weapon slot specified is invalid (valid is 0-12). /// -native GetPlayerWeaponData(playerID, slot, &weapons, &ammo); +native GetPlayerWeaponData(playerid, slot, &weapons, &ammo); ///

    Give money to or take money from a player. -/// The ID of the player to give money to or take money from +/// The ID of the player to give money to or take money from /// The amount of money to give the player. Use a minus value to take money /// /// @@ -540,20 +540,20 @@ native GetPlayerWeaponData(playerID, slot, &weapons, &ammo); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native GivePlayerMoney(playerID, money); +native GivePlayerMoney(playerid, money); ///

    Reset a player's money to $0. -/// The ID of the player to reset the money of +/// The ID of the player to reset the money of /// /// /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native ResetPlayerMoney(playerID); +native ResetPlayerMoney(playerid); ///

    Sets the name of a player. -/// The ID of the player to set the name of +/// The ID of the player to set the name of /// The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-z, [], (), $, @, ., _, =) /// /// Changing the players' name to the same name but with different character cases (e.g. "John" to "JOHN") will not work. @@ -565,17 +565,17 @@ native ResetPlayerMoney(playerID); /// 0 The player already has that name.

    /// -1 The name can not be changed (it's already in use, too long or has invalid characters). /// -native SetPlayerName(playerID, const name[]); +native SetPlayerName(playerid, const name[]); ///

    Retrieves the amount of money a player has. -/// The ID of the player to get the money of +/// The ID of the player to get the money of /// /// /// The amount of money the player has. -native GetPlayerMoney(playerID); +native GetPlayerMoney(playerid); /// Get a player's current state. -/// The ID of the player to get the current state of +/// The ID of the player to get the current state of /// /// /// @@ -595,10 +595,10 @@ native GetPlayerMoney(playerID); /// ///
    /// The player's current state as an integer. -native GetPlayerState(playerID); +native GetPlayerState(playerid); /// Get the specified player's IP address and store it in a string. -/// The ID of the player to get the IP address of +/// The ID of the player to get the IP address of /// An array into which to store the player's IP address, passed by reference /// The maximum length of the IP address (recommended 16) /// @@ -610,28 +610,28 @@ native GetPlayerState(playerID); /// /// This function does not work when used in OnPlayerDisconnect because the player is already disconnected. It will return an invalid IP (255.255.255.255). Save players' IPs under OnPlayerConnect if they need to be used under OnPlayerDisconnect. /// 1 on success and 0 on failure. -native GetPlayerIp(playerID, ip[], len = sizeof (ip)); +native GetPlayerIp(playerid, ip[], len = sizeof (ip)); /// Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back. -/// The ID of the player to get the ping of +/// The ID of the player to get the ping of /// /// /// /// Player's ping may be 65535 for a while after a player connects /// The current ping of the player (expressed in milliseconds). -native GetPlayerPing(playerID); +native GetPlayerPing(playerid); /// Returns the ID of the weapon a player is currently holding. -/// The ID of the player to get the currently held weapon of +/// The ID of the player to get the currently held weapon of /// /// /// /// Prior to version 0.3z R1-2, when the player state is PLAYER_STATE_PASSENGER this function returns the weapon held by the player before they entered the vehicle. If a cheat is used to spawn a weapon inside a vehicle, this function will not report it. /// The ID of the player's current weapon. Returns -1 if the player specified does not exist. -native GetPlayerWeapon(playerID); +native GetPlayerWeapon(playerid); /// Check which keys a player is pressing. -/// The ID of the player to get the keys of +/// The ID of the player to get the keys of /// Bitmask containing the player's key states. List of keys /// Up/down state /// Left/right state @@ -639,10 +639,10 @@ native GetPlayerWeapon(playerID); /// Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). /// As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. /// The keys are stored in the specified variables. -native GetPlayerKeys(playerID, &keys, &updown, &leftright); +native GetPlayerKeys(playerid, &keys, &updown, &leftright); /// Get a player's name. -/// The ID of the player to get the name of +/// The ID of the player to get the name of /// An array into which to store the name, passed by reference /// The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME /// @@ -652,10 +652,10 @@ native GetPlayerKeys(playerID, &keys, &updown, &leftright); /// /// A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. /// The length of the player's name. 0 if player specified doesn't exist. -native GetPlayerName(playerID, name[], len = sizeof (name)); +native GetPlayerName(playerid, name[], len = sizeof (name)); /// Sets the game time for a player. If a player's clock is enabled (TogglePlayerClock) the time displayed by it will update automatically. -/// The ID of the player to set the game time of +/// The ID of the player to set the game time of /// Hour to set (0-23) /// Minutes to set (0-59) /// @@ -666,10 +666,10 @@ native GetPlayerName(playerID, name[], len = sizeof (name)); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native SetPlayerTime(playerID, hour, minute); +native SetPlayerTime(playerid, hour, minute); ///

    Get the player's current game time. Set by SetWorldTime or SetPlayerTime, or by the game automatically if TogglePlayerClock is used. -/// The ID of the player to get the game time of +/// The ID of the player to get the game time of /// A variable in which to store the hour, passed by reference /// A variable in which to store the minutes, passed by reference /// @@ -679,10 +679,10 @@ native SetPlayerTime(playerID, hour, minute); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist.

    /// -native GetPlayerTime(playerID, &hour, &minute); +native GetPlayerTime(playerid, &hour, &minute); ///

    Toggle the in-game clock (top-right corner) for a specific player. When this is enabled, time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) when set using SetWeather/SetPlayerWeather. -/// The player whose clock you want to enable/disable +/// The player whose clock you want to enable/disable /// 1 to show and 0 to hide. Hidden by default /// Time is not synced with other players! Time can be synced using SetPlayerTime. /// Time will automatically advance 6 hours when the player dies. @@ -690,27 +690,27 @@ native GetPlayerTime(playerID, &hour, &minute); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The specified player does not exist. /// -native TogglePlayerClock(playerID, toggle); +native TogglePlayerClock(playerid, toggle); ///

    Set a player's weather. -/// The ID of the player whose weather to set -/// The weather to set +/// The ID of the player whose weather to set +/// The weather to set /// /// /// If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. -native SetPlayerWeather(playerID, weather); +native SetPlayerWeather(playerid, weather); /// Forces a player to go back to class selection. -/// The player to send back to class selection +/// The player to send back to class selection /// /// /// /// /// The player will not return to class selection until they re-spawn. This can be achieved with TogglePlayerSpectating, as seen in the below example. -native ForceClassSelection(playerID); +native ForceClassSelection(playerid); /// Set a player's wanted level (6 brown stars under HUD). -/// The ID of the player to set the wanted level of +/// The ID of the player to set the wanted level of /// The wanted level to set for the player (0-6) /// /// @@ -718,17 +718,17 @@ native ForceClassSelection(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native SetPlayerWantedLevel(playerID, level); +native SetPlayerWantedLevel(playerid, level); ///

    Gets the wanted level of a player. -/// The ID of the player that you want to get the wanted level of +/// The ID of the player that you want to get the wanted level of /// /// /// The player's wanted level. -native GetPlayerWantedLevel(playerID); +native GetPlayerWantedLevel(playerid); /// Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default). -/// The ID of player to set the fighting style of +/// The ID of player to set the fighting style of /// The fighting style that should be set /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -744,10 +744,10 @@ native GetPlayerWantedLevel(playerID); ///
  • FIGHT_STYLE_ELBOW
  • /// ///
    -native SetPlayerFightingStyle(playerID, style); +native SetPlayerFightingStyle(playerid, style); /// Get the fighting style the player currently using. -/// The ID of the player to get the fighting style of +/// The ID of the player to get the fighting style of /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// @@ -762,10 +762,10 @@ native SetPlayerFightingStyle(playerID, style); /// /// /// The ID of the fighting style of the player. -native GetPlayerFightingStyle(playerID); +native GetPlayerFightingStyle(playerid); /// Set a player's velocity on the x, y and z axes. -/// The player to apply the speed to +/// The player to apply the speed to /// The velocity (speed) on the x axis /// The velocity (speed) on the y axis /// The velocity (speed) on the z axis @@ -777,10 +777,10 @@ native GetPlayerFightingStyle(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerVelocity(playerID, Float:x, Float:y, Float:z); +native SetPlayerVelocity(playerid, Float:x, Float:y, Float:z); ///

    Get the velocity (speed) of a player on the x, y and z axes. -/// The player to get the speed from +/// The player to get the speed from /// A float variable in which to store the velocity on the x axis, passed by reference /// A float variable in which to store the velocity on the y axis, passed by reference /// A float variable in which to store the velocity on the z axis, passed by reference @@ -788,11 +788,11 @@ native SetPlayerVelocity(playerID, Float:x, Float:y, Float:z); /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native GetPlayerVelocity(playerID, &Float:x, &Float:y, &Float:z); +native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); /// This function plays a crime report for a player - just like in single-player when CJ commits a crime. -/// The ID of the player that will hear the crime report -/// The ID of the suspect player whom will be described in the crime report +/// The ID of the player that will hear the crime report +/// The ID of the suspect player whom will be described in the crime report /// The crime ID, which will be reported as a 10-code (i.e. 10-16 if 16 was passed as the crime) /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -820,10 +820,10 @@ native GetPlayerVelocity(playerID, &Float:x, &Float:y, &Float:z); ///
  • 22 10-7 Out of service
  • /// ///
    -native PlayCrimeReportForPlayer(playerID, suspectID, crime); +native PlayCrimeReportForPlayer(playerid, suspectid, crime); /// Play an 'audio stream' for a player. Normal audio files also work (e.g. MP3). -/// The ID of the player to play the audio for +/// The ID of the player to play the audio for /// The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist /// The x position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) /// The y position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) @@ -837,17 +837,17 @@ native PlayCrimeReportForPlayer(playerID, suspectID, crime); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native PlayAudioStreamForPlayer(playerID, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, bool:usepos = false); +native PlayAudioStreamForPlayer(playerid, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, bool:usepos = false); ///

    Stops the current audio stream for a player. -/// The player you want to stop the audio stream for +/// The player you want to stop the audio stream for /// /// /// This function was added in SA-MP 0.3d and will not work in earlier versions! -native StopAudioStreamForPlayer(playerID); +native StopAudioStreamForPlayer(playerid); /// Loads or unloads an interior script for a player (for example the ammunation menu). -/// The ID of the player to load the interior script for +/// The ID of the player to load the interior script for /// The shop script to load. Leave blank ("") to unload scripts /// /// @@ -866,10 +866,10 @@ native StopAudioStreamForPlayer(playerID); ///
  • "AMMUN5" Ammunation 5
  • /// /// -native SetPlayerShopName(playerID, const shopname[]); +native SetPlayerShopName(playerid, const shopname[]); /// Set the skill level of a certain weapon type for a player. -/// The ID of the player to set the weapon skill of +/// The ID of the player to set the weapon skill of /// The weapon to set the skill of /// The skill level to set for that weapon, ranging from 0 to 999. A level out of range will max it out /// @@ -891,25 +891,25 @@ native SetPlayerShopName(playerID, const shopname[]); ///
  • WEAPONSKILL_SNIPERRIFLE(10)
  • /// /// -native SetPlayerSkillLevel(playerID, skill, level); +native SetPlayerSkillLevel(playerid, skill, level); /// Get the ID of the vehicle that the player is surfing (stuck to the roof of). -/// The ID of the player you want to know the surfing vehicle ID of -/// +/// The ID of the player you want to know the surfing vehicle ID of +/// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified is not connected, INVALID_VEHICLE_ID also. -native GetPlayerSurfingVehicleID(playerID); +native GetPlayerSurfingVehicleid(playerid); /// Returns the ID of the object the player is surfing on. -/// The ID of the player surfing the object +/// The ID of the player surfing the object /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// The ID of the moving object the player is surfing. If the player isn't surfing a moving object, it will return INVALID_OBJECT_ID. -native GetPlayerSurfingObjectID(playerID); +native GetPlayerSurfingObjectid(playerid); /// Removes a standard San Andreas model for a single player within a specified range. -/// The ID of the player to remove the objects for -/// The model to remove +/// The ID of the player to remove the objects for +/// The model to remove /// The x coordinate around which the objects will be removed /// The y coordinate around which the objects will be removed /// The z coordinate around which the objects will be removed @@ -919,11 +919,11 @@ native GetPlayerSurfingObjectID(playerID); /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// There appears to be a limit of around 1000 lines/objects. There is no workaround. /// When removing the same object for a player, they will crash. Commonly, players crash when reconnecting to the server because the server removes buildings on OnPlayerConnect. -/// In SA-MP 0.3.7 you can use -1 for the modelID to remove all objects within the specified radius. -native RemoveBuildingForPlayer(playerID, modelID, Float:centerX, Float:centerY, Float:centerZ, Float:radius); +/// In SA-MP 0.3.7 you can use -1 for the modelid to remove all objects within the specified radius. +native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, Float:centerZ, Float:radius); /// Retrieves the start and end (hit) position of the last bullet a player fired. -/// The ID of the player to get the last bullet shot information of +/// The ID of the player to get the last bullet shot information of /// A float variable in which to save the x coordinate of where the bullet originated from /// A float variable in which to save the y coordinate of where the bullet originated from /// A float variable in which to save the z coordinate of where the bullet originated from @@ -941,7 +941,7 @@ native RemoveBuildingForPlayer(playerID, modelID, Float:centerX, Float:centerY, /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist.

    /// -native GetPlayerLastShotVectors(playerID, &Float:originX, &Float:originY, &Float:originZ, &Float:hitPosX, &Float:hitPosY, &Float:hitPosZ); +native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float:originZ, &Float:hitPosX, &Float:hitPosY, &Float:hitPosZ); // Attached to bone objects #if MAX_PLAYER_ATTACHED_OBJECTS < 1 || MAX_PLAYER_ATTACHED_OBJECTS > 10 @@ -949,9 +949,9 @@ native GetPlayerLastShotVectors(playerID, &Float:originX, &Float:originY, &Float #endif ///

    Attach an object to a specific bone on a player. -/// The ID of the player to attach the object to +/// The ID of the player to attach the object to /// The index (slot) to assign the object to (0-9 since 0.3d, 0-4 in previous versions) -/// The model to attach +/// The model to attach /// The bone to attach the object to /// x axis offset for the object position (optional=0.0) /// y axis offset for the object position (optional=0.0) @@ -994,28 +994,28 @@ native GetPlayerLastShotVectors(playerID, &Float:originX, &Float:originY, &Float /// /// /// 1 on success, 0 on failure. -native SetPlayerAttachedObject(playerID, index, modelID, bone, Float:offsetX = 0.0, Float:offsetY = 0.0, Float:offsetZ = 0.0, Float:rotX = 0.0, Float:rotY = 0.0, Float:rotZ = 0.0, Float:scaleX = 1.0, Float:scaleY = 1.0, Float:scaleZ = 1.0, materialColour1 = 0, materialColour2 = 0); +native SetPlayerAttachedObject(playerid, index, modelid, bone, Float:offsetX = 0.0, Float:offsetY = 0.0, Float:offsetZ = 0.0, Float:rotX = 0.0, Float:rotY = 0.0, Float:rotZ = 0.0, Float:scaleX = 1.0, Float:scaleY = 1.0, Float:scaleZ = 1.0, materialColour1 = 0, materialColour2 = 0); /// Remove an attached object from a player. -/// The ID of the player to remove the object from +/// The ID of the player to remove the object from /// The index of the object to remove (set with SetPlayerAttachedObject) /// /// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// 1 on success, 0 on failure. -native RemovePlayerAttachedObject(playerID, index); +native RemovePlayerAttachedObject(playerid, index); /// Check if a player has an object attached in the specified index (slot). -/// The ID of the player to check +/// The ID of the player to check /// The index (slot) to check /// /// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// 1 if used, 0 if not. -native IsPlayerAttachedObjectSlotUsed(playerID, index); +native IsPlayerAttachedObjectSlotUsed(playerid, index); /// Enter edition mode for an attached object. -/// The ID of the player to enter in to edition mode +/// The ID of the player to enter in to edition mode /// The index (slot) of the attached object to edit /// /// @@ -1035,12 +1035,12 @@ native IsPlayerAttachedObjectSlotUsed(playerID, index); /// /// Players will be able to scale objects up to a very large or negative value size. Limits should be put in place using OnPlayerEditAttachedObject to abort the edit. /// 1 on success and 0 on failure. -native EditAttachedObject(playerID, index); +native EditAttachedObject(playerid, index); // Per-player TextDraws /// Creates a textdraw for a single player. This can be used as a way around the global text-draw limit. -/// The ID of the player to create the textdraw for +/// The ID of the player to create the textdraw for /// x-Coordinate /// y-Coordinate /// The text in the textdraw @@ -1079,10 +1079,10 @@ native EditAttachedObject(playerID, index); /// /// Player-textdraws are automatically destroyed when a player disconnects. /// The ID of the created textdraw. -native PlayerText:CreatePlayerTextDraw(playerID, Float:x, Float:y, const text[]); +native PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[]); /// Destroy a player-textdraw. -/// The ID of the player who's player-textdraw to destroy +/// The ID of the player who's player-textdraw to destroy /// The ID of the textdraw to destroy /// /// @@ -1100,10 +1100,10 @@ native PlayerText:CreatePlayerTextDraw(playerID, Float:x, Float:y, const text[]) /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawDestroy(playerID, PlayerText:text); +native PlayerTextDrawDestroy(playerid, PlayerText:text); /// Sets the width and height of the letters in a player-textdraw. -/// The ID of the player whose player-textdraw to set the letter size of +/// The ID of the player whose player-textdraw to set the letter size of /// The ID of the player-textdraw to change the letter size of /// Width of a char /// Height of a char @@ -1125,10 +1125,10 @@ native PlayerTextDrawDestroy(playerID, PlayerText:text); /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// When using this function purely for the benefit of affecting the textdraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements /// Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). -native PlayerTextDrawLetterSize(playerID, PlayerText:text, Float:x, Float:y); +native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:x, Float:y); /// Change the size of a player-textdraw (box if PlayerTextDrawUseBox is enabled and/or clickable area for use with PlayerTextDrawSetSelectable). -/// The ID of the player whose player-textdraw to set the size of +/// The ID of the player whose player-textdraw to set the size of /// The ID of the player-textdraw to set the size of /// The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate /// The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate @@ -1161,10 +1161,10 @@ native PlayerTextDrawLetterSize(playerID, PlayerText:text, Float:x, Float:y); /// The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).

    /// This function defines the clickable area for use with PlayerTextDrawSetSelectable, whether a box is shown or not. /// -native PlayerTextDrawTextSize(playerID, PlayerText:text, Float:x, Float:y); +native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:x, Float:y); ///

    Set the text alignment of a player-textdraw. -/// The ID of the player whose player-textdraw to set the alignment of +/// The ID of the player whose player-textdraw to set the alignment of /// The ID of the player-textdraw to set the alignment of /// 1-left 2-centered 3-right /// @@ -1184,10 +1184,10 @@ native PlayerTextDrawTextSize(playerID, PlayerText:text, Float:x, Float:y); /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at PlayerTextDrawTextSize. -native PlayerTextDrawAlignment(playerID, PlayerText:text, alignment); +native PlayerTextDrawAlignment(playerid, PlayerText:text, alignment); /// Sets the text colour of a player-textdraw. -/// The ID of the player who's textdraw to set the colour of +/// The ID of the player who's textdraw to set the colour of /// The TextDraw to change /// The colour in hexadecimal format /// @@ -1208,10 +1208,10 @@ native PlayerTextDrawAlignment(playerID, PlayerText:text, alignment); /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// You can also use Gametext colours in textdraws. /// The textdraw must be re-shown to the player in order to update the colour. -native PlayerTextDrawColor(playerID, PlayerText:text, colour); +native PlayerTextDrawColor(playerid, PlayerText:text, colour); /// Toggle the box on a player-textdraw. -/// The ID of the player whose textdraw to toggle the box of +/// The ID of the player whose textdraw to toggle the box of /// The ID of the player-textdraw to toggle the box of /// 1 to use a box or 0 to not use a box /// @@ -1230,10 +1230,10 @@ native PlayerTextDrawColor(playerID, PlayerText:text, colour); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawUseBox(playerID, PlayerText:text, use); +native PlayerTextDrawUseBox(playerid, PlayerText:text, use); /// Sets the colour of a textdraw's box (PlayerTextDrawUseBox). -/// The ID of the player whose textdraw to set the box colour of +/// The ID of the player whose textdraw to set the box colour of /// The ID of the player textdraw to set the box colour of /// The colour to set. Alpha (transparency) is supported /// @@ -1252,10 +1252,10 @@ native PlayerTextDrawUseBox(playerID, PlayerText:text, use); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawBoxColor(playerID, PlayerText:text, colour); +native PlayerTextDrawBoxColor(playerid, PlayerText:text, colour); /// Show a player-textdraw to the player it was created for. -/// The ID of the player to show the textdraw for +/// The ID of the player to show the textdraw for /// The ID of the textdraw to show /// The size of the shadow. 0 will hide the shadow /// @@ -1274,10 +1274,10 @@ native PlayerTextDrawBoxColor(playerID, PlayerText:text, colour); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawSetShadow(playerID, PlayerText:text, size); +native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); /// Set the outline of a player-textdraw. The outline colour cannot be changed unless PlayerTextDrawBackgroundColor is used. -/// The ID of the player whose player-textdraw to set the outline of +/// The ID of the player whose player-textdraw to set the outline of /// The ID of the player-textdraw to set the outline of /// The thickness of the outline /// @@ -1296,10 +1296,10 @@ native PlayerTextDrawSetShadow(playerID, PlayerText:text, size); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawSetOutline(playerID, PlayerText:text, size); +native PlayerTextDrawSetOutline(playerid, PlayerText:text, size); /// Adjust the background colour of a player-textdraw. -/// The ID of the player whose player-textdraw to set the background colour of +/// The ID of the player whose player-textdraw to set the background colour of /// The ID of the player-textdraw to set the background colour of /// The colour that the textdraw should be set to /// @@ -1319,10 +1319,10 @@ native PlayerTextDrawSetOutline(playerID, PlayerText:text, size); /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// If PlayerTextDrawSetOutline is used with size > 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in PlayerTextDrawColor -native PlayerTextDrawBackgroundColor(playerID, PlayerText:text, colour); +native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); /// Change the font of a player-textdraw. -/// The ID of the player whose player-textdraw to change the font of +/// The ID of the player whose player-textdraw to change the font of /// The ID of the player-textdraw to change the font of /// There are four font styles. A font value greater than 3 does not display, and anything greater than 16 crashes the client. See http://wiki.sa-mp.com/wiki/PlayerTextDrawFont /// @@ -1341,10 +1341,10 @@ native PlayerTextDrawBackgroundColor(playerID, PlayerText:text, colour); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawFont(playerID, PlayerText:text, font); +native PlayerTextDrawFont(playerid, PlayerText:text, font); /// Appears to scale text spacing to a proportional ratio. Useful when using PlayerTextDrawLetterSize to ensure the text has even character spacing. -/// The ID of the player whose player-textdraw to set the proportionality of +/// The ID of the player whose player-textdraw to set the proportionality of /// The ID of the player-textdraw to set the proportionality of /// 1 to enable proportionality, 0 to disable /// @@ -1363,10 +1363,10 @@ native PlayerTextDrawFont(playerID, PlayerText:text, font); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawSetProportional(playerID, PlayerText:text, set); +native PlayerTextDrawSetProportional(playerid, PlayerText:text, set); /// Toggles whether a player-textdraw can be selected or not. -/// The ID of the player whose player-textdraw to set the selectability of +/// The ID of the player whose player-textdraw to set the selectability of /// The ID of the player-textdraw to set the selectability of /// Set the player-textdraw selectable (1) or non-selectable (0). By default this is 0 /// @@ -1375,10 +1375,10 @@ native PlayerTextDrawSetProportional(playerID, PlayerText:text, set); /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// PlayerTextDrawSetSelectable MUST be used BEFORE the textdraw is shown to the player. /// Use PlayerTextDrawTextSize to define the clickable area. -native PlayerTextDrawSetSelectable(playerID, PlayerText:text, set); +native PlayerTextDrawSetSelectable(playerid, PlayerText:text, set); /// Show a player-textdraw to the player it was created for. -/// The ID of the player to show the textdraw for +/// The ID of the player to show the textdraw for /// The ID of the textdraw to show /// /// @@ -1396,10 +1396,10 @@ native PlayerTextDrawSetSelectable(playerID, PlayerText:text, set); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawShow(playerID, PlayerText:text); +native PlayerTextDrawShow(playerid, PlayerText:text); /// Hide a player-textdraw from the player it was created for. -/// The ID of the player to hide the textdraw for +/// The ID of the player to hide the textdraw for /// The ID of the textdraw to hide /// /// @@ -1417,10 +1417,10 @@ native PlayerTextDrawShow(playerID, PlayerText:text); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawHide(playerID, PlayerText:text); +native PlayerTextDrawHide(playerid, PlayerText:text); /// Change the text of a player-textdraw. -/// The ID of the player who's textdraw string to set +/// The ID of the player who's textdraw string to set /// The ID of the textdraw to change /// The new string for the TextDraw /// @@ -1441,10 +1441,10 @@ native PlayerTextDrawHide(playerID, PlayerText:text); /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// There are limits to the length of textdraw strings! See Limits for more info. /// You don't have to show the TextDraw again in order to apply the changes. -native PlayerTextDrawSetString(playerID, PlayerText:text, const string[]); +native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); /// Sets a player textdraw 2D preview sprite of a specified model ID. -/// The PlayerTextDraw player ID +/// The PlayerTextDraw player ID /// The textdraw ID that will display the 3D preview /// The GTA SA or SA:MP model ID to display /// @@ -1457,10 +1457,10 @@ native PlayerTextDrawSetString(playerID, PlayerText:text, const string[]); /// 1: The function executed successfully. If an invalid model is passed 'success' is reported, but the model will appear as a yellow/black question mark.

    /// 0: The function failed to execute. Player and/or textdraw do not exist. /// -native PlayerTextDrawSetPreviewModel(playerID, PlayerText:text, modelindex); +native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelindex); ///

    Sets the rotation and zoom of a 3D model preview player-textdraw. -/// The ID of the player whose player-textdraw to change +/// The ID of the player whose player-textdraw to change /// The ID of the player-textdraw to change /// The x rotation value /// The y rotation value @@ -1473,10 +1473,10 @@ native PlayerTextDrawSetPreviewModel(playerID, PlayerText:text, modelindex); /// /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW and already have a model set in order for this function to have effect. -native PlayerTextDrawSetPreviewRot(playerID, PlayerText:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); +native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); /// Set the colour of a vehicle in a player-textdraw model preview (if a vehicle is shown). -/// The ID of the player whose player-textdraw to change +/// The ID of the player whose player-textdraw to change /// The ID of the player's player-textdraw to change /// The colour to set the vehicle's primary colour to /// The colour to set the vehicle's secondary colour to @@ -1486,12 +1486,12 @@ native PlayerTextDrawSetPreviewRot(playerID, PlayerText:text, Float:rotX, Float: /// /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font TEXT_DRAW_FONT_MODEL_PREVIEW and be showing a vehicle in order for this function to have effect. -native PlayerTextDrawSetPreviewVehCol(playerID, PlayerText:text, colour1, colour2); +native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, colour1, colour2); // Per-player variable system (PVars) /// Set an integer player variable. -/// The ID of the player whose player variable will be set +/// The ID of the player whose player variable will be set /// The name of the player variable /// The integer to be set /// @@ -1505,10 +1505,10 @@ native PlayerTextDrawSetPreviewVehCol(playerID, PlayerText:text, colour1, colour /// 1: The function executed successfully.

    /// 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. /// -native SetPVarInt(playerID, const pvar[], value); +native SetPVarInt(playerid, const pvar[], value); ///

    Gets an integer player variable's value. -/// The ID of the player whose player variable to get +/// The ID of the player whose player variable to get /// The name of the player variable (case-insensitive). Assigned in SetPVarInt /// /// @@ -1517,10 +1517,10 @@ native SetPVarInt(playerID, const pvar[], value); /// /// /// The integer value of the specified player variable. It will still return 0 if the variable is not set, or the player does not exist. -native GetPVarInt(playerID, const pvar[]); +native GetPVarInt(playerid, const pvar[]); /// Saves a string into a player variable. -/// The ID of the player whose player variable will be set +/// The ID of the player whose player variable will be set /// The name of the player variable /// The string you want to save in the player variable /// @@ -1529,10 +1529,10 @@ native GetPVarInt(playerID, const pvar[]); /// /// /// -native SetPVarString(playerID, const pvar[], const value[]); +native SetPVarString(playerid, const pvar[], const value[]); /// Gets a player variable as a string. -/// The ID of the player whose player variable to get +/// The ID of the player whose player variable to get /// The name of the player variable, set by SetPVarString /// The array in which to store the string value in, passed by reference /// The maximum length of the returned string @@ -1544,10 +1544,10 @@ native SetPVarString(playerID, const pvar[], const value[]); /// /// If length of string is zero (value not set), output text will not be updated or set to anything and will remain with old data, neccesying that you clear the variable to blank value if GetPVarString returns 0 if that behavior is undesired /// The length of the string. -native GetPVarString(playerID, const pvar[], output[], len = sizeof (output)); +native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); /// Set a float player variable's value. -/// The ID of the player whose player variable will be set +/// The ID of the player whose player variable will be set /// The name of the player variable /// The float you want to save in the player variable /// @@ -1560,10 +1560,10 @@ native GetPVarString(playerID, const pvar[], output[], len = sizeof (output)); /// 1: The function executed successfully.

    /// 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. /// -native SetPVarFloat(playerID, const pvar[], Float:value); +native SetPVarFloat(playerid, const pvar[], Float:value); ///

    Gets a player variable as a float. -/// The ID of the player whose player variable you want to get +/// The ID of the player whose player variable you want to get /// The name of the player variable /// /// @@ -1572,10 +1572,10 @@ native SetPVarFloat(playerID, const pvar[], Float:value); /// /// /// The float from the specified player variable. -native Float:GetPVarFloat(playerID, const pvar[]); +native Float:GetPVarFloat(playerid, const pvar[]); /// Deletes a previously set player variable. -/// The ID of the player whose player variable to delete +/// The ID of the player whose player variable to delete /// The name of the player variable to delete /// /// @@ -1588,17 +1588,17 @@ native Float:GetPVarFloat(playerID, const pvar[]); /// 1: The function executed successfully.

    /// 0: The function failed to execute. Either the player specified isn't connected or there is no variable set with the given name. /// -native DeletePVar(playerID, const pvar[]); +native DeletePVar(playerid, const pvar[]); ///

    Each PVar (player-variable) has its own unique identification number for lookup, this function returns the highest ID set for a player. -/// The ID of the player to get the upper PVar index of +/// The ID of the player to get the upper PVar index of /// /// /// The highest set PVar ID. -native GetPVarsUpperIndex(playerID); +native GetPVarsUpperIndex(playerid); /// Retrieve the name of a player's pVar via the index. -/// The ID of the player whose player variable to get the name of +/// The ID of the player whose player variable to get the name of /// The index of the player's pVar /// A string to store the pVar's name in, passed by reference /// The max length of the returned string @@ -1606,10 +1606,10 @@ native GetPVarsUpperIndex(playerID); /// /// /// -native GetPVarNameAtIndex(playerID, index, output[], size = sizeof (output)); +native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); /// Gets the type (integer, float or string) of a player variable. -/// The ID of the player whose player variable to get the type of +/// The ID of the player whose player variable to get the type of /// The name of the player variable to get the type of /// /// @@ -1628,14 +1628,14 @@ native GetPVarNameAtIndex(playerID, index, output[], size = sizeof (output)); /// /// /// Returns the type of the PVar. See table below. -native GetPVarType(playerID, const pvar[]); +native GetPVarType(playerid, const pvar[]); #if MAX_CHATBUBBLE_LENGTH < 1 || MAX_CHATBUBBLE_LENGTH > 144 #error MAX_CHATBUBBLE_LENGTH must be >= 1 and <= 144 #endif /// Creates a chat bubble above a player's name tag. -/// The player which should have the chat bubble +/// The player which should have the chat bubble /// The text to display /// The text colour /// The distance from where players are able to see the chat bubble @@ -1643,16 +1643,16 @@ native GetPVarType(playerID, const pvar[]); /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// You can't see your own chatbubbles. The same applies to attached 3D text labels. /// You can use colour embedding for multiple colours in the message. -native SetPlayerChatBubble(playerID, const text[], colour, Float:drawdistance, expiretime); +native SetPlayerChatBubble(playerid, const text[], colour, Float:drawdistance, expiretime); // Player control /// Puts a player in a vehicle. -/// The ID of the player to put in a vehicle -/// The ID of the vehicle to put the player in -/// The ID of the seat to put the player in +/// The ID of the player to put in a vehicle +/// The ID of the vehicle to put the player in +/// The ID of the seat to put the player in /// -/// +/// /// /// /// If this function is used on a player that is already in a vehicle, other players will still see them in their previous vehicle. To fix this, first remove the player from the vehicle. @@ -1672,28 +1672,28 @@ native SetPlayerChatBubble(playerID, const text[], colour, Float:drawdistance, e /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player or vehicle don't exist. /// -native PutPlayerInVehicle(playerID, vehicleID, seatID); +native PutPlayerInVehicle(playerid, vehicleid, seatid); ///

    This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. -/// The ID of the player in the vehicle that you want to get the ID of +/// The ID of the player in the vehicle that you want to get the ID of /// /// /// /// /// ID of the vehicle or 0 if not in a vehicle. -native GetPlayerVehicleID(playerID); +native GetPlayerVehicleid(playerid); /// Find out which seat a player is in. -/// The ID of the player you want to get the seat of -/// +/// The ID of the player you want to get the seat of +/// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// Sometimes the result can be 128 which is an invalid seat ID. Circumstances of this are not yet known, but it is best to discard information when returned seat number is 128. /// The ID of the seat the player is in. -1 is not in vehicle, 0 is the driver, 1 is the front passenger, and 2 & 3 are the rear passengers. -native GetPlayerVehicleSeat(playerID); +native GetPlayerVehicleSeat(playerid); /// Removes/ejects a player from their vehicle. -/// The ID of the player to remove from their vehicle +/// The ID of the player to remove from their vehicle /// /// /// The exiting animation is not synced for other players.

    @@ -1704,20 +1704,20 @@ native GetPlayerVehicleSeat(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native RemovePlayerFromVehicle(playerID); +native RemovePlayerFromVehicle(playerid); ///

    Toggles whether a player can control their character or not. The player will also be unable to move their camera. -/// The ID of the player to toggle the controllability of +/// The ID of the player to toggle the controllability of /// 0 to make them uncontrollable, 1 to make them controllable /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native TogglePlayerControllable(playerID, toggle); +native TogglePlayerControllable(playerid, toggle); ///

    Plays the specified sound for a player. -/// The ID of the player for whom to play the sound -/// The sound to play +/// The ID of the player for whom to play the sound +/// The sound to play /// x coordinate for the sound to play at. (0 for no position) /// y coordinate for the sound to play at. (0 for no position) /// z coordinate for the sound to play at. (0 for no position) @@ -1729,10 +1729,10 @@ native TogglePlayerControllable(playerID, toggle); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native PlayerPlaySound(playerID, soundID, Float:x, Float:y, Float:z); +native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); ///

    Apply an animation to a player. -/// The ID of the player to apply the animation to +/// The ID of the player to apply the animation to /// The animation library from which to apply an animation /// The name of the animation to apply, within the specified library /// The speed to play the animation (use 4.1) @@ -1744,26 +1744,26 @@ native PlayerPlaySound(playerID, soundID, Float:x, Float:y, Float:z); /// Set to 1 to make server sync the animation with all other players in streaming radius. 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) (optional=0) /// /// -/// The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. +/// The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. /// An invalid animation library will crash the player's game. /// This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). -native ApplyAnimation(playerID, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, bool:forceSync = false); +native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, bool:forceSync = false); /// Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). -/// The ID of the player to clear the animations of -/// Set to 1 to force playerID to sync the animation with other players in streaming radius (optional=0) +/// The ID of the player to clear the animations of +/// Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) /// /// ClearAnimations doesn't do anything when the animation ends if we pass 1 for the freeze parameter in ApplyAnimation. /// Unlike some other ways to remove player from a vehicle, this will also reset the vehicle's velocity to zero, instantly stopping the car. Player will appear on top of the vehicle with the same location as he was in his car seat. /// This function always returns 1, even when the player specified is not connected. -native ClearAnimations(playerID, bool:forceSync = false); +native ClearAnimations(playerid, bool:forceSync = false); /// Returns the index of any running applied animations. -/// ID of the player of whom you want to get the animation index of +/// ID of the player of whom you want to get the animation index of /// /// This function was added in SA-MP 0.3b and will not work in earlier versions! /// 0 if there is no animation applied. -native GetPlayerAnimationIndex(playerID); // return the index of any running applied animations (0 if none are running) +native GetPlayerAnimationIndex(playerid); // return the index of any running applied animations (0 if none are running) /// Get the animation library/name for the index. /// The animation index, returned by GetPlayerAnimationIndex @@ -1777,7 +1777,7 @@ native GetPlayerAnimationIndex(playerID); // return the index of any running app native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibrary), animationName[], len2 = sizeof (animationName)); // get the animation lib/name for the index /// Retrieves a player's current special action. -/// The ID of the player to get the special action of +/// The ID of the player to get the special action of /// /// /// @@ -1815,11 +1815,11 @@ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibra /// /// /// The special action of the player. -native GetPlayerSpecialAction(playerID); +native GetPlayerSpecialAction(playerid); /// This function allows to set players special action. -/// The player that should perform the action -/// The action that should be performed +/// The player that should perform the action +/// The action that should be performed /// /// /// Removing jetpacks from players by setting their special action to 0 causes the sound to stay until death. @@ -1861,22 +1861,22 @@ native GetPlayerSpecialAction(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerSpecialAction(playerID, actionID); +native SetPlayerSpecialAction(playerid, actionid); ///

    Disables collisions between occupied vehicles for a player. -/// The ID of the player for whom you want to disable collisions +/// The ID of the player for whom you want to disable collisions /// 1 to disable collisions, 0 to enable collisions /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native DisableRemoteVehicleCollisions(playerID, disable); +native DisableRemoteVehicleCollisions(playerid, disable); // Player world/map related ///

    Sets a checkpoint (red cylinder) for a player. Also shows a red blip on the radar. When players enter a checkpoint, OnPlayerEnterCheckpoint is called and actions can be performed. -/// The ID of the player for whom to set a checkpoint +/// The ID of the player for whom to set a checkpoint /// The x coordinate to set the checkpoint at /// The y coordinate to set the checkpoint at /// The z coordinate to set the checkpoint at @@ -1890,10 +1890,10 @@ native DisableRemoteVehicleCollisions(playerID, disable); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerCheckpoint(playerID, Float:x, Float:y, Float:z, Float:size); +native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); ///

    Disables (hides/destroys) a player's set checkpoint. Players can only have a single checkpoint set at a time. Checkpoints don't need to be disabled before setting another one. -/// The ID of the player whose checkpoint to disable +/// The ID of the player whose checkpoint to disable /// /// /// @@ -1907,10 +1907,10 @@ native SetPlayerCheckpoint(playerID, Float:x, Float:y, Float:z, Float:size); /// 1: The function executed successfully. Success is also returned if the player doesn't have a checkpoint shown already.

    /// 0: The function failed to execute. This means the player is not connected. /// -native DisablePlayerCheckpoint(playerID); +native DisablePlayerCheckpoint(playerid); ///

    Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint callback is called. -/// The ID of the player to set the checkpoint for +/// The ID of the player to set the checkpoint for /// Type of checkpoint. 0-Normal, 1-Finish, 2-Nothing(Only the checkpoint without anything on it), 3-Air normal, 4-Air finish, 5-Air (rotates and stops), 6-Air (increases, decreases and disappears), 7-Air (swings down and up), 8-Air (swings up and down) /// x-Coordinate /// y-Coordinate @@ -1937,10 +1937,10 @@ native DisablePlayerCheckpoint(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerRaceCheckpoint(playerID, type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size); +native SetPlayerRaceCheckpoint(playerid, type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size); ///

    Disable any initialized race checkpoints for a specific player, since you can only have one at any given time. -/// The player to disable the current checkpoint for +/// The player to disable the current checkpoint for /// /// /// @@ -1950,10 +1950,10 @@ native SetPlayerRaceCheckpoint(playerID, type, Float:x, Float:y, Float:z, Float: /// /// /// -native DisablePlayerRaceCheckpoint(playerID); +native DisablePlayerRaceCheckpoint(playerid); /// Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in). -/// The ID of the player to set the world boundaries of +/// The ID of the player to set the world boundaries of /// The maximum x coordinate the player can go to /// The minimum x coordinate the player can go to /// The maximum y coordinate the player can go to @@ -1962,31 +1962,31 @@ native DisablePlayerRaceCheckpoint(playerID); /// This function does not work if used in OnPlayerConnect /// A player's world boundaries can be reset by setting them to 20000.0, -20000.0, 20000.0, -20000.0. These are the default values. /// This function doesn't work in interiors! -native SetPlayerWorldBounds(playerID, Float:maxX,Float:minX,Float:maxY,Float:minY); +native SetPlayerWorldBounds(playerid, Float:maxX,Float:minX,Float:maxY,Float:minY); /// Change the colour of a player's nametag and radar blip for another player. -/// The player that will see the player's changed blip/nametag colour -/// The player whose colour will be changed +/// The player that will see the player's changed blip/nametag colour +/// The player whose colour will be changed /// New colour. (RGBA) /// /// /// /// -native SetPlayerMarkerForPlayer(playerID, showplayerID, colour); +native SetPlayerMarkerForPlayer(playerid, showplayerid, colour); /// This functions allows you to toggle the drawing of player nametags, healthbars and armor bars which display above their head. For use of a similar function like this on a global level, ShowNameTags function. -/// Player who will see the results of this function -/// Player whose name tag will be shown or hidden +/// Player who will see the results of this function +/// Player whose name tag will be shown or hidden /// 1-show name tag, 0-hide name tag /// /// /// -/// ShowNameTags must be set to 1 to be able to show name tags with ShowPlayerNameTagForPlayer, that means that in order to be effective you need to ShowPlayerNameTagForPlayer(forplayerID, playerID, 0) ahead of time(OnPlayerStreamIn is a good spot). -native ShowPlayerNameTagForPlayer(playerID, showplayerID, show); +/// ShowNameTags must be set to 1 to be able to show name tags with ShowPlayerNameTagForPlayer, that means that in order to be effective you need to ShowPlayerNameTagForPlayer(forplayerid, playerid, 0) ahead of time(OnPlayerStreamIn is a good spot). +native ShowPlayerNameTagForPlayer(playerid, showplayerid, show); /// Place an icon/marker on a player's map. Can be used to mark locations such as banks and hospitals to players. -/// The ID of the player to set the map icon for -/// The player's icon ID, ranging from 0 to 99. This means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon +/// The ID of the player to set the map icon for +/// The player's icon ID, ranging from 0 to 99. This means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon /// The x coordinate to place the map icon at /// The y coordinate to place the map icon at /// The z coordinate to place the map icon at @@ -2011,30 +2011,30 @@ native ShowPlayerNameTagForPlayer(playerID, showplayerID, show); /// 1: The function executed successfully.

    /// 0: The function failed to execute. Player is not connected. /// -native SetPlayerMapIcon(playerID, iconID, Float:x, Float:y, Float:z, markertype, colour, style = MAPICON_LOCAL); +native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markertype, colour, style = MAPICON_LOCAL); ///

    Removes a map icon that was set earlier for a player using SetPlayerMapIcon. -/// The ID of the player whose icon to remove -/// The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon +/// The ID of the player whose icon to remove +/// The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon /// /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. /// -native RemovePlayerMapIcon(playerID, iconID); +native RemovePlayerMapIcon(playerid, iconid); ///

    Enable/Disable the teleporting ability for a player by right-clicking on the map. -/// The ID of the player to allow teleport +/// The ID of the player to allow teleport /// 1 to allow, 0 to disallow /// This function, as of 0.3d, is deprecated. Check OnPlayerClickMap. /// This function will work only if AllowAdminTeleport is enabled, and you have to be an admin. /// -native AllowPlayerTeleport(playerID, allow); +native AllowPlayerTeleport(playerid, allow); // Player camera /// Sets the camera to a specific position for a player. -/// ID of the player +/// ID of the player /// The x coordinate to place the camera at /// The y coordinate to place the camera at /// The z coordinate to place the camera at @@ -2047,10 +2047,10 @@ native AllowPlayerTeleport(playerID, allow); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified doesn't exist. /// -native SetPlayerCameraPos(playerID, Float:x, Float:y, Float:z); +native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); ///

    Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos. -/// The ID of the player whose camera to set +/// The ID of the player whose camera to set /// The x coordinate for the player's camera to look at /// The y coordinate for the player's camera to look at /// The z coordinate for the player's camera to look at @@ -2064,16 +2064,16 @@ native SetPlayerCameraPos(playerID, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player specified does not exist. /// -native SetPlayerCameraLookAt(playerID, Float:x, Float:y, Float:z, cut = CAMERA_CUT); +native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, cut = CAMERA_CUT); ///

    Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos. -/// The player you want to restore the camera for +/// The player you want to restore the camera for /// /// -native SetCameraBehindPlayer(playerID); +native SetCameraBehindPlayer(playerid); /// Get the position of the player's camera. -/// The ID of the player to get the camera position of +/// The ID of the player to get the camera position of /// A float variable to store the x coordinate in, passed by reference /// A float variable to store the y coordinate in, passed by reference /// A float variable to store the z coordinate in, passed by reference @@ -2085,10 +2085,10 @@ native SetCameraBehindPlayer(playerID); /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// Player's camera positions are only updated once a second, unless aiming. /// It is recommended to set a 1 second timer if you wish to take action that relies on a player's camera position. -native GetPlayerCameraPos(playerID, &Float:x, &Float:y, &Float:z); +native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z); /// This function will return the current direction of player's aiming in 3-D space, the coords are relative to the camera position, see GetPlayerCameraPos. -/// The ID of the player you want to obtain the camera front vector of +/// The ID of the player you want to obtain the camera front vector of /// A float to store the x coordinate, passed by reference /// A float to store the y coordinate, passed by reference /// A float to store the z coordinate, passed by reference @@ -2097,10 +2097,10 @@ native GetPlayerCameraPos(playerID, &Float:x, &Float:y, &Float:z); /// In 0.3a the camera front vector is only obtainable when player is inside a rhino, S.W.A.T tank, fire truck, or on foot. /// Since 0.3b the camera data can be obtained when the player is in any vehicle or on foot. /// The position is stored in the specified variables. -native GetPlayerCameraFrontVector(playerID, &Float:x, &Float:y, &Float:z); +native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z); /// Returns the current GTA camera mode for the requested player. The camera modes are useful in determining whether a player is aiming, doing a passenger driveby etc. -/// The ID of the player whose camera mode to retrieve +/// The ID of the player whose camera mode to retrieve /// /// /// @@ -2108,10 +2108,10 @@ native GetPlayerCameraFrontVector(playerID, &Float:x, &Float:y, &Float:z); /// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// The camera mode as an integer (or -1 if player is not connected). -native GetPlayerCameraMode(playerID); +native GetPlayerCameraMode(playerid); /// Toggle camera targeting functions for a player. Disabled by default to save bandwidth. -/// The ID of the player to toggle camera targeting functions for +/// The ID of the player to toggle camera targeting functions for /// 1 to enable camera targeting functions and 0 to disable them /// /// @@ -2121,20 +2121,20 @@ native GetPlayerCameraMode(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player is not connected. /// -native EnablePlayerCameraTarget(playerID, enable); +native EnablePlayerCameraTarget(playerid, enable); ///

    Allows you to retrieve the ID of the object the player is looking at. -/// The ID of the player to check +/// The ID of the player to check /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. -/// The ID of the object playerID is looking at. If INVALID_OBJECT_ID (65535) is returned, playerID isn't looking at any object. -native GetPlayerCameraTargetObject(playerID); +/// The ID of the object playerid is looking at. If INVALID_OBJECT_ID (65535) is returned, playerid isn't looking at any object. +native GetPlayerCameraTargetObject(playerid); /// Get the ID of the vehicle the player is looking at. -/// The ID of the player to check +/// The ID of the player to check /// /// /// @@ -2143,22 +2143,22 @@ native GetPlayerCameraTargetObject(playerID); /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. /// This function can (obviously) only return one vehicle ID at a time, while the player may be looking at multiple. It generally seems to detect the closest vehicle first. /// The vehicle ID of the vehicle the player is looking at. INVALID_VEHICLE_ID if none. -native GetPlayerCameraTargetVehicle(playerID); +native GetPlayerCameraTargetVehicle(playerid); -/// Allows you to retrieve the ID of the player the playerID is looking at. -/// The ID of the player to check +/// Allows you to retrieve the ID of the player the playerid is looking at. +/// The ID of the player to check /// /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. -/// Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerID is aming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerID is looking at (reference point is the center of the screen). -/// The ID of the player the playerID is looking at. -native GetPlayerCameraTargetPlayer(playerID); +/// Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerid is aming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerid is looking at (reference point is the center of the screen). +/// The ID of the player the playerid is looking at. +native GetPlayerCameraTargetPlayer(playerid); /// Allows you to retrieve the ID of the actor the player is looking at (if any). -/// The ID of the player to get the target actor of +/// The ID of the player to get the target actor of /// /// /// @@ -2168,48 +2168,48 @@ native GetPlayerCameraTargetPlayer(playerID); /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. /// This function only tells you which actor (if any) the player is looking at. To find out if they are aiming at them, you need to use GetPlayerTargetActor. /// The ID of the actor the player is looking at. -native GetPlayerCameraTargetActor(playerID); +native GetPlayerCameraTargetActor(playerid); /// Retrieves the aspect ratio of a player's camera. -/// The ID of the player to get the camera aspect ratio of +/// The ID of the player to get the camera aspect ratio of /// /// /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// The return value of this function represents the value of the "widescreen" option in the game's display settings, not the actual aspect ratio of the player's display. /// The aspect ratio of the player's camera, as a float. The aspect ratio can be one of three values: 4:3 (1.3333334, Float:0x3FAAAAAB) when widescreen is turned off, 5:4 (1.2470589, Float:0x3F9F9FA0) when letterbox mode is turned on, and 16:9 (1.7764707, Float:0x3FE36364) when widescreen is turned on regardless of the letterbox mode. -native Float:GetPlayerCameraAspectRatio(playerID); +native Float:GetPlayerCameraAspectRatio(playerid); /// Retrieves the game camera zoom level for a given player. -/// The ID of the player to get the camera zoom level of +/// The ID of the player to get the camera zoom level of /// /// /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This retrieves the zoom level of the GAME camera, not the camera WEAPON. /// The player's camera zoom level (camera, sniper etc.), a float. -native Float:GetPlayerCameraZoom(playerID); +native Float:GetPlayerCameraZoom(playerid); /// You can use this function to attach the player camera to objects. -/// The ID of the player which will have your camera attached on object -/// The object ID which you want to attach the player camera +/// The ID of the player which will have your camera attached on object +/// The object ID which you want to attach the player camera /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You need to create the object first, before attempting to attach a player camera for that. -native AttachCameraToObject(playerID, objectID); +native AttachCameraToObject(playerid, objectid); /// Attaches a player's camera to a player-object. The player is able to move their camera while it is attached to an object. Can be used with MovePlayerObject and AttachPlayerObjectToVehicle. -/// The ID of the player which will have their camera attached to a player-object -/// The ID of the player-object to which the player's camera will be attached +/// The ID of the player which will have their camera attached to a player-object +/// The ID of the player-object to which the player's camera will be attached /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// The player-object must be created before attempting to attach the player's camera to it. -native AttachCameraToPlayerObject(playerID, playerobjectID); +native AttachCameraToPlayerObject(playerid, playerobjectid); /// Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes. -/// The ID of the player the camera should be moved for +/// The ID of the player the camera should be moved for /// The x position the camera should start to move from /// The y position the camera should start to move from /// The z position the camera should start to move from @@ -2223,10 +2223,10 @@ native AttachCameraToPlayerObject(playerID, playerobjectID); /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraPos(playerID, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); +native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); /// Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. -/// The ID of the player the camera should be moved for +/// The ID of the player the camera should be moved for /// The x position the camera should start to move from /// The y position the camera should start to move from /// The z position the camera should start to move from @@ -2240,36 +2240,36 @@ native InterpolateCameraPos(playerID, Float:fromX, Float:fromY, Float:fromZ, Flo /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraLookAt(playerID, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); +native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); // Player conditionals /// Checks if a player is connected (if an ID is taken by a connected player). -/// The ID of the player to check +/// The ID of the player to check /// /// /// /// This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. /// 1 if the player is connected, 0 if not. -native IsPlayerConnected(playerID); +native IsPlayerConnected(playerid); /// Checks if a player is in a specific vehicle. -/// ID of the player -/// ID of the vehicle +/// ID of the player +/// ID of the vehicle /// /// /// 1 if the player is in the vehicle, 0 if not. -native IsPlayerInVehicle(playerID, vehicleID); +native IsPlayerInVehicle(playerid, vehicleid); /// Check if a player is inside any vehicle (as a driver or passenger). -/// The ID of the player to check +/// The ID of the player to check /// /// /// 1 if the player is in a vehicle, 0 if not. -native IsPlayerInAnyVehicle(playerID); +native IsPlayerInAnyVehicle(playerid); /// Check if the player is currently inside a checkpoint, this could be used for properties or teleport points for example. -/// The player you want to know the status of +/// The player you want to know the status of /// /// /// @@ -2280,10 +2280,10 @@ native IsPlayerInAnyVehicle(playerID); /// /// /// 0 if player isn't in his checkpoint else 1. -native IsPlayerInCheckpoint(playerID); +native IsPlayerInCheckpoint(playerid); /// Check if the player is inside their current set race checkpoint (SetPlayerRaceCheckpoint). -/// The ID of the player to check +/// The ID of the player to check /// /// /// @@ -2294,13 +2294,13 @@ native IsPlayerInCheckpoint(playerID); /// /// /// 1 is the player is in a race checkpoint, 0 if not. -native IsPlayerInRaceCheckpoint(playerID); +native IsPlayerInRaceCheckpoint(playerid); // Virtual Worlds /// Set the virtual world of a player. They can only see other players or vehicles that are in that same world. -/// The ID of the player you want to set the virtual world of -/// The virtual world ID to put the player in +/// The ID of the player you want to set the virtual world of +/// The virtual world ID to put the player in /// /// /// The default virtual world is 0 @@ -2308,27 +2308,27 @@ native IsPlayerInRaceCheckpoint(playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerVirtualWorld(playerID, worldID); +native SetPlayerVirtualWorld(playerid, worldid); ///

    Retrieves the current virtual world the player is in. -/// The ID of the player to get the virtual world of +/// The ID of the player to get the virtual world of /// /// /// /// The ID of the virtual world the player is currently in. -native GetPlayerVirtualWorld(playerID); +native GetPlayerVirtualWorld(playerid); // Insane Stunts /// Toggle stunt bonuses for a player. Enabled by default. -/// The ID of the player to toggle stunt bonuses for +/// The ID of the player to toggle stunt bonuses for /// 1 to enable stunt bonuses and 0 to disable them /// /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player is not connected. /// -native EnableStuntBonusForPlayer(playerID, bool:enable); +native EnableStuntBonusForPlayer(playerid, bool:enable); ///

    Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie). /// 1 to enable stunt bonuses or 0 to disable them @@ -2336,7 +2336,7 @@ native EnableStuntBonusForPlayer(playerID, bool:enable); native EnableStuntBonusForAll(enable); /// Toggle whether a player is in spectator mode or not. While in spectator mode a player can spectate (watch) other players and vehicles. After using this function, either PlayerSpectatePlayer or PlayerSpectateVehicle needs to be used. -/// The ID of the player who should spectate +/// The ID of the player who should spectate /// 1 to enable spectating and 0 to disable /// /// @@ -2347,16 +2347,16 @@ native EnableStuntBonusForAll(enable); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player does not exist. /// -native TogglePlayerSpectating(playerID, toggle); +native TogglePlayerSpectating(playerid, toggle); ///

    Makes a player spectate (watch) another player. -/// The ID of the player that will spectate -/// The ID of the player that should be spectated +/// The ID of the player that will spectate +/// The ID of the player that should be spectated /// The mode to spectate with (optional=SPECTATE_MODE_NORMAL) /// /// /// Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. -/// playerID and targetplayerID's virtual world and interior must be the same for this function to work properly. +/// playerid and targetplayerid's virtual world and interior must be the same for this function to work properly. /// /// Spectate modes:

    ///

      @@ -2369,38 +2369,38 @@ native TogglePlayerSpectating(playerID, toggle); /// 1: The function executed successfully.

      /// 0: The function failed to execute. One of the players specified does not exist. /// -native PlayerSpectatePlayer(playerID, targetplayerID, mode = SPECTATE_MODE_NORMAL); +native PlayerSpectatePlayer(playerid, targetplayerid, mode = SPECTATE_MODE_NORMAL); ///

      Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. -/// The ID of the player who should spectate a vehicle -/// The ID of the vehicle the player should spectate +/// The ID of the player who should spectate a vehicle +/// The ID of the vehicle the player should spectate /// The spectate mode. Can generally be left blank as it defaults to 'normal' /// /// /// Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. -/// playerID and targetvehicleID have to be in the same interior for this function to work properly. +/// playerid and targetvehicleid have to be in the same interior for this function to work properly. /// /// 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.

      /// 0: The function failed to execute. The player, vehicle, or both don't exist. /// -native PlayerSpectateVehicle(playerID, targetvehicleID, mode = SPECTATE_MODE_NORMAL); +native PlayerSpectateVehicle(playerid, targetvehicleid, mode = SPECTATE_MODE_NORMAL); ///

      Starts recording a player's movements to a file, which can then be reproduced by an NPC. -/// The ID of the player to record +/// The ID of the player to record /// The type of recording /// The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native StartRecordingPlayerData(playerID, recordtype, const recordname[]); +native StartRecordingPlayerData(playerid, recordtype, const recordname[]); /// Stops all the recordings that had been started with StartRecordingPlayerData for a specific player. -/// The player you want to stop the recordings of +/// The player you want to stop the recordings of /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native StopRecordingPlayerData(playerID); +native StopRecordingPlayerData(playerid); /// Display the cursor and allow the player to select a textdraw. -/// The ID of the player that should be able to select a textdraw +/// The ID of the player that should be able to select a textdraw /// The colour of the textdraw when hovering over with mouse (RGBA) /// /// @@ -2410,21 +2410,21 @@ native StopRecordingPlayerData(playerID); /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// TextDrawSetSelectable or PlayerTextDrawSetSelectable MUST be used first, to allow a textdraw to be selectable. /// It is the TEXT which will be highlighted when hovered over, NOT the box (if one is shown). -native SelectTextDraw(playerID, hoverColour); // enables the mouse so the player can select a textdraw +native SelectTextDraw(playerid, hoverColour); // enables the mouse so the player can select a textdraw /// Cancel textdraw selection with the mouse. -/// The ID of the player that should be the textdraw selection disabled +/// The ID of the player that should be the textdraw selection disabled /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// This function calls OnPlayerClickTextDraw with INVALID_TEXT_DRAW (65535). Using this function inside OnPlayerClickTextDraw without catching this case will cause clients to go into an infinite loop. -native CancelSelectTextDraw(playerID); // cancel textdraw selection with the mouse +native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mouse // Explosion /// Creates an explosion that is only visible to a single player. This can be used to isolate explosions from other players or to make them only appear in specific virtual worlds. -/// The ID of the player to create the explosion for +/// The ID of the player to create the explosion for /// The x coordinate of the explosion /// The y coordinate of the explosion /// The z coordinate of the explosion @@ -2434,13 +2434,13 @@ native CancelSelectTextDraw(playerID); // cancel textdraw selection with the mou /// This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! /// There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. /// This function always returns 1, even if the function failed to excute (player doesn't exist, invalid radius, or invalid explosion type). -native CreateExplosionForPlayer(playerID, Float:x, Float:y, Float:z, type, Float:radius); +native CreateExplosionForPlayer(playerid, Float:x, Float:y, Float:z, type, Float:radius); /// Perform a memory check on the client. -/// The ID of the player to check +/// The ID of the player to check /// The type of check to perform /// The base address to check /// The offset from the base address /// The number of bytes to check -native SendClientCheck(playerID, type, memAddr, memOffset, byteCount); +native SendClientCheck(playerid, type, memAddr, memOffset, byteCount); diff --git a/a_samp.inc b/a_samp.inc index f9b9799..0a7c524 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -396,49 +396,49 @@ open.mp releases can use `A` as the first digit. native format(output[], len = sizeof (output), const format[], {Float,_}:...); /// This function sends a message to a specific player with a chosen colour in the chat. The whole line in the chatbox will be in the set colour unless colour embedding is used (since 0.3c). -/// The ID of the player to display the message to +/// The ID of the player to display the message to /// The colour of the message (RGBA) /// The text that will be displayed (max 144 characters) /// /// /// /// If a message is longer than 144 characters, it will not be sent. Truncation can be used to prevent this. Displaying a message on multiple lines will also solve this issue. -/// AvoID using the percent sign (or format specifiers) in the actual message text without properly escaping it (like %%). It will result in crashes otherwise. +/// Avoid using the percent sign (or format specifiers) in the actual message text without properly escaping it (like %%). It will result in crashes otherwise. /// You can use colour embedding for multiple colours in the message. /// /// 1: The function executed successfully. Success is reported when the string is over 144 characters, but the message won't be sent.

      /// 0: The function failed to execute. The player is not connected. /// -native SendClientMessage(playerID, colour, const message[]); +native SendClientMessage(playerid, colour, const message[]); ///

      Displays a message in chat to all players. This is a multi-player equivalent of SendClientMessage. /// The colour of the message (RGBA) /// The message to show (max 144 characters) /// /// -/// AvoID using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. +/// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. /// This function always returns 1. native SendClientMessageToAll(colour, const message[]); -/// Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. -/// The ID of the player who will receive the message -/// The sender's ID. If invalid, the message will not be sent +/// Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. +/// The ID of the player who will receive the message +/// The sender's ID. If invalid, the message will not be sent /// The message that will be sent /// /// /// /// -/// AvoID using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. -native SendPlayerMessageToPlayer(playerID, senderID, const message[]); +/// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. +native SendPlayerMessageToPlayer(playerid, senderid, const message[]); /// Sends a message in the name of a player to all other players on the server. The line will start with the sender's name in their colour, followed by the message in white. -/// The ID of the sender. If invalid, the message will not be sent +/// The ID of the sender. If invalid, the message will not be sent /// The message that will be sent /// /// /// -/// AvoID using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. -native SendPlayerMessageToAll(senderID, const message[]); +/// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. +native SendPlayerMessageToAll(senderid, const message[]); /// Adds a death to the 'killfeed' on the right-hand side of the screen for all players. /// The ID of the killer (can be INVALID_PLAYER_ID) @@ -453,7 +453,7 @@ native SendPlayerMessageToAll(senderID, const message[]); native SendDeathMessage(killer, killee, weapon); /// Adds a death to the 'killfeed' on the right-hand side of the screen for a single player. -/// The ID of the player to send the death message to +/// The ID of the player to send the death message to /// The ID of the killer (can be INVALID_PLAYER_ID) /// The ID of the player that died /// The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) @@ -464,7 +464,7 @@ native SendDeathMessage(killer, killee, weapon); /// 1: The function executed successfully.

      /// 0: The function failed to execute. /// -native SendDeathMessageToPlayer(playerID, killer, killee, weapon); +native SendDeathMessageToPlayer(playerid, killer, killee, weapon); ///

      Shows 'game text' (on-screen text) for a certain length of time for all players. /// The text to be displayed @@ -476,7 +476,7 @@ native SendDeathMessageToPlayer(playerID, killer, killee, weapon); native GameTextForAll(const string[], time, style); /// Shows 'game text' (on-screen text) for a certain length of time for a specific player. -/// The ID of the player to show the gametext for +/// The ID of the player to show the gametext for /// The text to be displayed /// The duration of the text being shown in milliseconds /// The style of text to be displayed @@ -486,7 +486,7 @@ native GameTextForAll(const string[], time, style); /// 1: The function executed successfully. Success is reported when the style and/or time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.

      /// 0: The function failed to execute. This means either the string is null or the player is not connected. /// -native GameTextForPlayer(playerID, const string[], time, style); +native GameTextForPlayer(playerid, const string[], time, style); ///

      Sets a 'timer' to call a function after some time. Can be set to repeat. /// Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server @@ -530,11 +530,11 @@ native SetTimer(const funcname[], interval, repeating); native SetTimerEx(const funcname[], interval, repeating, const format[], {Float,_}:...); /// Kills (stops) a running timer. -/// The ID of the timer to kill (returned by SetTimer or SetTimerEx) +/// The ID of the timer to kill (returned by SetTimer or SetTimerEx) /// /// /// This function always returns 0. -native KillTimer(timerID); +native KillTimer(timerid); /// Returns the uptime of the actual server (not the SA-MP server) in milliseconds. /// @@ -628,25 +628,25 @@ native Float:atan(Float:value); /// The angle in degrees. native Float:atan2(Float:y, Float:x); -/// Gets the highest playerID currently in use on the server. +/// Gets the highest playerid currently in use on the server. /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The highest playerID currently in use on the server or 0 if there are no connected players. +/// The highest playerid currently in use on the server or 0 if there are no connected players. native GetPlayerPoolSize(); -/// Gets the highest vehicleID currently in use on the server. +/// Gets the highest vehicleid currently in use on the server. /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The highest vehicleID currently in use on the server or 0 if there are no created vehicles. +/// The highest vehicleid currently in use on the server or 0 if there are no created vehicles. native GetVehiclePoolSize(); -/// Gets the highest actorID created on the server. +/// Gets the highest actorid created on the server. /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The highest actorID created on the server or 0 if there are no created actors. +/// The highest actorid created on the server or 0 if there are no created actors. native GetActorPoolSize(); // Hash @@ -815,7 +815,7 @@ native SetGameModeText(const string[]); native SetTeamCount(count); /// Adds a class to class selection. Classes are used so players may spawn with a skin of their choice. -/// The skin which the player will spawn with +/// The skin which the player will spawn with /// The x coordinate of the spawnpoint of this class /// The y coordinate of the spawnpoint of this class /// The z coordinate of the spawnpoint of this class @@ -839,11 +839,11 @@ native SetTeamCount(count); /// /// /// -native AddPlayerClass(modelID, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); +native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /// This function is exactly the same as the AddPlayerClass function, with the addition of a team parameter. -/// The team you want the player to spawn in -/// The skin which the player will spawn with +/// The team you want the player to spawn in +/// The skin which the player will spawn with /// The x coordinate of the spawnpoint of this class /// The y coordinate of the spawnpoint of this class /// The z coordinate of the spawnpoint of this class @@ -865,10 +865,10 @@ native AddPlayerClass(modelID, Float:spawnX, Float:spawnY, Float:spawnZ, Float:a /// /// /// -native AddPlayerClassEx(teamID, modelID, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); +native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /// Adds a 'static' vehicle (models are pre-loaded for players) to the gamemode. -/// The Model ID for the vehicle +/// The Model ID for the vehicle /// The x coordinate of the spawnpoint of this vehicle /// The y coordinate of the spawnpoint of this vehicle /// The z coordinate of the spawnpoint of this vehicle @@ -885,10 +885,10 @@ native AddPlayerClassEx(teamID, modelID, Float:spawnX, Float:spawnY, Float:spawn /// /// /// -native AddStaticVehicle(modelID, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2); +native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2); /// Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from AddStaticVehicle in only one way: allows a respawn time to be set for when the vehicle is left unoccupied by the driver. -/// The Model ID for the vehicle +/// The Model ID for the vehicle /// The x coordinate of the spawnpoint of this vehicle /// The y coordinate of the spawnpoint of this vehicle /// The z coordinate of the spawnpoint of this vehicle @@ -907,7 +907,7 @@ native AddStaticVehicle(modelID, Float:spawnX, Float:spawnY, Float:spawnZ, Float /// /// /// -native AddStaticVehicleEx(modelID, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2, respawnDelay, bool:addSiren = false); +native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2, respawnDelay, bool:addSiren = false); /// This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically). /// The model of the pickup @@ -1016,7 +1016,7 @@ native GameModeExit(); native SetWorldTime(hour); /// Get the name of a weapon. -/// The ID of the weapon to get the name of +/// The ID of the weapon to get the name of /// An array to store the weapon's name in, passed by reference /// The maximum length of the weapon name to store. /// @@ -1026,7 +1026,7 @@ native SetWorldTime(hour); /// 1: The function executed successfully.

      /// 0: The function failed to execute. The weapon specified does not exist. /// -native GetWeaponName(weaponID, weapon[], len = sizeof (weapon)); +native GetWeaponName(weaponid, weapon[], len = sizeof (weapon)); /// 1 to enable, 0 to disable tire popping /// This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. @@ -1046,11 +1046,11 @@ native EnableVehicleFriendlyFire(); native AllowInteriorWeapons(allow); ///

      Set the world weather for all players. -/// The weather to set +/// The weather to set /// /// /// If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. -native SetWeather(weatherID); +native SetWeather(weatherid); /// Get the currently set gravity. /// @@ -1153,66 +1153,66 @@ native LimitPlayerMarkerRadius(Float:markerRadius); native ConnectNPC(const name[], const script[]); /// Check if a player is an actual player or an NPC. -/// The ID of the player to check +/// The ID of the player to check /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is an NPC, 0 if not. -native IsPlayerNPC(playerID); +native IsPlayerNPC(playerid); -native AddCharModel(baseID, newID, const dffname[], const txdname[]); -native AddSimpleModel(virtualWorld, baseID, newID, const dffname[], const txdname[]); -native AddSimpleModelTimed(virtualWorld, baseID, newID, const dffname[], const txdname[], timeon, timeoff); +native AddCharModel(baseid, newid, const dffname[], const txdname[]); +native AddSimpleModel(virtualWorld, baseid, newid, const dffname[], const txdname[]); +native AddSimpleModelTimed(virtualWorld, baseid, newid, const dffname[], const txdname[], timeon, timeoff); native FindModelFileNameFromCRC(crc, retstr[], retstr_size = sizeof (retstr)); native FindTextureFileNameFromCRC(crc, retstr[], retstr_size = sizeof (retstr)); -native RedirectDownload(playerID, const url[]); +native RedirectDownload(playerid, const url[]); // Admin /// Check if a player is logged in as an RCON admin. -/// The ID of the player to check +/// The ID of the player to check /// /// /// 1 if the player is an RCON admin, 0 if not. -native IsPlayerAdmin(playerID); +native IsPlayerAdmin(playerid); /// Kicks a player from the server. They will have to quit the game and re-connect if they wish to continue playing. -/// The ID of the player to kick +/// The ID of the player to kick /// /// /// As of SA-MP 0.3x, any action taken directly before Kick() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the kick. /// This function always returns 1, even if the function failed to execute (player specified doesn't exist). -native Kick(playerID); +native Kick(playerid); /// Ban a player who is currently in the server. They will be unable to join the server ever again. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. BanEx can be used to give a reason for the ban. IP bans can be added/removed using the RCON banip and unbanip commands (SendRconCommand). -/// The ID of the player to ban +/// The ID of the player to ban /// /// /// As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. /// -native Ban(playerID); +native Ban(playerid); /// Ban a player with a reason. -/// The ID of the player to ban +/// The ID of the player to ban /// The reason for the ban /// /// /// As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. -native BanEx(playerID, const reason[]); +native BanEx(playerid, const reason[]); /// Sends an RCON (Remote Console) command. /// The RCON command to be executed /// /// /// -/// Does not support login, due to the lack of a 'playerID' parameter. +/// Does not support login, due to the lack of a 'playerid' parameter. /// 'password 0' will remove the server's password if one is set. /// This function always returns 1. /// This function will result in OnRconCommand being called. native SendRconCommand(const command[]); /// Gets a player's network stats and saves them into a string. -/// The ID of the player you want to get the networkstats of +/// The ID of the player you want to get the networkstats of /// The string to store the networkstats in, passed by reference /// The length of the string that should be stored /// @@ -1227,7 +1227,7 @@ native SendRconCommand(const command[]); /// /// This function was added in SA-MP 0.3c R4 and will not work in earlier versions! /// This function may not return accurate data when used under OnPlayerDisconnect if the player has quit normally. It usually returns accurate data if the player has been kicked or has timed out. -native GetPlayerNetworkStats(playerID, output[], size = sizeof (output)); +native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); /// Gets the server's network stats and stores them in a string. /// The string to store the network stats in, passed by reference @@ -1269,16 +1269,16 @@ native GetPlayerNetworkStats(playerID, output[], size = sizeof (output)); native GetNetworkStats(output[], size = sizeof (output)); /// Returns the SA-MP client version, as reported by the player. -/// The ID of the player to get the client version of +/// The ID of the player to get the client version of /// The string to store the player's version in, passed by reference /// The maximum length of the version /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// The string the version gets stored in will be empty if playerID is an NPC. +/// The string the version gets stored in will be empty if playerid is an NPC. /// 1 on success and 0 on failure (if player specified doesn't exist). -native GetPlayerVersion(playerID, version[], len = sizeof (version)); // Returns the SA-MP client revision as reported by the player +native GetPlayerVersion(playerid, version[], len = sizeof (version)); // Returns the SA-MP client revision as reported by the player /// Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. /// The IP to block @@ -1328,7 +1328,7 @@ native GetServerVarAsInt(const cvar[]); /// Type 'varlist' in the server console to display a list of available server variables and their types. /// The value of the specified server variable. 0 if the specified server variable is not a boolean or doesn't exist. native GetServerVarAsBool(const cvar[]); -// These are the same 3 functions as above although they avoID the name ambiguity/conflict with the SVar system. +// These are the same 3 functions as above although they avoid the name ambiguity/conflict with the SVar system. /// Get the string value of a console variable. /// The name of the string variable to get the value of @@ -1367,7 +1367,7 @@ native GetConsoleVarAsBool(const cvar[]); native GetServerTickRate(); /// Gets the amount of time (in milliseconds) that a player has been connected to the server for. -/// The ID of the player to get the connected time of +/// The ID of the player to get the connected time of /// /// /// @@ -1381,10 +1381,10 @@ native GetServerTickRate(); /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// The return value is not reset to zero after changing the game mode (using the RCON command "gmx"). /// This function returns the amount of time (in milliseconds) that a player has been connected to the server for. 0 is returned if the player is not connected. -native NetStats_GetConnectedTime(playerID); +native NetStats_GetConnectedTime(playerid); /// Gets the number of messages the server has received from the player. -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1397,10 +1397,10 @@ native NetStats_GetConnectedTime(playerID); /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This function returns the number of messages the server has received from the player. 0 is returned if the player is not connected. -native NetStats_MessagesReceived(playerID); +native NetStats_MessagesReceived(playerid); /// Gets the amount of data (in bytes) that the server has received from the player. -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1413,10 +1413,10 @@ native NetStats_MessagesReceived(playerID); /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This function returns the number of bytes the server has received from the player. 0 is returned if the player is not connected. -native NetStats_BytesReceived(playerID); +native NetStats_BytesReceived(playerid); /// Gets the number of messages the server has sent to the player. -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1429,10 +1429,10 @@ native NetStats_BytesReceived(playerID); /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// The number of messages the server has sent to the player. -native NetStats_MessagesSent(playerID); +native NetStats_MessagesSent(playerid); /// Gets the amount of data (in bytes) that the server has sent to the player. -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1445,10 +1445,10 @@ native NetStats_MessagesSent(playerID); /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This function returns the number of bytes the server has sent to the player. 0 is returned if the player is not connected. -native NetStats_BytesSent(playerID); +native NetStats_BytesSent(playerid); /// Gets the number of messages the player has received in the last second. -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1461,10 +1461,10 @@ native NetStats_BytesSent(playerID); /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// the number of messages the player has received in the last second. -native NetStats_MessagesRecvPerSecond(playerID); +native NetStats_MessagesRecvPerSecond(playerid); /// Gets the packet loss percentage of a player. Packet loss means data the player is sending to the server is being lost (or vice-versa). -/// The ID of the player to get the data from +/// The ID of the player to get the data from /// /// /// @@ -1480,10 +1480,10 @@ native NetStats_MessagesRecvPerSecond(playerID); /// This function has been found to be currently unreliable the output is not as expected when compared to the client. Therefore this function should not be used as a packet loss kicker. /// A more accurate packetloss function can be found here: http://forum.sa-mp.com/showpost.php?p=2488911&postcount=984 /// The percentage packet loss as a float. 0.0 if player not connected. -native Float:NetStats_PacketLossPercent(playerID); +native Float:NetStats_PacketLossPercent(playerid); /// Gets the player's current connection status. -/// The ID of the player to get the connection status of +/// The ID of the player to get the connection status of /// /// /// @@ -1513,10 +1513,10 @@ native Float:NetStats_PacketLossPercent(playerID); ///
    ///
    /// The player's connection status, as an integer value. -native NetStats_ConnectionStatus(playerID); +native NetStats_ConnectionStatus(playerid); /// Get a player's IP and port. -/// The ID of the player to get the IP and port of +/// The ID of the player to get the IP and port of /// A string array to store the IP and port in, passed by reference /// The maximum length of the IP/port. 22 is recommended /// @@ -1531,7 +1531,7 @@ native NetStats_ConnectionStatus(playerID); /// /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! -native NetStats_GetIpPort(playerID, output[], size = sizeof (output)); +native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); // Menu @@ -1559,17 +1559,17 @@ native NetStats_GetIpPort(playerID, output[], size = sizeof (output)); native Menu:CreateMenu(const title[], columns, Float:x, Float:y, Float:col1width, Float:col2width = 0.0); /// Destroys the specified menu. -/// The menu ID to destroy +/// The menu ID to destroy /// /// /// /// /// /// 1 if the destroying was successful, otherwise 0. -native DestroyMenu(Menu:menuID); +native DestroyMenu(Menu:menuid); /// Adds an item to a specified menu. -/// The menu ID to add an item to +/// The menu ID to add an item to /// The column to add the item to /// The text for the new menu item /// @@ -1587,10 +1587,10 @@ native DestroyMenu(Menu:menuID); /// /// /// -native AddMenuItem(Menu:menuID, column, const menutext[]); +native AddMenuItem(Menu:menuid, column, const menutext[]); /// Sets the caption of a column in a menu. -/// ID of the menu to change +/// ID of the menu to change /// The column (0 or 1) to set the header of /// The caption text for the column /// @@ -1598,11 +1598,11 @@ native AddMenuItem(Menu:menuID, column, const menutext[]); /// /// Crashes when passed an invalid menu ID. /// Note that you can add only 12 items with AddMenuItem. The 13th object of a menu would replace the header of the column which is correctly set with this function. -native SetMenuColumnHeader(Menu:menuID, column, const columnheader[]); +native SetMenuColumnHeader(Menu:menuid, column, const columnheader[]); /// Shows a previously created menu for a player. -/// The ID of the menu to show. Returned by CreateMenu -/// The ID of the player to whom the menu will be shown +/// The ID of the menu to show. Returned by CreateMenu +/// The ID of the player to whom the menu will be shown /// /// /// @@ -1614,11 +1614,11 @@ native SetMenuColumnHeader(Menu:menuID, column, const columnheader[]); /// 1: The function executed successfully.

    /// 0: The function failed to execute. Menu and/or player doesn't exist. /// -native ShowMenuForPlayer(Menu:menuID, playerID); +native ShowMenuForPlayer(Menu:menuid, playerid); ///

    Hides a menu for a player. -/// The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow -/// The ID of the player that the menu will be hidden for +/// The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow +/// The ID of the player that the menu will be hidden for /// /// /// @@ -1627,25 +1627,25 @@ native ShowMenuForPlayer(Menu:menuID, playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. /// -native HideMenuForPlayer(Menu:menuID, playerID); +native HideMenuForPlayer(Menu:menuid, playerid); ///

    Check if a menu ID is vliad. -/// The menu to check for existance +/// The menu to check for existance /// /// /// 1 if the menu is valid, otherwise 0. -native IsValidMenu(Menu:menuID); +native IsValidMenu(Menu:menuid); /// Disable a menu. -/// The ID of the menu to disable +/// The ID of the menu to disable /// /// /// /// Crashes when passed an invalid menu ID. -native DisableMenu(Menu:menuID); +native DisableMenu(Menu:menuid); /// Disable a specific row in a menu for all players. It will be greyed-out and can't be selected by players. -/// The ID of the menu to disable a row of. Ensure this is valid, as an invalid menu ID will crash the entire server +/// The ID of the menu to disable a row of. Ensure this is valid, as an invalid menu ID will crash the entire server /// The ID of the row to disable (rows start at 0) /// /// @@ -1655,10 +1655,10 @@ native DisableMenu(Menu:menuID); /// This function disabled the specified menu row for all players. There is no function to disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, and one without. Or one per player. ///
    /// This function always returns 1, even if the function fails. If an invalid row is specified, nothing will happen. If an invalid menu ID is specified, the server will crash. -native DisableMenuRow(Menu:menuID, row); +native DisableMenuRow(Menu:menuid, row); /// Gets the ID of the menu the player is currently viewing (shown by ShowMenuForPlayer). -/// The ID of the player to get the current menu of +/// The ID of the player to get the current menu of /// /// /// @@ -1668,7 +1668,7 @@ native DisableMenuRow(Menu:menuID, row); /// /// Returns previous menu when none is displayed. /// The ID of the player's currently shown menu, or INVALID_MENU (255) if no menu shown. -native Menu:GetPlayerMenu(playerID); +native Menu:GetPlayerMenu(playerid); /// Creates a textdraw. Textdraws are, as the name implies, text (mainly - there can be boxes, sprites and model previews (skins/vehicles/weapons/objects too) that is drawn on a player's screens. /// The x (left/right) coordinate to create the textdraw at @@ -1802,22 +1802,22 @@ native TextDrawSetProportional(Text:text, set); native TextDrawSetSelectable(Text:text, set); /// Shows a textdraw for a specific player. -/// The ID of the player to show the textdraw for +/// The ID of the player to show the textdraw for /// The ID of the textdraw to show. Returned by TextDrawCreate /// If only a single player will see a textdraw, it might be wise to use player-textdraws instead. This is also useful for textdraws that need to show information specific for an individual player. /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means either the player and/or textdraw specified does not exist. /// -native TextDrawShowForPlayer(playerID, Text:text); +native TextDrawShowForPlayer(playerid, Text:text); ///

    Hides a textdraw for a specific player. -/// The ID of the player that the textdraw should be hidden for +/// The ID of the player that the textdraw should be hidden for /// The ID of the textdraw to hide /// /// /// -native TextDrawHideForPlayer(playerID, Text:text); +native TextDrawHideForPlayer(playerid, Text:text); /// Shows a textdraw for all players. /// The ID of the textdraw to show. Returned by TextDrawCreate @@ -1906,7 +1906,7 @@ native GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy); native GangZoneDestroy(zone); /// Show a gangzone for a player. Must be created with GangZoneCreate first. -/// The ID of the player you would like to show the gangzone for. +/// The ID of the player you would like to show the gangzone for. /// The ID of the gang zone to show for the player. Returned by GangZoneCreate /// The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported /// @@ -1919,7 +1919,7 @@ native GangZoneDestroy(zone); /// /// /// 1 if the gangzone was shown, otherwise 0 (non-existant). -native GangZoneShowForPlayer(playerID, zone, colour); +native GangZoneShowForPlayer(playerid, zone, colour); /// Shows a gangzone with the desired colour to all players. /// The ID of the gangzone to show (returned by GangZoneCreate) @@ -1940,7 +1940,7 @@ native GangZoneShowForPlayer(playerID, zone, colour); native GangZoneShowForAll(zone, colour); /// Hides a gangzone for a player. -/// The ID of the player to hide the gangzone for +/// The ID of the player to hide the gangzone for /// The ID of the zone to hide /// /// @@ -1951,7 +1951,7 @@ native GangZoneShowForAll(zone, colour); /// /// /// -native GangZoneHideForPlayer(playerID, zone); +native GangZoneHideForPlayer(playerid, zone); /// GangZoneHideForAll hides a gangzone from all players. /// The zone to hide @@ -1967,7 +1967,7 @@ native GangZoneHideForPlayer(playerID, zone); native GangZoneHideForAll(zone); /// Makes a gangzone flash for a player. -/// The ID of the player to flash the gangzone for +/// The ID of the player to flash the gangzone for /// The ID of the zone to flash /// The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported /// @@ -1979,7 +1979,7 @@ native GangZoneHideForAll(zone); /// /// /// -native GangZoneFlashForPlayer(playerID, zone, flashColour); +native GangZoneFlashForPlayer(playerid, zone, flashColour); /// GangZoneFlashForAll flashes a gangzone for all players. /// The zone to flash @@ -1996,7 +1996,7 @@ native GangZoneFlashForPlayer(playerID, zone, flashColour); native GangZoneFlashForAll(zone, flashColour); /// Stops a gangzone flashing for a player. -/// The ID of the player to stop the gangzone flashing for +/// The ID of the player to stop the gangzone flashing for /// The ID of the gangzonezone to stop flashing /// /// @@ -2007,7 +2007,7 @@ native GangZoneFlashForAll(zone, flashColour); /// /// /// -native GangZoneStopFlashForPlayer(playerID, zone); +native GangZoneStopFlashForPlayer(playerid, zone); /// Stops a gangzone flashing for all players. /// The ID of the zone to stop flashing. Returned by GangZoneCreate @@ -2055,7 +2055,7 @@ native GangZoneStopFlashForAll(zone); native Text3D:Create3DTextLabel(const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, virtualWorld, bool:testLOS = false); /// Delete a 3D text label (created with Create3DTextLabel). -/// The ID of the 3D text label to delete +/// The ID of the 3D text label to delete /// /// /// @@ -2065,11 +2065,11 @@ native Text3D:Create3DTextLabel(const text[], colour, Float:x, Float:y, Float:z, /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the 3D text label was deleted, otherwise 0. -native Delete3DTextLabel(Text3D:textID); +native Delete3DTextLabel(Text3D:textid); /// Attach a 3D text label to a player. -/// The ID of the 3D text label to attach. Returned by Create3DTextLabel -/// The ID of the player to attach the label to +/// The ID of the 3D text label to attach. Returned by Create3DTextLabel +/// The ID of the player to attach the label to /// The x offset from the player /// The y offset from the player /// The z offset from the player @@ -2085,11 +2085,11 @@ native Delete3DTextLabel(Text3D:textID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player and/or label do not exist. /// -native Attach3DTextLabelToPlayer(Text3D:textID, playerID, Float:offsetX, Float:offsetY, Float:offsetZ); +native Attach3DTextLabelToPlayer(Text3D:textid, playerid, Float:offsetX, Float:offsetY, Float:offsetZ); ///

    Attaches a 3D Text Label to a specific vehicle. -/// The ID of the 3D text label to attach. Returned by Create3DTextLabel -/// The vehicle you want to attach the 3D Text Label to +/// The ID of the 3D text label to attach. Returned by Create3DTextLabel +/// The vehicle you want to attach the 3D Text Label to /// The offset-x coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). /// The offset-y coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). /// The offset-z coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). @@ -2101,10 +2101,10 @@ native Attach3DTextLabelToPlayer(Text3D:textID, playerID, Float:offsetX, Float:o /// /// /// Attach3DTextLabelToPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions! -native Attach3DTextLabelToVehicle(Text3D:textID, vehicleID, Float:offsetX, Float:offsetY, Float:offsetZ); +native Attach3DTextLabelToVehicle(Text3D:textid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ); /// Updates a 3D Text Label text and colour. -/// The 3D Text Label you want to update +/// The 3D Text Label you want to update /// The colour the 3D Text Label should have from now on /// The new text which the 3D Text Label should have from now on /// @@ -2116,12 +2116,12 @@ native Attach3DTextLabelToVehicle(Text3D:textID, vehicleID, Float:offsetX, Float /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// If is empty, the server/clients next to the text might crash! -native Update3DTextLabelText(Text3D:textID, colour, const text[]); +native Update3DTextLabelText(Text3D:textid, colour, const text[]); // Per-player 3D Text Labels /// Creates a 3D Text Label only for a specific player. -/// The player which should see the newly created 3DText Label +/// The player which should see the newly created 3DText Label /// The text to display /// The text colour /// x Coordinate (or offset if attached) @@ -2142,11 +2142,11 @@ native Update3DTextLabelText(Text3D:textID, colour, const text[]); /// If is empty, the server/clients next to the text might crash! /// drawdistance seems to be a lot smaller when spectating. /// The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. -native PlayerText3D:CreatePlayer3DTextLabel(playerID, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayer = INVALID_PLAYER_ID, parentVehicle = INVALID_VEHICLE_ID, bool:testLOS = false); +native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayer = INVALID_PLAYER_ID, parentVehicle = INVALID_VEHICLE_ID, bool:testLOS = false); /// Destroy a 3D text label that was created using CreatePlayer3DTextLabel. -/// The ID of the player whose 3D text label to delete -/// The ID of the player's 3D text label to delete +/// The ID of the player whose 3D text label to delete +/// The ID of the player's 3D text label to delete /// /// /// @@ -2158,11 +2158,11 @@ native PlayerText3D:CreatePlayer3DTextLabel(playerID, const text[], colour, Floa /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the label specified doesn't exist. /// -native DeletePlayer3DTextLabel(playerID, PlayerText3D:textID); +native DeletePlayer3DTextLabel(playerid, PlayerText3D:textid); ///

    Updates a player 3D Text Label's text and colour. -/// The ID of the player for which the 3D Text Label was created -/// The 3D Text Label you want to update +/// The ID of the player for which the 3D Text Label was created +/// The 3D Text Label you want to update /// The colour the 3D Text Label should have from now on /// The new text which the 3D Text Label should have from now on /// @@ -2174,11 +2174,11 @@ native DeletePlayer3DTextLabel(playerID, PlayerText3D:textID); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// If is empty, the server/clients next to the text might crash! -native UpdatePlayer3DTextLabelText(playerID, PlayerText3D:textID, colour, const text[]); +native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const text[]); /// Shows the player a synchronous (only one at a time) dialog box. -/// The ID of the player to show the dialog to -/// An ID to assign this dialog to, so responses can be processed. Max dialogID is 32767. Using negative values will close any open dialog +/// The ID of the player to show the dialog to +/// An ID to assign this dialog to, so responses can be processed. Max dialogid is 32767. Using negative values will close any open dialog /// The style of the dialog /// The title at the top of the dialog. The length of the caption can not exceed more than 64 characters before it starts to cut off /// The text to display in the main dialog. Use \n to start a new line and \t to tabulate @@ -2188,18 +2188,18 @@ native UpdatePlayer3DTextLabelText(playerID, PlayerText3D:textID, colour, const /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// Use colour embedding for multiple colours in the text. -/// Using -1 as dialogID closes all dialogs currently shown on the client's screen. +/// Using -1 as dialogid closes all dialogs currently shown on the client's screen. /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the player is not connected.

    /// -native ShowPlayerDialog(playerID, dialogID, style, const caption[], const info[], const button1[], const button2[]); +native ShowPlayerDialog(playerid, dialogid, style, const caption[], const info[], const button1[], const button2[]); ///

    Get a players unique ID. -/// The player to get the unique ID of +/// The player to get the unique ID of /// Where to save the unique ID /// The size of "serial" -native gpci(playerID, serial[], maxlen); +native gpci(playerid, serial[], maxlen); // -------------------------------------------------- // Forwards (Callback declarations) diff --git a/a_vehicles.inc b/a_vehicles.inc index 0700ecb..e6e994f 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -50,7 +50,7 @@ // Vehicle /// Creates a vehicle in the world. Can be used in place of AddStaticVehicleEx at any time in the script. -/// The model for the vehicle +/// The model for the vehicle /// The x coordinate for the vehicle /// The y coordinate for the vehicle /// The z coordinate for the vehicle @@ -70,10 +70,10 @@ /// The vehicle ID of the vehicle created (1 to MAX_VEHICLES).

    /// INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed). /// -native CreateVehicle(modelID, Float:x, Float:y, Float:z, Float:rotation, colour1, colour2, respawnDelay, bool:addSiren = false); +native CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:rotation, colour1, colour2, respawnDelay, bool:addSiren = false); ///

    Destroy a vehicle. It will disappear instantly. -/// The ID of the vehicle to destroy +/// The ID of the vehicle to destroy /// /// /// @@ -81,11 +81,11 @@ native CreateVehicle(modelID, Float:x, Float:y, Float:z, Float:rotation, colour1 /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle does not exist. /// -native DestroyVehicle(vehicleID); +native DestroyVehicle(vehicleid); ///

    Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) for a player. -/// The ID of the vehicle to check -/// The ID of the player to check +/// The ID of the vehicle to check +/// The ID of the player to check /// /// /// @@ -96,10 +96,10 @@ native DestroyVehicle(vehicleID); /// 0: Vehicle is not streamed in for the player, or the function failed to execute (player and/or vehicle do not exist).

    /// 1: Vehicle is streamed in for the player. /// -native IsVehicleStreamedIn(vehicleID, playerID); +native IsVehicleStreamedIn(vehicleid, playerid); ///

    Gets the position of a vehicle. -/// The ID of the vehicle to get the position of +/// The ID of the vehicle to get the position of /// A float variable in which to store the x coordinate, passed by reference /// A float variable in which to store the y coordinate, passed by reference /// A float variable in which to store the z coordinate, passed by reference @@ -110,10 +110,10 @@ native IsVehicleStreamedIn(vehicleID, playerID); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle specified does not exist. /// -native GetVehiclePos(vehicleID, &Float:x, &Float:y, &Float:z); +native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); ///

    Set a vehicle's position. -/// Vehicle ID that you want set new position +/// Vehicle ID that you want set new position /// The x coordinate to position the vehicle at /// The y coordinate to position the vehicle at /// The z coordinate to position the vehicle at @@ -125,10 +125,10 @@ native GetVehiclePos(vehicleID, &Float:x, &Float:y, &Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle specified does not exist. /// -native SetVehiclePos(vehicleID, Float:x, Float:y, Float:z); +native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); ///

    Get the rotation of a vehicle on the z axis (yaw). -/// The ID of the vehicle to get the z angle of +/// The ID of the vehicle to get the z angle of /// A float variable in which to store the z rotation, passed by reference /// /// @@ -139,10 +139,10 @@ native SetVehiclePos(vehicleID, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle does not exist. /// -native GetVehicleZAngle(vehicleID, &Float:z_angle); +native GetVehicleZAngle(vehicleid, &Float:z_angle); ///

    Returns a vehicle's rotation on all axes as a quaternion. -/// The ID of the vehicle to get the rotation of +/// The ID of the vehicle to get the rotation of /// A float variable in which to store the first quaternion angle, passed by reference /// A float variable in which to store the second quaternion angle, passed by reference /// A float variable in which to store the third quaternion angle, passed by reference @@ -153,9 +153,9 @@ native GetVehicleZAngle(vehicleID, &Float:z_angle); /// To euler:

    /// /// //GetVehicleRotation Created by IllidanS4

    -/// stock GetVehicleRotation(vehicleID,&Float:rx,&Float:ry,&Float:rz){

    +/// stock GetVehicleRotation(vehicleid,&Float:rx,&Float:ry,&Float:rz){

    /// new Float:qw,Float:qx,Float:qy,Float:qz;

    -/// GetVehicleRotationQuat(vehicleID,qw,qx,qy,qz);

    +/// GetVehicleRotationQuat(vehicleid,qw,qx,qy,qz);

    /// rx = asin(2*qy*qz-2*qx*qw);

    /// ry = -atan2(qx*qz+qy*qw,0.5-qx*qx-qy*qy);

    /// rz = -atan2(qx*qy+qz*qw,0.5-qx*qx-qz*qz);

    @@ -168,10 +168,10 @@ native GetVehicleZAngle(vehicleID, &Float:z_angle); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle specified does not exist. /// -native GetVehicleRotationQuat(vehicleID, &Float:w, &Float:x, &Float:y, &Float:z); +native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z); ///

    This function can be used to calculate the distance (as a float) between a vehicle and another map coordinate. This can be useful to detect how far a vehicle away is from a location. -/// The ID of the vehicle to calculate the distance for +/// The ID of the vehicle to calculate the distance for /// The x map coordinate /// The y map coordinate /// The z map coordinate @@ -179,10 +179,10 @@ native GetVehicleRotationQuat(vehicleID, &Float:w, &Float:x, &Float:y, &Float:z) /// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// A float containing the distance from the point specified in the coordinates. -native Float:GetVehicleDistanceFromPoint(vehicleID, Float:x, Float:y, Float:z); +native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); /// Set the z rotation (yaw) of a vehicle. -/// The ID of the vehicle to set the rotation of +/// The ID of the vehicle to set the rotation of /// The z angle to set /// /// @@ -192,11 +192,11 @@ native Float:GetVehicleDistanceFromPoint(vehicleID, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle specified does not exist. /// -native SetVehicleZAngle(vehicleID, Float:angle); +native SetVehicleZAngle(vehicleid, Float:angle); ///

    Set the parameters of a vehicle for a player. /// The ID of the vehicle to set the parameters of -/// The ID of the player to set the vehicle's parameters for +/// The ID of the player to set the vehicle's parameters for /// 0 to disable the objective or 1 to show it. This is a bobbing yellow arrow above the vehicle /// 0 to unlock the doors or 1 to lock them /// @@ -206,7 +206,7 @@ native SetVehicleZAngle(vehicleID, Float:angle); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The player and/or vehicle specified do not exist. /// -native SetVehicleParamsForPlayer(vehicleID, playerID, objective, doors); +native SetVehicleParamsForPlayer(vehicleid, playerid, objective, doors); ///

    Use this function before any player connects (OnGameModeInit) to tell all clients that the script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when players enter/exit vehicles and headlights automatically coming on when it is dark. /// @@ -218,7 +218,7 @@ native SetVehicleParamsForPlayer(vehicleID, playerID, objective, doors); native ManualVehicleEngineAndLights(); /// Sets a vehicle's parameters for all players. -/// The ID of the vehicle to set the parameters of +/// The ID of the vehicle to set the parameters of /// Engine status. 0 - Off, 1 - On /// Light status. 0 - Off, 1 - On /// Vehicle alarm status. If on, the alarm starts. 0 - Off, 1 - On @@ -236,10 +236,10 @@ native ManualVehicleEngineAndLights(); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle does not exist. /// -native SetVehicleParamsEx(vehicleID, engine, lights, alarm, doors, bonnet, boot, objective); +native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); ///

    Gets a vehicle's parameters. -/// The ID of the vehicle to get the parameters from +/// The ID of the vehicle to get the parameters from /// Get the engine status. If 1, the engine is running. /// Get the vehicle's lights' state. If 1 the lights are on /// Get the vehicle's alarm state. If 1 the alarm is (or was) sounding @@ -250,17 +250,17 @@ native SetVehicleParamsEx(vehicleID, engine, lights, alarm, doors, bonnet, boot, /// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset'). -native GetVehicleParamsEx(vehicleID, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective); +native GetVehicleParamsEx(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective); /// Returns a vehicle's siren state (on/off). -/// The ID of the vehicle to get the siren state of +/// The ID of the vehicle to get the siren state of /// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// -1 if unset (off), 0 if off, 1 if on -native GetVehicleParamsSirenState(vehicleID); +native GetVehicleParamsSirenState(vehicleid); /// Allows you to open and close the doors of a vehicle. -/// The ID of the vehicle to set the door state of +/// The ID of the vehicle to set the door state of /// The state of the driver's door. 1 to open, 0 to close /// The state of the passenger door. 1 to open, 0 to close /// The state of the rear left door (if available). 1 to open, 0 to close @@ -270,10 +270,10 @@ native GetVehicleParamsSirenState(vehicleID); /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 is open, 0 is closed -native SetVehicleParamsCarDoors(vehicleID, driver, passenger, rearLeft, rearRight); +native SetVehicleParamsCarDoors(vehicleid, driver, passenger, rearLeft, rearRight); /// Allows you to retrieve the current state of a vehicle's doors. -/// The ID of the vehicle +/// The ID of the vehicle /// The integer to save the state of the driver's door to /// The integer to save the state of the passenger's door to /// The integer to save the state of the rear left door to (if available) @@ -283,10 +283,10 @@ native SetVehicleParamsCarDoors(vehicleID, driver, passenger, rearLeft, rearRigh /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. -native GetVehicleParamsCarDoors(vehicleID, &driver, &passenger, &rearLeft, &rearRight); +native GetVehicleParamsCarDoors(vehicleid, &driver, &passenger, &rearLeft, &rearRight); /// Allows you to open and close the windows of a vehicle. -/// The ID of the vehicle to set the window state of +/// The ID of the vehicle to set the window state of /// The state of the driver's window. 0 to open, 1 to close /// The state of the passenger window. 0 to open, 1 to close /// The state of the rear left window (if available). 0 to open, 1 to close @@ -295,10 +295,10 @@ native GetVehicleParamsCarDoors(vehicleID, &driver, &passenger, &rearLeft, &rear /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -native SetVehicleParamsCarWindows(vehicleID, driver, passenger, rearLeft, rearRight); +native SetVehicleParamsCarWindows(vehicleid, driver, passenger, rearLeft, rearRight); /// Allows you to retrieve the current state of a vehicle's windows. -/// The ID of the vehicle +/// The ID of the vehicle /// The integer to save the state of the drivers window to /// The integer to save the state of the passengers window to /// The integer to save the state of the rear left window to (if available) @@ -309,32 +309,32 @@ native SetVehicleParamsCarWindows(vehicleID, driver, passenger, rearLeft, rearRi /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. /// The vehicle's windows state is stored in the specified variables. -native GetVehicleParamsCarWindows(vehicleID, &driver, &passenger, &rearLeft, &rearRight); +native GetVehicleParamsCarWindows(vehicleid, &driver, &passenger, &rearLeft, &rearRight); /// Sets a vehicle back to the position at where it was created. -/// The ID of the vehicle to respawn +/// The ID of the vehicle to respawn /// /// /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle does not exist. /// -native SetVehicleToRespawn(vehicleID); +native SetVehicleToRespawn(vehicleid); ///

    Links a vehicle to an interior. Vehicles can only be seen by players in the same interior (SetPlayerInterior). -/// The ID of the vehicle to link to an interior -/// The Interior ID to link it to +/// The ID of the vehicle to link to an interior +/// The Interior ID to link it to /// /// /// /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle does not exist.

    /// -native LinkVehicleToInterior(vehicleID, interiorID); +native LinkVehicleToInterior(vehicleid, interiorid); ///

    Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components can be found here. -/// The ID of the vehicle to add the component to. Not to be confused with modelID -/// The ID of the component to add to the vehicle +/// The ID of the vehicle to add the component to. Not to be confused with modelid +/// The ID of the component to add to the vehicle /// ///
      ///
    • 0 - The component was not added because the vehicle does not exist.
    • @@ -347,20 +347,20 @@ native LinkVehicleToInterior(vehicleID, interiorID); /// /// /// -native AddVehicleComponent(vehicleID, componentID); +native AddVehicleComponent(vehicleid, componentid); /// Remove a component from a vehicle. -/// ID of the vehicle -/// ID of the component to remove +/// ID of the vehicle +/// ID of the component to remove /// /// /// /// /// -native RemoveVehicleComponent(vehicleID, componentID); +native RemoveVehicleComponent(vehicleid, componentid); /// Change a vehicle's primary and secondary colours. -/// The ID of the vehicle to change the colours of +/// The ID of the vehicle to change the colours of /// The new vehicle's primary Color ID /// The new vehicle's secondary Color ID /// @@ -370,11 +370,11 @@ native RemoveVehicleComponent(vehicleID, componentID); /// 1: The function executed successfully. The vehicle's colour was successfully changed.

      /// 0: The function failed to execute. The vehicle does not exist. /// -native ChangeVehicleColor(vehicleID, colour1, colour2); +native ChangeVehicleColor(vehicleid, colour1, colour2); ///

      Change a vehicle's paintjob (for plain colours see ChangeVehicleColor). -/// The ID of the vehicle to change the paintjob of -/// The ID of the Paintjob to apply. Use 3 to remove a paintjob +/// The ID of the vehicle to change the paintjob of +/// The ID of the Paintjob to apply. Use 3 to remove a paintjob /// /// /// @@ -383,10 +383,10 @@ native ChangeVehicleColor(vehicleID, colour1, colour2); /// Vehicles change their colour to white anymore when a paintjob is removed. /// /// This function always returns 1 (success), even if the vehicle passed is not created. -native ChangeVehiclePaintjob(vehicleID, paintJobID); +native ChangeVehiclePaintjob(vehicleid, paintJobid); /// Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%). -/// The ID of the vehicle to set the health of +/// The ID of the vehicle to set the health of /// The health, given as a float value /// /// @@ -407,10 +407,10 @@ native ChangeVehiclePaintjob(vehicleID, paintJobID); /// 1: The function executed successfully.

      /// 0: The function failed to execute. This means the vehicle does not exist. /// -native SetVehicleHealth(vehicleID, Float:health); +native SetVehicleHealth(vehicleid, Float:health); ///

      Get the health of a vehicle. -/// The ID of the vehicle to get the health of +/// The ID of the vehicle to get the health of /// A float variable in which to store the vehicle's health, passed by reference /// /// @@ -430,43 +430,43 @@ native SetVehicleHealth(vehicleID, Float:health); /// 1 - success.

      /// 0 - failure (invalid vehicle ID).

      /// -native GetVehicleHealth(vehicleID, &Float:health); +native GetVehicleHealth(vehicleid, &Float:health); ///

      Attach a vehicle to another vehicle as a trailer. -/// The ID of the vehicle that will be pulled -/// The ID of the vehicle that will pull the trailer +/// The ID of the vehicle that will be pulled +/// The ID of the vehicle that will pull the trailer /// /// /// /// This will only work if both vehicles are streamed in for a player (check IsVehicleStreamedIn). /// This function always returns 1, even if neither of the vehicle IDs passed are valid. -native AttachTrailerToVehicle(trailerID, vehicleID); +native AttachTrailerToVehicle(trailerid, vehicleid); /// Detach the connection between a vehicle and its trailer, if any. -/// ID of the pulling vehicle +/// ID of the pulling vehicle /// /// /// -native DetachTrailerFromVehicle(vehicleID); +native DetachTrailerFromVehicle(vehicleid); /// Checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer to get the vehicle ID of the trailer (if any). -/// The ID of the vehicle to check for trailers +/// The ID of the vehicle to check for trailers /// /// /// /// 1 if the vehicle has a trailer attached, 0 if not. -native IsTrailerAttachedToVehicle(vehicleID); +native IsTrailerAttachedToVehicle(vehicleid); /// Get the ID of the trailer attached to a vehicle. -/// The ID of the vehicle to get the trailer of +/// The ID of the vehicle to get the trailer of /// /// /// /// The vehicle ID of the trailer or 0 if no trailer is attached. -native GetVehicleTrailer(vehicleID); +native GetVehicleTrailer(vehicleid); /// Set a vehicle numberplate. -/// The ID of the vehicle to set the number plate of +/// The ID of the vehicle to set the number plate of /// The text that should be displayed on the number plate /// /// @@ -485,19 +485,19 @@ native GetVehicleTrailer(vehicleID); /// 1: The function executed successfully.

      /// 0: The function failed to execute. The vehicle does not exist.

      /// -native SetVehicleNumberPlate(vehicleID, const numberplate[]); +native SetVehicleNumberPlate(vehicleid, const numberplate[]); ///

      Gets the model ID of a vehicle. -/// The ID of the vehicle to get the model of -/// +/// The ID of the vehicle to get the model of +/// /// /// /// /// The vehicle's model ID, or 0 if the vehicle doesn't exist. -native GetVehicleModel(vehicleID); +native GetVehicleModel(vehicleid); /// Retrieves the installed component ID (modshop mod(ification)) on a vehicle in a specific slot. -/// The ID of the vehicle to check for the component +/// The ID of the vehicle to check for the component /// The component slot to check for components (see below) /// /// @@ -533,7 +533,7 @@ native GetVehicleModel(vehicleID); ///
    ///
    /// The ID of the component installed in the specified slot. Returns 0 if no component in specified vehicle's specified slot, or if vehicle doesn't exist. -native GetVehicleComponentInSlot(vehicleID, slot); // There is 1 slot for each CARMODTYPE_* +native GetVehicleComponentInSlot(vehicleid, slot); // There is 1 slot for each CARMODTYPE_* /// Find out what type of component a certain ID is. /// The component ID to check @@ -547,7 +547,7 @@ native GetVehicleComponentInSlot(vehicleID, slot); // There is 1 slot for each C native GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID /// Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.). -/// The ID of the vehicle to repair +/// The ID of the vehicle to repair /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -555,10 +555,10 @@ native GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle specified does not exist. /// -native RepairVehicle(vehicleID); // Repairs the damage model and resets the health +native RepairVehicle(vehicleid); // Repairs the damage model and resets the health ///

    Get the velocity of a vehicle on the x, y and z axes. -/// The ID of the vehicle to get the velocity of +/// The ID of the vehicle to get the velocity of /// A float variable in to which to store the vehicle's x velocity, passed by reference /// A float variable in to which to store the vehicle's y velocity, passed by reference /// A float variable in to which to store the vehicle's z velocity, passed by reference @@ -571,10 +571,10 @@ native RepairVehicle(vehicleID); // Repairs the damage model and resets the heal /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle specified does not exist.

    /// -native GetVehicleVelocity(vehicleID, &Float:x, &Float:y, &Float:z); +native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); ///

    Sets the x, y and z velocity of a vehicle. -/// The ID of the vehicle to set the velocity of +/// The ID of the vehicle to set the velocity of /// The velocity in the x direction /// The velocity in the y direction /// The velocity in the z direction @@ -584,10 +584,10 @@ native GetVehicleVelocity(vehicleID, &Float:x, &Float:y, &Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle does not exist. /// -native SetVehicleVelocity(vehicleID, Float:x, Float:y, Float:z); +native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); ///

    Sets the angular x, y and z velocity of a vehicle. -/// The ID of the vehicle to set the velocity of +/// The ID of the vehicle to set the velocity of /// The amount of velocity in the angular x direction /// The amount of velocity in the angular y direction /// The amount of velocity in the angular z direction @@ -599,10 +599,10 @@ native SetVehicleVelocity(vehicleID, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. The vehicle does not exist. /// -native SetVehicleAngularVelocity(vehicleID, Float:x, Float:y, Float:z); +native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); ///

    Retrieve the damage statuses of a vehicle. -/// The ID of the vehicle to get the damage statuses of +/// The ID of the vehicle to get the damage statuses of /// A variable to store the panel damage data in, passed by reference /// A variable to store the door damage data in, passed by reference /// A variable to store the light damage data in, passed by reference @@ -649,10 +649,10 @@ native SetVehicleAngularVelocity(vehicleID, Float:x, Float:y, Float:z); /// 1: The function executed successfully.

    /// 0: The function failed to execute. This means the vehicle specified does not exist. /// -native GetVehicleDamageStatus(vehicleID, &panels, &doors, &lights, &tires); +native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); ///

    Sets the various visual damage statuses of a vehicle, such as popped tires, broken lights and damaged panels. -/// The ID of the vehicle to set the damage of +/// The ID of the vehicle to set the damage of /// A set of bits containing the panel damage status /// A set of bits containing the door damage status /// A set of bits containing the light damage status @@ -695,7 +695,7 @@ native GetVehicleDamageStatus(vehicleID, &panels, &doors, &lights, &tires); ///
  • only check the right states for bikes
  • /// /// -native UpdateVehicleDamageStatus(vehicleID, panels, doors, lights, tires); +native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); /// Retrieve information about a specific vehicle model such as the size or position of seats. /// The vehicle model to get info of @@ -724,23 +724,23 @@ native GetVehicleModelInfo(vehiclemodel, infotype, &Float:x, &Float:y, &Float:z) // Virtual Worlds /// Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their own virtual world. -/// The ID of vehicle to set the virtual world of -/// The ID of the virtual world to put the vehicle in +/// The ID of vehicle to set the virtual world of +/// The ID of the virtual world to put the vehicle in /// /// -native SetVehicleVirtualWorld(vehicleID, worldID); +native SetVehicleVirtualWorld(vehicleid, worldid); /// Get the virtual world of a vehicle. -/// The ID of the vehicle to get the virtual world of +/// The ID of the vehicle to get the virtual world of /// /// /// The virtual world that the vehicle is in. -native GetVehicleVirtualWorld(vehicleID); +native GetVehicleVirtualWorld(vehicleid); /// Check if a vehicle ID is valid. -/// The ID of the vehicle to check +/// The ID of the vehicle to check /// /// /// true or false. -native bool:IsValidVehicle(vehicleID); +native bool:IsValidVehicle(vehicleid); From e3584e11f283ba952a42dba0d47d528da16bb6e9 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 27 Apr 2021 23:52:54 +0100 Subject: [PATCH 007/104] More tweaks: * Change `

    ` to `
    `. * More `bool:` tags. * Refine more parameter names. --- a_actor.inc | 56 +++--- a_http.inc | 4 +- a_npc.inc | 34 ++-- a_objects.inc | 102 +++++------ a_players.inc | 336 +++++++++++++++++------------------ a_samp.inc | 462 +++++++++++++++++++++++++------------------------ a_sampdb.inc | 4 +- a_vehicles.inc | 119 ++++++------- 8 files changed, 562 insertions(+), 555 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 0716b34..d1da55b 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -43,13 +43,13 @@ /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// -/// Actors are completely separate from NPCs. They do NOT use player IDs/slots on the server and CANNOT be handled like NPCs.

    -/// Actors are limited to 1000 (MAX_ACTORS).

    -/// Actors can be pushed by vehicles, use a timer to put them back at their positions.

    +/// Actors are completely separate from NPCs. They do NOT use player IDs/slots on the server and CANNOT be handled like NPCs.
    +/// Actors are limited to 1000 (MAX_ACTORS).
    +/// Actors can be pushed by vehicles, use a timer to put them back at their positions.
    /// As of 0.3.7 R2 actors default to being invulnerable. /// /// -/// The created Actor ID (start at 0).

    +/// The created Actor ID (start at 0).
    /// INVALID_ACTOR_ID (65535) If the actor limit (1000) is reached. /// native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); @@ -59,31 +59,31 @@ native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// -/// 1: The function executed successfully.

    +/// 1: The function executed successfully.
    /// 0: The function failed to execute. The actor with the ID specified does not exist. /// native DestroyActor(actorid); ///

    Checks if an actor is streamed in for a player. /// The ID of the actor -/// The ID of the player +/// The ID of the player /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 if the actor is streamed in for the player, or 0 if it is not. -native IsActorStreamedIn(actorid, forplayerid); +native bool:IsActorStreamedIn(actorid, playerid); /// Set the virtual world of an actor. Only players in the same world will see the actor. /// The ID of the actor (returned by CreateActor) to set the virtual world of -/// The virtual world to put the actor ID +/// The virtual world to put the actor ID /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// -/// 1: The function executed successfully.

    +/// 1: The function executed successfully.
    /// 0: The function failed to execute. The actor specified does not exist. /// -native SetActorVirtualWorld(actorid, vworld); +native SetActorVirtualWorld(actorid, virtualWorld); ///

    Get the virtual world of an actor. /// The ID of the actor to get the virtual world of @@ -106,7 +106,7 @@ native GetActorVirtualWorld(actorid); /// You must preload the animation library for the player the actor will be applying the animation for, and not for the actor. Otherwise, the animation won't be applied to the actor until the function is executed again. /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// -/// 1: The function executed successfully.

    +/// 1: The function executed successfully.
    /// 0: The function failed to execute. The actor specified does not exist. /// native ApplyActorAnimation(actorid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); @@ -116,7 +116,7 @@ native ApplyActorAnimation(actorid, const animationLibrary[], const animationNam /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// -/// 1: The function executed successfully.

    +/// 1: The function executed successfully.
    /// 0: The function failed to execute. The actor specified does not exist. /// native ClearActorAnimations(actorid); @@ -131,7 +131,7 @@ native ClearActorAnimations(actorid); /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// When creating an actor with CreateActor, you specify it's position. You do not need to use this function unless you want to change its position later. /// -/// 1: The function executed successfully.

    +/// 1: The function executed successfully.
    /// 0: The function failed to execute. The actor specified does not exist. /// native SetActorPos(actorid, Float:x, Float:y, Float:z); @@ -144,43 +144,43 @@ native SetActorPos(actorid, Float:x, Float:y, Float:z); /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// -/// 1: The function executed successfully.

    -/// 0: The function failed to execute. The actor specified does not exist.

    +/// 1: The function executed successfully.
    +/// 0: The function failed to execute. The actor specified does not exist.
    /// native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); ///

    Set the facing angle of an actor. /// The ID of the actor to set the facing angle of. Returned by CreateActor -/// The facing angle to set for the actor +/// The facing angle to set for the actor /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// Players will see actor's facing angle changed only when it is restreamed to them. /// When creating an actor with CreateActor, you specify it's facing angle. You do not need to use this function unless you want to change its facing angle later. /// -/// 1: The function executed successfully.

    +/// 1: The function executed successfully.
    /// 0: The function failed to execute. The actor specified does not exist. /// -native SetActorFacingAngle(actorid, Float:ang); +native SetActorFacingAngle(actorid, Float:angle); ///

    Get the facing angle of an actor. /// The ID of the actor to get the facing angle of. Returned by CreateActor -/// A float variable, passed by reference, in to which the actor's facing angle will be stored +/// A float variable, passed by reference, in to which the actor's facing angle will be stored /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// -/// 1: The function executed successfully.

    +/// 1: The function executed successfully.
    /// 0: The function failed to execute. The actor specified does not exist. /// -native GetActorFacingAngle(actorid, &Float:ang); +native GetActorFacingAngle(actorid, &Float:angle); ///

    Set the health of an actor. /// The ID of the actor to set the health of /// The value to set the actors's health to /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// -/// 1 on success.

    +/// 1 on success.
    /// 0 on failure (i.e. actor is not created). /// native SetActorHealth(actorid, Float:health); @@ -190,8 +190,8 @@ native SetActorHealth(actorid, Float:health); /// A float variable, passed by reference, in to which to store the actor's health /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// -/// 1 - success.

    -/// 0 - failure (i.e. actor is not created).

    +/// 1 - success.
    +/// 0 - failure (i.e. actor is not created).
    /// native GetActorHealth(actorid, &Float:health); @@ -202,10 +202,10 @@ native GetActorHealth(actorid, &Float:health); /// Once set invulnerable, the actor does not call OnPlayerGiveDamageActor. /// Players will have actor's invulnerability state changed only when it is restreamed to them. /// -/// 1 - Success.

    +/// 1 - Success.
    /// 0 - Failure (i.e. Actor is not created). /// -native SetActorInvulnerable(actorid, invulnerable = true); +native SetActorInvulnerable(actorid, bool:invulnerable = true); ///

    Check if an actor is invulnerable. /// The ID of the actor to check @@ -214,11 +214,11 @@ native SetActorInvulnerable(actorid, invulnerable = true); /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 if the actor is invulnerable, 0 otherwise. -native IsActorInvulnerable(actorid); +native bool:IsActorInvulnerable(actorid); /// Checks if an actor ID is valid. /// The ID of the actor to check /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 if the actor is valid, 0 if not. -native IsValidActor(actorid); +native bool:IsValidActor(actorid); diff --git a/a_http.inc b/a_http.inc index 90296e2..9542172 100644 --- a/a_http.inc +++ b/a_http.inc @@ -41,7 +41,7 @@ /// This function was added in SA-MP 0.3b and will not work in earlier versions! /// 1 on success, 0 on failure. /// -/// Request types:

    +/// Request types:
    ///

      ///
    • HTTP_GET
    • ///
    • HTTP_POST
    • @@ -49,7 +49,7 @@ ///
    ///
    /// -/// Response codes:

    +/// Response codes:
    ///

      ///
    • HTTP_ERROR_BAD_HOST
    • ///
    • HTTP_ERROR_NO_SOCKET
    • diff --git a/a_npc.inc b/a_npc.inc index 7d2d867..749d741 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -254,7 +254,7 @@ open.mp releases can use `A` as the first digit. /// The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. /// This function doesn't support packed strings. /// - /// Format Specifiers:

      + /// Format Specifiers:
      ///

        ///
      • %i - integer (whole number)
      • ///
      • %d - integer (whole number).
      • @@ -269,7 +269,7 @@ open.mp releases can use `A` as the first digit. /// /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) - native printf(const format[], {Float,_}:...); + native printf(const format[], {Float, _}:...); #endif /// Formats a string to include variables and other strings inside it. @@ -281,7 +281,7 @@ open.mp releases can use `A` as the first digit. /// /// This function doesn't support packed strings. /// -/// Format Specifiers:

        +/// Format Specifiers:
        ///

          ///
        • %i - integer (whole number)
        • ///
        • %d - integer (whole number).
        • @@ -296,10 +296,10 @@ open.mp releases can use `A` as the first digit. /// /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) -native format(output[], len = sizeof (output), const format[], {Float,_}:...); +native format(output[], len = sizeof (output), const format[], {Float, _}:...); /// Sets a 'timer' to call a function after some time. Can be set to repeat. -/// Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server +/// Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server /// Interval in milliseconds /// Whether the timer should repeat or not /// @@ -309,7 +309,7 @@ native format(output[], len = sizeof (output), const format[], {Float,_}:...); /// The function that should be called must be public. /// The use of many timers will result in increased memory/cpu usage. /// The ID of the timer that was started. Timer IDs start at 1. -native SetTimer(const funcname[], interval, repeating); +native SetTimer(const functionName[], interval, repeating); /// Kills (stops) a running timer. /// The ID of the timer to kill (returned by SetTimer or SetTimerEx) @@ -353,16 +353,16 @@ native Float:atan(Float:value); native Float:atan2(Float:y, Float:x); /// This will send a player text by the bot, just like using SendPlayerMessageToAll, but this function is to be used inside the NPC scripts. -/// The text to be sent by the NPC +/// The text to be sent by the NPC /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! -native SendChat(const msg[]); +native SendChat(const message[]); /// This will force the NPC to write a desired command, and this way, getting the effects it would produce. -/// The command text to be sent by the NPC +/// The command text to be sent by the NPC /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! -native SendCommand(const commandtext[]); +native SendCommand(const command[]); /// Get a player's current state. /// The ID of the player to get the current state of @@ -370,7 +370,7 @@ native SendCommand(const commandtext[]); /// /// /// -/// States:

          +/// States:
          ///

            ///
          • PLAYER_STATE_NONE - empty (while initializing)
          • ///
          • PLAYER_STATE_ONFOOT - player is on foot
          • @@ -425,14 +425,14 @@ native GetPlayerSpecialAction(playerid); /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is streamed in, 0 if not. -native IsPlayerStreamedIn(playerid); +native bool:IsPlayerStreamedIn(playerid); /// Checks if a vehicle is streamed in for an NPC. Only nearby vehicles are streamed in. /// The ID of the vehicle to check /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the vehicle is streamed in, 0 if not. -native IsVehicleStreamedIn(vehicleid); +native bool:IsVehicleStreamedIn(vehicleid); /// Check which keys a player is pressing. /// The ID of the player to get the keys of @@ -505,7 +505,7 @@ native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is in range, 0 if not. -native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); +native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); /// Get a player's name. /// The ID of the player to get the name of @@ -527,14 +527,14 @@ native GetPlayerName(playerid, name[], len = sizeof (name)); /// /// This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. /// 1 if the player is connected, 0 if not. -native IsPlayerConnected(playerid); +native bool:IsPlayerConnected(playerid); /// This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. /// The type of recording to be loaded -/// The filename to be loaded, without the .rec extension +/// The filename to be loaded, without the .rec extension /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! -native StartRecordingPlayback(playbacktype, const recordname[]); +native StartRecordingPlayback(playbacktype, const recordFike[]); /// This will stop the current .rec file which is being ran by the NPC, making it stay idle until some other order is given. /// diff --git a/a_objects.inc b/a_objects.inc index 2c79146..d157bf7 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -44,9 +44,9 @@ /// The x coordinate to create the object at /// The y coordinate to create the object at /// The z coordinate to create the object at -/// The x rotation of the object -/// The y rotation of the object -/// The z rotation of the object +/// The x rotation of the object +/// The y rotation of the object +/// The z rotation of the object /// The distance that San Andreas renders objects at. 0.0 will cause objects to render at their default distances. Usable since 0.3b, limited to 300 prior to 0.3x (optional=0.0) /// /// @@ -66,7 +66,7 @@ /// In case the light is attached to another object, one fix for this is to set SyncRotation to false in AttachObjectToObject. This will ensure the light stays at 0 rotation. This would only really work for objects that consist ONLY of light, so wouldn't work for the police light for example. /// There is a limit of 1000 objects (MAX_OBJECTS). To circumvent this limit, you can use a streamer /// The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. -native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); +native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, Float:rotZ, Float:drawDistance = 0.0); /// Attach an object to a vehicle. /// The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first @@ -107,7 +107,7 @@ native AttachObjectToVehicle(objectid, vehicleid, Float:offsetX, Float:offsetY, ///
          ///
          /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. /// native AttachObjectToObject(objectid, attachtoid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); @@ -151,7 +151,7 @@ native SetObjectPos(objectid, Float:x, Float:y, Float:z); /// /// /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. The specified object does not exist. /// native GetObjectPos(objectid, &Float:x, &Float:y, &Float:z); @@ -195,7 +195,7 @@ native GetObjectModel(objectid); /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. The object specified does not exist. /// native SetObjectNoCameraCol(objectid); @@ -207,7 +207,7 @@ native SetObjectNoCameraCol(objectid); /// /// This is to check if an object exists, not if a model is valid. /// 1 if the object exists, 0 if not. -native IsValidObject(objectid); +native bool:IsValidObject(objectid); ///

          Destroys (removes) an object that was created using CreateObject. /// The ID of the object to destroy. Returned by CreateObject @@ -253,7 +253,7 @@ native StopObject(objectid); /// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// 1 if the object is moving, 0 if not. -native IsObjectMoving(objectid); +native bool:IsObjectMoving(objectid); /// Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical User Interface). /// The ID of the player that should edit the object @@ -265,7 +265,7 @@ native IsObjectMoving(objectid); /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. /// -/// 1: The function executed successfully. Success is reported when a non-existent object is specified, but nothing will happen.

          +/// 1: The function executed successfully. Success is reported when a non-existent object is specified, but nothing will happen.
          /// 0: The function failed to execute. The player is not connected. /// native EditObject(playerid, objectid); @@ -280,7 +280,7 @@ native EditObject(playerid, objectid); /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. Player or object not valid. /// native EditPlayerObject(playerid, objectid); @@ -310,9 +310,9 @@ native CancelEdit(playerid); /// The x coordinate to create the object at /// The y coordinate to create the object at /// The z coordinate to create the object at -/// The x rotation of the object -/// The y rotation of the object -/// The z rotation of the object +/// The x rotation of the object +/// The y rotation of the object +/// The z rotation of the object /// The distance from which objects will appear to players. 0.0 will cause an object to render at its default distance. Leaving this parameter out will cause objects to be rendered at their default distance. The maximum usable distance is 300 in versions prior to 0.3x, in which drawdistance can be unlimited (optional=0.0) /// /// @@ -327,7 +327,7 @@ native CancelEdit(playerid); /// /// The 'DrawDistance' parameter was added in 0.3b. It must be left out in scripts for older versions of SA:MP. /// The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. -native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ, Float:drawDistance = 0.0); +native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, Float:rotZ, Float:drawDistance = 0.0); ///

          Attach a player object to a vehicle. /// The ID of the player the object was created for @@ -357,7 +357,7 @@ native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:offsetX, /// /// /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. Player and/or object do not exist. /// native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); @@ -374,8 +374,8 @@ native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); /// /// /// -/// 1: The function executed successfully.

          -/// 0: The function failed to execute. The player and/or the object don't exist.

          +/// 1: The function executed successfully.
          +/// 0: The function failed to execute. The player and/or the object don't exist.
          /// The object's position is stored in the specified variables. /// native GetPlayerObjectPos(playerid, objectid, &Float:x, &Float:y, &Float:z); @@ -392,7 +392,7 @@ native GetPlayerObjectPos(playerid, objectid, &Float:x, &Float:y, &Float:z); /// /// To smoothly rotate an object, see MovePlayerObject. /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. /// native SetPlayerObjectRot(playerid, objectid, Float:rotX, Float:rotY, Float:rotZ); @@ -436,7 +436,7 @@ native SetPlayerObjectNoCameraCol(playerid, objectid); /// /// /// 1 if the object exists, 0 if not. -native IsValidPlayerObject(playerid, objectid); +native bool:IsValidPlayerObject(playerid, objectid); ///

          Destroy a player-object created using CreatePlayerObject. /// The ID of the player whose player-object to destroy @@ -485,73 +485,73 @@ native StopPlayerObject(playerid, objectid); /// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// 1 if the player object is moving, 0 if not. -native IsPlayerObjectMoving(playerid, objectid); +native bool:IsPlayerObjectMoving(playerid, objectid); /// The same as AttachObjectToPlayer but for objects which were created for player. -/// The ID of the player which is linked with the object +/// The ID of the player which is linked with the object /// The objectid you want to attach to the player -/// The ID of the player you want to attach to the object +/// The ID of the player you want to attach to the object /// The distance between the player and the object in the x direction /// The distance between the player and the object in the y direction /// The distance between the player and the object in the z direction -/// The x rotation -/// The y rotation -/// The z rotation +/// The x rotation +/// The y rotation +/// The z rotation /// /// /// /// /// This function was removed in SA-MP 0.3. -native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rX, Float:rY, Float:rZ); +native AttachPlayerObjectToPlayer(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// Replace the texture of an object with the texture from another model in the game. /// The ID of the object to change the texture of -/// The material index on the object to change (0 to 15) +/// The material index on the object to change (0 to 15) /// The modelid on which the replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the texture -/// The name of the txd file which contains the replacement texture (use "none" if not required) -/// The name of the texture to use as the replacement (use "none" if not required) +/// The name of the txd file which contains the replacement texture (use "none" if not required) +/// The name of the texture to use as the replacement (use "none" if not required) /// The object colour to set, as an integer or hex in ARGB colour format. Using 0 keeps the existing material colour (optional=0) /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Vertex lightning of the object will disappear if material colour is changed. /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. /// -native SetObjectMaterial(objectid, materialindex, modelid, const txdname[], const texturename[], materialColour = 0); +native SetObjectMaterial(objectid, materialIndex, modelid, const textureLibrary[], const textureName[], materialColour = 0); ///

          Replace the texture of a player-object with the texture from another model in the game. /// The ID of the player the object is associated to /// The ID of the object to replace the texture of -/// The material index on the object to change (0 to 15) +/// The material index on the object to change (0 to 15) /// The modelid on which replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the existing texture -/// The name of the txd file which contains the replacement texture (use "none" if not required) -/// The name of the texture to use as the replacement (use "none" if not required) +/// The name of the txd file which contains the replacement texture (use "none" if not required) +/// The name of the texture to use as the replacement (use "none" if not required) /// The object colour to set (ARGB). Using 0 keeps the existing material colour (optional=0) /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Vertex lightning of the object will disappear if material colour is changed. -native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, const txdname[], const texturename[], materialColour = 0); +native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const textureLibrary[], const textureName[], materialColour = 0); /// Replace the texture of an object with text. /// The ID of the object to replace the texture of with text /// The text to show on the object. (MAX 2048 characters) -/// The object's material index to replace with text (optional=0) -/// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) +/// The object's material index to replace with text (optional=0) +/// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) /// The font to use (optional="Arial") /// The size of the text (MAX 255) (optional=24) /// Bold text. Set to 1 for bold, 0 for not (optional=1) /// The colour of the text, in ARGB format (optional=-1) -/// The background colour, in ARGB format (optional=0) -/// The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) +/// The background colour, in ARGB format (optional=0) +/// The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Color embedding can be used for multiple colours in the text. /// -/// Alignment:

          +/// Alignment:
          ///

            ///
          • OBJECT_MATERIAL_TEXT_ALIGN_LEFT 0
          • ///
          • OBJECT_MATERIAL_TEXT_ALIGN_CENTER 1
          • @@ -559,7 +559,7 @@ native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, const ///
          ///
          /// -/// Sizes:

          +/// Sizes:
          ///

            ///
          • OBJECT_MATERIAL_SIZE_32x32 10
          • ///
          • OBJECT_MATERIAL_SIZE_64x32 20
          • @@ -578,29 +578,29 @@ native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, const ///
          ///
          /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. /// -native SetObjectMaterialText(objectid, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backColour = 0, textalignment = 0); +native SetObjectMaterialText(objectid, const text[], materialIndex = 0, materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, textAlignment = 0); ///

          Replace the texture of a player object with text. /// The ID of the player whose player object to set the text of /// The ID of the object on which to place the text /// The text to set -/// The material index to replace with text (optional=0) -/// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) +/// The material index to replace with text (optional=0) +/// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) /// The font to use (optional="Arial") /// The size of the text (MAX 255) (optional=24) /// Bold text. Set to 1 for bold, 0 for not (optional=1) /// The colour of the text (optional=-1) -/// The background colour (optional=0) -/// The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) +/// The background colour (optional=0) +/// The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Color embedding can be used for multiple colours in the text. /// -/// Alignment:

          +/// Alignment:
          ///

            ///
          • OBJECT_MATERIAL_TEXT_ALIGN_LEFT 0
          • ///
          • OBJECT_MATERIAL_TEXT_ALIGN_CENTER 1
          • @@ -608,7 +608,7 @@ native SetObjectMaterialText(objectid, const text[], materialindex = 0, material ///
          ///
          /// -/// Sizes:

          +/// Sizes:
          ///

            ///
          • OBJECT_MATERIAL_SIZE_32x32 10
          • ///
          • OBJECT_MATERIAL_SIZE_64x32 20
          • @@ -626,7 +626,7 @@ native SetObjectMaterialText(objectid, const text[], materialindex = 0, material ///
          • OBJECT_MATERIAL_SIZE_512x512 140
          • ///
          ///
          -native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backColour = 0, textalignment = 0); +native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialIndex = 0, materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, textAlignment = 0); /// Allows camera collisions with newly created objects to be disabled by default. /// 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) diff --git a/a_players.inc b/a_players.inc index fdc0259..d8cfb3b 100644 --- a/a_players.inc +++ b/a_players.inc @@ -104,15 +104,15 @@ /// The z-coordinate of the player's spawn position /// The direction in which the player needs to be facing after spawning /// The first spawn-weapon for the player -/// The amount of ammunition for the primary spawnweapon +/// The amount of ammunition for the primary spawnweapon /// The second spawn-weapon for the player -/// The amount of ammunition for the second spawnweapon +/// The amount of ammunition for the second spawnweapon /// The third spawn-weapon for the player -/// The amount of ammunition for the third spawnweapon +/// The amount of ammunition for the third spawnweapon /// /// /// -native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); +native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /// (Re)Spawns a player. /// The ID of the player to spawn @@ -121,7 +121,7 @@ native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotat /// /// Kills the player if they are in a vehicle and then they spawn with a bottle in their hand. /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. This means the player is not connected. /// native SpawnPlayer(playerid); @@ -140,7 +140,7 @@ native SpawnPlayer(playerid); /// /// Using this function on a player in a vehicle will instantly remove them from the vehicle. Useful for quickly ejecting players. /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. This means the player specified does not exist. /// native SetPlayerPos(playerid, Float:x, Float:y, Float:z); @@ -154,7 +154,7 @@ native SetPlayerPos(playerid, Float:x, Float:y, Float:z); /// /// This function does not work if the new coordinates are far away from where the player currently is. The z height will be 0, which will likely put them underground. It is highly recommended that the MapAndreas plugin be used instead. /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. This means the player specified does not exist. /// native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); @@ -179,7 +179,7 @@ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /// /// Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. The player specified does not exist. /// native SetPlayerFacingAngle(playerid, Float:ang); @@ -204,7 +204,7 @@ native GetPlayerFacingAngle(playerid, &Float:ang); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is in range, 0 if not. -native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); +native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); ///

          Calculate the distance between a player and a map coordinate. /// The ID of the player to calculate the distance from @@ -219,8 +219,8 @@ native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); /// Checks if a player is streamed in another player's client. -/// The ID of the player to check is streamed in -/// The ID of the player to check if playerid is streamed in for +/// The ID of the player to check is streamed in +/// The ID of the player to check if playerid is streamed in for /// /// /// @@ -228,10 +228,10 @@ native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// Players aren't streamed in on their own client, so if playerid is the same as forplayerid it will return false! +/// Players aren't streamed in on their own client, so if playerid is the same as targetid it will return false! /// Players stream out if they are more than 150 meters away (see server.cfg - stream_distance) /// 1 if the player is streamed in, 0 if not. -native IsPlayerStreamedIn(playerid, forplayerid); +native bool:IsPlayerStreamedIn(targetid, playerid); /// Set a player's interior. A list of currently known interiors and their positions can be found here. /// The ID of the player to set the interior of @@ -240,7 +240,7 @@ native IsPlayerStreamedIn(playerid, forplayerid); /// /// /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. This means the player is not connected. /// native SetPlayerInterior(playerid, interiorid); @@ -263,7 +263,7 @@ native GetPlayerInterior(playerid); /// If a player's health is set to 0 or a minus value, they will die instantly. /// If a player's health is below 10 or above 98303, their health bar will flash. /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. This means the player specified does not exist. /// native SetPlayerHealth(playerid, Float:health); @@ -275,12 +275,12 @@ native SetPlayerHealth(playerid, Float:health); /// /// /// -/// Even though the health can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc.

          +/// Even though the health can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc.
          /// Health is obtained rounded to integers: set 50.15, but get 50.0 /// /// -/// 1 - success.

          -/// 0 - failure (i.e. player not connected).

          +/// 1 - success.
          +/// 0 - failure (i.e. player not connected).
          /// native GetPlayerHealth(playerid, &Float:health); @@ -293,7 +293,7 @@ native GetPlayerHealth(playerid, &Float:health); /// Armour is obtained rounded to integers: set 50.15, but get 50.0 /// The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. /// -/// 1: The function executed successfully.

          +/// 1: The function executed successfully.
          /// 0: The function failed to execute. This means the player specified does not exist. /// native SetPlayerArmour(playerid, Float:armour); @@ -308,8 +308,8 @@ native SetPlayerArmour(playerid, Float:armour); /// Armour is obtained rounded to integers: set 50.15, but get 50.0 /// The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. /// -/// 1 - success.

          -/// 0 - failure (i.e. player not connected).

          +/// 1 - success.
          +/// 0 - failure (i.e. player not connected).
          /// native GetPlayerArmour(playerid, &Float:armour); @@ -322,8 +322,8 @@ native GetPlayerArmour(playerid, &Float:armour); /// /// Set the ammo to 0 to remove a weapon from a player's inventory. Note that the weapon will still show up in GetPlayerWeaponData, albeit with 0 ammo. /// -/// 1: The function executed successfully. Success is also returned when the weapon slot specified is invalid (not 0-12).

          -/// 0: The function failed to execute. The player isn't connected.

          +/// 1: The function executed successfully. Success is also returned when the weapon slot specified is invalid (not 0-12).
          +/// 0: The function failed to execute. The player isn't connected.
          /// native SetPlayerAmmo(playerid, weaponslot, ammo); @@ -340,7 +340,7 @@ native GetPlayerAmmo(playerid); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// Weapon states:

          +/// Weapon states:
          ///

            ///
          • WEAPONSTATE_UNKNOWN - unknown (Set when in a vehicle)
          • ///
          • WEAPONSTATE_NO_BULLETS - The weapon has no remaining ammo
          • @@ -389,8 +389,8 @@ native SetPlayerTeam(playerid, teamid); /// /// /// -/// 0-254: The player's team. (0 is a valid team).

            -/// 255: Defined as NO_TEAM. The player is not on any team.

            +/// 0-254: The player's team. (0 is a valid team).
            +/// 255: Defined as NO_TEAM. The player is not on any team.
            /// -1: The function failed to execute. Player is not connected. /// native GetPlayerTeam(playerid); @@ -400,7 +400,7 @@ native GetPlayerTeam(playerid); /// The value to set the player's score to /// /// -/// 1: The function executed successfully.

            +/// 1: The function executed successfully.
            /// 0: The function failed to execute. This means the player specified does not exist. /// native SetPlayerScore(playerid, score); @@ -427,14 +427,14 @@ native GetPlayerDrunkLevel(playerid); /// The level of drunkenness to set /// /// -/// Players' drunk level will automatically decrease over time, based on their FPS (players with 50 FPS will lose 50 'levels' per second. This is useful for determining a player's FPS!).

            -/// In 0.3a the drunk level will decrement and stop at 2000. In 0.3b+ the drunk level decrements to 0)

            -/// Levels over 2000 make the player drunk (camera swaying and vehicles difficult to control).

            -/// Max drunk level is 50000.

            +/// Players' drunk level will automatically decrease over time, based on their FPS (players with 50 FPS will lose 50 'levels' per second. This is useful for determining a player's FPS!).
            +/// In 0.3a the drunk level will decrement and stop at 2000. In 0.3b+ the drunk level decrements to 0)
            +/// Levels over 2000 make the player drunk (camera swaying and vehicles difficult to control).
            +/// Max drunk level is 50000.
            /// While the drunk level is above 5000, the player's HUD (radar etc.) will be hidden. /// /// -/// 1: The function executed successfully.

            +/// 1: The function executed successfully.
            /// 0: The function failed to execute. This means the player is not connected. /// native SetPlayerDrunkLevel(playerid, level); @@ -466,8 +466,8 @@ native GetPlayerColor(playerid); /// Setting a player's skin when he is dead may crash players around him. /// Note that 'success' is reported even when skin ID is invalid (not 0-311, or 74), but the skin will be set to ID 0 (CJ). /// -/// 1: The function executed successfully.

            -/// 0: The function failed to execute. This means the player specified does not exist.

            +/// 1: The function executed successfully.
            +/// 0: The function failed to execute. This means the player specified does not exist.
            /// native SetPlayerSkin(playerid, skinid); @@ -488,8 +488,8 @@ native GetPlayerCustomSkin(playerid); /// /// /// -/// 1: The function executed successfully.

            -/// 0: The function failed to execute. This means the player is not connected.

            +/// 1: The function executed successfully.
            +/// 0: The function failed to execute. This means the player is not connected.
            /// native GivePlayerWeapon(playerid, weaponid, ammo); @@ -499,7 +499,7 @@ native GivePlayerWeapon(playerid, weaponid, ammo); /// /// To remove individual weapons from a player, set their ammo to 0 using SetPlayerAmmo. /// -/// 1: The function executed successfully.

            +/// 1: The function executed successfully.
            /// 0: The function failed to execute. This means the player specified does not exist. /// native ResetPlayerWeapons(playerid); @@ -512,7 +512,7 @@ native ResetPlayerWeapons(playerid); /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// This function arms a player with a weapon they already have; it does not give them a new weapon. See GivePlayerWeapon. /// -/// 1: The function executed successfully. Success is returned even when the function fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).

            +/// 1: The function executed successfully. Success is returned even when the function fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).
            /// 0: The function failed to execute. The player is not connected. /// native SetPlayerArmedWeapon(playerid, weaponid); @@ -526,7 +526,7 @@ native SetPlayerArmedWeapon(playerid, weaponid); /// /// Old weapons with no ammo left are still returned. /// -/// 1: The function executed successfully.

            +/// 1: The function executed successfully.
            /// 0: The function failed to execute. The player isn't connected and/or the weapon slot specified is invalid (valid is 0-12). /// native GetPlayerWeaponData(playerid, slot, &weapons, &ammo); @@ -537,7 +537,7 @@ native GetPlayerWeaponData(playerid, slot, &weapons, &ammo); /// /// /// -/// 1: The function executed successfully.

            +/// 1: The function executed successfully.
            /// 0: The function failed to execute. This means the player is not connected. /// native GivePlayerMoney(playerid, money); @@ -547,7 +547,7 @@ native GivePlayerMoney(playerid, money); /// /// /// -/// 1: The function executed successfully.

            +/// 1: The function executed successfully.
            /// 0: The function failed to execute. This means the player is not connected. /// native ResetPlayerMoney(playerid); @@ -561,8 +561,8 @@ native ResetPlayerMoney(playerid); /// Passing a null string as the new name will crash the server. /// Player names can be up to 24 characters when using this function, but when joining the server from the SA-MP server browser, players' names must be no more than 20 and less than 3 characters (the server will deny entry). This allows for 4 characters extra when using SetPlayerName. /// -/// 1 The name was changed successfully.

            -/// 0 The player already has that name.

            +/// 1 The name was changed successfully.
            +/// 0 The player already has that name.
            /// -1 The name can not be changed (it's already in use, too long or has invalid characters). /// native SetPlayerName(playerid, const name[]); @@ -580,7 +580,7 @@ native GetPlayerMoney(playerid); /// /// /// -/// States:

            +/// States:
            ///

              ///
            • PLAYER_STATE_NONE - empty (while initializing)
            • ///
            • PLAYER_STATE_ONFOOT - player is on foot
            • @@ -663,7 +663,7 @@ native GetPlayerName(playerid, name[], len = sizeof (name)); /// /// Using this function under OnPlayerConnect doesn't work. /// -/// 1: The function executed successfully.

              +/// 1: The function executed successfully.
              /// 0: The function failed to execute. The player specified does not exist. /// native SetPlayerTime(playerid, hour, minute); @@ -676,8 +676,8 @@ native SetPlayerTime(playerid, hour, minute); /// /// /// -/// 1: The function executed successfully.

              -/// 0: The function failed to execute. The player specified does not exist.

              +/// 1: The function executed successfully.
              +/// 0: The function failed to execute. The player specified does not exist.
              /// native GetPlayerTime(playerid, &hour, &minute); @@ -687,10 +687,10 @@ native GetPlayerTime(playerid, &hour, &minute); /// Time is not synced with other players! Time can be synced using SetPlayerTime. /// Time will automatically advance 6 hours when the player dies. /// -/// 1: The function executed successfully.

              +/// 1: The function executed successfully.
              /// 0: The function failed to execute. The specified player does not exist. /// -native TogglePlayerClock(playerid, toggle); +native TogglePlayerClock(playerid, bool:toggle); ///

              Set a player's weather. /// The ID of the player whose weather to set @@ -715,7 +715,7 @@ native ForceClassSelection(playerid); /// /// /// -/// 1: The function executed successfully.

              +/// 1: The function executed successfully.
              /// 0: The function failed to execute. The player specified does not exist. /// native SetPlayerWantedLevel(playerid, level); @@ -734,7 +734,7 @@ native GetPlayerWantedLevel(playerid); /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// This does not affect normal fist attacks - only special/secondary attacks (aim + press 'secondary attack' key). /// -/// Fighting styles:

              +/// Fighting styles:
              ///

                ///
              • FIGHT_STYLE_NORMAL
              • ///
              • FIGHT_STYLE_BOXING
              • @@ -751,7 +751,7 @@ native SetPlayerFightingStyle(playerid, style); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// Fighting styles:

                +/// Fighting styles:
                ///

                  ///
                • FIGHT_STYLE_NORMAL
                • ///
                • FIGHT_STYLE_BOXING
                • @@ -774,7 +774,7 @@ native GetPlayerFightingStyle(playerid); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// 1: The function executed successfully.

                  +/// 1: The function executed successfully.
                  /// 0: The function failed to execute. This means the player is not connected. /// native SetPlayerVelocity(playerid, Float:x, Float:y, Float:z); @@ -797,7 +797,7 @@ native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// Crime list:

                  +/// Crime list:
                  ///

                    ///
                  • 3 10-71 Advise nature of fire (size, type, contents of building)
                  • ///
                  • 4 10-47 Emergency road repairs needed
                  • @@ -834,7 +834,7 @@ native PlayCrimeReportForPlayer(playerid, suspectid, crime); /// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// -/// 1: The function executed successfully.

                    +/// 1: The function executed successfully.
                    /// 0: The function failed to execute. The player specified does not exist. /// native PlayAudioStreamForPlayer(playerid, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, bool:usepos = false); @@ -854,7 +854,7 @@ native StopAudioStreamForPlayer(playerid); /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// This function does not support casino scripts. /// -/// Shop names:

                    +/// Shop names:
                    ///

                      ///
                    • "FDPIZA" Pizza Stack
                    • ///
                    • "FDBURG" Burger Shot
                    • @@ -876,7 +876,7 @@ native SetPlayerShopName(playerid, const shopname[]); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// Weapon skills:

                      +/// Weapon skills:
                      ///

                        ///
                      • WEAPONSKILL_PISTOL(0)
                      • ///
                      • WEAPONSKILL_PISTOL_SILENCED(1)
                      • @@ -938,8 +938,8 @@ native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, /// This function will only work when lag compensation is enabled. /// If the player hit nothing, the hit positions will be 0. This means you can't currently calculate how far a bullet travels through open air. /// -/// 1: The function executed successfully.

                        -/// 0: The function failed to execute. The player specified does not exist.

                        +/// 1: The function executed successfully.
                        +/// 0: The function failed to execute. The player specified does not exist.
                        /// native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float:originZ, &Float:hitPosX, &Float:hitPosY, &Float:hitPosZ); @@ -971,7 +971,7 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float /// In version 0.3d and onwards, 10 objects can be attached to a single player (index 0-9). In earlier versions, the limit is 5 (index 0-4). /// This function is separate from the CreateObject / CreatePlayerObject pools. /// -/// Bone IDs:

                        +/// Bone IDs:
                        ///

                          ///
                        • 1 - spine
                        • ///
                        • 2 - head
                        • @@ -1012,7 +1012,7 @@ native RemovePlayerAttachedObject(playerid, index); /// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// 1 if used, 0 if not. -native IsPlayerAttachedObjectSlotUsed(playerid, index); +native bool:IsPlayerAttachedObjectSlotUsed(playerid, index); /// Enter edition mode for an attached object. /// The ID of the player to enter in to edition mode @@ -1028,9 +1028,9 @@ native IsPlayerAttachedObjectSlotUsed(playerid, index); /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. /// -/// There are 7 clickable buttons in edition mode.

                          -/// The three single icons that have x/y/z on them can be dragged to edit position/rotation/scale.

                          -/// The four buttons in a row are to select the edition mode and save edition: [Move] [Rotate] [Scale] [Save].

                          +/// There are 7 clickable buttons in edition mode.
                          +/// The three single icons that have x/y/z on them can be dragged to edit position/rotation/scale.
                          +/// The four buttons in a row are to select the edition mode and save edition: [Move] [Rotate] [Scale] [Save].
                          /// Clicking save will call OnPlayerEditAttachedObject. /// /// Players will be able to scale objects up to a very large or negative value size. Limits should be put in place using OnPlayerEditAttachedObject to abort the edit. @@ -1061,21 +1061,21 @@ native EditAttachedObject(playerid, index); /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// -/// If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.

                          -/// must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)

                          -/// If the last character in the text is a space (" "), the text will all be blank.

                          -/// If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will.

                          +/// If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.
                          +/// must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
                          +/// If the last character in the text is a space (" "), the text will all be blank.
                          +/// If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will.
                          /// /// -/// This applies ONLY to sa-mp versions before 0.3z:

                          -/// Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.

                          -/// If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.

                          +/// This applies ONLY to sa-mp versions before 0.3z:

                          +/// Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
                          +/// If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.
                          /// /// Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ Doesn't work beyond 255th character. /// -/// The x,y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using PlayerTextDrawAlignment with alignment 3 (right), the x,y coordinate is the top right coordinate for the text draw.

                          -/// This function merely CREATES the textdraw, you must use PlayerTextDrawShow to show it to a player.

                          -/// It is recommended to use WHOLE numbers instead of decimal positions when creating player textdraws to ensure resolution friendly design.

                          +/// The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using PlayerTextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
                          +/// This function merely CREATES the textdraw, you must use PlayerTextDrawShow to show it to a player.
                          +/// It is recommended to use WHOLE numbers instead of decimal positions when creating player textdraws to ensure resolution friendly design.
                          /// /// Player-textdraws are automatically destroyed when a player disconnects. /// The ID of the created textdraw. @@ -1105,8 +1105,8 @@ native PlayerTextDrawDestroy(playerid, PlayerText:text); ///

                          Sets the width and height of the letters in a player-textdraw. /// The ID of the player whose player-textdraw to set the letter size of /// The ID of the player-textdraw to change the letter size of -/// Width of a char -/// Height of a char +/// Width of a char +/// Height of a char /// /// /// @@ -1125,13 +1125,13 @@ native PlayerTextDrawDestroy(playerid, PlayerText:text); /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// When using this function purely for the benefit of affecting the textdraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements /// Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). -native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:x, Float:y); +native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:width, Float:height); /// Change the size of a player-textdraw (box if PlayerTextDrawUseBox is enabled and/or clickable area for use with PlayerTextDrawSetSelectable). /// The ID of the player whose player-textdraw to set the size of /// The ID of the player-textdraw to set the size of -/// The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate -/// The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate +/// The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate +/// The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate /// /// /// @@ -1149,7 +1149,7 @@ native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:x, Float:y); /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// -/// The x and y have different meanings with different PlayerTextDrawAlignment values:

                          +/// The x and y have different meanings with different PlayerTextDrawAlignment values:
                          ///

                            ///
                          • 1 (left): they are the right-most corner of the box, absolute coordinates.
                          • ///
                          • 2 (center): they need to inverted (switch the two) and the x value is the overall width of the box.
                          • @@ -1157,11 +1157,11 @@ native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:x, Float:y); ///
                          ///
                          /// -/// Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).

                          -/// The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).

                          +/// Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).
                          +/// The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).
                          /// This function defines the clickable area for use with PlayerTextDrawSetSelectable, whether a box is shown or not. /// -native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:x, Float:y); +native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:width, Float:height); ///

                          Set the text alignment of a player-textdraw. /// The ID of the player whose player-textdraw to set the alignment of @@ -1230,7 +1230,7 @@ native PlayerTextDrawColor(playerid, PlayerText:text, colour); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawUseBox(playerid, PlayerText:text, use); +native PlayerTextDrawUseBox(playerid, PlayerText:text, bool:use); /// Sets the colour of a textdraw's box (PlayerTextDrawUseBox). /// The ID of the player whose textdraw to set the box colour of @@ -1363,7 +1363,7 @@ native PlayerTextDrawFont(playerid, PlayerText:text, font); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawSetProportional(playerid, PlayerText:text, set); +native PlayerTextDrawSetProportional(playerid, PlayerText:text, bool:set); /// Toggles whether a player-textdraw can be selected or not. /// The ID of the player whose player-textdraw to set the selectability of @@ -1375,7 +1375,7 @@ native PlayerTextDrawSetProportional(playerid, PlayerText:text, set); /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// PlayerTextDrawSetSelectable MUST be used BEFORE the textdraw is shown to the player. /// Use PlayerTextDrawTextSize to define the clickable area. -native PlayerTextDrawSetSelectable(playerid, PlayerText:text, set); +native PlayerTextDrawSetSelectable(playerid, PlayerText:text, bool:set); /// Show a player-textdraw to the player it was created for. /// The ID of the player to show the textdraw for @@ -1446,7 +1446,7 @@ native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); /// Sets a player textdraw 2D preview sprite of a specified model ID. /// The PlayerTextDraw player ID /// The textdraw ID that will display the 3D preview -/// The GTA SA or SA:MP model ID to display +/// The GTA SA or SA:MP model ID to display /// /// /// @@ -1454,10 +1454,10 @@ native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. /// -/// 1: The function executed successfully. If an invalid model is passed 'success' is reported, but the model will appear as a yellow/black question mark.

                          +/// 1: The function executed successfully. If an invalid model is passed 'success' is reported, but the model will appear as a yellow/black question mark.
                          /// 0: The function failed to execute. Player and/or textdraw do not exist. /// -native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelindex); +native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelIndex); ///

                          Sets the rotation and zoom of a 3D model preview player-textdraw. /// The ID of the player whose player-textdraw to change @@ -1502,7 +1502,7 @@ native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, colour1, colour /// /// Variables aren't reset until after OnPlayerDisconnect is called, so the values are still accessible in OnPlayerDisconnect. /// -/// 1: The function executed successfully.

                          +/// 1: The function executed successfully.
                          /// 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. /// native SetPVarInt(playerid, const pvar[], value); @@ -1557,7 +1557,7 @@ native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); /// /// /// -/// 1: The function executed successfully.

                          +/// 1: The function executed successfully.
                          /// 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. /// native SetPVarFloat(playerid, const pvar[], Float:value); @@ -1585,7 +1585,7 @@ native Float:GetPVarFloat(playerid, const pvar[]); /// /// Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings). /// -/// 1: The function executed successfully.

                          +/// 1: The function executed successfully.
                          /// 0: The function failed to execute. Either the player specified isn't connected or there is no variable set with the given name. /// native DeletePVar(playerid, const pvar[]); @@ -1619,7 +1619,7 @@ native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); /// /// /// -/// Variable types:

                          +/// Variable types:
                          ///

                            ///
                          • PLAYER_VARTYPE_NONE (pVar with name given does not exist)
                          • ///
                          • PLAYER_VARTYPE_INT
                          • @@ -1659,7 +1659,7 @@ native SetPlayerChatBubble(playerid, const text[], colour, Float:drawdistance, e /// If the seat is invalid or is taken, will cause a crash when they EXIT the vehicle. /// You can use GetPlayerVehicleSeat in a loop to check if a seat is occupied by any players. /// -/// Seats:

                            +/// Seats:
                            ///

                              ///
                            • 0 - driver.
                            • ///
                            • 1 - front passenger.
                            • @@ -1669,7 +1669,7 @@ native SetPlayerChatBubble(playerid, const text[], colour, Float:drawdistance, e ///
                            ///
                            /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. The player or vehicle don't exist. /// native PutPlayerInVehicle(playerid, vehicleid, seatid); @@ -1696,12 +1696,12 @@ native GetPlayerVehicleSeat(playerid); /// The ID of the player to remove from their vehicle /// /// -/// The exiting animation is not synced for other players.

                            -/// This function will not work when used in OnPlayerEnterVehicle, because the player isn't in the vehicle when the callback is called. Use OnPlayerStateChange instead.

                            +/// The exiting animation is not synced for other players.
                            +/// This function will not work when used in OnPlayerEnterVehicle, because the player isn't in the vehicle when the callback is called. Use OnPlayerStateChange instead.
                            /// The player isn't removed if he is in a RC Vehicle. /// /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. This means the player is not connected. /// native RemovePlayerFromVehicle(playerid); @@ -1710,10 +1710,10 @@ native RemovePlayerFromVehicle(playerid); /// The ID of the player to toggle the controllability of /// 0 to make them uncontrollable, 1 to make them controllable /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. The player specified does not exist. /// -native TogglePlayerControllable(playerid, toggle); +native TogglePlayerControllable(playerid, bool:toggle); ///

                            Plays the specified sound for a player. /// The ID of the player for whom to play the sound @@ -1726,7 +1726,7 @@ native TogglePlayerControllable(playerid, toggle); /// /// Only use the coordinates if you want the sound to be played at a certain position. Set coordinates all to 0 to just play the sound. /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. This means the player is not connected. /// native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); @@ -1749,7 +1749,7 @@ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); /// This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, bool:forceSync = false); -///

                            Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). +/// Clears all animations for the given player (it also cancels all current tasks such as jetpacking, parachuting, entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). /// The ID of the player to clear the animations of /// Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) /// @@ -1781,7 +1781,7 @@ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibra /// /// /// -/// Special actions: (marked with * cannot be set)

                            +/// Special actions: (marked with * cannot be set)
                            ///

                              ///
                            • 0 - SPECIAL_ACTION_NONE
                            • ///
                            • 2 - SPECIAL_ACTION_USEJETPACK
                            • @@ -1794,7 +1794,7 @@ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibra ///
                            • 12 - SPECIAL_ACTION_SITTING *
                            • ///
                            • 13 - SPECIAL_ACTION_STOPUSECELLPHONE
                            • ///
                            -/// added in SA-MP 0.3:

                            +/// added in SA-MP 0.3:
                            ///

                              ///
                            • 1 - SPECIAL_ACTION_DUCK * - Detect if the player is crouching.
                            • ///
                            • 3 - SPECIAL_ACTION_ENTER_VEHICLE * - Detect if the player is entering a vehicle via an animation.
                            • @@ -1805,11 +1805,11 @@ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibra ///
                            • 23 - SPECIAL_ACTION_DRINK_SPRUNK - Will give the player a sprunk bottle to drink from
                            • ///
                            • 68 - SPECIAL_ACTION_PISSING - Will make make the player perform the pissing animation with visible pee.
                            • ///
                            -/// added in SA-MP 0.3e:

                            +/// added in SA-MP 0.3e:
                            ///

                              ///
                            • 24 - SPECIAL_ACTION_CUFFED - Will force the player in to cuffs (hands are behind their back) (does not work on CJ skin)
                            • ///
                            -/// added in SA-MP 0.3x:

                            +/// added in SA-MP 0.3x:
                            ///

                              ///
                            • 25 - SPECIAL_ACTION_CARRY - Will apply a 'carrying' animation to the player and make them unable to sprint, jump or punch (does not work on CJ skin)
                            • ///
                            @@ -1824,7 +1824,7 @@ native GetPlayerSpecialAction(playerid); /// /// Removing jetpacks from players by setting their special action to 0 causes the sound to stay until death. /// -/// Special actions: (marked with * cannot be set)

                            +/// Special actions: (marked with * cannot be set)
                            ///

                              ///
                            • 0 - SPECIAL_ACTION_NONE
                            • ///
                            • 2 - SPECIAL_ACTION_USEJETPACK
                            • @@ -1837,7 +1837,7 @@ native GetPlayerSpecialAction(playerid); ///
                            • 12 - SPECIAL_ACTION_SITTING *
                            • ///
                            • 13 - SPECIAL_ACTION_STOPUSECELLPHONE
                            • ///
                            -/// added in SA-MP 0.3:

                            +/// added in SA-MP 0.3:
                            ///

                              ///
                            • 1 - SPECIAL_ACTION_DUCK * - Detect if the player is crouching.
                            • ///
                            • 3 - SPECIAL_ACTION_ENTER_VEHICLE * - Detect if the player is entering a vehicle via an animation.
                            • @@ -1848,17 +1848,17 @@ native GetPlayerSpecialAction(playerid); ///
                            • 23 - SPECIAL_ACTION_DRINK_SPRUNK - Will give the player a sprunk bottle to drink from
                            • ///
                            • 68 - SPECIAL_ACTION_PISSING - Will make make the player perform the pissing animation with visible pee.
                            • ///
                            -/// added in SA-MP 0.3e:

                            +/// added in SA-MP 0.3e:
                            ///

                              ///
                            • 24 - SPECIAL_ACTION_CUFFED - Will force the player in to cuffs (hands are behind their back) (does not work on CJ skin)
                            • ///
                            -/// added in SA-MP 0.3x:

                            +/// added in SA-MP 0.3x:
                            ///

                              ///
                            • 25 - SPECIAL_ACTION_CARRY - Will apply a 'carrying' animation to the player and make them unable to sprint, jump or punch (does not work on CJ skin)
                            • ///
                            ///
                            /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. This means the player is not connected. /// native SetPlayerSpecialAction(playerid, actionid); @@ -1868,10 +1868,10 @@ native SetPlayerSpecialAction(playerid, actionid); /// 1 to disable collisions, 0 to enable collisions /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. The player specified does not exist. /// -native DisableRemoteVehicleCollisions(playerid, disable); +native DisableRemoteVehicleCollisions(playerid, bool:disable); // Player world/map related @@ -1882,12 +1882,12 @@ native DisableRemoteVehicleCollisions(playerid, disable); /// The z coordinate to set the checkpoint at /// The size of the checkpoint /// -/// If a checkpoint is already set it will use the size of that checkpoint instead of the new one.

                            +/// If a checkpoint is already set it will use the size of that checkpoint instead of the new one.
                            /// Checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly. A pickup can be used instead. /// /// Checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' checkpoints (only show them when players are close enough), use a checkpoint streamer. /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. This means the player specified does not exist. /// native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); @@ -1904,7 +1904,7 @@ native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); /// /// /// -/// 1: The function executed successfully. Success is also returned if the player doesn't have a checkpoint shown already.

                            +/// 1: The function executed successfully. Success is also returned if the player doesn't have a checkpoint shown already.
                            /// 0: The function failed to execute. This means the player is not connected. /// native DisablePlayerCheckpoint(playerid); @@ -1912,12 +1912,12 @@ native DisablePlayerCheckpoint(playerid); ///

                            Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint callback is called. /// The ID of the player to set the checkpoint for /// Type of checkpoint. 0-Normal, 1-Finish, 2-Nothing(Only the checkpoint without anything on it), 3-Air normal, 4-Air finish, 5-Air (rotates and stops), 6-Air (increases, decreases and disappears), 7-Air (swings down and up), 8-Air (swings up and down) -/// x-Coordinate -/// y-Coordinate -/// z-Coordinate -/// x-Coordinate of the next point, for the arrow facing direction -/// y-Coordinate of the next point, for the arrow facing direction -/// z-Coordinate of the next point, for the arrow facing direction +/// x-Coordinate +/// y-Coordinate +/// z-Coordinate +/// x-Coordinate of the next point, for the arrow facing direction +/// y-Coordinate of the next point, for the arrow facing direction +/// z-Coordinate of the next point, for the arrow facing direction /// Size (diameter) of the checkpoint /// /// @@ -1930,14 +1930,14 @@ native DisablePlayerCheckpoint(playerid); /// /// If a race checkpoint is already set it will use the size of that checkpoint instead of the new one. /// -/// Race checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly.

                            +/// Race checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly.
                            /// Race checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' race checkpoints (only show them when players are close enough), use a race checkpoint streamer. /// /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. This means the player specified does not exist. /// -native SetPlayerRaceCheckpoint(playerid, type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size); +native SetPlayerRaceCheckpoint(playerid, type, Float:centerX, Float:centerY, Float:centerZ, Float:nextX, Float:nextY, Float:nextZ, Float:size); ///

                            Disable any initialized race checkpoints for a specific player, since you can only have one at any given time. /// The player to disable the current checkpoint for @@ -1962,27 +1962,27 @@ native DisablePlayerRaceCheckpoint(playerid); /// This function does not work if used in OnPlayerConnect /// A player's world boundaries can be reset by setting them to 20000.0, -20000.0, 20000.0, -20000.0. These are the default values. /// This function doesn't work in interiors! -native SetPlayerWorldBounds(playerid, Float:maxX,Float:minX,Float:maxY,Float:minY); +native SetPlayerWorldBounds(playerid, Float:maxX, Float:minX, Float:maxY, Float:minY); /// Change the colour of a player's nametag and radar blip for another player. /// The player that will see the player's changed blip/nametag colour -/// The player whose colour will be changed +/// The player whose colour will be changed /// New colour. (RGBA) /// /// /// /// -native SetPlayerMarkerForPlayer(playerid, showplayerid, colour); +native SetPlayerMarkerForPlayer(playerid, targetid, colour); /// This functions allows you to toggle the drawing of player nametags, healthbars and armor bars which display above their head. For use of a similar function like this on a global level, ShowNameTags function. /// Player who will see the results of this function -/// Player whose name tag will be shown or hidden +/// Player whose name tag will be shown or hidden /// 1-show name tag, 0-hide name tag /// /// /// /// ShowNameTags must be set to 1 to be able to show name tags with ShowPlayerNameTagForPlayer, that means that in order to be effective you need to ShowPlayerNameTagForPlayer(forplayerid, playerid, 0) ahead of time(OnPlayerStreamIn is a good spot). -native ShowPlayerNameTagForPlayer(playerid, showplayerid, show); +native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); /// Place an icon/marker on a player's map. Can be used to mark locations such as banks and hospitals to players. /// The ID of the player to set the map icon for @@ -1990,7 +1990,7 @@ native ShowPlayerNameTagForPlayer(playerid, showplayerid, show); /// The x coordinate to place the map icon at /// The y coordinate to place the map icon at /// The z coordinate to place the map icon at -/// The icon to set +/// The icon to set /// The colour of the icon (RGBA). This should only be used with the square icon (ID: 0) /// The style of icon (optional=MAPICON_LOCAL) /// @@ -1999,7 +1999,7 @@ native ShowPlayerNameTagForPlayer(playerid, showplayerid, show); /// If you use an icon ID that is already in use, it will replace the current map icon using that ID. /// Marker type 1 (square), 2 (player blip), 4 (north), and 56 (single airstrip blip) will cause your game to crash if you have map legends enabled while viewing the map. /// -/// Map icon styles:

                            +/// Map icon styles:
                            ///

                              ///
                            • 0 MAPICON_LOCAL - close proximity only
                            • ///
                            • 1 MAPICON_GLOBAL - show on radar edge as long as in range
                            • @@ -2008,17 +2008,17 @@ native ShowPlayerNameTagForPlayer(playerid, showplayerid, show); ///
                            ///
                            /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. Player is not connected. /// -native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markertype, colour, style = MAPICON_LOCAL); +native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, colour, style = MAPICON_LOCAL); ///

                            Removes a map icon that was set earlier for a player using SetPlayerMapIcon. /// The ID of the player whose icon to remove /// The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon /// /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. /// native RemovePlayerMapIcon(playerid, iconid); @@ -2029,7 +2029,7 @@ native RemovePlayerMapIcon(playerid, iconid); /// This function, as of 0.3d, is deprecated. Check OnPlayerClickMap. /// This function will work only if AllowAdminTeleport is enabled, and you have to be an admin. /// -native AllowPlayerTeleport(playerid, allow); +native AllowPlayerTeleport(playerid, bool:allow); // Player camera @@ -2044,7 +2044,7 @@ native AllowPlayerTeleport(playerid, allow); /// Use SetCameraBehindPlayer to reset the camera to behind the player. /// Using the camera functions directly after enabling spectator mode doesn't work. /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. The player specified doesn't exist. /// native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); @@ -2061,7 +2061,7 @@ native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); /// /// Using the camera functions directly after enabling spectator mode doesn't work. /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. The player specified does not exist. /// native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, cut = CAMERA_CUT); @@ -2118,10 +2118,10 @@ native GetPlayerCameraMode(playerid); /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. The player is not connected. /// -native EnablePlayerCameraTarget(playerid, enable); +native EnablePlayerCameraTarget(playerid, bool:enable); ///

                            Allows you to retrieve the ID of the object the player is looking at. /// The ID of the player to check @@ -2200,13 +2200,13 @@ native AttachCameraToObject(playerid, objectid); /// Attaches a player's camera to a player-object. The player is able to move their camera while it is attached to an object. Can be used with MovePlayerObject and AttachPlayerObjectToVehicle. /// The ID of the player which will have their camera attached to a player-object -/// The ID of the player-object to which the player's camera will be attached +/// The ID of the player-object to which the player's camera will be attached /// /// /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// The player-object must be created before attempting to attach the player's camera to it. -native AttachCameraToPlayerObject(playerid, playerobjectid); +native AttachCameraToPlayerObject(playerid, objectid); /// Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes. /// The ID of the player the camera should be moved for @@ -2251,7 +2251,7 @@ native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, /// /// This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. /// 1 if the player is connected, 0 if not. -native IsPlayerConnected(playerid); +native bool:IsPlayerConnected(playerid); /// Checks if a player is in a specific vehicle. /// ID of the player @@ -2259,14 +2259,14 @@ native IsPlayerConnected(playerid); /// /// /// 1 if the player is in the vehicle, 0 if not. -native IsPlayerInVehicle(playerid, vehicleid); +native bool:IsPlayerInVehicle(playerid, vehicleid); /// Check if a player is inside any vehicle (as a driver or passenger). /// The ID of the player to check /// /// /// 1 if the player is in a vehicle, 0 if not. -native IsPlayerInAnyVehicle(playerid); +native bool:IsPlayerInAnyVehicle(playerid); /// Check if the player is currently inside a checkpoint, this could be used for properties or teleport points for example. /// The player you want to know the status of @@ -2280,7 +2280,7 @@ native IsPlayerInAnyVehicle(playerid); /// /// /// 0 if player isn't in his checkpoint else 1. -native IsPlayerInCheckpoint(playerid); +native bool:IsPlayerInCheckpoint(playerid); /// Check if the player is inside their current set race checkpoint (SetPlayerRaceCheckpoint). /// The ID of the player to check @@ -2294,21 +2294,21 @@ native IsPlayerInCheckpoint(playerid); /// /// /// 1 is the player is in a race checkpoint, 0 if not. -native IsPlayerInRaceCheckpoint(playerid); +native bool:IsPlayerInRaceCheckpoint(playerid); // Virtual Worlds /// Set the virtual world of a player. They can only see other players or vehicles that are in that same world. /// The ID of the player you want to set the virtual world of -/// The virtual world ID to put the player in +/// The virtual world ID to put the player in /// /// /// The default virtual world is 0 /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. This means the player is not connected. /// -native SetPlayerVirtualWorld(playerid, worldid); +native SetPlayerVirtualWorld(playerid, virtualWorld); ///

                            Retrieves the current virtual world the player is in. /// The ID of the player to get the virtual world of @@ -2325,7 +2325,7 @@ native GetPlayerVirtualWorld(playerid); /// 1 to enable stunt bonuses and 0 to disable them /// /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. The player is not connected. /// native EnableStuntBonusForPlayer(playerid, bool:enable); @@ -2344,21 +2344,21 @@ native EnableStuntBonusForAll(enable); /// When spectator mode is disabled, OnPlayerSpawn will automatically be called, if you wish to restore player to state before spectating, you will have to handle that in OnPlayerSpawn. Note also, that player can also go to class selection before if they used F4 during spectate, a player also CAN die in spectate mode due to various glitches. /// When a player is in spectate mode their HUD is hidden, making it useful for setting a player's camera without the HUD. Also, objects near the player's camera will be streamed in, making this useful for interpolating cameras. /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. The player does not exist. /// -native TogglePlayerSpectating(playerid, toggle); +native TogglePlayerSpectating(playerid, bool:toggle); ///

                            Makes a player spectate (watch) another player. /// The ID of the player that will spectate -/// The ID of the player that should be spectated +/// The ID of the player that should be spectated /// The mode to spectate with (optional=SPECTATE_MODE_NORMAL) /// /// /// Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. -/// playerid and targetplayerid's virtual world and interior must be the same for this function to work properly. +/// playerid and targetid's virtual world and interior must be the same for this function to work properly. /// -/// Spectate modes:

                            +/// Spectate modes:
                            ///

                              ///
                            • SPECTATE_MODE_NORMAL - normal spectate mode (third person point of view). Camera can not be changed.
                            • ///
                            • SPECTATE_MODE_FIXED - use SetPlayerCameraPos after this to position the player's camera, and it will track the player/vehicle set with PlayerSpectatePlayer/PlayerSpectateVehicle.
                            • @@ -2366,32 +2366,32 @@ native TogglePlayerSpectating(playerid, toggle); ///
                            ///
                            /// -/// 1: The function executed successfully.

                            +/// 1: The function executed successfully.
                            /// 0: The function failed to execute. One of the players specified does not exist. /// -native PlayerSpectatePlayer(playerid, targetplayerid, mode = SPECTATE_MODE_NORMAL); +native PlayerSpectatePlayer(playerid, targetid, mode = SPECTATE_MODE_NORMAL); ///

                            Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. /// The ID of the player who should spectate a vehicle -/// The ID of the vehicle the player should spectate +/// The ID of the vehicle the player should spectate /// The spectate mode. Can generally be left blank as it defaults to 'normal' /// /// /// Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. -/// playerid and targetvehicleid have to be in the same interior for this function to work properly. +/// playerid and targetid have to be in the same interior for this function to work properly. /// -/// 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.

                            +/// 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.
                            /// 0: The function failed to execute. The player, vehicle, or both don't exist. /// -native PlayerSpectateVehicle(playerid, targetvehicleid, mode = SPECTATE_MODE_NORMAL); +native PlayerSpectateVehicle(playerid, targetid, mode = SPECTATE_MODE_NORMAL); ///

                            Starts recording a player's movements to a file, which can then be reproduced by an NPC. /// The ID of the player to record -/// The type of recording -/// The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback +/// The type of recording +/// The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native StartRecordingPlayerData(playerid, recordtype, const recordname[]); +native StartRecordingPlayerData(playerid, recordType, const recordFile[]); /// Stops all the recordings that had been started with StartRecordingPlayerData for a specific player. /// The player you want to stop the recordings of @@ -2439,8 +2439,8 @@ native CreateExplosionForPlayer(playerid, Float:x, Float:y, Float:z, type, Float /// Perform a memory check on the client. /// The ID of the player to check /// The type of check to perform -/// The base address to check -/// The offset from the base address +/// The base address to check +/// The offset from the base address /// The number of bytes to check -native SendClientCheck(playerid, type, memAddr, memOffset, byteCount); +native SendClientCheck(playerid, type, memoryAddress, memoryOffset, byteCount); diff --git a/a_samp.inc b/a_samp.inc index 0a7c524..de47053 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -351,7 +351,7 @@ open.mp releases can use `A` as the first digit. /// The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. /// This function doesn't support packed strings. /// - /// Format Specifiers:

                            + /// Format Specifiers:
                            ///

                              ///
                            • %i - integer (whole number)
                            • ///
                            • %d - integer (whole number).
                            • @@ -366,7 +366,7 @@ open.mp releases can use `A` as the first digit. /// /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) - native printf(const format[], {Float,_}:...); + native printf(const format[], {Float, _}:...); #endif /// Formats a string to include variables and other strings inside it. @@ -378,7 +378,7 @@ open.mp releases can use `A` as the first digit. /// /// This function doesn't support packed strings. /// -/// Format Specifiers:

                              +/// Format Specifiers:
                              ///

                                ///
                              • %i - integer (whole number)
                              • ///
                              • %d - integer (whole number).
                              • @@ -393,7 +393,7 @@ open.mp releases can use `A` as the first digit. /// /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) -native format(output[], len = sizeof (output), const format[], {Float,_}:...); +native format(output[], len = sizeof (output), const format[], {Float, _}:...); /// This function sends a message to a specific player with a chosen colour in the chat. The whole line in the chatbox will be in the set colour unless colour embedding is used (since 0.3c). /// The ID of the player to display the message to @@ -406,7 +406,7 @@ native format(output[], len = sizeof (output), const format[], {Float,_}:...); /// Avoid using the percent sign (or format specifiers) in the actual message text without properly escaping it (like %%). It will result in crashes otherwise. /// You can use colour embedding for multiple colours in the message. /// -/// 1: The function executed successfully. Success is reported when the string is over 144 characters, but the message won't be sent.

                                +/// 1: The function executed successfully. Success is reported when the string is over 144 characters, but the message won't be sent.
                                /// 0: The function failed to execute. The player is not connected. /// native SendClientMessage(playerid, colour, const message[]); @@ -461,7 +461,7 @@ native SendDeathMessage(killer, killee, weapon); /// /// This Function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! /// -/// 1: The function executed successfully.

                                +/// 1: The function executed successfully.
                                /// 0: The function failed to execute. /// native SendDeathMessageToPlayer(playerid, killer, killee, weapon); @@ -483,13 +483,13 @@ native GameTextForAll(const string[], time, style); /// /// /// -/// 1: The function executed successfully. Success is reported when the style and/or time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.

                                +/// 1: The function executed successfully. Success is reported when the style and/or time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.
                                /// 0: The function failed to execute. This means either the string is null or the player is not connected. /// native GameTextForPlayer(playerid, const string[], time, style); ///

                                Sets a 'timer' to call a function after some time. Can be set to repeat. -/// Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server +/// Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server /// Interval in milliseconds /// Whether the timer should repeat or not /// @@ -499,10 +499,10 @@ native GameTextForPlayer(playerid, const string[], time, style); /// The function that should be called must be public. /// The use of many timers will result in increased memory/cpu usage. /// The ID of the timer that was started. Timer IDs start at 1. -native SetTimer(const funcname[], interval, repeating); +native SetTimer(const functionName[], interval, repeating); /// Sets a timer to call a function after the specified interval. This variant ('Ex') can pass parameters (such as a player ID) to the function. -/// The name of a public function to call when the timer expires +/// The name of a public function to call when the timer expires /// Interval in milliseconds /// Whether the timer should be called repeatedly (can only be stopped with KillTimer) or only once /// Special format indicating the types of values the timer will pass @@ -516,7 +516,7 @@ native SetTimer(const funcname[], interval, repeating); /// The function that should be called must be public. /// The use of many timers will result in increased memory/cpu usage. /// -/// Format syntax:

                                +/// Format syntax:
                                ///

                                  ///
                                • i - integer
                                • ///
                                • d - integer
                                • @@ -527,7 +527,7 @@ native SetTimer(const funcname[], interval, repeating); ///
                                ///
                                /// The ID of the timer that was started. Timer IDs start at 1 and are never reused. There are no internal checks to verify that the parameters passed are valid (e.g. duration not a minus value). -native SetTimerEx(const funcname[], interval, repeating, const format[], {Float,_}:...); +native SetTimerEx(const functionName[], interval, repeating, const format[], {Float, _}:...); /// Kills (stops) a running timer. /// The ID of the timer to kill (returned by SetTimer or SetTimerEx) @@ -558,7 +558,7 @@ native GetMaxPlayers(); /// The value that the last public function returned. /// CallRemoteFunction crashes the server if it's passing an empty string. /// -/// Format string placeholders:

                                +/// Format string placeholders:
                                ///

                                  ///
                                • c - a single character
                                • ///
                                • d - an integer (whole) number
                                • @@ -568,7 +568,7 @@ native GetMaxPlayers(); ///
                                • s - a string
                                • ///
                                ///
                                -native CallRemoteFunction(const function[], const format[], {Float,_}:...); +native CallRemoteFunction(const function[], const format[], {Float, _}:...); /// Calls a public function from the script in which it is used. /// Public function's name @@ -578,7 +578,7 @@ native CallRemoteFunction(const function[], const format[], {Float,_}:...); /// The value that the only public function returned. /// CallLocalFunction crashes the server if it's passing an empty string. /// -/// Format string placeholders:

                                +/// Format string placeholders:
                                ///

                                  ///
                                • c - a single character
                                • ///
                                • d - an integer (whole) number
                                • @@ -588,7 +588,7 @@ native CallRemoteFunction(const function[], const format[], {Float,_}:...); ///
                                • s - a string
                                • ///
                                ///
                                -native CallLocalFunction(const function[], const format[], {Float,_}:...); +native CallLocalFunction(const function[], const format[], {Float, _}:...); /// Returns the norm (length) of the provided vector. /// The vector's magnitude on the x axis @@ -675,7 +675,7 @@ native SHA256_PassHash(const password[], const salt[], output[], size = sizeof ( /// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// -/// 1: The function executed successfully.

                                +/// 1: The function executed successfully.
                                /// 0: The function failed to execute. The variable name is null or over 40 characters. /// native SetSVarInt(const svar[], value); @@ -703,7 +703,7 @@ native GetSVarInt(const svar[]); /// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// -/// 1: The function executed successfully.

                                +/// 1: The function executed successfully.
                                /// 0: The function failed to execute. The variable name is null or over 40 characters. /// native SetSVarString(const svar[], const value[]); @@ -733,7 +733,7 @@ native GetSVarString(const svar[], output[], len = sizeof (output)); /// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// -/// 1: The function executed successfully.

                                +/// 1: The function executed successfully.
                                /// 0: The function failed to execute. The variable name is null or over 40 characters. /// native SetSVarFloat(const svar[], Float:value); @@ -760,7 +760,7 @@ native Float:GetSVarFloat(const svar[]); /// /// Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings. /// -/// 1: The function executed successfully.

                                +/// 1: The function executed successfully.
                                /// 0: The function failed to execute. There is no variable set with the given name. /// native DeleteSVar(const svar[]); @@ -791,7 +791,7 @@ native GetSVarNameAtIndex(index, output[], size = sizeof (output)); /// /// /// -/// Variable types:

                                +/// Variable types:
                                ///

                                  ///
                                • SERVER_VARTYPE_NONE (sVar with name given does not exist)
                                • ///
                                • SERVER_VARTYPE_INT
                                • @@ -918,7 +918,7 @@ native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Flo /// The virtual world ID to put the pickup in. Use -1 to show the pickup in all worlds /// /// 1 if the pickup is successfully created. -///

                                  +///
                                  /// 0 if failed to create. /// /// This function doesn't return a pickup ID that you can use in, for example, OnPlayerPickUpPickup. Use CreatePickup if you'd like to assign IDs. @@ -938,17 +938,17 @@ native AddStaticPickup(model, type, Float:x, Float:y, Float:x, virtualWorld = 0) /// /// /// -/// Known Bugs:

                                  +/// Known Bugs:
                                  /// Pickups that have a x or y lower than -4096.0 or bigger than 4096.0 won't show up and won't trigger OnPlayerPickUpPickup either. /// /// -/// The only type of pickup that can be picked up from inside a vehicle is 14 (except for special pickups such as bribes).

                                  -/// Pickups are shown to, and can be picked up by all players.

                                  -/// It is possible that if DestroyPickup is used when a pickup is picked up, more than one player can pick up the pickup, due to lag. This can be circumvented through the use of variables.

                                  -/// Certain pickup types come with 'automatic responses', for example using an M4 model in the pickup will automatically give the player the weapon and some ammo. For fully scripted pickups, type 1 should be used.

                                  +/// The only type of pickup that can be picked up from inside a vehicle is 14 (except for special pickups such as bribes).
                                  +/// Pickups are shown to, and can be picked up by all players.
                                  +/// It is possible that if DestroyPickup is used when a pickup is picked up, more than one player can pick up the pickup, due to lag. This can be circumvented through the use of variables.
                                  +/// Certain pickup types come with 'automatic responses', for example using an M4 model in the pickup will automatically give the player the weapon and some ammo. For fully scripted pickups, type 1 should be used.
                                  /// /// -/// Available Pickup Types

                                  +/// Available Pickup Types
                                  /// Most other IDs are either undocumented or are similar to type 1 (but do not use them just because they seem similar to ID 1, they might have side-effects like ID 18 and 20). ///

                                    ///
                                  • 0 - The pickup does not always display. If displayed, it can't be picked up and does not trigger OnPlayerPickUpPickup and it will stay after server shutdown.
                                  • @@ -983,7 +983,7 @@ native DestroyPickup(pickup); /// /// /// This function can only be used in OnGameModeInit. For other times, see ShowPlayerNameTagForPlayer. -native ShowNameTags(show); +native ShowNameTags(bool:show); /// Toggles player markers (blips on the radar). Must be used when the server starts (OnGameModeInit). For other times, see SetPlayerMarkerForPlayer. /// The mode to use for markers. They can be streamed, meaning they are only visible to nearby players. See table below @@ -992,7 +992,7 @@ native ShowNameTags(show); /// /// /// -/// Marker modes:

                                    +/// Marker modes:
                                    ///

                                      ///
                                    • PLAYER_MARKERS_MODE_OFF 0
                                    • ///
                                    • PLAYER_MARKERS_MODE_GLOBAL 1
                                    • @@ -1023,14 +1023,15 @@ native SetWorldTime(hour); /// /// /// -/// 1: The function executed successfully.

                                      +/// 1: The function executed successfully.
                                      /// 0: The function failed to execute. The weapon specified does not exist. /// native GetWeaponName(weaponid, weapon[], len = sizeof (weapon)); /// 1 to enable, 0 to disable tire popping /// This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. -native EnableTirePopping(enable); // deprecated function +#pragma deprecated Use `OnVehicleDamageStatusUpdate`. +native EnableTirePopping(bool:enable); // deprecated function ///

                                      Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles (SetPlayerTeam must be used!). /// @@ -1043,7 +1044,7 @@ native EnableVehicleFriendlyFire(); /// /// /// -native AllowInteriorWeapons(allow); +native AllowInteriorWeapons(bool:allow); /// Set the world weather for all players. /// The weather to set @@ -1071,12 +1072,14 @@ native SetGravity(Float:gravity); /// This function, as of 0.3d, is deprecated. Please see OnPlayerClickMap. /// /// -native AllowAdminTeleport(allow); +#pragma deprecated Use `OnPlayerClickMap`. +native AllowAdminTeleport(bool:allow); /// This function does not work in the current SA:MP version! /// /// /// +#pragma deprecated Use `CreatePickup`. native SetDeathDropAmount(amount); /// Create an explosion at the specified coordinates. @@ -1093,7 +1096,7 @@ native CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); /// This function allows to turn on zone / area names such as the "Vinewood" or "Doherty" text at the bottom-right of the screen as they enter the area. This is a gamemode option and should be set in the callback OnGameModeInit. /// A toggle option for whether or not you'd like zone names on or off /// This function was removed in SA-MP 0.3. This was due to crashes it caused. -native EnableZoneNames(enable); +native EnableZoneNames(bool:enable); /// Uses standard player walking animation (animation of the CJ skin) instead of custom animations for every skin (e.g. skating for skater skins). /// @@ -1158,13 +1161,13 @@ native ConnectNPC(const name[], const script[]); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is an NPC, 0 if not. -native IsPlayerNPC(playerid); +native bool:IsPlayerNPC(playerid); -native AddCharModel(baseid, newid, const dffname[], const txdname[]); -native AddSimpleModel(virtualWorld, baseid, newid, const dffname[], const txdname[]); -native AddSimpleModelTimed(virtualWorld, baseid, newid, const dffname[], const txdname[], timeon, timeoff); -native FindModelFileNameFromCRC(crc, retstr[], retstr_size = sizeof (retstr)); -native FindTextureFileNameFromCRC(crc, retstr[], retstr_size = sizeof (retstr)); +native AddCharModel(baseid, newid, const dff[], const textureLibrary[]); +native AddSimpleModel(virtualWorld, baseid, newid, const dff[], const textureLibrary[]); +native AddSimpleModelTimed(virtualWorld, baseid, newid, const dff[], const textureLibrary[], timeOn, timeOff); +native FindModelFileNameFromCRC(crc, output[], retstr_size = sizeof (output)); +native FindTextureFileNameFromCRC(crc, output[], retstr_size = sizeof (output)); native RedirectDownload(playerid, const url[]); // Admin @@ -1174,7 +1177,7 @@ native RedirectDownload(playerid, const url[]); /// /// /// 1 if the player is an RCON admin, 0 if not. -native IsPlayerAdmin(playerid); +native bool:IsPlayerAdmin(playerid); /// Kicks a player from the server. They will have to quit the game and re-connect if they wish to continue playing. /// The ID of the player to kick @@ -1244,25 +1247,25 @@ native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); /// /// This function was added in SA-MP 0.3c R4 and will not work in earlier versions! /// -/// Example output:

                                      +/// Example output:
                                      /// -/// Server Ticks: 200

                                      -/// Messages in Send buffer: 0

                                      -/// Messages sent: 142

                                      -/// Bytes sent: 8203

                                      -/// Acks sent: 11

                                      -/// Acks in send buffer: 0

                                      -/// Messages waiting for ack: 0

                                      -/// Messages resent: 0

                                      -/// Bytes resent: 0

                                      -/// Packetloss: 0.0%

                                      -/// Messages received: 54

                                      -/// Bytes received: 2204

                                      -/// Acks received: 0

                                      -/// Duplicate acks received: 0

                                      -/// Inst. KBits per second: 28.8

                                      -/// KBits per second sent: 10.0

                                      -/// KBits per second received: 2.7

                                      +/// Server Ticks: 200
                                      +/// Messages in Send buffer: 0
                                      +/// Messages sent: 142
                                      +/// Bytes sent: 8203
                                      +/// Acks sent: 11
                                      +/// Acks in send buffer: 0
                                      +/// Messages waiting for ack: 0
                                      +/// Messages resent: 0
                                      +/// Bytes resent: 0
                                      +/// Packetloss: 0.0%
                                      +/// Messages received: 54
                                      +/// Bytes received: 2204
                                      +/// Acks received: 0
                                      +/// Duplicate acks received: 0
                                      +/// Inst. KBits per second: 28.8
                                      +/// KBits per second sent: 10.0
                                      +/// KBits per second received: 2.7
                                      /// /// /// This function always returns 1. @@ -1309,6 +1312,7 @@ native UnBlockIpAddress(const ipAddress[]); /// Type 'varlist' in the server console to display a list of available server variables and their types. /// When filterscripts or plugins is specified as the cvar, this function only returns the name of the first specified filterscript or plugin. This is a bug. /// The length of the returned string. 0 if the specified server variable is not a string or doesn't exist. +#pragma deprecated Use `GetConsoleVarAsString`. native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); ///

                                      Get the integer value of a server variable. @@ -1318,6 +1322,7 @@ native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); /// This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsInt /// Type 'varlist' in the server console to display a list of available server variables and their types. /// The value of the specified server variable. 0 if the specified server variable is not an integer or doesn't exist. +#pragma deprecated Use `GetConsoleVarAsInt`. native GetServerVarAsInt(const cvar[]); /// Get the boolean value of a server variable. @@ -1327,7 +1332,8 @@ native GetServerVarAsInt(const cvar[]); /// This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsBool /// Type 'varlist' in the server console to display a list of available server variables and their types. /// The value of the specified server variable. 0 if the specified server variable is not a boolean or doesn't exist. -native GetServerVarAsBool(const cvar[]); +#pragma deprecated Use `GetConsoleVarAsBool`. +native bool:GetServerVarAsBool(const cvar[]); // These are the same 3 functions as above although they avoid the name ambiguity/conflict with the SVar system. /// Get the string value of a console variable. @@ -1356,7 +1362,7 @@ native GetConsoleVarAsInt(const cvar[]); /// /// Type varlist in the server console to display a list of available console variables and their types. /// The value of the specified console variable. 0 if the specified console variable is not a boolean or doesn't exist. -native GetConsoleVarAsBool(const cvar[]); +native bool:GetConsoleVarAsBool(const cvar[]); // Extended admin network stats @@ -1499,7 +1505,7 @@ native Float:NetStats_PacketLossPercent(playerid); /// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// -/// Status:

                                      +/// Status:
                                      ///

                                        ///
                                      • 0 - NO_ACTION
                                      • ///
                                      • 1 - DISCONNECT_ASAP
                                      • @@ -1550,8 +1556,8 @@ native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); /// /// /// -/// This function merely CREATES the menu - ShowMenuForPlayer must be used to show it.

                                        -/// You can only create and access 2 columns (0 and 1).

                                        +/// This function merely CREATES the menu - ShowMenuForPlayer must be used to show it.
                                        +/// You can only create and access 2 columns (0 and 1).
                                        /// If the title's length is equal to or greater than 32 chars the title is truncated to 30 characters. /// /// There is a limit of 12 items per menu, and a limit of 128 menus in total. @@ -1571,7 +1577,7 @@ native DestroyMenu(Menu:menuid); ///

                                        Adds an item to a specified menu. /// The menu ID to add an item to /// The column to add the item to -/// The text for the new menu item +/// The text for the new menu item /// ///
                                          ///
                                        • Crashes when passed an invalid menu ID.
                                        • @@ -1587,18 +1593,18 @@ native DestroyMenu(Menu:menuid); /// /// /// -native AddMenuItem(Menu:menuid, column, const menutext[]); +native AddMenuItem(Menu:menuid, column, const text[]); /// Sets the caption of a column in a menu. /// ID of the menu to change /// The column (0 or 1) to set the header of -/// The caption text for the column +/// The caption text for the column /// /// /// /// Crashes when passed an invalid menu ID. /// Note that you can add only 12 items with AddMenuItem. The 13th object of a menu would replace the header of the column which is correctly set with this function. -native SetMenuColumnHeader(Menu:menuid, column, const columnheader[]); +native SetMenuColumnHeader(Menu:menuid, column, const heading[]); /// Shows a previously created menu for a player. /// The ID of the menu to show. Returned by CreateMenu @@ -1611,7 +1617,7 @@ native SetMenuColumnHeader(Menu:menuid, column, const columnheader[]); /// /// Crashes the both server and player if an invalid menu ID given. /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. Menu and/or player doesn't exist. /// native ShowMenuForPlayer(Menu:menuid, playerid); @@ -1624,7 +1630,7 @@ native ShowMenuForPlayer(Menu:menuid, playerid); /// /// /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. /// native HideMenuForPlayer(Menu:menuid, playerid); @@ -1634,7 +1640,7 @@ native HideMenuForPlayer(Menu:menuid, playerid); /// /// /// 1 if the menu is valid, otherwise 0. -native IsValidMenu(Menu:menuid); +native bool:IsValidMenu(Menu:menuid); ///

                                          Disable a menu. /// The ID of the menu to disable @@ -1651,7 +1657,7 @@ native DisableMenu(Menu:menuid); /// /// /// -/// Crashes when passed an invalid menu ID.

                                          +/// Crashes when passed an invalid menu ID.
                                          /// This function disabled the specified menu row for all players. There is no function to disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, and one without. Or one per player. /// /// This function always returns 1, even if the function fails. If an invalid row is specified, nothing will happen. If an invalid menu ID is specified, the server will crash. @@ -1675,19 +1681,19 @@ native Menu:GetPlayerMenu(playerid); /// The y (up/down) coordinate to create the textdraw at /// The text that will appear in the textdraw /// -/// If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.

                                          -/// text[] must not be empty or the server will crash! If you need a textdraw that shows nothing, use a space underscore. Now it's fixed.

                                          -/// If the last character in the text is a space, the text will all be blank.

                                          +/// If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.
                                          +/// text[] must not be empty or the server will crash! If you need a textdraw that shows nothing, use a space underscore. Now it's fixed.
                                          +/// If the last character in the text is a space, the text will all be blank.
                                          /// If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will. /// /// -/// This applies ONLY to sa-mp versions before 0.3z:

                                          -/// Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.

                                          +/// This applies ONLY to sa-mp versions before 0.3z:
                                          +/// Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
                                          /// If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw. /// /// -/// The x,y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using TextDrawAlignment with alignment 3 (right), the x,y coordinate is the top right coordinate for the text draw.

                                          -/// This function merely CREATES the textdraw, you must use TextDrawShowForPlayer or TextDrawShowForAll to show it.

                                          +/// The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using TextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
                                          +/// This function merely CREATES the textdraw, you must use TextDrawShowForPlayer or TextDrawShowForAll to show it.
                                          /// It is recommended to use WHOLE numbers instead of decimal positions when creating textdraws to ensure resolution friendly design. /// /// Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ don't work beyond 255th character. @@ -1700,19 +1706,19 @@ native TextDrawDestroy(Text:text); ///

                                          Sets the width and height of the letters. /// The TextDraw to change -/// Width of a char -/// Height of a char +/// Width of a char +/// Height of a char /// When using this function purely for the benefit of affecting the TextDraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements. Hint: it is easier and extremely precise to use LD_SPAC:white sprite for box-only textdraws, TextDrawTextSize will have regular offsets. /// If you want to change the letter size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. /// Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). -native TextDrawLetterSize(Text:text, Float:x, Float:y); +native TextDrawLetterSize(Text:text, Float:width, Float:height); /// Change the size of a textdraw (box if TextDrawUseBox is enabled and/or clickable area for use with TextDrawSetSelectable). /// The TextDraw to set the size of -/// The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate -/// The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate +/// The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate +/// The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate /// -/// The x and y have different meanings with different TextDrawAlignment values:

                                          +/// The x and y have different meanings with different TextDrawAlignment values:
                                          ///

                                            ///
                                          • 1 (left): they are the right-most corner of the box, absolute coordinates.
                                          • ///
                                          • 2 (center): they need to inverted (switch the two) and the x value is the overall width of the box.
                                          • @@ -1720,12 +1726,12 @@ native TextDrawLetterSize(Text:text, Float:x, Float:y); ///
                                          ///
                                          /// -/// Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).

                                          -/// The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).

                                          +/// Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).
                                          +/// The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).
                                          /// This function defines the clickable area for use with TextDrawSetSelectable, whether a box is shown or not. /// /// If you want to change the text size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. -native TextDrawTextSize(Text:text, Float:x, Float:y); +native TextDrawTextSize(Text:text, Float:width, Float:height); ///

                                          Set the alignment of text in a text draw. /// The ID of the textdraw to set the alignment of @@ -1745,10 +1751,10 @@ native TextDrawColor(Text:text, colour); /// 1 to show a box or 0 to not show a box /// If the textdraw is already shown, it must be re-shown (TextDrawShowForAll/TextDrawShowForPlayer) to show the changes of this function. /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. This means the textdraw specified does not exist. /// -native TextDrawUseBox(Text:text, use); +native TextDrawUseBox(Text:text, bool:use); ///

                                          Adjusts the text box colour (only used if TextDrawUseBox 'use' parameter is 1). /// The TextDraw to change @@ -1762,7 +1768,7 @@ native TextDrawBoxColor(Text:text, colour); /// The shadow can be cut by the box area if the size is set too big for the area. /// If you want to change the shadow of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. The textdraw does not exist. /// native TextDrawSetShadow(Text:text, size); @@ -1791,7 +1797,7 @@ native TextDrawFont(Text:text, font); /// 1 to enable proportionality, 0 to disable /// Proportionality is set to 1 by default, you might skip this function if you don't want to disable it. /// If you want to change the proportionality of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. -native TextDrawSetProportional(Text:text, set); +native TextDrawSetProportional(Text:text, bool:set); ///

                                          Sets whether a textdraw can be selected (clicked on) or not. /// The ID of the textdraw to make selectable @@ -1799,14 +1805,14 @@ native TextDrawSetProportional(Text:text, set); /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// TextDrawSetSelectable must be used BEFORE the textdraw is shown to players for it to be selectable. /// Use TextDrawTextSize to define the clickable area. -native TextDrawSetSelectable(Text:text, set); +native TextDrawSetSelectable(Text:text, bool:set); /// Shows a textdraw for a specific player. /// The ID of the player to show the textdraw for /// The ID of the textdraw to show. Returned by TextDrawCreate /// If only a single player will see a textdraw, it might be wise to use player-textdraws instead. This is also useful for textdraws that need to show information specific for an individual player. /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. This means either the player and/or textdraw specified does not exist. /// native TextDrawShowForPlayer(playerid, Text:text); @@ -1825,7 +1831,7 @@ native TextDrawHideForPlayer(playerid, Text:text); /// /// /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. This means the textdraw specified does not exist. /// native TextDrawShowForAll(Text:text); @@ -1845,11 +1851,11 @@ native TextDrawSetString(Text:text, const string[]); ///

                                          Set the model for a textdraw model preview. Click here to see this function's effect. /// The textdraw ID that will display the 3D preview -/// The GTA SA or SA:MP model ID to display +/// The GTA SA or SA:MP model ID to display /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. /// Use TextDrawBackgroundColor to set the background colour behind the model. -native TextDrawSetPreviewModel(Text:text, modelindex); +native TextDrawSetPreviewModel(Text:text, modelIndex); /// Sets the rotation and zoom of a 3D model preview textdraw. /// The x rotation value @@ -1871,10 +1877,10 @@ native TextDrawSetPreviewVehCol(Text:text, colour1, colour2); // Gang Zones /// Create a gangzone (coloured radar area). -/// The x coordinate for the west side of the gangzone -/// The y coordinate for the south side of the gangzone -/// The x coordinate for the east side of the gangzone -/// The y coordinate for the north side of the gangzone +/// The x coordinate for the west side of the gangzone +/// The y coordinate for the south side of the gangzone +/// The x coordinate for the east side of the gangzone +/// The y coordinate for the north side of the gangzone /// /// /// @@ -1885,12 +1891,12 @@ native TextDrawSetPreviewVehCol(Text:text, colour1, colour2); /// /// /// -/// There is a limit of 1024 gangzones.

                                          +/// There is a limit of 1024 gangzones.
                                          /// Putting the parameters in the wrong order results in glitchy behavior. /// /// This function merely CREATES the gangzone, you must use GangZoneShowForPlayer or GangZoneShowForAll to show it. /// The ID of the created zone, returns -1 if not created. -native GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy); +native GangZoneCreate(Float:minX, Float:minY, Float:maxX, Float:maxY); ///

                                          Destroy a gangzone. /// The ID of the zone to destroy @@ -1934,7 +1940,7 @@ native GangZoneShowForPlayer(playerid, zone, colour); /// /// /// -/// 1: The function executed successfully. The gang zone was shown for all players.

                                          +/// 1: The function executed successfully. The gang zone was shown for all players.
                                          /// 0: The function failed to execute. The gangzone does not exist. /// native GangZoneShowForAll(zone, colour); @@ -2021,7 +2027,7 @@ native GangZoneStopFlashForPlayer(playerid, zone); /// /// /// -/// 1: The function executed successfully. Success is reported even if the gang zone wasn't flashing to begin with.

                                          +/// 1: The function executed successfully. Success is reported even if the gang zone wasn't flashing to begin with.
                                          /// 0: The function failed to execute. The gangzone specified does not exist. /// native GangZoneStopFlashForAll(zone); @@ -2046,7 +2052,7 @@ native GangZoneStopFlashForAll(zone); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// If is empty, the server/clients next to the text might crash!

                                          +/// If is empty, the server/clients next to the text might crash!
                                          /// If the virtualWorld is set as -1 the text will not appear. /// /// drawdistance seems to be a lot smaller when spectating. @@ -2069,7 +2075,7 @@ native Delete3DTextLabel(Text3D:textid); ///

                                          Attach a 3D text label to a player. /// The ID of the 3D text label to attach. Returned by Create3DTextLabel -/// The ID of the player to attach the label to +/// The ID of the player to attach the label to /// The x offset from the player /// The y offset from the player /// The z offset from the player @@ -2082,17 +2088,17 @@ native Delete3DTextLabel(Text3D:textid); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. This means the player and/or label do not exist. /// -native Attach3DTextLabelToPlayer(Text3D:textid, playerid, Float:offsetX, Float:offsetY, Float:offsetZ); +native Attach3DTextLabelToPlayer(Text3D:textid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ); ///

                                          Attaches a 3D Text Label to a specific vehicle. /// The ID of the 3D text label to attach. Returned by Create3DTextLabel -/// The vehicle you want to attach the 3D Text Label to -/// The offset-x coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). -/// The offset-y coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). -/// The offset-z coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0). +/// The vehicle you want to attach the 3D Text Label to +/// The offset-x coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). +/// The offset-y coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). +/// The offset-z coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). /// /// /// @@ -2101,7 +2107,7 @@ native Attach3DTextLabelToPlayer(Text3D:textid, playerid, Float:offsetX, Float:o /// /// /// Attach3DTextLabelToPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions! -native Attach3DTextLabelToVehicle(Text3D:textid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ); +native Attach3DTextLabelToVehicle(Text3D:textid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ); /// Updates a 3D Text Label text and colour. /// The 3D Text Label you want to update @@ -2128,8 +2134,8 @@ native Update3DTextLabelText(Text3D:textid, colour, const text[]); /// y Coordinate (or offset if attached) /// z Coordinate (or offset if attached) /// The distance where you are able to see the 3D Text Label -/// The player you want to attach the 3D Text Label to. (optional=INVALID_PLAYER_ID) -/// The vehicle you want to attach the 3D Text Label to. (optional=INVALID_VEHICLE_ID) +/// The player you want to attach the 3D Text Label to. (optional=INVALID_PLAYER_ID) +/// The vehicle you want to attach the 3D Text Label to. (optional=INVALID_VEHICLE_ID) /// Test the line-of-sight so this text can't be seen through walls (optional=0) /// /// @@ -2142,7 +2148,7 @@ native Update3DTextLabelText(Text3D:textid, colour, const text[]); /// If is empty, the server/clients next to the text might crash! /// drawdistance seems to be a lot smaller when spectating. /// The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. -native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayer = INVALID_PLAYER_ID, parentVehicle = INVALID_VEHICLE_ID, bool:testLOS = false); +native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayerid = INVALID_PLAYER_ID, parentVehicleid = INVALID_VEHICLE_ID, bool:testLOS = false); /// Destroy a 3D text label that was created using CreatePlayer3DTextLabel. /// The ID of the player whose 3D text label to delete @@ -2155,7 +2161,7 @@ native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Floa /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. This means the label specified doesn't exist. /// native DeletePlayer3DTextLabel(playerid, PlayerText3D:textid); @@ -2190,16 +2196,16 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const /// Use colour embedding for multiple colours in the text. /// Using -1 as dialogid closes all dialogs currently shown on the client's screen. /// -/// 1: The function executed successfully.

                                          -/// 0: The function failed to execute. This means the player is not connected.

                                          +/// 1: The function executed successfully.
                                          +/// 0: The function failed to execute. This means the player is not connected.
                                          /// native ShowPlayerDialog(playerid, dialogid, style, const caption[], const info[], const button1[], const button2[]); ///

                                          Get a players unique ID. /// The player to get the unique ID of -/// Where to save the unique ID -/// The size of "serial" -native gpci(playerid, serial[], maxlen); +/// Where to save the unique ID +/// The size of "output" (the serial) +native gpci(playerid, output[], size = sizeof (output)); // -------------------------------------------------- // Forwards (Callback declarations) @@ -2211,8 +2217,8 @@ native gpci(playerid, serial[], maxlen); /// /// This function can also be used in a filterscript to detect if the gamemode changes with RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. /// -/// 0 - Will prevent other filterscripts from receiving this callback.

                                          -/// 1 - Indicates that this callback will be passed to the next filterscript.

                                          +/// 0 - Will prevent other filterscripts from receiving this callback.
                                          +/// 1 - Indicates that this callback will be passed to the next filterscript.
                                          /// It is always called first in gamemode. /// forward OnGameModeInit(); @@ -2226,8 +2232,8 @@ forward OnGameModeInit(); /// When using OnGameModeExit in conjunction with the 'rcon gmx' console command keep in mind there is a potential for client bugs to occur an example of this is excessive RemoveBuildingForPlayer calls during OnGameModeInit which could result in a client crash. /// This callback will NOT be called if the server crashes or the process is killed by other means, such as using the Linux kill command or pressing the close-button on the Windows console. /// -/// 0 - Will prevent other filterscripts from receiving this callback.

                                          -/// 1 - Indicates that this callback will be passed to the next filterscript.

                                          +/// 0 - Will prevent other filterscripts from receiving this callback.
                                          +/// 1 - Indicates that this callback will be passed to the next filterscript.
                                          /// It is always called first in gamemode. /// forward OnGameModeExit(); @@ -2253,8 +2259,8 @@ forward OnFilterScriptExit(); /// /// This callback can also be called by NPC. /// -/// 0 - Will prevent other filterscripts from receiving this callback.

                                          -/// 1 - Indicates that this callback will be passed to the next filterscript.

                                          +/// 0 - Will prevent other filterscripts from receiving this callback.
                                          +/// 1 - Indicates that this callback will be passed to the next filterscript.
                                          /// It is always called first in filterscripts. /// forward OnPlayerConnect(playerid); @@ -2268,7 +2274,7 @@ forward OnPlayerConnect(playerid); /// This callback can also be called by NPC. /// Some functions might not work correctly when used in this callback because the player is already disconnected when the callback is called. This means that you can't get unambiguous information from functions like GetPlayerIp and GetPlayerPos. /// -/// Reasons:

                                          +/// Reasons:
                                          ///

                                            ///
                                          • 0 - timeout/Crash - the player's connection was lost. Either their game crashed or their network had a fault.
                                          • ///
                                          • 1 - quit - the player purposefully quit, either using the /quit (/q) command or via the pause menu.
                                          • @@ -2276,8 +2282,8 @@ forward OnPlayerConnect(playerid); ///
                                          ///
                                          /// -/// 0 - Will prevent other filterscripts from receiving this callback.

                                          -/// 1 - Indicates that this callback will be passed to the next filterscript.

                                          +/// 0 - Will prevent other filterscripts from receiving this callback.
                                          +/// 1 - Indicates that this callback will be passed to the next filterscript.
                                          /// It is always called first in filterscripts. /// forward OnPlayerDisconnect(playerid, reason); @@ -2292,8 +2298,8 @@ forward OnPlayerDisconnect(playerid, reason); /// This callback can also be called by NPC. /// The game sometimes deducts $100 from players after spawn. /// -/// 0 - Will prevent other filterscripts from receiving this callback.

                                          -/// 1 - Indicates that this callback will be passed to the next filterscript.

                                          +/// 0 - Will prevent other filterscripts from receiving this callback.
                                          +/// 1 - Indicates that this callback will be passed to the next filterscript.
                                          /// It is always called first in filterscripts. /// forward OnPlayerSpawn(playerid); @@ -2306,14 +2312,14 @@ forward OnPlayerSpawn(playerid); /// /// /// -/// The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)

                                          -/// The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

                                          -/// You do not need to check whether killerid is valid before using it in SendDeathMessage. INVALID_PLAYER_ID is a valid killerid ID parameter in that function.

                                          +/// The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
                                          +/// The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
                                          +/// You do not need to check whether killerid is valid before using it in SendDeathMessage. INVALID_PLAYER_ID is a valid killerid ID parameter in that function.
                                          /// playerid is the only one who can call the callback. (good to know for anti fake death) /// /// -/// 0 - Will prevent other filterscripts from receiving this callback.

                                          -/// 1 - Indicates that this callback will be passed to the next filterscript.

                                          +/// 0 - Will prevent other filterscripts from receiving this callback.
                                          +/// 1 - Indicates that this callback will be passed to the next filterscript.
                                          /// It is always called first in filterscripts. /// forward OnPlayerDeath(playerid, killerid, reason); @@ -2325,8 +2331,8 @@ forward OnPlayerDeath(playerid, killerid, reason); /// /// /// -/// 0 - Will prevent other filterscripts from receiving this callback.

                                          -/// 1 - Indicates that this callback will be passed to the next filterscript.

                                          +/// 0 - Will prevent other filterscripts from receiving this callback.
                                          +/// 1 - Indicates that this callback will be passed to the next filterscript.
                                          /// It is always called first in filterscripts. /// forward OnVehicleSpawn(vehicleid); @@ -2339,7 +2345,7 @@ forward OnVehicleSpawn(vehicleid); /// This callback can also be called by NPC. /// This callback will also be called when a vehicle enters water, but the vehicle can be saved from destruction by teleportation or driving out (if only partially submerged). The callback won't be called a second time, and the vehicle may disappear when the driver exits, or after a short time. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnVehicleDeath(vehicleid, killerid); @@ -2352,7 +2358,7 @@ forward OnVehicleDeath(vehicleid, killerid); /// /// This callback can also be called by NPC. /// -/// Returning 0 in this callback will stop the text from being sent to all players.

                                          +/// Returning 0 in this callback will stop the text from being sent to all players.
                                          /// It is always called first in filterscripts so returning 0 there blocks other scripts from seeing it. /// forward OnPlayerText(playerid, text[]); @@ -2365,7 +2371,7 @@ forward OnPlayerText(playerid, text[]); /// /// This callback can also be called by NPC. /// -/// Return 1 if the command was processed, otherwise 0; If the command was not found both in filterscripts and in gamemode, the player will be received a message: SERVER: Unknown command.

                                          +/// Return 1 if the command was processed, otherwise 0; If the command was not found both in filterscripts and in gamemode, the player will be received a message: SERVER: Unknown command.
                                          /// It is always called first in filterscripts so returning 1 there blocks other scripts from seeing it. /// forward OnPlayerCommandText(playerid, cmdtext[]); @@ -2378,7 +2384,7 @@ forward OnPlayerCommandText(playerid, cmdtext[]); /// This callback can also be called by NPC. /// This callback is also called when a player presses F4. /// -/// Returning 0 in this callback will prevent the player from spawning. The player can be forced to spawn when SpawnPlayer is used.

                                          +/// Returning 0 in this callback will prevent the player from spawning. The player can be forced to spawn when SpawnPlayer is used.
                                          /// It is always called first in filterscripts. /// forward OnPlayerRequestClass(playerid, classid); @@ -2394,7 +2400,7 @@ forward OnPlayerRequestClass(playerid, classid); /// This callback is called when a player BEGINS to enter a vehicle, not when they HAVE entered it. See OnPlayerStateChange. /// This callback is still called if the player is denied entry to the vehicle (e.g. it is locked or full). /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); @@ -2409,7 +2415,7 @@ forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); /// Not called if the player falls off a bike or is removed from a vehicle by other means such as using SetPlayerPos. /// You must use OnPlayerStateChange and check if their old state is PLAYER_STATE_DRIVER or PLAYER_STATE_PASSENGER and their new state is PLAYER_STATE_ONFOOT. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnPlayerExitVehicle(playerid, vehicleid); @@ -2424,7 +2430,7 @@ forward OnPlayerExitVehicle(playerid, vehicleid); /// /// This callback can also be called by NPC. /// -/// States:

                                          +/// States:
                                          ///

                                            ///
                                          • PLAYER_STATE_NONE - empty (while initializing)
                                          • ///
                                          • PLAYER_STATE_ONFOOT - player is on foot
                                          • @@ -2439,7 +2445,7 @@ forward OnPlayerExitVehicle(playerid, vehicleid); ///
                                          ///
                                          /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnPlayerStateChange(playerid, newstate, oldstate); @@ -2457,7 +2463,7 @@ forward OnPlayerStateChange(playerid, newstate, oldstate); /// /// This callback can also be called by NPC. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnPlayerEnterCheckpoint(playerid); @@ -2475,7 +2481,7 @@ forward OnPlayerEnterCheckpoint(playerid); /// /// This callback can also be called by NPC. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnPlayerLeaveCheckpoint(playerid); @@ -2493,7 +2499,7 @@ forward OnPlayerLeaveCheckpoint(playerid); /// /// This callback can also be called by NPC. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnPlayerEnterRaceCheckpoint(playerid); @@ -2511,7 +2517,7 @@ forward OnPlayerEnterRaceCheckpoint(playerid); /// /// This callback can also be called by NPC. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnPlayerLeaveRaceCheckpoint(playerid); @@ -2526,7 +2532,7 @@ forward OnPlayerLeaveRaceCheckpoint(playerid); /// This callback is not called when the player is not logged in as RCON admin. /// When the player is not logged in as RCON admin and uses /rcon login, this callback will not be called and OnRconLoginAttempt is called instead. However, when the player is logged in as RCON admin, the use of this command will call this callback. /// -/// 0 if the command was not processed, it will be passed to another script or 1 if the command was processed, will not be passed to other scripts.

                                          +/// 0 if the command was not processed, it will be passed to another script or 1 if the command was processed, will not be passed to other scripts.
                                          /// It is always called first in filterscripts so returning 1 there blocks gamemode from seeing it. /// forward OnRconCommand(cmd[]); @@ -2538,7 +2544,7 @@ forward OnRconCommand(cmd[]); /// This callback can also be called by NPC. /// To prevent players from spawning with certain classes, the last viewed class must be saved in a variable in OnPlayerRequestClass. /// -/// Returning 0 in this callback will prevent the player from spawning.

                                          +/// Returning 0 in this callback will prevent the player from spawning.
                                          /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// forward OnPlayerRequestSpawn(playerid); @@ -2551,7 +2557,7 @@ forward OnPlayerRequestSpawn(playerid); /// /// SetObjectPos does not work when used in this callback. To fix it, recreate the object. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnObjectMoved(objectid); @@ -2565,7 +2571,7 @@ forward OnObjectMoved(objectid); /// /// This callback can also be called for NPC. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnPlayerObjectMoved(playerid, objectid); @@ -2576,7 +2582,7 @@ forward OnPlayerObjectMoved(playerid, objectid); /// /// /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in gamemode. /// forward OnPlayerPickUpPickup(playerid, pickupid); @@ -2591,7 +2597,7 @@ forward OnPlayerPickUpPickup(playerid, pickupid); /// /// This callback is NOT called by AddVehicleComponent. /// -/// Return 0 to desync the mod (or an invalid mod) from propagating and / or crashing players.

                                          +/// Return 0 to desync the mod (or an invalid mod) from propagating and / or crashing players.
                                          /// It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. /// forward OnVehicleMod(playerid, vehicleid, componentid); @@ -2607,7 +2613,7 @@ forward OnVehicleMod(playerid, vehicleid, componentid); /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// Players collide when they get into the same mod shop. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnEnterExitModShop(playerid, enterexit, interiorid); @@ -2622,7 +2628,7 @@ forward OnEnterExitModShop(playerid, enterexit, interiorid); /// /// This callback is not called by ChangeVehiclePaintjob. /// -/// This callback does not handle returns. Returning 0 won't deny the paintjob change.

                                          +/// This callback does not handle returns. Returning 0 won't deny the paintjob change.
                                          /// It is always called first in gamemode so returning 0 there blocks other filterscripts from seeing it. /// forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); @@ -2640,7 +2646,7 @@ forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); /// Previewing a component inside a mod shop might call this callback. /// This callback is not called by ChangeVehicleColor. /// -/// Returning 0 in this callback will deny the colour change. Returning 1 will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.

                                          +/// Returning 0 in this callback will deny the colour change. Returning 1 will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.
                                          /// It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. /// forward OnVehicleRespray(playerid, vehicleid, color1, color2); @@ -2653,9 +2659,9 @@ forward OnVehicleRespray(playerid, vehicleid, color1, color2); /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// This does not include vehicle health changes /// -/// 1 - Will prevent other filterscripts from receiving this callback.

                                          -/// 0 - Indicates that this callback will be passed to the next filterscript.

                                          -/// It is always called first in filterscripts.

                                          +/// 1 - Will prevent other filterscripts from receiving this callback.
                                          +/// 0 - Indicates that this callback will be passed to the next filterscript.
                                          +/// It is always called first in filterscripts.
                                          /// forward OnVehicleDamageStatusUpdate(vehicleid, playerid); @@ -2674,7 +2680,7 @@ forward OnVehicleDamageStatusUpdate(vehicleid, playerid); /// This callback is called very frequently per second per unoccupied vehicle. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. /// GetVehiclePos will return the old coordinates of the vehicle before this update. /// -/// Returning 0 in this callback will stop the vehicle's position being synced to other players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.

                                          +/// Returning 0 in this callback will stop the vehicle's position being synced to other players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.
                                          /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); @@ -2691,7 +2697,7 @@ forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new /// /// The menu ID is not passed to this callback. GetPlayerMenu must be used to determine which menu the player selected an item on. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in gamemode. /// forward OnPlayerSelectedMenuRow(playerid, row); @@ -2702,7 +2708,7 @@ forward OnPlayerSelectedMenuRow(playerid, row); /// /// /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in gamemode. /// forward OnPlayerExitedMenu(playerid); @@ -2716,7 +2722,7 @@ forward OnPlayerExitedMenu(playerid); /// /// /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in gamemode. /// forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); @@ -2728,23 +2734,23 @@ forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); /// /// This callback can also be called by NPC. /// -/// Useful macros:

                                          +/// Useful macros:
                                          /// -/// // HOLDING(keys)

                                          -/// #define HOLDING(%0) ((newkeys & (%0)) == (%0))

                                          -///

                                          -/// // PRESSED(keys)

                                          -/// #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

                                          -///

                                          -/// // PRESSING(keyVariable, keys)

                                          -/// #define PRESSING(%0,%1) (%0 & (%1))

                                          -///

                                          -/// // RELEASED(keys)

                                          -/// #define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))

                                          +/// // HOLDING(keys)
                                          +/// #define HOLDING(%0) ((newkeys & (%0)) == (%0))
                                          +///
                                          +/// // PRESSED(keys)
                                          +/// #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
                                          +///
                                          +/// // PRESSING(keyVariable, keys)
                                          +/// #define PRESSING(%0,%1) (%0 & (%1))
                                          +///
                                          +/// // RELEASED(keys)
                                          +/// #define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
                                          ///
                                          /// /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in gamemode. /// forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys); @@ -2760,7 +2766,7 @@ forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys); /// This callback is only called when /rcon login is used in-game. /// This callback is only called when the player is not yet logged in. When the player is logged in, OnRconCommand is called instead. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnRconLoginAttempt(ip[], password[], success); @@ -2771,8 +2777,8 @@ forward OnRconLoginAttempt(ip[], password[], success); /// This callback is called, on average, 30 times per second, per player; only use it when you know what it's meant for (or more importantly what it's NOT meant for). /// The frequency with which this callback is called for each player varies, depending on what the player is doing. Driving or shooting will trigger a lot more updates than idling. /// -/// 0 - Update from this player will not be replicated to other clients.

                                          -/// 1 - Indicates that this update can be processed normally and sent to other players.

                                          +/// 0 - Update from this player will not be replicated to other clients.
                                          +/// 1 - Indicates that this update can be processed normally and sent to other players.
                                          /// It is always called first in filterscripts. /// forward OnPlayerUpdate(playerid); @@ -2786,7 +2792,7 @@ forward OnPlayerUpdate(playerid); /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// This callback can also be called by NPC. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnPlayerStreamIn(playerid, forplayerid); @@ -2800,7 +2806,7 @@ forward OnPlayerStreamIn(playerid, forplayerid); /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// This callback can also be called by NPC. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnPlayerStreamOut(playerid, forplayerid); @@ -2814,7 +2820,7 @@ forward OnPlayerStreamOut(playerid, forplayerid); /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// This callback can also be called by NPC. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnVehicleStreamIn(vehicleid, forplayerid); @@ -2828,7 +2834,7 @@ forward OnVehicleStreamIn(vehicleid, forplayerid); /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// This callback can also be called by NPC. /// -/// This callback does not handle returns.

                                          +/// This callback does not handle returns.
                                          /// It is always called first in filterscripts. /// forward OnVehicleStreamOut(vehicleid, forplayerid); @@ -2866,7 +2872,7 @@ forward OnActorStreamOut(actorid, forplayerid); /// A player's dialog doesn't hide when the gamemode restarts, causing the server to print "Warning: PlayerDialogResponse PlayerId: 0 dialog ID doesn't match last sent dialog ID" if a player responded to this dialog after restart. /// Parameters can contain different values, based on dialog's style. /// -/// Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.

                                          +/// Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.
                                          /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]); @@ -2882,14 +2888,14 @@ forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]); /// This callback was added in SA-MP 0.3d and will not work in earlier versions! /// GetPlayerHealth and GetPlayerArmour will return the old amounts of the player before this callback. /// -/// The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18).

                                          -/// The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

                                          -/// playerid is the only one who can call the callback.

                                          +/// The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18).
                                          +/// The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
                                          +/// playerid is the only one who can call the callback.
                                          /// The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. /// /// -/// 1 - Callback will not be called in other filterscripts.

                                          -/// 0 - Allows this callback to be called in other filterscripts.

                                          +/// 1 - Callback will not be called in other filterscripts.
                                          +/// 0 - Allows this callback to be called in other filterscripts.
                                          /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart); @@ -2903,16 +2909,16 @@ forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) /// /// This callback was added in SA-MP 0.3d and will not work in earlier versions! /// -/// Keep in mind this function can be inaccurate in some cases.

                                          -/// If you want to prevent certain players from damaging eachother, use SetPlayerTeam.

                                          -/// The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)

                                          -/// The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)

                                          -/// playerid is the only one who can call the callback.

                                          +/// Keep in mind this function can be inaccurate in some cases.
                                          +/// If you want to prevent certain players from damaging eachother, use SetPlayerTeam.
                                          +/// The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
                                          +/// The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
                                          +/// playerid is the only one who can call the callback.
                                          /// The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. /// /// -/// 1 - Callback will not be called in other filterscripts.

                                          -/// 0 - Allows this callback to be called in other filterscripts.

                                          +/// 1 - Callback will not be called in other filterscripts.
                                          +/// 0 - Allows this callback to be called in other filterscripts.
                                          /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart); @@ -2934,8 +2940,8 @@ forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart /// This callback was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function does not get called if the actor is set invulnerable (WHICH IS BY DEFAULT). See SetActorInvulnerable. /// -/// 1 - Callback will not be called in other filterscripts.

                                          -/// 0 - Allows this callback to be called in other filterscripts.

                                          +/// 1 - Callback will not be called in other filterscripts.
                                          +/// 0 - Allows this callback to be called in other filterscripts.
                                          /// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. /// forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart); @@ -2951,8 +2957,8 @@ forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponi /// This callback was added in SA-MP 0.3d and will not work in earlier versions! /// The Z value returned will be 0 (invalid) if it is far away from the player; use the MapAndreas plugin to get a more accurate Z coordinate. /// -/// 1 - Will prevent other filterscripts from receiving this callback.

                                          -/// 0 - Indicates that this callback will be passed to the next filterscript.

                                          +/// 1 - Will prevent other filterscripts from receiving this callback.
                                          +/// 0 - Indicates that this callback will be passed to the next filterscript.
                                          /// It is always called first in gamemode. /// forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); @@ -2966,7 +2972,7 @@ forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); /// The clickable area is defined by TextDrawTextSize. The x and y parameters passed to that function must not be zero or negative. /// Do not use CancelSelectTextDraw unconditionally within this callback. This results in an infinite loop. /// -/// Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.

                                          +/// Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
                                          /// It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. /// forward OnPlayerClickTextDraw(playerid, Text:clickedid); @@ -2980,7 +2986,7 @@ forward OnPlayerClickTextDraw(playerid, Text:clickedid); /// This callback was added in SA-MP 0.3e and will not work in earlier versions! /// When a player presses ESC to cancel selecting a textdraw, OnPlayerClickTextDraw is called with a textdraw ID of INVALID_TEXT_DRAW. OnPlayerClickPlayerTextDraw won't be called also. /// -/// Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.

                                          +/// Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
                                          /// It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. /// forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); @@ -2996,8 +3002,8 @@ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); /// /// This callback was added in SA-MP 0.3z R2-2 and will not work in earlier versions! /// -/// 1 - Will prevent other filterscripts from receiving this callback.

                                          -/// 0 - Indicates that this callback will be passed to the next filterscript.

                                          +/// 1 - Will prevent other filterscripts from receiving this callback.
                                          +/// 0 - Indicates that this callback will be passed to the next filterscript.
                                          /// It is always called first in filterscripts. /// forward OnIncomingConnection(playerid, ip_address[], port); @@ -3013,8 +3019,8 @@ forward OnIncomingConnection(playerid, ip_address[], port); /// This callback was added in SA-MP 0.3z R4 and will not work in earlier versions! /// This callback is called very frequently per second per trailer. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. /// -/// 0 - Cancels any trailer updates from being sent to other players. Update is still sent to the updating player.

                                          -/// 1 - Processes the trailer update as normal and synchronizes it between all players.

                                          +/// 0 - Cancels any trailer updates from being sent to other players. Update is still sent to the updating player.
                                          +/// 1 - Processes the trailer update as normal and synchronizes it between all players.
                                          /// It is always called first in filterscripts. /// forward OnTrailerUpdate(playerid, vehicleid); @@ -3028,8 +3034,8 @@ forward OnTrailerUpdate(playerid, vehicleid); /// This callback can also be called by NPC. /// This callback is only called when a vehicle's siren is toggled on or off, NOT when the alternate siren is in use (holding horn). /// -/// 1 - Will prevent gamemode from receiving this callback.

                                          -/// 0 - Indicates that this callback will be passed to the gamemode.

                                          +/// 1 - Will prevent gamemode from receiving this callback.
                                          +/// 0 - Indicates that this callback will be passed to the gamemode.
                                          /// It is always called first in filterscripts. /// forward OnVehicleSirenStateChange(playerid, vehicleid, newstate); @@ -3054,8 +3060,8 @@ forward OnPlayerRequestDownload(playerid, type, crc); /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// There is currently only one (0 - CLICK_SOURCE_SCOREBOARD). The existence of this argument suggests that more sources may be supported in the future. /// -/// 1 - Will prevent other filterscripts from receiving this callback.

                                          -/// 0 - Indicates that this callback will be passed to the next filterscript.

                                          +/// 1 - Will prevent other filterscripts from receiving this callback.
                                          +/// 0 - Indicates that this callback will be passed to the next filterscript.
                                          /// It is always called first in filterscripts. /// forward OnPlayerClickPlayer(playerid, clickedplayerid, source); @@ -3078,8 +3084,8 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, source); /// This callback was added in SA-MP 0.3e and will not work in earlier versions! /// When using EDIT_RESPONSE_UPDATE be aware that this callback will not be called when releasing an edit in progress resulting in the last update of EDIT_RESPONSE_UPDATE being out of sync of the objects current position. /// -/// 1 - Will prevent other scripts from receiving this callback.

                                          -/// 0 - Indicates that this callback will be passed to the next script.

                                          +/// 1 - Will prevent other scripts from receiving this callback.
                                          +/// 0 - Indicates that this callback will be passed to the next script.
                                          /// It is always called first in filterscripts. /// forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); @@ -3104,8 +3110,8 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, /// This callback was added in SA-MP 0.3e and will not work in earlier versions! /// Editions should be discarded if response was 0 (cancelled). This must be done by storing the offsets etc. in an array BEFORE using EditAttachedObject. /// -/// 1 - Will prevent other scripts from receiving this callback.

                                          -/// 0 - Indicates that this callback will be passed to the next script.

                                          +/// 1 - Will prevent other scripts from receiving this callback.
                                          +/// 0 - Indicates that this callback will be passed to the next script.
                                          /// It is always called first in filterscripts. /// forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); @@ -3121,8 +3127,8 @@ forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, F /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// -/// 1 - Will prevent other scripts from receiving this callback.

                                          -/// 0 - Indicates that this callback will be passed to the next script.

                                          +/// 1 - Will prevent other scripts from receiving this callback.
                                          +/// 0 - Indicates that this callback will be passed to the next script.
                                          /// It is always called first in filterscripts. /// forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ); @@ -3148,23 +3154,23 @@ forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float: /// BULLET_HIT_TYPE_PLAYER is also called for NPCs. Actors are ignored by this callback and detects as BULLET_HIT_TYPE_NONE. /// This callback is only called when lag compensation is enabled. /// -/// If hittype is:

                                          +/// If hittype is:
                                          ///

                                            ///
                                          • - BULLET_HIT_TYPE_NONE: the fX, fY and fZ parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
                                          • ///
                                          • - Others: the fX, fY and fZ are offsets relative to the hitid.
                                          • ///
                                          ///
                                          /// -/// Isn't called if you fired in vehicle as driver or if you are looking behind with the aim enabled (shooting in air).

                                          -/// It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitid (the hit player's vehicleid) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER at all.

                                          +/// Isn't called if you fired in vehicle as driver or if you are looking behind with the aim enabled (shooting in air).
                                          +/// It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitid (the hit player's vehicleid) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER at all.
                                          /// Partially fixed in SA-MP 0.3.7: If fake weapon data is sent by a malicious user, other player clients may freeze or crash. To combat this, check if the reported weaponid can actually fire bullets. /// /// /// /// GetPlayerLastShotVectors can be used in this callback for more detailed bullet vector information. /// -/// 0 - Prevent the bullet from causing damage.

                                          -/// 1 - Allow the bullet to cause damage.

                                          +/// 0 - Prevent the bullet from causing damage.
                                          +/// 1 - Allow the bullet to cause damage.
                                          /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ); diff --git a/a_sampdb.inc b/a_sampdb.inc index d295d34..dd1b0dc 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -17,7 +17,7 @@ /// File name of the database /// Return type for this function has changed since version 0.3.7 R2. /// -/// It will create a new SQLite database, if there is no SQLite database with the same file name available.

                                          +/// It will create a new SQLite database, if there is no SQLite database with the same file name available.
                                          /// Close your database connection with db_close! /// /// Returns index (starting at 1) of the database connection . @@ -27,7 +27,7 @@ native DB:db_open(const name[]); /// The handle of the database connection to close (returned by db_open) /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. May mean that the database handle specified is not open. /// native db_close(DB:db); diff --git a/a_vehicles.inc b/a_vehicles.inc index e6e994f..82e4314 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -67,7 +67,7 @@ /// /// Trains can only be added with AddStaticVehicle and AddStaticVehicleEx. /// -/// The vehicle ID of the vehicle created (1 to MAX_VEHICLES).

                                          +/// The vehicle ID of the vehicle created (1 to MAX_VEHICLES).
                                          /// INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed). /// native CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:rotation, colour1, colour2, respawnDelay, bool:addSiren = false); @@ -78,7 +78,7 @@ native CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:rotation, colour1 /// /// /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. The vehicle does not exist. /// native DestroyVehicle(vehicleid); @@ -93,10 +93,10 @@ native DestroyVehicle(vehicleid); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// 0: Vehicle is not streamed in for the player, or the function failed to execute (player and/or vehicle do not exist).

                                          +/// 0: Vehicle is not streamed in for the player, or the function failed to execute (player and/or vehicle do not exist).
                                          /// 1: Vehicle is streamed in for the player. /// -native IsVehicleStreamedIn(vehicleid, playerid); +native bool:IsVehicleStreamedIn(vehicleid, playerid); ///

                                          Gets the position of a vehicle. /// The ID of the vehicle to get the position of @@ -107,7 +107,7 @@ native IsVehicleStreamedIn(vehicleid, playerid); /// /// /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. The vehicle specified does not exist. /// native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); @@ -122,24 +122,24 @@ native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); /// /// An empty vehicle will not fall after being teleported into the air. /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. The vehicle specified does not exist. /// native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); ///

                                          Get the rotation of a vehicle on the z axis (yaw). /// The ID of the vehicle to get the z angle of -/// A float variable in which to store the z rotation, passed by reference +/// A float variable in which to store the z rotation, passed by reference /// /// /// /// /// /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. This means the vehicle does not exist. /// -native GetVehicleZAngle(vehicleid, &Float:z_angle); +native GetVehicleZAngle(vehicleid, &Float:angle); ///

                                          Returns a vehicle's rotation on all axes as a quaternion. /// The ID of the vehicle to get the rotation of @@ -150,22 +150,23 @@ native GetVehicleZAngle(vehicleid, &Float:z_angle); /// /// This function was added in SA-MP 0.3b and will not work in earlier versions! /// -/// To euler:

                                          +/// To euler:
                                          /// -/// //GetVehicleRotation Created by IllidanS4

                                          -/// stock GetVehicleRotation(vehicleid,&Float:rx,&Float:ry,&Float:rz){

                                          -/// new Float:qw,Float:qx,Float:qy,Float:qz;

                                          -/// GetVehicleRotationQuat(vehicleid,qw,qx,qy,qz);

                                          -/// rx = asin(2*qy*qz-2*qx*qw);

                                          -/// ry = -atan2(qx*qz+qy*qw,0.5-qx*qx-qy*qy);

                                          -/// rz = -atan2(qx*qy+qz*qw,0.5-qx*qx-qz*qz);

                                          +/// // GetVehicleRotation Created by IllidanS4
                                          +/// stock GetVehicleRotation(vehicleid, &Float:rx, &Float:ry, &Float:rz)
                                          +/// {
                                          +/// new Float:qw, Float:qx, Float:qy, Float:qz;
                                          +/// GetVehicleRotationQuat(vehicleid, qw, qx, qy, qz);
                                          +/// rx = asin((2 * qy * qz) - (2 * qx * qw));
                                          +/// ry = -atan2((qx * qz) + (qy * qw), 0.5 - (qx * qx) - (qy * qy));
                                          +/// rz = -atan2((qx * qy) + (qz * qw), 0.5 - (qx * qx) - (qz * qz));
                                          /// } ///
                                          /// /// There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart from the z angle) /// This function may return incorrect values for unoccupied vehicles. The reason is that the third row of the vehicle's internal rotation matrix gets corrupted if it gets updated while unoccupied. /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. This means the vehicle specified does not exist. /// native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z); @@ -189,7 +190,7 @@ native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); /// A vehicle's x and y (pitch and roll) rotation will be reset when this function is used. The x and y rotations can not be set. /// This function does not work on unoccupied vehicles. /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. The vehicle specified does not exist. /// native SetVehicleZAngle(vehicleid, Float:angle); @@ -203,7 +204,7 @@ native SetVehicleZAngle(vehicleid, Float:angle); /// Vehicles must be respawned for the 'objective' to be removed. This can be circumvented somewhat using Get/SetVehicleParamsEx which do not require the vehicle to be respawned. It is worth noting however that the object will be disabled on a global scale, and this is only useful if only one player has the vehicle as an objective. /// Since 0.3a you will have to reapply this function when OnVehicleStreamIn is called. /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. The player and/or vehicle specified do not exist. /// native SetVehicleParamsForPlayer(vehicleid, playerid, objective, doors); @@ -233,7 +234,7 @@ native ManualVehicleEngineAndLights(); /// The alarm will not reset when finished, you'll need to reset it by yourself with this function. /// Lights also operate during the day (Only when ManualVehicleEngineAndLights is enabled). /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. This means the vehicle does not exist. /// native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); @@ -316,7 +317,7 @@ native GetVehicleParamsCarWindows(vehicleid, &driver, &passenger, &rearLeft, &re /// /// /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. The vehicle does not exist. /// native SetVehicleToRespawn(vehicleid); @@ -327,8 +328,8 @@ native SetVehicleToRespawn(vehicleid); /// /// /// -/// 1: The function executed successfully.

                                          -/// 0: The function failed to execute. This means the vehicle does not exist.

                                          +/// 1: The function executed successfully.
                                          +/// 0: The function failed to execute. This means the vehicle does not exist.
                                          /// native LinkVehicleToInterior(vehicleid, interiorid); @@ -367,23 +368,23 @@ native RemoveVehicleComponent(vehicleid, componentid); /// /// Some vehicles have only a primary colour and some can not have the colour changed at all. A few (cement, squallo) have 4 colours, of which 2 can not be changed in SA:MP /// -/// 1: The function executed successfully. The vehicle's colour was successfully changed.

                                          +/// 1: The function executed successfully. The vehicle's colour was successfully changed.
                                          /// 0: The function failed to execute. The vehicle does not exist. /// native ChangeVehicleColor(vehicleid, colour1, colour2); ///

                                          Change a vehicle's paintjob (for plain colours see ChangeVehicleColor). /// The ID of the vehicle to change the paintjob of -/// The ID of the Paintjob to apply. Use 3 to remove a paintjob +/// The ID of the Paintjob to apply. Use 3 to remove a paintjob /// /// /// -/// Known Bugs:

                                          -/// This function calls OnVehicleRespray.

                                          +/// Known Bugs:
                                          +/// This function calls OnVehicleRespray.
                                          /// Vehicles change their colour to white anymore when a paintjob is removed. /// /// This function always returns 1 (success), even if the vehicle passed is not created. -native ChangeVehiclePaintjob(vehicleid, paintJobid); +native ChangeVehiclePaintjob(vehicleid, paintjobid); ///

                                          Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%). /// The ID of the vehicle to set the health of @@ -394,7 +395,7 @@ native ChangeVehiclePaintjob(vehicleid, paintJobid); /// /// Full vehicle health is 1000, however higher values are possible and increase the health of the vehicle. /// -/// Health:

                                          +/// Health:
                                          ///

                                            ///
                                          • > 650 - undamaged
                                          • ///
                                          • 650-550 - white Smoke
                                          • @@ -404,7 +405,7 @@ native ChangeVehiclePaintjob(vehicleid, paintJobid); ///
                                          ///
                                          /// -/// 1: The function executed successfully.

                                          +/// 1: The function executed successfully.
                                          /// 0: The function failed to execute. This means the vehicle does not exist. /// native SetVehicleHealth(vehicleid, Float:health); @@ -417,7 +418,7 @@ native SetVehicleHealth(vehicleid, Float:health); /// /// Full vehicle health is 1000, however higher values are possible and increase the health of the vehicle. /// -/// Health:

                                          +/// Health:
                                          ///

                                            ///
                                          • > 650 - undamaged
                                          • ///
                                          • 650-550 - white Smoke
                                          • @@ -427,8 +428,8 @@ native SetVehicleHealth(vehicleid, Float:health); ///
                                          ///
                                          /// -/// 1 - success.

                                          -/// 0 - failure (invalid vehicle ID).

                                          +/// 1 - success.
                                          +/// 0 - failure (invalid vehicle ID).
                                          /// native GetVehicleHealth(vehicleid, &Float:health); @@ -455,7 +456,7 @@ native DetachTrailerFromVehicle(vehicleid); /// /// /// 1 if the vehicle has a trailer attached, 0 if not. -native IsTrailerAttachedToVehicle(vehicleid); +native bool:IsTrailerAttachedToVehicle(vehicleid); ///

                                          Get the ID of the trailer attached to a vehicle. /// The ID of the vehicle to get the trailer of @@ -474,16 +475,16 @@ native GetVehicleTrailer(vehicleid); /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// You can use colour embedding on the number plate text. /// -/// This function has no internal error checking. Do not assign custom number plates to vehicles without plates (boats, planes, etc) as this will result in some unneeded processing time on the client.

                                          -/// The vehicle must be re-spawned or re-streamed for the changes to take effect.

                                          -/// There's a limit of 32 characters on each number plate (including embedded colours).

                                          -/// The text length that can be seen on the number plate is around 9 to 10 characters, more characters will cause the text to split.

                                          -/// Some vehicle models has a backward number plate, e.g. Boxville (498) (as an alternative to this vehicle you can use vehicle model ID 609, which is a duplicated Boxville (aka Boxburg), but with a regular number plate).

                                          +/// This function has no internal error checking. Do not assign custom number plates to vehicles without plates (boats, planes, etc) as this will result in some unneeded processing time on the client.
                                          +/// The vehicle must be re-spawned or re-streamed for the changes to take effect.
                                          +/// There's a limit of 32 characters on each number plate (including embedded colours).
                                          +/// The text length that can be seen on the number plate is around 9 to 10 characters, more characters will cause the text to split.
                                          +/// Some vehicle models has a backward number plate, e.g. Boxville (498) (as an alternative to this vehicle you can use vehicle model ID 609, which is a duplicated Boxville (aka Boxburg), but with a regular number plate).
                                          /// This function only works in versions 0.2.1, 0.2.2, 0.2x and 0.3c (and beyond). /// /// -/// 1: The function executed successfully.

                                          -/// 0: The function failed to execute. The vehicle does not exist.

                                          +/// 1: The function executed successfully.
                                          +/// 0: The function failed to execute. The vehicle does not exist.
                                          /// native SetVehicleNumberPlate(vehicleid, const numberplate[]); @@ -505,7 +506,7 @@ native GetVehicleModel(vehicleid); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// Slots:

                                          +/// Slots:
                                          /// /// CARMODTYPE_SPOILER /// CARMODTYPE_HOOD @@ -524,7 +525,7 @@ native GetVehicleModel(vehicleid); /// /// /// -/// Known Bugs:

                                          +/// Known Bugs:
                                          ///

                                            ///
                                          • Doesn't work for CARMODTYPE_STEREO.
                                          • ///
                                          • Both front bull bars and front bumper components are saved in the CARMODTYPE_FRONT_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
                                          • @@ -552,7 +553,7 @@ native GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// 1: The function executed successfully.

                                            +/// 1: The function executed successfully.
                                            /// 0: The function failed to execute. This means the vehicle specified does not exist. /// native RepairVehicle(vehicleid); // Repairs the damage model and resets the health @@ -568,8 +569,8 @@ native RepairVehicle(vehicleid); // Repairs the damage model and resets the heal /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// Multiply vector with 250.66667 for kmph or 199.416667 for mph or something... /// -/// 1: The function executed successfully.

                                            -/// 0: The function failed to execute. This means the vehicle specified does not exist.

                                            +/// 1: The function executed successfully.
                                            +/// 0: The function failed to execute. This means the vehicle specified does not exist.
                                            /// native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); @@ -581,7 +582,7 @@ native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// This function has no affect on un-occupied vehicles and does not affect trains. /// -/// 1: The function executed successfully.

                                            +/// 1: The function executed successfully.
                                            /// 0: The function failed to execute. The vehicle does not exist. /// native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); @@ -596,7 +597,7 @@ native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); /// This function was added in SA-MP 0.3b and will not work in earlier versions! /// This function has no effect on un-occupied vehicles and does not effect trains. /// -/// 1: The function executed successfully.

                                            +/// 1: The function executed successfully.
                                            /// 0: The function failed to execute. The vehicle does not exist. /// native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); @@ -614,7 +615,7 @@ native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); /// /// This Callback was added in SA-MP 0.3a and will not work in earlier versions! /// -/// Door states:

                                            +/// Door states:
                                            ///

                                              ///
                                            • 0x000000FF - hood
                                            • ///
                                            • 0x0000FF00 - trunk
                                            • @@ -628,7 +629,7 @@ native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); ///
                                            /// /// -/// Light states:

                                            +/// Light states:
                                            ///

                                              ///
                                            • 0x01 - front left broken
                                            • ///
                                            • 0x04 - front right broken
                                            • @@ -636,7 +637,7 @@ native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); ///
                                            ///
                                            /// -/// Tire states:

                                            +/// Tire states:
                                            ///

                                              ///
                                            • 0x1 - back right popped
                                            • ///
                                            • 0x2 - front right popped
                                            • @@ -646,7 +647,7 @@ native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); ///
                                            ///
                                            /// -/// 1: The function executed successfully.

                                            +/// 1: The function executed successfully.
                                            /// 0: The function failed to execute. This means the vehicle specified does not exist. /// native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); @@ -664,7 +665,7 @@ native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// Door states:

                                            +/// Door states:
                                            ///

                                              ///
                                            • 0x000000FF - hood
                                            • ///
                                            • 0x0000FF00 - trunk
                                            • @@ -678,7 +679,7 @@ native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); ///
                                            /// /// -/// Light states:

                                            +/// Light states:
                                            ///

                                              ///
                                            • 0x01 - front left broken
                                            • ///
                                            • 0x04 - front right broken
                                            • @@ -686,7 +687,7 @@ native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); ///
                                            ///
                                            /// -/// Tire states:

                                            +/// Tire states:
                                            ///

                                              ///
                                            • 0x1 - back right popped
                                            • ///
                                            • 0x2 - front right popped
                                            • @@ -706,7 +707,7 @@ native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// -/// Information types:

                                              +/// Information types:
                                              ///

                                                ///
                                              • VEHICLE_MODEL_INFO_SIZE - vehicle size
                                              • ///
                                              • VEHICLE_MODEL_INFO_FRONTSEAT - position of the front seat
                                              • @@ -725,10 +726,10 @@ native GetVehicleModelInfo(vehiclemodel, infotype, &Float:x, &Float:y, &Float:z) /// Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their own virtual world. /// The ID of vehicle to set the virtual world of -/// The ID of the virtual world to put the vehicle in +/// The ID of the virtual world to put the vehicle in /// /// -native SetVehicleVirtualWorld(vehicleid, worldid); +native SetVehicleVirtualWorld(vehicleid, virtualWorld); /// Get the virtual world of a vehicle. /// The ID of the vehicle to get the virtual world of From 6ec7e5fa6434c51336c3773de24b6ed51cc86c23 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 27 Apr 2021 23:58:26 +0100 Subject: [PATCH 008/104] Idiomatic DB function naming. --- a_sampdb.inc | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/a_sampdb.inc b/a_sampdb.inc index dd1b0dc..abdf382 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -21,6 +21,9 @@ /// Close your database connection with db_close! /// /// Returns index (starting at 1) of the database connection . +native DB:DB_Open(const name[]) = db_open; + +#pragma deprecated Use `DB_Open`. native DB:db_open(const name[]); /// Closes an SQLite database that was opened with db_open. @@ -30,6 +33,9 @@ native DB:db_open(const name[]); /// 1: The function executed successfully.
                                                /// 0: The function failed to execute. May mean that the database handle specified is not open. /// +native DB_Close(DB:db) = db_close; + +#pragma deprecated Use `DB_Close`. native db_close(DB:db); /// This function is used to execute an SQL query on an opened SQLite database. @@ -38,29 +44,44 @@ native db_close(DB:db); /// Return type for this function has changed since version 0.3.7 R2. /// Always free the result by using db_free_result! /// The query result index (starting at 1). +native DBResult:DB_Query(DB:db, const query[]) = db_query; + +#pragma deprecated Use `DB_Query`. native DBResult:db_query(DB:db, const query[]); /// Frees result memory allocated from db_query. /// The result to free /// If DBResult:dbhandle is a valid handle, it returns 1, otherwise 0 if DBResult:dbhandle is a NULL reference. +native DB_FreeResult(DBResult:result) = db_free_result; + +#pragma deprecated Use `DB_FreeResult`. native db_free_result(DBResult:result); /// Returns the number of rows from a db_query. /// The result of db_query /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// The number of rows in the result. +native DB_NumRows(DBResult:result) = db_num_rows; + +#pragma deprecated Use `DB_NumRows`. native db_num_rows(DBResult:result); /// Moves to the next row of the result allocated from db_query. /// The result of db_query /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Returns 1 on success, otherwise 0 if DBResult:result is a NULL reference or the last row is reached. +native DB_NextRow(DBResult:result) = db_next_row; + +#pragma deprecated Use `DB_NextRow`. native db_next_row(DBResult:result); /// Get the number of fields in a result. /// The result of db_query /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// The number of fields in the result. +native DB_NumFields(DBResult:result) = db_num_fields; + +#pragma deprecated Use `DB_NumFields`. native db_num_fields(DBResult:result); /// Returns the name of a field at a particular index. @@ -70,6 +91,9 @@ native db_num_fields(DBResult:result); /// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Returns 1, if the function was successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. +native DB_FieldName(DBResult:result, field, output[], size = sizeof (output)) = db_field_name; + +#pragma deprecated Use `DB_FieldName`. native db_field_name(DBResult:result, field, output[], size = sizeof (output)); /// Get the content of a field from db_query. @@ -79,6 +103,9 @@ native db_field_name(DBResult:result, field, output[], size = sizeof (output)); /// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. +native DB_GetField(DBResult:result, field, output[], size = sizeof (output)) = db_get_field; + +#pragma deprecated Use `DB_GetField`. native db_get_field(DBResult:result, field, output[], size = sizeof (output)); /// Get the content of a field as an integer from db_query. @@ -86,6 +113,9 @@ native db_get_field(DBResult:result, field, output[], size = sizeof (output)); /// The field to get the data from (optional=0) /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Retrieved value as integer (number). +native DB_GetFieldInt(DBResult:result, field = 0) = db_get_field_int; + +#pragma deprecated Use `DB_GetFieldInt`. native db_get_field_int(DBResult:result, field = 0); /// Get the content of a field as a float from db_query. @@ -93,6 +123,9 @@ native db_get_field_int(DBResult:result, field = 0); /// The field to get the data from (optional=0) /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Retrieved value as floating point number. +native Float:DB_GetFieldFloat(DBResult:result, field = 0) = db_get_field_float; + +#pragma deprecated Use `DB_GetFieldFloat`. native Float:db_get_field_float(DBResult:result, field = 0); /// Get the contents of field with specified name. @@ -102,6 +135,9 @@ native Float:db_get_field_float(DBResult:result, field = 0); /// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. +native DB_GetFieldAssoc(DBResult:result, const field[], output[], size = sizeof (output)) = db_get_field_assoc; + +#pragma deprecated Use `DB_GetFieldAssoc`. native db_get_field_assoc(DBResult:result, const field[], output[], size = sizeof (output)); /// Get the contents of field as an integer with specified name. @@ -109,6 +145,9 @@ native db_get_field_assoc(DBResult:result, const field[], output[], size = sizeo /// The fieldname to get the data from /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Retrieved value as integer (number). +native DB_GetFieldAssocInt(DBResult:result, const field[]) = db_get_field_assoc_int; + +#pragma deprecated Use `DB_GetFieldAssocInt`. native db_get_field_assoc_int(DBResult:result, const field[]); /// Get the contents of field as a float with specified name. @@ -116,20 +155,36 @@ native db_get_field_assoc_int(DBResult:result, const field[]); /// The fieldname to get the data from /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Retrieved value as floating point number. +native Float:DB_GetFieldAssocFloat(DBResult:result, const field[]) = db_get_field_assoc_float; + +#pragma deprecated Use `DB_GetFieldAssocFloat`. native Float:db_get_field_assoc_float(DBResult:result, const field[]); /// Get memory handle for an SQLite database that was opened with db_open. /// The index of the database connection (returned by db_open) /// This function was added in SA-MP 0.3.7 R1 and will not work in earlier versions! /// Returns the memory handle for a specified database. +native DB_GetMemHandle(DB:db) = db_get_mem_handle; + +#pragma deprecated Use `DB_GetMemHandle`. native db_get_mem_handle(DB:db); /// Get memory handle for an SQLite query that was executed with db_query. /// The index of the query (returned by db_query) /// This function was added in SA-MP 0.3.7 R1 and will not work in earlier versions! /// Returns the memory handle for a specified query. +native DB_GetResultMemHandle(DBResult:result) = db_get_result_mem_handle; + +#pragma deprecated Use `DB_GetResultMemHandle`. native db_get_result_mem_handle(DBResult:result); +native DB_DebugOpenFiles() = db_debug_openfiles; + +#pragma deprecated Use `DB_DebugOpenFiles`. native db_debug_openfiles(); + +native DB_DebugOpenResults() = db_debug_openresults; + +#pragma deprecated Use `DB_DebugOpenResults`. native db_debug_openresults(); From a41db327b8fbb7663f3f9e98b54cce249e3c9f23 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 4 May 2021 21:20:24 +0100 Subject: [PATCH 009/104] Name tweaks. --- a_objects.inc | 20 ++++++++++---------- a_samp.inc | 2 +- a_vehicles.inc | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/a_objects.inc b/a_objects.inc index d157bf7..c224a52 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -84,7 +84,7 @@ native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// The object must be created first. /// When the vehicle is destroyed or respawned, the attached objects won't be destroyed with it; they will remain stationary at the position the vehicle disappeared and be reattached to the next vehicle to claim the vehicle ID that the objects were attached to. -native AttachObjectToVehicle(objectid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// You can use this function to attach objects to other objects. The objects will folow the main object. /// The object to attach to another object @@ -110,7 +110,7 @@ native AttachObjectToVehicle(objectid, vehicleid, Float:offsetX, Float:offsetY, /// 1: The function executed successfully.
                                                /// 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. /// -native AttachObjectToObject(objectid, attachtoid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); +native AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); /// Attach an object to a player. /// The ID of the object to attach to the player @@ -127,7 +127,7 @@ native AttachObjectToObject(objectid, attachtoid, Float:offsetX, Float:offsetY, /// /// /// This function always returns 0. -native AttachObjectToPlayer(objectid, playerid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +native AttachObjectToPlayer(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// Change the position of an object. /// The ID of the object to set the position of. Returned by CreateObject @@ -344,7 +344,7 @@ native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:ro /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You need to create the object before attempting to attach it to a vehicle. -native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +native AttachPlayerObjectToVehicle(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /// Sets the position of a player-object to the specified coordinates. /// The ID of the player whose player-object to set the position of @@ -540,8 +540,8 @@ native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const /// The text to show on the object. (MAX 2048 characters) /// The object's material index to replace with text (optional=0) /// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) -/// The font to use (optional="Arial") -/// The size of the text (MAX 255) (optional=24) +/// The font to use (optional="Arial") +/// The size of the text (MAX 255) (optional=24) /// Bold text. Set to 1 for bold, 0 for not (optional=1) /// The colour of the text, in ARGB format (optional=-1) /// The background colour, in ARGB format (optional=0) @@ -581,7 +581,7 @@ native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const /// 1: The function executed successfully.
                                                /// 0: The function failed to execute. /// -native SetObjectMaterialText(objectid, const text[], materialIndex = 0, materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, textAlignment = 0); +native SetObjectMaterialText(objectid, const text[], materialIndex = 0, materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, textAlignment = 0); /// Replace the texture of a player object with text. /// The ID of the player whose player object to set the text of @@ -589,8 +589,8 @@ native SetObjectMaterialText(objectid, const text[], materialIndex = 0, material /// The text to set /// The material index to replace with text (optional=0) /// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) -/// The font to use (optional="Arial") -/// The size of the text (MAX 255) (optional=24) +/// The font to use (optional="Arial") +/// The size of the text (MAX 255) (optional=24) /// Bold text. Set to 1 for bold, 0 for not (optional=1) /// The colour of the text (optional=-1) /// The background colour (optional=0) @@ -626,7 +626,7 @@ native SetObjectMaterialText(objectid, const text[], materialIndex = 0, material ///
                                              • OBJECT_MATERIAL_SIZE_512x512 140
                                              • ///
                                              ///
                                              -native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialIndex = 0, materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, textAlignment = 0); +native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialIndex = 0, materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, textAlignment = 0); /// Allows camera collisions with newly created objects to be disabled by default. /// 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) diff --git a/a_samp.inc b/a_samp.inc index de47053..51135bf 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -925,7 +925,7 @@ native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Flo /// /// /// -native AddStaticPickup(model, type, Float:x, Float:y, Float:x, virtualWorld = 0); +native AddStaticPickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0); /// This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. /// The model of the pickup diff --git a/a_vehicles.inc b/a_vehicles.inc index 82e4314..3943e50 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -466,9 +466,9 @@ native bool:IsTrailerAttachedToVehicle(vehicleid); /// The vehicle ID of the trailer or 0 if no trailer is attached. native GetVehicleTrailer(vehicleid); -/// Set a vehicle numberplate. +/// Set a vehicle numberPlate. /// The ID of the vehicle to set the number plate of -/// The text that should be displayed on the number plate +/// The text that should be displayed on the number plate /// /// /// @@ -486,7 +486,7 @@ native GetVehicleTrailer(vehicleid); /// 1: The function executed successfully.
                                              /// 0: The function failed to execute. The vehicle does not exist.
                                              /// -native SetVehicleNumberPlate(vehicleid, const numberplate[]); +native SetVehicleNumberPlate(vehicleid, const numberPlate[]); /// Gets the model ID of a vehicle. /// The ID of the vehicle to get the model of From 04ca6ac08dfbba48e4617fdd600af2b3b5851a24 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 4 May 2021 21:21:06 +0100 Subject: [PATCH 010/104] Fix clobbered names. --- a_players.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a_players.inc b/a_players.inc index d8cfb3b..4f4b213 100644 --- a/a_players.inc +++ b/a_players.inc @@ -899,13 +899,13 @@ native SetPlayerSkillLevel(playerid, skill, level); /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified is not connected, INVALID_VEHICLE_ID also. -native GetPlayerSurfingVehicleid(playerid); +native GetPlayerSurfingVehicleID(playerid); /// Returns the ID of the object the player is surfing on. /// The ID of the player surfing the object /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// The ID of the moving object the player is surfing. If the player isn't surfing a moving object, it will return INVALID_OBJECT_ID. -native GetPlayerSurfingObjectid(playerid); +native GetPlayerSurfingObjectID(playerid); /// Removes a standard San Andreas model for a single player within a specified range. /// The ID of the player to remove the objects for From 2fa5a19cf435b4664933759201a91dd9605d7115 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 4 May 2021 21:29:14 +0100 Subject: [PATCH 011/104] Another tag and name clobber. --- a_players.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a_players.inc b/a_players.inc index 4f4b213..c924d01 100644 --- a/a_players.inc +++ b/a_players.inc @@ -1681,7 +1681,7 @@ native PutPlayerInVehicle(playerid, vehicleid, seatid); /// /// /// ID of the vehicle or 0 if not in a vehicle. -native GetPlayerVehicleid(playerid); +native GetPlayerVehicleID(playerid); /// Find out which seat a player is in. /// The ID of the player you want to get the seat of @@ -2333,7 +2333,7 @@ native EnableStuntBonusForPlayer(playerid, bool:enable); /// Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie). /// 1 to enable stunt bonuses or 0 to disable them /// -native EnableStuntBonusForAll(enable); +native EnableStuntBonusForAll(bool:enable); /// Toggle whether a player is in spectator mode or not. While in spectator mode a player can spectate (watch) other players and vehicles. After using this function, either PlayerSpectatePlayer or PlayerSpectateVehicle needs to be used. /// The ID of the player who should spectate From c5b01813f2d4f8a78a119ef8a269fa9bfcfc2078 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Wed, 3 Oct 2018 21:03:46 +0200 Subject: [PATCH 012/104] More tags. --- a_http.inc | 30 ++++++---- a_npc.inc | 34 ++++++----- a_objects.inc | 48 +++++++++------- a_players.inc | 99 ++++++++++++++++++++------------ a_samp.inc | 151 ++++++++++++++++++++++++++++++------------------- a_sampdb.inc | 24 ++++---- a_vehicles.inc | 61 +++++++++++--------- 7 files changed, 266 insertions(+), 181 deletions(-) diff --git a/a_http.inc b/a_http.inc index 9542172..254a5d6 100644 --- a/a_http.inc +++ b/a_http.inc @@ -18,23 +18,29 @@ // -------------------------------------------------- // HTTP requests -#define HTTP_GET (1) -#define HTTP_POST (2) -#define HTTP_HEAD (3) +enum e_HTTP_METHOD +{ + HTTP_GET = 1, + HTTP_POST, + HTTP_HEAD +} // HTTP error response codes // These codes compliment ordinary HTTP response codes returned in 'responseCode' -// (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error) -#define HTTP_ERROR_BAD_HOST (1) -#define HTTP_ERROR_NO_SOCKET (2) -#define HTTP_ERROR_CANT_CONNECT (3) -#define HTTP_ERROR_CANT_WRITE (4) -#define HTTP_ERROR_CONTENT_TOO_BIG (5) -#define HTTP_ERROR_MALFORMED_RESPONSE (6) +// (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error) +enum e_HTTP_ERROR +{ + HTTP_ERROR_BAD_HOST = 1, + HTTP_ERROR_NO_SOCKET, + HTTP_ERROR_CANT_CONNECT, + HTTP_ERROR_CANT_WRITE, + HTTP_ERROR_CONTENT_TOO_BIG, + HTTP_ERROR_MALFORMED_RESPONSE +} /// Sends a threaded HTTP request. /// ID used to differentiate requests that are sent to the same callback (useful for playerids) -/// The type of request you wish to send +/// The type of request you wish to send /// The URL you want to request. (Without 'http://') /// Any POST data you want to send with the request /// Name of the callback function you want to use to handle responses to this request @@ -60,7 +66,7 @@ ///
                                            • + standard HTTP response codes
                                            • ///
                                            ///
                                            -native HTTP(index, type, const url[], const data[], const callback[]); +native HTTP(index, e_HTTP_METHOD:method, const url[], const data[], const callback[]); // example HTTP callback: public MyHttpResponse(index, responseCode, const data[]) { ... } diff --git a/a_npc.inc b/a_npc.inc index 749d741..2edb61e 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -61,13 +61,16 @@ #define INVALID_GANG_ZONE (-1) // States -#define PLAYER_STATE_NONE (0) -#define PLAYER_STATE_ONFOOT (1) -#define PLAYER_STATE_DRIVER (2) -#define PLAYER_STATE_PASSENGER (3) -#define PLAYER_STATE_WASTED (7) -#define PLAYER_STATE_SPAWNED (8) -#define PLAYER_STATE_SPECTATING (9) +enum +{ + PLAYER_STATE_NONE, + PLAYER_STATE_ONFOOT, + PLAYER_STATE_DRIVER, + PLAYER_STATE_PASSENGER, + PLAYER_STATE_WASTED = 7, + PLAYER_STATE_SPAWNED, + PLAYER_STATE_SPECTATING +} // Weapons #define WEAPON_BRASSKNUCKLE (1) @@ -138,9 +141,12 @@ #define KEY_LEFT (-128) #define KEY_RIGHT (128) -#define PLAYER_RECORDING_TYPE_NONE (0) -#define PLAYER_RECORDING_TYPE_DRIVER (1) -#define PLAYER_RECORDING_TYPE_ONFOOT (2) +enum e_PLAYER_RECORDING_TYPE +{ + PLAYER_RECORDING_TYPE_NONE, + PLAYER_RECORDING_TYPE_DRIVER, + PLAYER_RECORDING_TYPE_ONFOOT +} // Limits #if MAX_PLAYER_NAME < 1 || MAX_PLAYER_NAME > 24 @@ -269,7 +275,7 @@ open.mp releases can use `A` as the first digit. /// /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) - native printf(const format[], {Float, _}:...); + native printf(const format[], {Float,_}:...); #endif /// Formats a string to include variables and other strings inside it. @@ -309,7 +315,7 @@ native format(output[], len = sizeof (output), const format[], {Float, _}:...); /// The function that should be called must be public. /// The use of many timers will result in increased memory/cpu usage. /// The ID of the timer that was started. Timer IDs start at 1. -native SetTimer(const functionName[], interval, repeating); +native SetTimer(const functionName[], interval, bool:repeating); /// Kills (stops) a running timer. /// The ID of the timer to kill (returned by SetTimer or SetTimerEx) @@ -531,10 +537,10 @@ native bool:IsPlayerConnected(playerid); /// This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. /// The type of recording to be loaded -/// The filename to be loaded, without the .rec extension +/// The filename to be loaded, without the .rec extension /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! -native StartRecordingPlayback(playbacktype, const recordFike[]); +native StartRecordingPlayback(e_PLAYER_RECORDING_TYPE:playbacktype, const recordFile[]); /// This will stop the current .rec file which is being ran by the NPC, making it stay idle until some other order is given. /// diff --git a/a_objects.inc b/a_objects.inc index c224a52..83c40e4 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -18,24 +18,30 @@ // Defines // -------------------------------------------------- -#define OBJECT_MATERIAL_SIZE_32x32 (10) -#define OBJECT_MATERIAL_SIZE_64x32 (20) -#define OBJECT_MATERIAL_SIZE_64x64 (30) -#define OBJECT_MATERIAL_SIZE_128x32 (40) -#define OBJECT_MATERIAL_SIZE_128x64 (50) -#define OBJECT_MATERIAL_SIZE_128x128 (60) -#define OBJECT_MATERIAL_SIZE_256x32 (70) -#define OBJECT_MATERIAL_SIZE_256x64 (80) -#define OBJECT_MATERIAL_SIZE_256x128 (90) -#define OBJECT_MATERIAL_SIZE_256x256 (100) -#define OBJECT_MATERIAL_SIZE_512x64 (110) -#define OBJECT_MATERIAL_SIZE_512x128 (120) -#define OBJECT_MATERIAL_SIZE_512x256 (130) -#define OBJECT_MATERIAL_SIZE_512x512 (140) - -#define OBJECT_MATERIAL_TEXT_ALIGN_LEFT (0) -#define OBJECT_MATERIAL_TEXT_ALIGN_CENTER (1) -#define OBJECT_MATERIAL_TEXT_ALIGN_RIGHT (2) +enum e_OBJECT_MATERIAL_SIZE (+= 10) +{ + OBJECT_MATERIAL_SIZE_32x32 = 10, + OBJECT_MATERIAL_SIZE_64x32, + OBJECT_MATERIAL_SIZE_64x64, + OBJECT_MATERIAL_SIZE_128x32, + OBJECT_MATERIAL_SIZE_128x64, + OBJECT_MATERIAL_SIZE_128x128, + OBJECT_MATERIAL_SIZE_256x32, + OBJECT_MATERIAL_SIZE_256x64, + OBJECT_MATERIAL_SIZE_256x128, + OBJECT_MATERIAL_SIZE_256x256, + OBJECT_MATERIAL_SIZE_512x64, + OBJECT_MATERIAL_SIZE_512x128, + OBJECT_MATERIAL_SIZE_512x256, + OBJECT_MATERIAL_SIZE_512x512, +} + +enum e_OBJECT_MATERIAL_TEXT_ALIGN +{ + OBJECT_MATERIAL_TEXT_ALIGN_LEFT, + OBJECT_MATERIAL_TEXT_ALIGN_CENTER, + OBJECT_MATERIAL_TEXT_ALIGN_RIGHT +} // Objects @@ -581,7 +587,7 @@ native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const /// 1: The function executed successfully.
                                            /// 0: The function failed to execute. ///
                                            -native SetObjectMaterialText(objectid, const text[], materialIndex = 0, materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, textAlignment = 0); +native SetObjectMaterialText(objectid, const text[], materialIndex = 0, e_OBJECT_MATERIAL_SIZE:materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, e_OBJECT_MATERIAL_TEXT_ALIGN:textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); /// Replace the texture of a player object with text. /// The ID of the player whose player object to set the text of @@ -626,7 +632,7 @@ native SetObjectMaterialText(objectid, const text[], materialIndex = 0, material ///
                                          • OBJECT_MATERIAL_SIZE_512x512 140
                                          • ///
                                          ///
                                          -native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialIndex = 0, materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, textAlignment = 0); +native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialIndex = 0, e_OBJECT_MATERIAL_SIZE:materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, e_OBJECT_MATERIAL_TEXT_ALIGN:textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); /// Allows camera collisions with newly created objects to be disabled by default. /// 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) @@ -635,5 +641,5 @@ native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialInd /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function only affects the camera collision of objects created AFTER its use - it does not toggle existing objects' camera collisions. /// This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). -native SetObjectsDefaultCameraCol(disable); +native SetObjectsDefaultCameraCol(bool:disable); diff --git a/a_players.inc b/a_players.inc index c924d01..eb464f5 100644 --- a/a_players.inc +++ b/a_players.inc @@ -44,12 +44,15 @@ #define SPECIAL_ACTION_CUFFED (24) #define SPECIAL_ACTION_CARRY (25) -#define FIGHT_STYLE_NORMAL (4) -#define FIGHT_STYLE_BOXING (5) -#define FIGHT_STYLE_KUNGFU (6) -#define FIGHT_STYLE_KNEEHEAD (7) -#define FIGHT_STYLE_GRABKICK (15) -#define FIGHT_STYLE_ELBOW (16) +enum e_FIGHT_STYLE +{ + FIGHT_STYLE_NORMAL = 4, + FIGHT_STYLE_BOXING, + FIGHT_STYLE_KUNGFU, + FIGHT_STYLE_KNEEHEAD, + FIGHT_STYLE_GRABKICK = 15, + FIGHT_STYLE_ELBOW +} #define WEAPONSKILL_PISTOL (0) #define WEAPONSKILL_PISTOL_SILENCED (1) @@ -70,28 +73,43 @@ #define WEAPONSTATE_RELOADING (3) // PVar enumeration -#define PLAYER_VARTYPE_NONE (0) -#define PLAYER_VARTYPE_INT (1) -#define PLAYER_VARTYPE_STRING (2) -#define PLAYER_VARTYPE_FLOAT (3) - -#define MAPICON_LOCAL (0) // displays in the player's local area -#define MAPICON_GLOBAL (1) // displays always -#define MAPICON_LOCAL_CHECKPOINT (2) // displays in the player's local area and has a checkpoint marker -#define MAPICON_GLOBAL_CHECKPOINT (3) // displays always and has a checkpoint marker - -#define CAMERA_CUT (2) -#define CAMERA_MOVE (1) +enum e_PLAYER_VARTYPE +{ + PLAYER_VARTYPE_NONE, + PLAYER_VARTYPE_INT, + PLAYER_VARTYPE_STRING, + PLAYER_VARTYPE_FLOAT +} + +enum e_MAPICON +{ + MAPICON_LOCAL, // displays in the player's local area + MAPICON_GLOBAL, // displays always + MAPICON_LOCAL_CHECKPOINT, // displays in the player's local area and has a checkpoint marker + MAPICON_GLOBAL_CHECKPOINT // displays always and has a checkpoint marker +} + +enum e_CAMERA +{ + CAMERA_MOVE = 1, + CAMERA_CUT +} // Spectating -#define SPECTATE_MODE_NORMAL (1) -#define SPECTATE_MODE_FIXED (2) -#define SPECTATE_MODE_SIDE (3) +enum e_SPECTATE_MODE +{ + SPECTATE_MODE_NORMAL = 1, + SPECTATE_MODE_FIXED, + SPECTATE_MODE_SIDE +} // Recording for NPC playback -#define PLAYER_RECORDING_TYPE_NONE (0) -#define PLAYER_RECORDING_TYPE_DRIVER (1) -#define PLAYER_RECORDING_TYPE_ONFOOT (2) +enum e_PLAYER_RECORDING_TYPE +{ + PLAYER_RECORDING_TYPE_NONE, + PLAYER_RECORDING_TYPE_DRIVER, + PLAYER_RECORDING_TYPE_ONFOOT +} // Player @@ -479,6 +497,12 @@ native SetPlayerSkin(playerid, skinid); /// The skin ID (0 if invalid). native GetPlayerSkin(playerid); +/// Returns the class of the players skin. +/// The player you want to get the skin from +/// +/// Returns the new skin after SetSpawnInfo is called but before the player actually respawns to get the new skin. +/// Returns the old skin if the player was spawned through SpawnPlayer function. +/// The skin id (0 if invalid). native GetPlayerCustomSkin(playerid); /// Give a player a weapon with a specified amount of ammo. @@ -744,7 +768,7 @@ native GetPlayerWantedLevel(playerid); ///
                                        • FIGHT_STYLE_ELBOW
                                        • ///
                                        ///
                                        -native SetPlayerFightingStyle(playerid, style); +native SetPlayerFightingStyle(playerid, e_FIGHT_STYLE:style); /// Get the fighting style the player currently using. /// The ID of the player to get the fighting style of @@ -762,7 +786,7 @@ native SetPlayerFightingStyle(playerid, style); ///
                                      ///
                                      /// The ID of the fighting style of the player. -native GetPlayerFightingStyle(playerid); +native e_FIGHT_STYLE:GetPlayerFightingStyle(playerid); /// Set a player's velocity on the x, y and z axes. /// The player to apply the speed to @@ -1184,7 +1208,7 @@ native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:width, Float:heig /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at PlayerTextDrawTextSize. -native PlayerTextDrawAlignment(playerid, PlayerText:text, alignment); +native PlayerTextDrawAlignment(playerid, PlayerText:text, e_TEXT_DRAW_ALIGN:alignment); /// Sets the text colour of a player-textdraw. /// The ID of the player who's textdraw to set the colour of @@ -1628,7 +1652,7 @@ native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); ///
                                    ///
                                    /// Returns the type of the PVar. See table below. -native GetPVarType(playerid, const pvar[]); +native e_PLAYER_VARTYPE:GetPVarType(playerid, const pvar[]); #if MAX_CHATBUBBLE_LENGTH < 1 || MAX_CHATBUBBLE_LENGTH > 144 #error MAX_CHATBUBBLE_LENGTH must be >= 1 and <= 144 @@ -1749,7 +1773,7 @@ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); /// This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, bool:forceSync = false); -/// Clears all animations for the given player (it also cancels all current tasks such as jetpacking, parachuting, entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). +/// Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). /// The ID of the player to clear the animations of /// Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) /// @@ -2011,7 +2035,7 @@ native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); /// 1: The function executed successfully.
                                    /// 0: The function failed to execute. Player is not connected. /// -native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, colour, style = MAPICON_LOCAL); +native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, colour, e_MAPICON:style = MAPICON_LOCAL); /// Removes a map icon that was set earlier for a player using SetPlayerMapIcon. /// The ID of the player whose icon to remove @@ -2029,6 +2053,7 @@ native RemovePlayerMapIcon(playerid, iconid); /// This function, as of 0.3d, is deprecated. Check OnPlayerClickMap. /// This function will work only if AllowAdminTeleport is enabled, and you have to be an admin. /// +#pragma deprecated Use `OnPlayerClickMap`. native AllowPlayerTeleport(playerid, bool:allow); // Player camera @@ -2047,7 +2072,7 @@ native AllowPlayerTeleport(playerid, bool:allow); /// 1: The function executed successfully.
                                    /// 0: The function failed to execute. The player specified doesn't exist. /// -native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); +native SetPlayerCameraPos(playerid,Float:x, Float:y, Float:z); /// Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos. /// The ID of the player whose camera to set @@ -2064,7 +2089,7 @@ native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); /// 1: The function executed successfully.
                                    /// 0: The function failed to execute. The player specified does not exist. /// -native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, cut = CAMERA_CUT); +native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, e_CAMERA:cut = CAMERA_CUT); /// Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos. /// The player you want to restore the camera for @@ -2223,7 +2248,7 @@ native AttachCameraToPlayerObject(playerid, objectid); /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); +native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, e_CAMERA:cut = CAMERA_CUT); /// Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. /// The ID of the player the camera should be moved for @@ -2240,7 +2265,7 @@ native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Flo /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, cut = CAMERA_CUT); +native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, e_CAMERA:cut = CAMERA_CUT); // Player conditionals @@ -2369,7 +2394,7 @@ native TogglePlayerSpectating(playerid, bool:toggle); /// 1: The function executed successfully.
                                    /// 0: The function failed to execute. One of the players specified does not exist. /// -native PlayerSpectatePlayer(playerid, targetid, mode = SPECTATE_MODE_NORMAL); +native PlayerSpectatePlayer(playerid, targetid, e_SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); /// Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. /// The ID of the player who should spectate a vehicle @@ -2383,7 +2408,7 @@ native PlayerSpectatePlayer(playerid, targetid, mode = SPECTATE_MODE_NORMAL); /// 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.
                                    /// 0: The function failed to execute. The player, vehicle, or both don't exist. /// -native PlayerSpectateVehicle(playerid, targetid, mode = SPECTATE_MODE_NORMAL); +native PlayerSpectateVehicle(playerid, targetid, e_SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); /// Starts recording a player's movements to a file, which can then be reproduced by an NPC. /// The ID of the player to record @@ -2391,7 +2416,7 @@ native PlayerSpectateVehicle(playerid, targetid, mode = SPECTATE_MODE_NORMAL); /// The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native StartRecordingPlayerData(playerid, recordType, const recordFile[]); +native StartRecordingPlayerData(playerid, e_PLAYER_RECORDING_TYPE:recordType, const recordFile[]); /// Stops all the recordings that had been started with StartRecordingPlayerData for a specific player. /// The player you want to stop the recordings of diff --git a/a_samp.inc b/a_samp.inc index 51135bf..b78f219 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -87,21 +87,27 @@ #define INVALID_PLAYER_3DTEXT_ID (PlayerText3D:0xFFFF) // States -#define PLAYER_STATE_NONE (0) -#define PLAYER_STATE_ONFOOT (1) -#define PLAYER_STATE_DRIVER (2) -#define PLAYER_STATE_PASSENGER (3) -#define PLAYER_STATE_EXIT_VEHICLE (4) // (used internally) -#define PLAYER_STATE_ENTER_VEHICLE_DRIVER (5) // (used internally) -#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER (6) // (used internally) -#define PLAYER_STATE_WASTED (7) -#define PLAYER_STATE_SPAWNED (8) -#define PLAYER_STATE_SPECTATING (9) +enum +{ + PLAYER_STATE_NONE, + PLAYER_STATE_ONFOOT, + PLAYER_STATE_DRIVER, + PLAYER_STATE_PASSENGER, + PLAYER_STATE_EXIT_VEHICLE, // (used internally) + PLAYER_STATE_ENTER_VEHICLE_DRIVER, // (used internally) + PLAYER_STATE_ENTER_VEHICLE_PASSENGER, // (used internally) + PLAYER_STATE_WASTED, + PLAYER_STATE_SPAWNED, + PLAYER_STATE_SPECTATING +} // Marker modes used by ShowPlayerMarkers() -#define PLAYER_MARKERS_MODE_OFF (0) -#define PLAYER_MARKERS_MODE_GLOBAL (1) -#define PLAYER_MARKERS_MODE_STREAMED (2) +enum e_PLAYER_MARKERS +{ + PLAYER_MARKERS_MODE_OFF, + PLAYER_MARKERS_MODE_GLOBAL, + PLAYER_MARKERS_MODE_STREAMED +} // Weapons #define WEAPON_BRASSKNUCKLE (1) @@ -176,42 +182,70 @@ #define KEY_RIGHT (128) // Player GUI Dialog -#define DIALOG_STYLE_MSGBOX (0) -#define DIALOG_STYLE_INPUT (1) -#define DIALOG_STYLE_LIST (2) -#define DIALOG_STYLE_PASSWORD (3) -#define DIALOG_STYLE_TABLIST (4) -#define DIALOG_STYLE_TABLIST_HEADERS (5) +enum e_DIALOG_STYLE +{ + DIALOG_STYLE_MSGBOX, + DIALOG_STYLE_INPUT, + DIALOG_STYLE_LIST, + DIALOG_STYLE_PASSWORD, + DIALOG_STYLE_TABLIST, + DIALOG_STYLE_TABLIST_HEADERS +} // Text Draw -#define TEXT_DRAW_FONT_SPRITE_DRAW (4) -#define TEXT_DRAW_FONT_MODEL_PREVIEW (5) +#define TEXT_DRAW_FONT_SPRITE_DRAW (4) +#define TEXT_DRAW_FONT_MODEL_PREVIEW (5) + +enum e_TEXT_DRAW_ALIGN +{ + TEXT_DRAW_ALIGN_LEFT = 1, + TEXT_DRAW_ALIGN_CENTER, + TEXT_DRAW_ALIGN_RIGHT +} // SVar enumeration -#define SERVER_VARTYPE_NONE (0) -#define SERVER_VARTYPE_INT (1) -#define SERVER_VARTYPE_STRING (2) -#define SERVER_VARTYPE_FLOAT (3) +enum e_SERVER_VARTYPE +{ + SERVER_VARTYPE_NONE, + SERVER_VARTYPE_INT, + SERVER_VARTYPE_STRING, + SERVER_VARTYPE_FLOAT +} // Artwork/NetModels -#define DOWNLOAD_REQUEST_EMPTY (0) -#define DOWNLOAD_REQUEST_MODEL_FILE (1) -#define DOWNLOAD_REQUEST_TEXTURE_FILE (2) - -#define CLICK_SOURCE_SCOREBOARD (0) - -#define EDIT_RESPONSE_CANCEL (0) -#define EDIT_RESPONSE_FINAL (1) -#define EDIT_RESPONSE_UPDATE (2) - -#define SELECT_OBJECT_GLOBAL_OBJECT (1) -#define SELECT_OBJECT_PLAYER_OBJECT (2) - -#define BULLET_HIT_TYPE_NONE (0) -#define BULLET_HIT_TYPE_PLAYER (1) -#define BULLET_HIT_TYPE_VEHICLE (2) -#define BULLET_HIT_TYPE_OBJECT (3) -#define BULLET_HIT_TYPE_PLAYER_OBJECT (4) +enum e_DOWNLOAD_REQUEST +{ + DOWNLOAD_REQUEST_EMPTY, + DOWNLOAD_REQUEST_MODEL_FILE, + DOWNLOAD_REQUEST_TEXTURE_FILE +} + +enum e_CLICK_SOURCE +{ + CLICK_SOURCE_SCOREBOARD +} + +enum e_EDIT_RESPONSE +{ + EDIT_RESPONSE_CANCEL, + EDIT_RESPONSE_FINAL, + EDIT_RESPONSE_UPDATE +} + +enum e_SELECT_OBJECT +{ + SELECT_OBJECT_GLOBAL_OBJECT = 1, + SELECT_OBJECT_PLAYER_OBJECT +} + +enum e_BULLET_HIT_TYPE +{ + BULLET_HIT_TYPE_NONE, + BULLET_HIT_TYPE_PLAYER, + BULLET_HIT_TYPE_VEHICLE, + BULLET_HIT_TYPE_OBJECT, + BULLET_HIT_TYPE_PLAYER_OBJECT +} // Limits #if MAX_PLAYER_NAME < 1 || MAX_PLAYER_NAME > 24 @@ -366,7 +400,7 @@ open.mp releases can use `A` as the first digit. /// /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) - native printf(const format[], {Float, _}:...); + native printf(const format[], {Float,_}:...); #endif /// Formats a string to include variables and other strings inside it. @@ -499,7 +533,7 @@ native GameTextForPlayer(playerid, const string[], time, style); /// The function that should be called must be public. /// The use of many timers will result in increased memory/cpu usage. /// The ID of the timer that was started. Timer IDs start at 1. -native SetTimer(const functionName[], interval, repeating); +native SetTimer(const functionName[], interval, bool:repeating); /// Sets a timer to call a function after the specified interval. This variant ('Ex') can pass parameters (such as a player ID) to the function. /// The name of a public function to call when the timer expires @@ -527,7 +561,7 @@ native SetTimer(const functionName[], interval, repeating); ///
                                  /// /// The ID of the timer that was started. Timer IDs start at 1 and are never reused. There are no internal checks to verify that the parameters passed are valid (e.g. duration not a minus value). -native SetTimerEx(const functionName[], interval, repeating, const format[], {Float, _}:...); +native SetTimerEx(const functionName[], interval, bool:repeating, const format[] = "", {Float, _}:...); /// Kills (stops) a running timer. /// The ID of the timer to kill (returned by SetTimer or SetTimerEx) @@ -568,7 +602,7 @@ native GetMaxPlayers(); ///
                                • s - a string
                                • ///
                                /// -native CallRemoteFunction(const function[], const format[], {Float, _}:...); +native CallRemoteFunction(const function[], const format[], {Float,_}:...); /// Calls a public function from the script in which it is used. /// Public function's name @@ -588,7 +622,7 @@ native CallRemoteFunction(const function[], const format[], {Float, _}:...); ///
                              • s - a string
                              • ///
                              ///
                              -native CallLocalFunction(const function[], const format[], {Float, _}:...); +native CallLocalFunction(const function[], const format[], {Float,_}:...); /// Returns the norm (length) of the provided vector. /// The vector's magnitude on the x axis @@ -800,7 +834,7 @@ native GetSVarNameAtIndex(index, output[], size = sizeof (output)); ///
                            ///
                            /// Returns the type of the SVar. See table below. -native GetSVarType(const svar[]); +native e_SERVER_VARTYPE:GetSVarType(const svar[]); // Game @@ -1000,7 +1034,7 @@ native ShowNameTags(bool:show); ///
                          ///
                          /// It is also possible to set a player's colour to a colour that has full transparency (no alpha value). This makes it possible to show markers on a per-player basis. -native ShowPlayerMarkers(mode); +native ShowPlayerMarkers(e_PLAYER_MARKERS:mode); /// Ends the current gamemode. /// @@ -1044,6 +1078,7 @@ native EnableVehicleFriendlyFire(); /// /// /// +#pragma deprecated Use `OnPlayerInteriorChange`. native AllowInteriorWeapons(bool:allow); /// Set the world weather for all players. @@ -1737,7 +1772,7 @@ native TextDrawTextSize(Text:text, Float:width, Float:height); /// The ID of the textdraw to set the alignment of /// 1-left 2-centered 3-right /// For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at TextDrawTextSize, also position coordinate become position of center of textdraw and not left/top edges. -native TextDrawAlignment(Text:text, alignment); +native TextDrawAlignment(Text:text, e_TEXT_DRAW_ALIGN:alignment); /// Sets the text colour of a textdraw. /// The ID of the textdraw to change the colour of. @@ -2189,7 +2224,7 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const /// The title at the top of the dialog. The length of the caption can not exceed more than 64 characters before it starts to cut off /// The text to display in the main dialog. Use \n to start a new line and \t to tabulate /// The text on the left button -/// The text on the right button. Leave it blank ("") to hide it +/// The text on the right button. Leave it blank ( "" ) to hide it /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -2199,7 +2234,7 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const /// 1: The function executed successfully.
                          /// 0: The function failed to execute. This means the player is not connected.
                          /// -native ShowPlayerDialog(playerid, dialogid, style, const caption[], const info[], const button1[], const button2[]); +native ShowPlayerDialog(playerid, dialogid, e_DIALOG_STYLE:style, const caption[], const info[], const button1[], const button2[]); /// Get a players unique ID. /// The player to get the unique ID of @@ -3064,7 +3099,7 @@ forward OnPlayerRequestDownload(playerid, type, crc); /// 0 - Indicates that this callback will be passed to the next filterscript.
                          /// It is always called first in filterscripts. /// -forward OnPlayerClickPlayer(playerid, clickedplayerid, source); +forward OnPlayerClickPlayer(playerid, clickedplayerid, e_CLICK_SOURCE:source); /// This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). /// The ID of the player that edited an object @@ -3088,7 +3123,7 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, source); /// 0 - Indicates that this callback will be passed to the next script.
                          /// It is always called first in filterscripts. /// -forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); +forward OnPlayerEditObject(playerid, playerobject, objectid, /*e_EDIT_RESPONSE:*/response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); /// This callback is called when a player ends attached object edition mode. /// The ID of the player that ended edition mode @@ -3114,7 +3149,7 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, /// 0 - Indicates that this callback will be passed to the next script.
                          /// It is always called first in filterscripts. /// -forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); +forward OnPlayerEditAttachedObject(playerid, /*e_EDIT_RESPONSE:*/response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); /// This callback is called when a player selects an object after SelectObject has been used. /// The ID of the player that selected an object @@ -3131,7 +3166,7 @@ forward OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, F /// 0 - Indicates that this callback will be passed to the next script.
                          /// It is always called first in filterscripts. /// -forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerSelectObject(playerid, e_SELECT_OBJECT:type, objectid, modelid, Float:fX, Float:fY, Float:fZ); /// This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). /// The ID of the player that shot a weapon @@ -3173,7 +3208,7 @@ forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float: /// 1 - Allow the bullet to cause damage.
                          /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. /// -forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerWeaponShot(playerid, weaponid, e_BULLET_HIT_TYPE:hittype, hitid, Float:fX, Float:fY, Float:fZ); /// This callback is called when a SendClientCheck request comletes /// The ID of the player checked diff --git a/a_sampdb.inc b/a_sampdb.inc index abdf382..0db5fe7 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -33,10 +33,10 @@ native DB:db_open(const name[]); /// 1: The function executed successfully.
                          /// 0: The function failed to execute. May mean that the database handle specified is not open. /// -native DB_Close(DB:db) = db_close; +native bool:DB_Close(DB:db) = db_close; #pragma deprecated Use `DB_Close`. -native db_close(DB:db); +native bool:db_close(DB:db); /// This function is used to execute an SQL query on an opened SQLite database. /// The database handle to query @@ -52,10 +52,10 @@ native DBResult:db_query(DB:db, const query[]); /// Frees result memory allocated from db_query. /// The result to free /// If DBResult:dbhandle is a valid handle, it returns 1, otherwise 0 if DBResult:dbhandle is a NULL reference. -native DB_FreeResult(DBResult:result) = db_free_result; +native bool:DB_FreeResult(DBResult:result) = db_free_result; #pragma deprecated Use `DB_FreeResult`. -native db_free_result(DBResult:result); +native bool:db_free_result(DBResult:result); /// Returns the number of rows from a db_query. /// The result of db_query @@ -70,10 +70,10 @@ native db_num_rows(DBResult:result); /// The result of db_query /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Returns 1 on success, otherwise 0 if DBResult:result is a NULL reference or the last row is reached. -native DB_NextRow(DBResult:result) = db_next_row; +native bool:DB_NextRow(DBResult:result) = db_next_row; #pragma deprecated Use `DB_NextRow`. -native db_next_row(DBResult:result); +native bool:db_next_row(DBResult:result); /// Get the number of fields in a result. /// The result of db_query @@ -91,10 +91,10 @@ native db_num_fields(DBResult:result); /// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Returns 1, if the function was successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. -native DB_FieldName(DBResult:result, field, output[], size = sizeof (output)) = db_field_name; +native bool:DB_FieldName(DBResult:result, field, output[], size = sizeof (output)) = db_field_name; #pragma deprecated Use `DB_FieldName`. -native db_field_name(DBResult:result, field, output[], size = sizeof (output)); +native bool:db_field_name(DBResult:result, field, output[], size = sizeof (output)); /// Get the content of a field from db_query. /// The result to get the data from @@ -103,10 +103,10 @@ native db_field_name(DBResult:result, field, output[], size = sizeof (output)); /// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. -native DB_GetField(DBResult:result, field, output[], size = sizeof (output)) = db_get_field; +native bool:DB_GetField(DBResult:result, field, output[], size = sizeof (output)) = db_get_field; #pragma deprecated Use `DB_GetField`. -native db_get_field(DBResult:result, field, output[], size = sizeof (output)); +native bool:db_get_field(DBResult:result, field, output[], size = sizeof (output)); /// Get the content of a field as an integer from db_query. /// The result to get the data from @@ -135,10 +135,10 @@ native Float:db_get_field_float(DBResult:result, field = 0); /// The max length of the field /// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references /// Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. -native DB_GetFieldAssoc(DBResult:result, const field[], output[], size = sizeof (output)) = db_get_field_assoc; +native bool:DB_GetFieldAssoc(DBResult:result, const field[], output[], size = sizeof (output)) = db_get_field_assoc; #pragma deprecated Use `DB_GetFieldAssoc`. -native db_get_field_assoc(DBResult:result, const field[], output[], size = sizeof (output)); +native bool:db_get_field_assoc(DBResult:result, const field[], output[], size = sizeof (output)); /// Get the contents of field as an integer with specified name. /// The result to get the data from diff --git a/a_vehicles.inc b/a_vehicles.inc index 3943e50..8629f2c 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -18,34 +18,41 @@ // Defines // -------------------------------------------------- -#define CARMODTYPE_SPOILER (0) -#define CARMODTYPE_HOOD (1) -#define CARMODTYPE_ROOF (2) -#define CARMODTYPE_SIDESKIRT (3) -#define CARMODTYPE_LAMPS (4) -#define CARMODTYPE_NITRO (5) -#define CARMODTYPE_EXHAUST (6) -#define CARMODTYPE_WHEELS (7) -#define CARMODTYPE_STEREO (8) -#define CARMODTYPE_HYDRAULICS (9) -#define CARMODTYPE_FRONT_BUMPER (10) -#define CARMODTYPE_REAR_BUMPER (11) -#define CARMODTYPE_VENT_RIGHT (12) -#define CARMODTYPE_VENT_LEFT (13) - +enum e_CARMODTYPE +{ + CARMODTYPE_SPOILER, + CARMODTYPE_HOOD, + CARMODTYPE_ROOF, + CARMODTYPE_SIDESKIRT, + CARMODTYPE_LAMPS, + CARMODTYPE_NITRO, + CARMODTYPE_EXHAUST, + CARMODTYPE_WHEELS, + CARMODTYPE_STEREO, + CARMODTYPE_HYDRAULICS, + CARMODTYPE_FRONT_BUMPER, + CARMODTYPE_REAR_BUMPER, + CARMODTYPE_VENT_RIGHT, + CARMODTYPE_VENT_LEFT +} + +#define VEHICLE_PARAMS_ON (1) #define VEHICLE_PARAMS_UNSET (-1) #define VEHICLE_PARAMS_OFF (0) #define VEHICLE_PARAMS_ON (1) -#define VEHICLE_MODEL_INFO_SIZE (1) -#define VEHICLE_MODEL_INFO_FRONTSEAT (2) -#define VEHICLE_MODEL_INFO_REARSEAT (3) -#define VEHICLE_MODEL_INFO_PETROLCAP (4) -#define VEHICLE_MODEL_INFO_WHEELSFRONT (5) -#define VEHICLE_MODEL_INFO_WHEELSREAR (6) -#define VEHICLE_MODEL_INFO_WHEELSMID (7) -#define VEHICLE_MODEL_INFO_FRONT_BUMPER_Z (8) -#define VEHICLE_MODEL_INFO_REAR_BUMPER_Z (9) +enum e_VEHICLE_MODEL_INFO +{ + VEHICLE_MODEL_INFO_SIZE = 1, + VEHICLE_MODEL_INFO_FRONTSEAT, + VEHICLE_MODEL_INFO_REARSEAT, + VEHICLE_MODEL_INFO_PETROLCAP, + VEHICLE_MODEL_INFO_WHEELSFRONT, + VEHICLE_MODEL_INFO_WHEELSREAR, + VEHICLE_MODEL_INFO_WHEELSMID, + VEHICLE_MODEL_INFO_FRONT_BUMPER_Z, + VEHICLE_MODEL_INFO_REAR_BUMPER_Z +} // Vehicle @@ -534,7 +541,7 @@ native GetVehicleModel(vehicleid); ///
                        /// /// The ID of the component installed in the specified slot. Returns 0 if no component in specified vehicle's specified slot, or if vehicle doesn't exist. -native GetVehicleComponentInSlot(vehicleid, slot); // There is 1 slot for each CARMODTYPE_* +native GetVehicleComponentInSlot(vehicleid, e_CARMODTYPE:slot); // There is 1 slot for each CARMODTYPE_* /// Find out what type of component a certain ID is. /// The component ID to check @@ -545,7 +552,7 @@ native GetVehicleComponentInSlot(vehicleid, slot); // There is 1 slot for each C /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// The component slot ID of the specified component or -1 if the component is invalid. -native GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID +native e_CARMODTYPE:GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID /// Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.). /// The ID of the vehicle to repair @@ -720,7 +727,7 @@ native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); ///
                      • VEHICLE_MODEL_INFO_REAR_BUMPER_Z - height of the rear bumper
                      • ///
                      ///
                      -native GetVehicleModelInfo(vehiclemodel, infotype, &Float:x, &Float:y, &Float:z); +native GetVehicleModelInfo(vehiclemodel, e_VEHICLE_MODEL_INFO:infotype, &Float:x, &Float:y, &Float:z); // Virtual Worlds From 5e45fae8015a0ac899eb9254a910c2f4d2beb721 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 8 May 2021 21:54:17 +0100 Subject: [PATCH 013/104] More enums. --- a_npc.inc | 143 +++++++++++++++++++++++---------------------- a_players.inc | 93 +++++++++++++++-------------- a_samp.inc | 155 ++++++++++++++++++++++++++----------------------- a_vehicles.inc | 38 ++++++------ 4 files changed, 227 insertions(+), 202 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index 2edb61e..86f9bf9 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -67,79 +67,88 @@ enum PLAYER_STATE_ONFOOT, PLAYER_STATE_DRIVER, PLAYER_STATE_PASSENGER, - PLAYER_STATE_WASTED = 7, + PLAYER_STATE_WASTED = 7, PLAYER_STATE_SPAWNED, PLAYER_STATE_SPECTATING } // Weapons -#define WEAPON_BRASSKNUCKLE (1) -#define WEAPON_GOLFCLUB (2) -#define WEAPON_NITESTICK (3) -#define WEAPON_KNIFE (4) -#define WEAPON_BAT (5) -#define WEAPON_SHOVEL (6) -#define WEAPON_POOLSTICK (7) -#define WEAPON_KATANA (8) -#define WEAPON_CHAINSAW (9) -#define WEAPON_DILDO (10) -#define WEAPON_DILDO2 (11) -#define WEAPON_VIBRATOR (12) -#define WEAPON_VIBRATOR2 (13) -#define WEAPON_FLOWER (14) -#define WEAPON_CANE (15) -#define WEAPON_GRENADE (16) -#define WEAPON_TEARGAS (17) -#define WEAPON_MOLTOV (18) -#define WEAPON_COLT45 (22) -#define WEAPON_SILENCED (23) -#define WEAPON_DEAGLE (24) -#define WEAPON_SHOTGUN (25) -#define WEAPON_SAWEDOFF (26) -#define WEAPON_SHOTGSPA (27) -#define WEAPON_UZI (28) -#define WEAPON_MP5 (29) -#define WEAPON_AK47 (30) -#define WEAPON_M4 (31) -#define WEAPON_TEC9 (32) -#define WEAPON_RIFLE (33) -#define WEAPON_SNIPER (34) -#define WEAPON_ROCKETLAUNCHER (35) -#define WEAPON_HEATSEEKER (36) -#define WEAPON_FLAMETHROWER (37) -#define WEAPON_MINIGUN (38) -#define WEAPON_SATCHEL (39) -#define WEAPON_BOMB (40) -#define WEAPON_SPRAYCAN (41) -#define WEAPON_FIREEXTINGUISHER (42) -#define WEAPON_CAMERA (43) -#define WEAPON_PARACHUTE (46) -#define WEAPON_VEHICLE (49) -#define WEAPON_DROWN (53) -#define WEAPON_COLLISION (54) +enum e_WEAPON +{ + WEAPON_BRASSKNUCKLE = 1, + WEAPON_GOLFCLUB, + WEAPON_NITESTICK, + WEAPON_KNIFE, + WEAPON_BAT, + WEAPON_SHOVEL, + WEAPON_POOLSTICK, + WEAPON_KATANA, + WEAPON_CHAINSAW, + WEAPON_DILDO, + WEAPON_DILDO2, + WEAPON_VIBRATOR, + WEAPON_VIBRATOR2, + WEAPON_FLOWER, + WEAPON_CANE, + WEAPON_GRENADE, + WEAPON_TEARGAS, + WEAPON_MOLTOV, + WEAPON_COLT45 = 22, + WEAPON_SILENCED, + WEAPON_DEAGLE, + WEAPON_SHOTGUN, + WEAPON_SAWEDOFF, + WEAPON_SHOTGSPA, + WEAPON_UZI, + WEAPON_MP5, + WEAPON_AK47, + WEAPON_M4, + WEAPON_TEC9, + WEAPON_RIFLE, + WEAPON_SNIPER, + WEAPON_ROCKETLAUNCHER, + WEAPON_HEATSEEKER, + WEAPON_FLAMETHROWER, + WEAPON_MINIGUN, + WEAPON_SATCHEL, + WEAPON_BOMB, + WEAPON_SPRAYCAN, + WEAPON_FIREEXTINGUISHER, + WEAPON_CAMERA, + WEAPON_PARACHUTE = 46, + WEAPON_VEHICLE = 49, + WEAPON_DROWN = 53, + WEAPON_COLLISION, +} // Keys -#define KEY_ACTION (1) -#define KEY_CROUCH (2) -#define KEY_FIRE (4) -#define KEY_SPRINT (8) -#define KEY_SECONDARY_ATTACK (16) -#define KEY_JUMP (32) -#define KEY_LOOK_RIGHT (64) -#define KEY_HANDBRAKE (128) -#define KEY_LOOK_LEFT (256) -#define KEY_SUBMISSION (512) -#define KEY_LOOK_BEHIND (512) -#define KEY_WALK (1024) -#define KEY_ANALOG_UP (2048) -#define KEY_ANALOG_DOWN (4096) -#define KEY_ANALOG_RIGHT (16384) -#define KEY_ANALOG_LEFT (8192) - -#define KEY_UP (-128) -#define KEY_DOWN (128) -#define KEY_LEFT (-128) -#define KEY_RIGHT (128) +enum e_KEY (<<= 1) +{ + KEY_ACTION = 1, + KEY_CROUCH, + KEY_FIRE, + KEY_SPRINT, + KEY_SECONDARY_ATTACK, + KEY_JUMP, + KEY_LOOK_RIGHT, + KEY_HANDBRAKE, + KEY_LOOK_LEFT, + KEY_SUBMISSION, + KEY_LOOK_BEHIND = KEY_SUBMISSION, + KEY_WALK, + KEY_ANALOG_UP, + KEY_ANALOG_DOWN, + KEY_ANALOG_LEFT, + KEY_ANALOG_RIGHT, + KEY_YES = 65536, + KEY_NO, + KEY_CTRL_BACK, + + KEY_UP = -128, + KEY_DOWN = 128, + KEY_LEFT = -128, + KEY_RIGHT = 128, +} enum e_PLAYER_RECORDING_TYPE { @@ -645,5 +654,3 @@ forward OnVehicleStreamOut(vehicleid); /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! forward OnRecordingPlaybackEnd(); -// -------------------------------------------------- - diff --git a/a_players.inc b/a_players.inc index eb464f5..227cb4b 100644 --- a/a_players.inc +++ b/a_players.inc @@ -23,26 +23,29 @@ #define MAX_CHATBUBBLE_LENGTH (144) #endif -#define SPECIAL_ACTION_NONE (0) -#define SPECIAL_ACTION_DUCK (1) -#define SPECIAL_ACTION_USEJETPACK (2) -#define SPECIAL_ACTION_ENTER_VEHICLE (3) -#define SPECIAL_ACTION_EXIT_VEHICLE (4) -#define SPECIAL_ACTION_DANCE1 (5) -#define SPECIAL_ACTION_DANCE2 (6) -#define SPECIAL_ACTION_DANCE3 (7) -#define SPECIAL_ACTION_DANCE4 (8) -#define SPECIAL_ACTION_HANDSUP (10) -#define SPECIAL_ACTION_USECELLPHONE (11) -#define SPECIAL_ACTION_SITTING (12) -#define SPECIAL_ACTION_STOPUSECELLPHONE (13) -#define SPECIAL_ACTION_DRINK_BEER (20) -#define SPECIAL_ACTION_SMOKE_CIGGY (21) -#define SPECIAL_ACTION_DRINK_WINE (22) -#define SPECIAL_ACTION_DRINK_SPRUNK (23) -#define SPECIAL_ACTION_PISSING (68) -#define SPECIAL_ACTION_CUFFED (24) -#define SPECIAL_ACTION_CARRY (25) +enum e_SPECIAL_ACTION +{ + SPECIAL_ACTION_NONE, + SPECIAL_ACTION_DUCK, + SPECIAL_ACTION_USEJETPACK, + SPECIAL_ACTION_ENTER_VEHICLE, + SPECIAL_ACTION_EXIT_VEHICLE, + SPECIAL_ACTION_DANCE1, + SPECIAL_ACTION_DANCE2, + SPECIAL_ACTION_DANCE3, + SPECIAL_ACTION_DANCE4, + SPECIAL_ACTION_HANDSUP = 10, + SPECIAL_ACTION_USECELLPHONE, + SPECIAL_ACTION_SITTING, + SPECIAL_ACTION_STOPUSECELLPHONE, + SPECIAL_ACTION_DRINK_BEER = 20, + SPECIAL_ACTION_SMOKE_CIGGY, + SPECIAL_ACTION_DRINK_WINE, + SPECIAL_ACTION_DRINK_SPRUNK, + SPECIAL_ACTION_CUFFED, + SPECIAL_ACTION_CARRY, + SPECIAL_ACTION_PISSING = 68, +} enum e_FIGHT_STYLE { @@ -54,23 +57,29 @@ enum e_FIGHT_STYLE FIGHT_STYLE_ELBOW } -#define WEAPONSKILL_PISTOL (0) -#define WEAPONSKILL_PISTOL_SILENCED (1) -#define WEAPONSKILL_DESERT_EAGLE (2) -#define WEAPONSKILL_SHOTGUN (3) -#define WEAPONSKILL_SAWNOFF_SHOTGUN (4) -#define WEAPONSKILL_SPAS12_SHOTGUN (5) -#define WEAPONSKILL_MICRO_UZI (6) -#define WEAPONSKILL_MP5 (7) -#define WEAPONSKILL_AK47 (8) -#define WEAPONSKILL_M4 (9) -#define WEAPONSKILL_SNIPERRIFLE (10) - -#define WEAPONSTATE_UNKNOWN (-1) -#define WEAPONSTATE_NO_BULLETS (0) -#define WEAPONSTATE_LAST_BULLET (1) -#define WEAPONSTATE_MORE_BULLETS (2) -#define WEAPONSTATE_RELOADING (3) +enum e_WEAPONSKILL +{ + WEAPONSKILL_PISTOL, + WEAPONSKILL_PISTOL_SILENCED, + WEAPONSKILL_DESERT_EAGLE, + WEAPONSKILL_SHOTGUN, + WEAPONSKILL_SAWNOFF_SHOTGUN, + WEAPONSKILL_SPAS12_SHOTGUN, + WEAPONSKILL_MICRO_UZI, + WEAPONSKILL_MP5, + WEAPONSKILL_AK47, + WEAPONSKILL_M4, + WEAPONSKILL_SNIPERRIFLE, +} + +enum e_WEAPONSTATE +{ + WEAPONSTATE_UNKNOWN = -1, + WEAPONSTATE_NO_BULLETS, + WEAPONSTATE_LAST_BULLET, + WEAPONSTATE_MORE_BULLETS, + WEAPONSTATE_RELOADING, +} // PVar enumeration enum e_PLAYER_VARTYPE @@ -368,7 +377,7 @@ native GetPlayerAmmo(playerid); ///
                    /// /// The state of the player's weapon. 0 if player specified does not exist. -native GetPlayerWeaponState(playerid); +native e_WEAPONSTATE:GetPlayerWeaponState(playerid); /// Check who a player is aiming at. /// The ID of the player to get the target of @@ -619,7 +628,7 @@ native GetPlayerMoney(playerid); ///
                  /// /// The player's current state as an integer. -native GetPlayerState(playerid); +native e_PLAYER_STATE:GetPlayerState(playerid); /// Get the specified player's IP address and store it in a string. /// The ID of the player to get the IP address of @@ -915,7 +924,7 @@ native SetPlayerShopName(playerid, const shopname[]); ///
                • WEAPONSKILL_SNIPERRIFLE(10)
                • ///
                ///
                -native SetPlayerSkillLevel(playerid, skill, level); +native SetPlayerSkillLevel(playerid, e_WEAPONSKILL:skill, level); /// Get the ID of the vehicle that the player is surfing (stuck to the roof of). /// The ID of the player you want to know the surfing vehicle ID of @@ -1839,7 +1848,7 @@ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibra ///
              /// /// The special action of the player. -native GetPlayerSpecialAction(playerid); +native e_SPECIAL_ACTION:GetPlayerSpecialAction(playerid); /// This function allows to set players special action. /// The player that should perform the action @@ -1885,7 +1894,7 @@ native GetPlayerSpecialAction(playerid); /// 1: The function executed successfully.
              /// 0: The function failed to execute. This means the player is not connected. ///
              -native SetPlayerSpecialAction(playerid, actionid); +native SetPlayerSpecialAction(playerid, e_SPECIAL_ACTION:actionid); /// Disables collisions between occupied vehicles for a player. /// The ID of the player for whom you want to disable collisions diff --git a/a_samp.inc b/a_samp.inc index b78f219..a85a952 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -87,7 +87,7 @@ #define INVALID_PLAYER_3DTEXT_ID (PlayerText3D:0xFFFF) // States -enum +enum e_PLAYER_STATE { PLAYER_STATE_NONE, PLAYER_STATE_ONFOOT, @@ -110,76 +110,82 @@ enum e_PLAYER_MARKERS } // Weapons -#define WEAPON_BRASSKNUCKLE (1) -#define WEAPON_GOLFCLUB (2) -#define WEAPON_NITESTICK (3) -#define WEAPON_KNIFE (4) -#define WEAPON_BAT (5) -#define WEAPON_SHOVEL (6) -#define WEAPON_POOLSTICK (7) -#define WEAPON_KATANA (8) -#define WEAPON_CHAINSAW (9) -#define WEAPON_DILDO (10) -#define WEAPON_DILDO2 (11) -#define WEAPON_VIBRATOR (12) -#define WEAPON_VIBRATOR2 (13) -#define WEAPON_FLOWER (14) -#define WEAPON_CANE (15) -#define WEAPON_GRENADE (16) -#define WEAPON_TEARGAS (17) -#define WEAPON_MOLTOV (18) -#define WEAPON_COLT45 (22) -#define WEAPON_SILENCED (23) -#define WEAPON_DEAGLE (24) -#define WEAPON_SHOTGUN (25) -#define WEAPON_SAWEDOFF (26) -#define WEAPON_SHOTGSPA (27) -#define WEAPON_UZI (28) -#define WEAPON_MP5 (29) -#define WEAPON_AK47 (30) -#define WEAPON_M4 (31) -#define WEAPON_TEC9 (32) -#define WEAPON_RIFLE (33) -#define WEAPON_SNIPER (34) -#define WEAPON_ROCKETLAUNCHER (35) -#define WEAPON_HEATSEEKER (36) -#define WEAPON_FLAMETHROWER (37) -#define WEAPON_MINIGUN (38) -#define WEAPON_SATCHEL (39) -#define WEAPON_BOMB (40) -#define WEAPON_SPRAYCAN (41) -#define WEAPON_FIREEXTINGUISHER (42) -#define WEAPON_CAMERA (43) -#define WEAPON_PARACHUTE (46) -#define WEAPON_VEHICLE (49) -#define WEAPON_DROWN (53) -#define WEAPON_COLLISION (54) +enum e_WEAPON +{ + WEAPON_BRASSKNUCKLE = 1, + WEAPON_GOLFCLUB, + WEAPON_NITESTICK, + WEAPON_KNIFE, + WEAPON_BAT, + WEAPON_SHOVEL, + WEAPON_POOLSTICK, + WEAPON_KATANA, + WEAPON_CHAINSAW, + WEAPON_DILDO, + WEAPON_DILDO2, + WEAPON_VIBRATOR, + WEAPON_VIBRATOR2, + WEAPON_FLOWER, + WEAPON_CANE, + WEAPON_GRENADE, + WEAPON_TEARGAS, + WEAPON_MOLTOV, + WEAPON_COLT45 = 22, + WEAPON_SILENCED, + WEAPON_DEAGLE, + WEAPON_SHOTGUN, + WEAPON_SAWEDOFF, + WEAPON_SHOTGSPA, + WEAPON_UZI, + WEAPON_MP5, + WEAPON_AK47, + WEAPON_M4, + WEAPON_TEC9, + WEAPON_RIFLE, + WEAPON_SNIPER, + WEAPON_ROCKETLAUNCHER, + WEAPON_HEATSEEKER, + WEAPON_FLAMETHROWER, + WEAPON_MINIGUN, + WEAPON_SATCHEL, + WEAPON_BOMB, + WEAPON_SPRAYCAN, + WEAPON_FIREEXTINGUISHER, + WEAPON_CAMERA, + WEAPON_PARACHUTE = 46, + WEAPON_VEHICLE = 49, + WEAPON_DROWN = 53, + WEAPON_COLLISION, +} // Keys -#define KEY_ACTION (1) -#define KEY_CROUCH (2) -#define KEY_FIRE (4) -#define KEY_SPRINT (8) -#define KEY_SECONDARY_ATTACK (16) -#define KEY_JUMP (32) -#define KEY_LOOK_RIGHT (64) -#define KEY_HANDBRAKE (128) -#define KEY_LOOK_LEFT (256) -#define KEY_SUBMISSION (512) -#define KEY_LOOK_BEHIND (512) -#define KEY_WALK (1024) -#define KEY_ANALOG_UP (2048) -#define KEY_ANALOG_DOWN (4096) -#define KEY_ANALOG_LEFT (8192) -#define KEY_ANALOG_RIGHT (16384) -#define KEY_YES (65536) -#define KEY_NO (131072) -#define KEY_CTRL_BACK (262144) - -#define KEY_UP (-128) -#define KEY_DOWN (128) -#define KEY_LEFT (-128) -#define KEY_RIGHT (128) +enum e_KEY (<<= 1) +{ + KEY_ACTION = 1, + KEY_CROUCH, + KEY_FIRE, + KEY_SPRINT, + KEY_SECONDARY_ATTACK, + KEY_JUMP, + KEY_LOOK_RIGHT, + KEY_HANDBRAKE, + KEY_LOOK_LEFT, + KEY_SUBMISSION, + KEY_LOOK_BEHIND = KEY_SUBMISSION, + KEY_WALK, + KEY_ANALOG_UP, + KEY_ANALOG_DOWN, + KEY_ANALOG_LEFT, + KEY_ANALOG_RIGHT, + KEY_YES = 65536, + KEY_NO, + KEY_CTRL_BACK, + + KEY_UP = -128, + KEY_DOWN = 128, + KEY_LEFT = -128, + KEY_RIGHT = 128, +} // Player GUI Dialog enum e_DIALOG_STYLE @@ -193,8 +199,11 @@ enum e_DIALOG_STYLE } // Text Draw -#define TEXT_DRAW_FONT_SPRITE_DRAW (4) -#define TEXT_DRAW_FONT_MODEL_PREVIEW (5) +enum e_TEXT_DRAW_FONT +{ + TEXT_DRAW_FONT_SPRITE_DRAW = 4, + TEXT_DRAW_FONT_MODEL_PREVIEW = 5, +} enum e_TEXT_DRAW_ALIGN { @@ -2483,7 +2492,7 @@ forward OnPlayerExitVehicle(playerid, vehicleid); /// This callback does not handle returns.
              /// It is always called first in filterscripts. ///
              -forward OnPlayerStateChange(playerid, newstate, oldstate); +forward OnPlayerStateChange(playerid, /*e_PLAYER_STATE:*/newstate, /*e_PLAYER_STATE:*/oldstate); /// This callback is called when a player enters the checkpoint set for that player. /// The player who entered the checkpoint @@ -3225,5 +3234,3 @@ forward OnClientCheckResponse(playerid, actionid, memaddr, retndata); /// Doesn't work forward OnScriptCash(playerid, amount, source); -// -------------------------------------------------- - diff --git a/a_vehicles.inc b/a_vehicles.inc index 8629f2c..a0aeed1 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -36,10 +36,12 @@ enum e_CARMODTYPE CARMODTYPE_VENT_LEFT } -#define VEHICLE_PARAMS_ON (1) -#define VEHICLE_PARAMS_UNSET (-1) -#define VEHICLE_PARAMS_OFF (0) -#define VEHICLE_PARAMS_ON (1) +enum e_VEHICLE_PARAMS +{ + VEHICLE_PARAMS_UNSET = -1, + VEHICLE_PARAMS_OFF, + VEHICLE_PARAMS_ON, +} enum e_VEHICLE_MODEL_INFO { @@ -244,7 +246,7 @@ native ManualVehicleEngineAndLights(); /// 1: The function executed successfully.
              /// 0: The function failed to execute. This means the vehicle does not exist. /// -native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); +native SetVehicleParamsEx(vehicleid, e_VEHICLE_PARAMS:engine, e_VEHICLE_PARAMS:lights, e_VEHICLE_PARAMS:alarm, e_VEHICLE_PARAMS:doors, e_VEHICLE_PARAMS:bonnet, e_VEHICLE_PARAMS:boot, e_VEHICLE_PARAMS:objective); /// Gets a vehicle's parameters. /// The ID of the vehicle to get the parameters from @@ -258,7 +260,7 @@ native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, /// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset'). -native GetVehicleParamsEx(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective); +native GetVehicleParamsEx(vehicleid, &e_VEHICLE_PARAMS:engine, &e_VEHICLE_PARAMS:lights, &e_VEHICLE_PARAMS:alarm, &e_VEHICLE_PARAMS:doors, &e_VEHICLE_PARAMS:bonnet, &e_VEHICLE_PARAMS:boot, &e_VEHICLE_PARAMS:objective); /// Returns a vehicle's siren state (on/off). /// The ID of the vehicle to get the siren state of @@ -269,8 +271,8 @@ native GetVehicleParamsSirenState(vehicleid); /// Allows you to open and close the doors of a vehicle. /// The ID of the vehicle to set the door state of -/// The state of the driver's door. 1 to open, 0 to close -/// The state of the passenger door. 1 to open, 0 to close +/// The state of the driver's door. 1 to open, 0 to close +/// The state of the passenger door. 1 to open, 0 to close /// The state of the rear left door (if available). 1 to open, 0 to close /// The state of the rear right door (if available). 1 to open, 0 to close /// @@ -278,12 +280,12 @@ native GetVehicleParamsSirenState(vehicleid); /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 is open, 0 is closed -native SetVehicleParamsCarDoors(vehicleid, driver, passenger, rearLeft, rearRight); +native SetVehicleParamsCarDoors(vehicleid, frontLeft, frontRight, rearLeft, rearRight); /// Allows you to retrieve the current state of a vehicle's doors. /// The ID of the vehicle -/// The integer to save the state of the driver's door to -/// The integer to save the state of the passenger's door to +/// The integer to save the state of the driver's door to +/// The integer to save the state of the passenger's door to /// The integer to save the state of the rear left door to (if available) /// The integer to save the state of the rear right door to (if available) /// @@ -291,24 +293,24 @@ native SetVehicleParamsCarDoors(vehicleid, driver, passenger, rearLeft, rearRigh /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. -native GetVehicleParamsCarDoors(vehicleid, &driver, &passenger, &rearLeft, &rearRight); +native GetVehicleParamsCarDoors(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); /// Allows you to open and close the windows of a vehicle. /// The ID of the vehicle to set the window state of -/// The state of the driver's window. 0 to open, 1 to close -/// The state of the passenger window. 0 to open, 1 to close +/// The state of the driver's window. 0 to open, 1 to close +/// The state of the passenger window. 0 to open, 1 to close /// The state of the rear left window (if available). 0 to open, 1 to close /// The state of the rear right window (if available). 0 to open, 1 to close /// /// /// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -native SetVehicleParamsCarWindows(vehicleid, driver, passenger, rearLeft, rearRight); +native SetVehicleParamsCarWindows(vehicleid, frontLeft, frontRight, rearLeft, rearRight); /// Allows you to retrieve the current state of a vehicle's windows. /// The ID of the vehicle -/// The integer to save the state of the drivers window to -/// The integer to save the state of the passengers window to +/// The integer to save the state of the drivers window to +/// The integer to save the state of the passengers window to /// The integer to save the state of the rear left window to (if available) /// The integer to save the state of the rear right window to (if available) /// @@ -317,7 +319,7 @@ native SetVehicleParamsCarWindows(vehicleid, driver, passenger, rearLeft, rearRi /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. /// The vehicle's windows state is stored in the specified variables. -native GetVehicleParamsCarWindows(vehicleid, &driver, &passenger, &rearLeft, &rearRight); +native GetVehicleParamsCarWindows(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); /// Sets a vehicle back to the position at where it was created. /// The ID of the vehicle to respawn From a14daced83f3235121cfcaf59e3c0a971383b066 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 9 May 2021 17:33:51 +0100 Subject: [PATCH 014/104] Lost a load of commits due to repo corruption: * `0xFF...` * Long names. * Spacing. * `#pragma unused SAMP_INCLUDES_VERSION` * Control tag generation with `NO_TAGS`, `WEAK_TAGS`, and `STRONG_TAGS`. * `WEAK_TAGS`. * `__MORE` and `__LESS`. * Proper constants. * Normal looking tags. --- a_actor.inc | 78 +-- a_http.inc | 12 +- a_npc.inc | 311 ++++++--- a_objects.inc | 329 +++++----- a_players.inc | 1389 +++++++++++++++++++------------------- a_samp.inc | 1718 +++++++++++++++++++++++++----------------------- a_vehicles.inc | 287 ++++---- 7 files changed, 2160 insertions(+), 1964 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index d1da55b..54da024 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -20,27 +20,27 @@ /// The y coordinate to create the actor at /// The z coordinate to create the actor at /// The facing angle (rotation) for the actor to have -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// Actors are completely separate from NPCs. They do NOT use player IDs/slots on the server and CANNOT be handled like NPCs.
              @@ -56,7 +56,7 @@ native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); /// Destroy an actor which was created with CreateActor. /// The ID of the actor to destroy. Returned by CreateActor -/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.
              @@ -67,8 +67,8 @@ native DestroyActor(actorid); /// Checks if an actor is streamed in for a player. /// The ID of the actor /// The ID of the player -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 if the actor is streamed in for the player, or 0 if it is not. native bool:IsActorStreamedIn(actorid, playerid); @@ -76,8 +76,8 @@ native bool:IsActorStreamedIn(actorid, playerid); /// Set the virtual world of an actor. Only players in the same world will see the actor. /// The ID of the actor (returned by CreateActor) to set the virtual world of /// The virtual world to put the actor ID -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.
              @@ -87,7 +87,7 @@ native SetActorVirtualWorld(actorid, virtualWorld); /// Get the virtual world of an actor. /// The ID of the actor to get the virtual world of -/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The virtual world of the actor. By default this is 0. Also returns 0 if actor specified does not exist. native GetActorVirtualWorld(actorid); @@ -102,7 +102,7 @@ native GetActorVirtualWorld(actorid); /// Same as above but for the y axis. Should be kept the same as the previous parameter /// Setting this to 1 will freeze an actor at the end of the animation. 0 will not /// Timer in milliseconds. For a never-ending loop it should be 0 -/// +/// /// You must preload the animation library for the player the actor will be applying the animation for, and not for the actor. Otherwise, the animation won't be applied to the actor until the function is executed again. /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// @@ -113,7 +113,7 @@ native ApplyActorAnimation(actorid, const animationLibrary[], const animationNam /// Clear any animations applied to an actor. /// The ID of the actor (returned by CreateActor) to clear the animations for -/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.
              @@ -126,8 +126,8 @@ native ClearActorAnimations(actorid); /// The x coordinate to position the actor at /// The y coordinate to position the actor at /// The z coordinate to position the actor at -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// When creating an actor with CreateActor, you specify it's position. You do not need to use this function unless you want to change its position later. /// @@ -141,7 +141,7 @@ native SetActorPos(actorid, Float:x, Float:y, Float:z); /// A float variable, passed by reference, in which to store the x coordinate of the actor /// A float variable, passed by reference, in which to store the y coordinate of the actor /// A float variable, passed by reference, in which to store the z coordinate of the actor -/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.
              @@ -152,8 +152,8 @@ native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); /// Set the facing angle of an actor. /// The ID of the actor to set the facing angle of. Returned by CreateActor /// The facing angle to set for the actor -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// Players will see actor's facing angle changed only when it is restreamed to them. /// When creating an actor with CreateActor, you specify it's facing angle. You do not need to use this function unless you want to change its facing angle later. @@ -166,8 +166,8 @@ native SetActorFacingAngle(actorid, Float:angle); /// Get the facing angle of an actor. /// The ID of the actor to get the facing angle of. Returned by CreateActor /// A float variable, passed by reference, in to which the actor's facing angle will be stored -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.
              @@ -209,9 +209,9 @@ native SetActorInvulnerable(actorid, bool:invulnerable = true); /// Check if an actor is invulnerable. /// The ID of the actor to check -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 if the actor is invulnerable, 0 otherwise. native bool:IsActorInvulnerable(actorid); diff --git a/a_http.inc b/a_http.inc index 254a5d6..1ef1191 100644 --- a/a_http.inc +++ b/a_http.inc @@ -18,9 +18,10 @@ // -------------------------------------------------- // HTTP requests -enum e_HTTP_METHOD +#define HTTP_METHOD: __TAG(HTTP_METHOD): +enum HTTP_METHOD: { - HTTP_GET = 1, + HTTP_GET = 1, HTTP_POST, HTTP_HEAD } @@ -28,9 +29,10 @@ enum e_HTTP_METHOD // HTTP error response codes // These codes compliment ordinary HTTP response codes returned in 'responseCode' // (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error) -enum e_HTTP_ERROR +#define HTTP_ERROR: __TAG(HTTP_ERROR): +enum HTTP_ERROR: { - HTTP_ERROR_BAD_HOST = 1, + HTTP_ERROR_BAD_HOST = 1, HTTP_ERROR_NO_SOCKET, HTTP_ERROR_CANT_CONNECT, HTTP_ERROR_CANT_WRITE, @@ -66,7 +68,7 @@ enum e_HTTP_ERROR ///
            • + standard HTTP response codes
            • ///
            /// -native HTTP(index, e_HTTP_METHOD:method, const url[], const data[], const callback[]); +native HTTP(index, __TAG(HTTP_METHOD):method, const url[], const data[], const callback[]); // example HTTP callback: public MyHttpResponse(index, responseCode, const data[]) { ... } diff --git a/a_npc.inc b/a_npc.inc index 86f9bf9..315b91d 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -15,6 +15,8 @@ #define SAMP_CONST_CORRECT +// Ignores warning 217 for properly indented PAWNO code +// It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8 #pragma tabsize 4 // -------------------------------------------------- @@ -22,60 +24,150 @@ // -------------------------------------------------- // Limits -#if !defined MAX_PLAYER_NAME - #define MAX_PLAYER_NAME (24) +#if defined MAX_PLAYER_NAME + static const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; + #undef MAX_PLAYER_NAME + const MAX_PLAYER_NAME = __MAX_PLAYER_NAME; +#else + const MAX_PLAYER_NAME = 24; #endif -#if !defined MAX_PLAYERS - #define MAX_PLAYERS (1000) +#if defined MAX_PLAYERS + static const __MAX_PLAYERS = MAX_PLAYERS; + #undef MAX_PLAYERS + const MAX_PLAYERS = __MAX_PLAYERS; +#else + const MAX_PLAYERS = 1000; #endif -#if !defined MAX_VEHICLES - #define MAX_VEHICLES (2000) +#if defined MAX_VEHICLES + static const __MAX_VEHICLES = MAX_VEHICLES; + #undef MAX_VEHICLES + const MAX_VEHICLES = __MAX_VEHICLES; +#else + const MAX_VEHICLES = 2000; #endif -#if !defined MAX_OBJECTS - #define MAX_OBJECTS (2000) +#if defined MAX_ACTORS + static const __MAX_ACTORS = MAX_ACTORS; + #undef MAX_ACTORS + const MAX_ACTORS = __MAX_ACTORS; +#else + const MAX_ACTORS = 1000; #endif -#if !defined MAX_GANG_ZONES - #define MAX_GANG_ZONES (1024) +#if defined MAX_OBJECTS + static const __MAX_OBJECTS = MAX_OBJECTS; + #undef MAX_OBJECTS + const MAX_OBJECTS = __MAX_OBJECTS; +#else + const MAX_OBJECTS = 2000; #endif -#if !defined MAX_TEXT_DRAWS - #define MAX_TEXT_DRAWS (Text:2048) +#if defined MAX_GANG_ZONES + static const __MAX_GANG_ZONES = MAX_GANG_ZONES; + #undef MAX_GANG_ZONES + const MAX_GANG_ZONES = __MAX_GANG_ZONES; +#else + const MAX_GANG_ZONES = 1024; #endif -#if !defined MAX_MENUS - #define MAX_MENUS (Menu:128) +#if defined MAX_TEXT_DRAWS + static const Text:__MAX_TEXT_DRAWS = Text:MAX_TEXT_DRAWS; + #undef MAX_TEXT_DRAWS + const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; +#else + const Text:MAX_TEXT_DRAWS = Text:2048; #endif -// Invalids -#define NO_TEAM (255) +#if defined MAX_PLAYER_TEXT_DRAWS + static const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:MAX_PLAYER_TEXT_DRAWS; + #undef MAX_PLAYER_TEXT_DRAWS + const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:__MAX_PLAYER_TEXT_DRAWS; +#else + const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:256; +#endif + +#if defined MAX_MENUS + static const Menu:__MAX_MENUS = Menu:MAX_MENUS; + #undef MAX_MENUS + const Menu:MAX_MENUS = Menu:__MAX_MENUS; +#else + const Menu:MAX_MENUS = Menu:128; +#endif + +#if defined MAX_3DTEXT_GLOBAL + static const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:MAX_3DTEXT_GLOBAL; + #undef MAX_3DTEXT_GLOBAL + const Text3D:MAX_3DTEXT_GLOBAL = Text3D:__MAX_3DTEXT_GLOBAL; +#else + const Text3D:MAX_3DTEXT_GLOBAL = Text3D:1024; +#endif + +#if defined MAX_3DTEXT_PLAYER + static const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:MAX_3DTEXT_PLAYER; + #undef MAX_3DTEXT_PLAYER + const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:__MAX_3DTEXT_PLAYER; +#else + const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:1024; +#endif + +#if defined MAX_PICKUPS + static const __MAX_PICKUPS = MAX_PICKUPS; + #undef MAX_PICKUPS + const MAX_PICKUPS = __MAX_PICKUPS; +#else + const MAX_PICKUPS = 4096; +#endif -#define INVALID_PLAYER_ID (0xFFFF) -#define INVALID_VEHICLE_ID (0xFFFF) -#define INVALID_OBJECT_ID (0xFFFF) -#define INVALID_MENU (Menu:0xFF) -#define INVALID_TEXT_DRAW (Text:0xFFFF) -#define INVALID_GANG_ZONE (-1) +#if defined NO_TAGS + #define __TAG(%0) _ +#elseif defined STRONG_TAGS + #define __TAG(%0) E_%0 +#else // if defined WEAK_TAGS + #define __TAG(%0) e_%0 + #define WEAK_TAGS +#endif +#if defined MORE_TAGS + #define __MORE(%0) __TAG(%0) +#else + #define __MORE(%0) _ + #define LESS_TAGS +#endif +#define __LESS __TAG + +// Invalids +const NO_TEAM = 0xFF; + +const INVALID_PLAYER_ID = 0xFFFF; +const INVALID_VEHICLE_ID = 0xFFFF; +const INVALID_ACTOR_ID = 0xFFFF; +const INVALID_OBJECT_ID = 0xFFFF; +const Menu:INVALID_MENU = Menu:0xFF; +const Text:INVALID_TEXT_DRAW = Text:0xFFFF; +const PlayerText:INVALID_PLAYER_TEXT_DRAW = PlayerText:0xFFFF; +const INVALID_GANG_ZONE = 0xFFFFFFFF; +const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; +const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; // States -enum +#define PLAYER_STATE: __TAG(PLAYER_STATE): +enum PLAYER_STATE: { PLAYER_STATE_NONE, PLAYER_STATE_ONFOOT, PLAYER_STATE_DRIVER, PLAYER_STATE_PASSENGER, - PLAYER_STATE_WASTED = 7, + PLAYER_STATE_WASTED = 7, PLAYER_STATE_SPAWNED, PLAYER_STATE_SPECTATING } // Weapons -enum e_WEAPON +#define WEAPON: __TAG(WEAPON): +enum WEAPON: { - WEAPON_BRASSKNUCKLE = 1, + WEAPON_BRASSKNUCKLE = 1, WEAPON_GOLFCLUB, WEAPON_NITESTICK, WEAPON_KNIFE, @@ -93,7 +185,7 @@ enum e_WEAPON WEAPON_GRENADE, WEAPON_TEARGAS, WEAPON_MOLTOV, - WEAPON_COLT45 = 22, + WEAPON_COLT45 = 22, WEAPON_SILENCED, WEAPON_DEAGLE, WEAPON_SHOTGUN, @@ -115,16 +207,17 @@ enum e_WEAPON WEAPON_SPRAYCAN, WEAPON_FIREEXTINGUISHER, WEAPON_CAMERA, - WEAPON_PARACHUTE = 46, - WEAPON_VEHICLE = 49, - WEAPON_DROWN = 53, + WEAPON_PARACHUTE = 46, + WEAPON_VEHICLE = 49, + WEAPON_DROWN = 53, WEAPON_COLLISION, } // Keys -enum e_KEY (<<= 1) +#define KEY: __TAG(KEY): +enum KEY: (<<= 1) { - KEY_ACTION = 1, + KEY_ACTION = 1, KEY_CROUCH, KEY_FIRE, KEY_SPRINT, @@ -134,23 +227,24 @@ enum e_KEY (<<= 1) KEY_HANDBRAKE, KEY_LOOK_LEFT, KEY_SUBMISSION, - KEY_LOOK_BEHIND = KEY_SUBMISSION, + KEY_LOOK_BEHIND = KEY_SUBMISSION, KEY_WALK, KEY_ANALOG_UP, KEY_ANALOG_DOWN, KEY_ANALOG_LEFT, KEY_ANALOG_RIGHT, - KEY_YES = 65536, + KEY_YES = 65536, KEY_NO, KEY_CTRL_BACK, - KEY_UP = -128, - KEY_DOWN = 128, - KEY_LEFT = -128, - KEY_RIGHT = 128, + KEY_UP = -128, + KEY_DOWN = 128, + KEY_LEFT = -128, + KEY_RIGHT = 128, } -enum e_PLAYER_RECORDING_TYPE +#define PLAYER_RECORDING_TYPE: __TAG(PLAYER_RECORDING_TYPE): +enum PLAYER_RECORDING_TYPE: { PLAYER_RECORDING_TYPE_NONE, PLAYER_RECORDING_TYPE_DRIVER, @@ -187,6 +281,7 @@ enum e_PLAYER_RECORDING_TYPE #endif public const SAMP_INCLUDES_VERSION = 0x037030; +#pragma unused SAMP_INCLUDES_VERSION #include #include @@ -258,14 +353,14 @@ open.mp releases can use `A` as the first digit. /// Prints a string to the server console (not in-game chat) and logs (server_log.txt). /// The string to print - /// + /// native print(const string[]); /// Outputs a formatted string on the console (the server window, not the in-game chat). /// The format string /// Indefinite number of arguments of any tag - /// - /// + /// + /// /// The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. /// This function doesn't support packed strings. /// @@ -284,7 +379,7 @@ open.mp releases can use `A` as the first digit. /// /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) - native printf(const format[], {Float,_}:...); + native printf(const format[], {Float, _}:...); #endif /// Formats a string to include variables and other strings inside it. @@ -292,8 +387,8 @@ open.mp releases can use `A` as the first digit. /// The maximum length output can contain /// The format string /// Indefinite number of arguments of any tag -/// -/// +/// +/// /// This function doesn't support packed strings. /// /// Format Specifiers:
            @@ -317,8 +412,8 @@ native format(output[], len = sizeof (output), const format[], {Float, _}:...); /// Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server /// Interval in milliseconds /// Whether the timer should repeat or not -/// -/// +/// +/// /// Timer intervals are not accurate (roughly 25% off). There's a fix available here. /// Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. /// The function that should be called must be public. @@ -328,13 +423,13 @@ native SetTimer(const functionName[], interval, bool:repeating); /// Kills (stops) a running timer. /// The ID of the timer to kill (returned by SetTimer or SetTimerEx) -/// -/// +/// +/// /// This function always returns 0. native KillTimer(timerid); /// Returns the uptime of the actual server (not the SA-MP server) in milliseconds. -/// +/// /// GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. /// One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. /// Uptime of the actual server (not the SA-MP server). @@ -342,48 +437,48 @@ native GetTickCount(); /// Get the inversed value of a sine in degrees. /// The sine for which to find the angle for -/// +/// /// The angle in degrees. native Float:asin(Float:value); /// Get the inversed value of a cosine in degrees. /// The cosine for which to find the angle for -/// +/// /// The angle in degrees. native Float:acos(Float:value); /// Get the inversed value of a tangent in degrees. /// The tangent for which to find the angle for -/// -/// +/// +/// /// The angle in degrees. native Float:atan(Float:value); /// Get the multi-valued inversed value of a tangent in degrees. /// y size /// x size -/// -/// +/// +/// /// The angle in degrees. native Float:atan2(Float:y, Float:x); /// This will send a player text by the bot, just like using SendPlayerMessageToAll, but this function is to be used inside the NPC scripts. /// The text to be sent by the NPC -/// +/// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! native SendChat(const message[]); /// This will force the NPC to write a desired command, and this way, getting the effects it would produce. /// The command text to be sent by the NPC -/// +/// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! native SendCommand(const command[]); /// Get a player's current state. /// The ID of the player to get the current state of -/// -/// -/// +/// +/// +/// /// /// States:
            ///
              @@ -407,20 +502,20 @@ native GetPlayerState(playerid); /// A float variable in which to store the x coordinate in, passed by reference /// A float variable in which to store the y coordinate in, passed by reference /// A float variable in which to store the z coordinate in, passed by reference -/// -/// -/// -/// +/// +/// +/// +/// /// This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. /// true on success, false on failure (i.e. player not connected). native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /// This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. /// The ID of the player in the vehicle that you want to get the ID of -/// -/// -/// -/// +/// +/// +/// +/// /// ID of the vehicle or 0 if not in a vehicle. native GetPlayerVehicleid(playerid); native GetPlayerArmedWeapon(playerid); @@ -430,21 +525,21 @@ native GetPlayerArmour(playerid); /// Retrieves a player's current special action. /// The ID of the player to get the special action of -/// -/// +/// +/// /// The special action of the player. native GetPlayerSpecialAction(playerid); /// Checks if a player is streamed in for an NPC. Only nearby players are streamed in. /// The ID of the player to check -/// +/// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is streamed in, 0 if not. native bool:IsPlayerStreamedIn(playerid); /// Checks if a vehicle is streamed in for an NPC. Only nearby vehicles are streamed in. /// The ID of the vehicle to check -/// +/// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the vehicle is streamed in, 0 if not. native bool:IsVehicleStreamedIn(vehicleid); @@ -454,7 +549,7 @@ native bool:IsVehicleStreamedIn(vehicleid); /// Bitmask containing the player's key states. List of keys /// Up/down state /// Left/right state -/// +/// /// Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). /// As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. /// The keys are stored in the specified variables. @@ -471,8 +566,8 @@ native GetPlayerFacingAngle(playerid, &Float:ang); /// A float to save the x coordinate, passed by reference /// A float to save the y coordinate, passed by reference /// A float to save the z coordinate, passed by reference -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! native GetMyPos(&Float:x, &Float:y, &Float:z); @@ -480,14 +575,14 @@ native GetMyPos(&Float:x, &Float:y, &Float:z); /// The x coordinate to put the NPC at /// The y coordinate to put the NPC at /// The z coordinate to put the NPC at -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! native SetMyPos(Float:x, Float:y, Float:z); /// Get the current facing angle of the NPC. /// A float to save the angle in, passed by reference -/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// The facing angle is stored in the specified variable. native GetMyFacingAngle(&Float:ang); @@ -503,8 +598,8 @@ native SetMyFacingAngle(Float:ang); /// The y coordinate of the point /// The z coordinate of the point /// A float to save the distance in, passed by reference -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// This function does not return any specific values. native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); @@ -515,9 +610,9 @@ native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); /// The x coordinate of the point to check the range to /// The y coordinate of the point to check the range to /// The z coordinate of the point to check the range to -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is in range, 0 if not. native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); @@ -526,20 +621,20 @@ native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Floa /// The ID of the player to get the name of /// An array into which to store the name, passed by reference /// The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. /// The length of the player's name. 0 if player specified doesn't exist. native GetPlayerName(playerid, name[], len = sizeof (name)); /// Checks if a player is connected (if an ID is taken by a connected player). /// The ID of the player to check -/// -/// -/// +/// +/// +/// /// This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. /// 1 if the player is connected, 0 if not. native bool:IsPlayerConnected(playerid); @@ -547,22 +642,22 @@ native bool:IsPlayerConnected(playerid); /// This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. /// The type of recording to be loaded /// The filename to be loaded, without the .rec extension -/// +/// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! -native StartRecordingPlayback(e_PLAYER_RECORDING_TYPE:playbacktype, const recordFile[]); +native StartRecordingPlayback(__TAG(PLAYER_RECORDING_TYPE):playbacktype, const recordFile[]); /// This will stop the current .rec file which is being ran by the NPC, making it stay idle until some other order is given. -/// +/// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! native StopRecordingPlayback(); /// This will pause playing back the recording. -/// +/// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! native PauseRecordingPlayback(); /// This will resume the paused recording. -/// +/// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! native ResumeRecordingPlayback(); @@ -571,28 +666,28 @@ native ResumeRecordingPlayback(); // -------------------------------------------------- /// Gets called when a NPC script is loaded. -/// +/// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! forward OnNPCModeInit(); /// Gets called when a NPC-script unloaded. -/// +/// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! forward OnNPCModeExit(); /// Gets called when a NPC successfully connects to the server. /// The playerid the NPC has been given -/// -/// -/// +/// +/// +/// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! forward OnNPCConnect(myplayerid); /// Gets called when the NPC gets disconnected from the server. /// The reason why the bot has disconnected from the server -/// -/// -/// +/// +/// +/// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! forward OnNPCDisconnect(reason[]); @@ -603,19 +698,19 @@ forward OnNPCSpawn(); /// Gets called when a NPC enters a vehicle. /// The vehicleid from the Vehicle the NPC enters /// The seatid the NPC uses -/// +/// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! forward OnNPCEnterVehicle(vehicleid, seatid); /// Gets called when a NPC leaves a vehicle. -/// +/// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! forward OnNPCExitVehicle(); /// This callback gets called whenever the NPC sees a ClientMessage. This will be everytime a SendClientMessageToAll function is used and everytime a SendClientMessage function is sent towards the NPC. This callback won't be called when someone says something. For a version of this with player text, see OnPlayerText. /// The colour the ClientMessage is /// The actual message -/// +/// /// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! forward OnClientMessage(colour, text[]); diff --git a/a_objects.inc b/a_objects.inc index 83c40e4..b9502e6 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -18,9 +18,10 @@ // Defines // -------------------------------------------------- -enum e_OBJECT_MATERIAL_SIZE (+= 10) +#define OBJECT_MATERIAL_SIZE: __TAG(OBJECT_MATERIAL_SIZE): +enum OBJECT_MATERIAL_SIZE: (+= 10) { - OBJECT_MATERIAL_SIZE_32x32 = 10, + OBJECT_MATERIAL_SIZE_32x32 = 10, OBJECT_MATERIAL_SIZE_64x32, OBJECT_MATERIAL_SIZE_64x64, OBJECT_MATERIAL_SIZE_128x32, @@ -33,16 +34,20 @@ enum e_OBJECT_MATERIAL_SIZE (+= 10) OBJECT_MATERIAL_SIZE_512x64, OBJECT_MATERIAL_SIZE_512x128, OBJECT_MATERIAL_SIZE_512x256, - OBJECT_MATERIAL_SIZE_512x512, + OBJECT_MATERIAL_SIZE_512x512 } -enum e_OBJECT_MATERIAL_TEXT_ALIGN +#define OBJECT_MATERIAL_TEXT_ALIGN: __TAG(OBJECT_MATERIAL_TEXT_ALIGN): +enum OBJECT_MATERIAL_TEXT_ALIGN: { OBJECT_MATERIAL_TEXT_ALIGN_LEFT, - OBJECT_MATERIAL_TEXT_ALIGN_CENTER, - OBJECT_MATERIAL_TEXT_ALIGN_RIGHT + OBJECT_MATERIAL_TEXT_ALIGN_CENT, + OBJECT_MATERIAL_TEXT_ALIGN_RIGT } +#define OBJECT_MATERIAL_TEXT_ALIGN_CENTER OBJECT_MATERIAL_TEXT_ALIGN_CENT +#define OBJECT_MATERIAL_TEXT_ALIGN_RIGHT OBJECT_MATERIAL_TEXT_ALIGN_RIGT + // Objects /// Creates an object at specified coordinates in the game world. @@ -54,17 +59,17 @@ enum e_OBJECT_MATERIAL_TEXT_ALIGN /// The y rotation of the object /// The z rotation of the object /// The distance that San Andreas renders objects at. 0.0 will cause objects to render at their default distances. Usable since 0.3b, limited to 300 prior to 0.3x (optional=0.0) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// /// Objects that emit light (lampposts, police lights, bollard lights, neons etc.) that have a greater rotation than 16.26 degrees (or -16.26) on either the x or y axis will stop shining. This effect also applies to light objects attached to other objects, players and vehicles. /// If a light object is attached to a car and the car is rotated over 16.26 degrees (like in a rollover), the object will also stop emitting light. This is a GTA:SA issue and is not caused by a bug in SA-MP. @@ -83,10 +88,10 @@ native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, /// The x rotation offset for the object /// The y rotation offset for the object /// The z rotation offset for the object -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// The object must be created first. /// When the vehicle is destroyed or respawned, the attached objects won't be destroyed with it; they will remain stationary at the position the vehicle disappeared and be reattached to the next vehicle to claim the vehicle ID that the objects were attached to. @@ -101,10 +106,10 @@ native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, F /// The x rotation between the object and the main object /// The y rotation between the object and the main object /// The z rotation between the object and the main object -/// If set to 0, objectid's rotation will not change with 's (optional=1) -/// -/// -/// +/// If set to 0, objectid's rotation will not change with 's (optional=1) +/// +/// +/// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// ///
                @@ -114,7 +119,7 @@ native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, F /// /// /// 1: The function executed successfully.
                -/// 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. +/// 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. ///
                native AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); @@ -127,11 +132,11 @@ native AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Fl /// The x rotation between the object and the player /// The y rotation between the object and the player /// The z rotation between the object and the player -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This function always returns 0. native AttachObjectToPlayer(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); @@ -140,10 +145,10 @@ native AttachObjectToPlayer(objectid, parentid, Float:offsetX, Float:offsetY, Fl /// The x coordinate to position the object at /// The y coordinate to position the object at /// The z coordinate to position the object at -/// -/// -/// -/// +/// +/// +/// +/// /// This function always returns 1, even if the object specified does not exist. native SetObjectPos(objectid, Float:x, Float:y, Float:z); @@ -152,10 +157,10 @@ native SetObjectPos(objectid, Float:x, Float:y, Float:z); /// A variable in which to store the x coordinate, passed by reference /// A variable in which to store the y coordinate, passed by reference /// A variable in which to store the z coordinate, passed by reference -/// -/// -/// -/// +/// +/// +/// +/// /// /// 1: The function executed successfully.
                /// 0: The function failed to execute. The specified object does not exist. @@ -167,10 +172,10 @@ native GetObjectPos(objectid, &Float:x, &Float:y, &Float:z); /// The x rotation /// The y rotation /// The z rotation -/// -/// -/// -/// +/// +/// +/// +/// /// This function always returns 1, even if the object doesn't exist. native SetObjectRot(objectid, Float:rotX, Float:rotY, Float:rotZ); @@ -179,25 +184,25 @@ native SetObjectRot(objectid, Float:rotX, Float:rotY, Float:rotZ); /// The variable to store the x rotation, passed by reference /// The variable to store the y rotation, passed by reference /// The variable to store the z rotation, passed by reference -/// -/// -/// -/// +/// +/// +/// +/// /// The object's rotation is stored in the referenced variables, not in the return value. native GetObjectRot(objectid, &Float:rotX, &Float:rotY, &Float:rotZ); /// Get the model ID of an object. /// The ID of the object to get the model of -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The model ID of the object. -1 if does not exist. +/// The model ID of the object. -1 if does not exist. native GetObjectModel(objectid); /// Disable collisions between players' cameras and the specified object. /// The ID of the object to disable camera collisions on -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). /// @@ -208,18 +213,18 @@ native SetObjectNoCameraCol(objectid); /// Checks if an object with the ID provided exists. /// The ID of the object to check the existence of -/// -/// -/// +/// +/// +/// /// This is to check if an object exists, not if a model is valid. /// 1 if the object exists, 0 if not. native bool:IsValidObject(objectid); /// Destroys (removes) an object that was created using CreateObject. /// The ID of the object to destroy. Returned by CreateObject -/// -/// -/// +/// +/// +/// native DestroyObject(objectid); /// Move an object to a new position with a set speed. Players/vehicles will 'surf' the object as it moves. @@ -231,13 +236,13 @@ native DestroyObject(objectid); /// The FINAL x rotation (optional=-1000.0) /// The FINAL y rotation (optional=-1000.0) /// The FINAL z rotation (optional=-1000.0) -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// This function can be used to make objects rotate smoothly. In order to achieve this however, the object must also be moved. The specified rotation is the rotation the object will have after the movement. Hence the object will not rotate when no movement is applied. For a script example take a look at the ferriswheel.pwn filterscript made by Kye included in the server package (SA-MP 0.3d and above). /// To fully understand the above note, you can (but not limited to) increase the z position by (+0.001) and then (-0.001) after moving it again, as not changing the x, y or z will not rotate the object. /// The time it will take for the object to move in milliseconds. @@ -245,18 +250,18 @@ native MoveObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = /// Stop a moving object after MoveObject has been used. /// The ID of the object to stop moving -/// -/// -/// -/// +/// +/// +/// +/// native StopObject(objectid); /// Checks if the given objectid is moving. /// The objectid you want to check if is moving -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// 1 if the object is moving, 0 if not. native bool:IsObjectMoving(objectid); @@ -264,10 +269,10 @@ native bool:IsObjectMoving(objectid); /// Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical User Interface). /// The ID of the player that should edit the object /// The ID of the object to be edited by the player -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. /// @@ -279,10 +284,10 @@ native EditObject(playerid, objectid); /// Allows players to edit a player-object (position and rotation) with a GUI and their mouse. /// The ID of the player that should edit the object /// The object to be edited by the player -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. /// @@ -293,20 +298,20 @@ native EditPlayerObject(playerid, objectid); /// Display the cursor and allow the player to select an object. OnPlayerSelectObject is called when the player selects an object. /// The ID of the player that should be able to select the object -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! native SelectObject(playerid); /// Cancel object edition mode for a player. /// The ID of the player to cancel edition for -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! native CancelEdit(playerid); @@ -320,17 +325,17 @@ native CancelEdit(playerid); /// The y rotation of the object /// The z rotation of the object /// The distance from which objects will appear to players. 0.0 will cause an object to render at its default distance. Leaving this parameter out will cause objects to be rendered at their default distance. The maximum usable distance is 300 in versions prior to 0.3x, in which drawdistance can be unlimited (optional=0.0) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// The 'DrawDistance' parameter was added in 0.3b. It must be left out in scripts for older versions of SA:MP. /// The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, Float:rotZ, Float:drawDistance = 0.0); @@ -345,9 +350,9 @@ native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:ro /// The x rotation offset for attachment /// The y rotation offset for attachment /// The z rotation offset for attachment -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You need to create the object before attempting to attach it to a vehicle. native AttachPlayerObjectToVehicle(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); @@ -358,10 +363,10 @@ native AttachPlayerObjectToVehicle(playerid, objectid, parentid, Float:offsetX, /// The x coordinate to put the object at /// The y coordinate to put the object at /// The z coordinate to put the object at -/// -/// -/// -/// +/// +/// +/// +/// /// /// 1: The function executed successfully.
                /// 0: The function failed to execute. Player and/or object do not exist. @@ -374,11 +379,11 @@ native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); /// A float variable in which to store the x coordinate, passed by reference /// A float variable in which to store the y coordinate, passed by reference /// A float variable in which to store the z coordinate, passed by reference -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// /// 1: The function executed successfully.
                /// 0: The function failed to execute. The player and/or the object don't exist.
                @@ -392,10 +397,10 @@ native GetPlayerObjectPos(playerid, objectid, &Float:x, &Float:y, &Float:z); /// The x rotation to set /// The y rotation to set /// The z rotation to set -/// -/// -/// -/// +/// +/// +/// +/// /// To smoothly rotate an object, see MovePlayerObject. /// /// 1: The function executed successfully.
                @@ -409,18 +414,18 @@ native SetPlayerObjectRot(playerid, objectid, Float:rotX, Float:rotY, Float:rotZ /// The variable to store the x rotation, passed by reference /// The variable to store the y rotation, passed by reference /// The variable to store the z rotation, passed by reference -/// -/// -/// -/// +/// +/// +/// +/// /// The object's rotation is stored in the specified variables. native GetPlayerObjectRot(playerid, objectid, &Float:rotX, &Float:rotY, &Float:rotZ); /// Retrieve the model ID of a player-object. /// The ID of the player whose player-object to get the model of /// The ID of the player-object of which to retrieve the model ID -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The model ID of the player object. If the player or object don't exist, it will return -1 or 0 if the player or object does not exist. native GetPlayerObjectModel(playerid, objectid); @@ -428,8 +433,8 @@ native GetPlayerObjectModel(playerid, objectid); /// Toggles a player object camera collision. /// The playerid the object belongs to /// The ID of the object you want to toggle -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). /// 1 regardless of if the object exists or not. @@ -438,18 +443,18 @@ native SetPlayerObjectNoCameraCol(playerid, objectid); /// Checks if the given object ID is valid for the given player. /// The ID of the player whose player-object to validate /// The ID of the object to validate -/// -/// -/// +/// +/// +/// /// 1 if the object exists, 0 if not. native bool:IsValidPlayerObject(playerid, objectid); /// Destroy a player-object created using CreatePlayerObject. /// The ID of the player whose player-object to destroy /// The ID of the player-object to destroy. Returned by CreatePlayerObject -/// -/// -/// +/// +/// +/// native DestroyPlayerObject(playerid, objectid); /// Move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects. @@ -462,13 +467,13 @@ native DestroyPlayerObject(playerid, objectid); /// The final x rotation (optional=-1000.0) /// The final y rotation (optional=-1000.0) /// The final z rotation (optional=-1000.0) -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// 0.3d R2 and older versions do not have the rotational parameters. /// The time it will take for the object to move in milliseconds. native MovePlayerObject(playerid, objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); @@ -476,19 +481,19 @@ native MovePlayerObject(playerid, objectid, Float:x, Float:y, Float:z, Float:spe /// Stop a moving player-object after MovePlayerObject has been used. /// The ID of the player whose player-object to stop /// The ID of the player-object to stop -/// -/// -/// -/// +/// +/// +/// +/// native StopPlayerObject(playerid, objectid); /// Checks if the given player objectid is moving. /// The ID of the player whose player-object is checked /// The player objectid you want to check if is moving -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// 1 if the player object is moving, 0 if not. native bool:IsPlayerObjectMoving(playerid, objectid); @@ -503,10 +508,10 @@ native bool:IsPlayerObjectMoving(playerid, objectid); /// The x rotation /// The y rotation /// The z rotation -/// -/// -/// -/// +/// +/// +/// +/// /// This function was removed in SA-MP 0.3. native AttachPlayerObjectToPlayer(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); @@ -517,8 +522,8 @@ native AttachPlayerObjectToPlayer(playerid, objectid, parentid, Float:offsetX, F /// The name of the txd file which contains the replacement texture (use "none" if not required) /// The name of the texture to use as the replacement (use "none" if not required) /// The object colour to set, as an integer or hex in ARGB colour format. Using 0 keeps the existing material colour (optional=0) -/// -/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Vertex lightning of the object will disappear if material colour is changed. /// @@ -535,8 +540,8 @@ native SetObjectMaterial(objectid, materialIndex, modelid, const textureLibrary[ /// The name of the txd file which contains the replacement texture (use "none" if not required) /// The name of the texture to use as the replacement (use "none" if not required) /// The object colour to set (ARGB). Using 0 keeps the existing material colour (optional=0) -/// -/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Vertex lightning of the object will disappear if material colour is changed. native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const textureLibrary[], const textureName[], materialColour = 0); @@ -552,8 +557,8 @@ native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const /// The colour of the text, in ARGB format (optional=-1) /// The background colour, in ARGB format (optional=0) /// The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) -/// -/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Color embedding can be used for multiple colours in the text. /// @@ -587,7 +592,7 @@ native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const /// 1: The function executed successfully.
                /// 0: The function failed to execute. ///
                -native SetObjectMaterialText(objectid, const text[], materialIndex = 0, e_OBJECT_MATERIAL_SIZE:materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, e_OBJECT_MATERIAL_TEXT_ALIGN:textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); +native SetObjectMaterialText(objectid, const text[], materialIndex = 0, __TAG(OBJECT_MATERIAL_SIZE):materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, __TAG(OBJECT_MATERIAL_TEXT_ALIGN):textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); /// Replace the texture of a player object with text. /// The ID of the player whose player object to set the text of @@ -601,8 +606,8 @@ native SetObjectMaterialText(objectid, const text[], materialIndex = 0, e_OBJECT /// The colour of the text (optional=-1) /// The background colour (optional=0) /// The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) -/// -/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Color embedding can be used for multiple colours in the text. /// @@ -632,12 +637,12 @@ native SetObjectMaterialText(objectid, const text[], materialIndex = 0, e_OBJECT ///
              • OBJECT_MATERIAL_SIZE_512x512 140
              • ///
              ///
              -native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialIndex = 0, e_OBJECT_MATERIAL_SIZE:materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, e_OBJECT_MATERIAL_TEXT_ALIGN:textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); +native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialIndex = 0, __TAG(OBJECT_MATERIAL_SIZE):materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, __TAG(OBJECT_MATERIAL_TEXT_ALIGN):textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); /// Allows camera collisions with newly created objects to be disabled by default. /// 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function only affects the camera collision of objects created AFTER its use - it does not toggle existing objects' camera collisions. /// This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). diff --git a/a_players.inc b/a_players.inc index 227cb4b..f38ed89 100644 --- a/a_players.inc +++ b/a_players.inc @@ -23,7 +23,8 @@ #define MAX_CHATBUBBLE_LENGTH (144) #endif -enum e_SPECIAL_ACTION +#define SPECIAL_ACTION: __TAG(SPECIAL_ACTION): +enum SPECIAL_ACTION: { SPECIAL_ACTION_NONE, SPECIAL_ACTION_DUCK, @@ -34,30 +35,32 @@ enum e_SPECIAL_ACTION SPECIAL_ACTION_DANCE2, SPECIAL_ACTION_DANCE3, SPECIAL_ACTION_DANCE4, - SPECIAL_ACTION_HANDSUP = 10, + SPECIAL_ACTION_HANDSUP = 10, SPECIAL_ACTION_USECELLPHONE, SPECIAL_ACTION_SITTING, SPECIAL_ACTION_STOPUSECELLPHONE, - SPECIAL_ACTION_DRINK_BEER = 20, + SPECIAL_ACTION_DRINK_BEER = 20, SPECIAL_ACTION_SMOKE_CIGGY, SPECIAL_ACTION_DRINK_WINE, SPECIAL_ACTION_DRINK_SPRUNK, SPECIAL_ACTION_CUFFED, SPECIAL_ACTION_CARRY, - SPECIAL_ACTION_PISSING = 68, + SPECIAL_ACTION_PISSING = 68 } -enum e_FIGHT_STYLE +#define FIGHT_STYLE: __TAG(FIGHT_STYLE): +enum FIGHT_STYLE: { - FIGHT_STYLE_NORMAL = 4, + FIGHT_STYLE_NORMAL = 4, FIGHT_STYLE_BOXING, FIGHT_STYLE_KUNGFU, FIGHT_STYLE_KNEEHEAD, - FIGHT_STYLE_GRABKICK = 15, + FIGHT_STYLE_GRABKICK = 15, FIGHT_STYLE_ELBOW } -enum e_WEAPONSKILL +#define WEAPONSKILL: __TAG(WEAPONSKILL): +enum WEAPONSKILL: { WEAPONSKILL_PISTOL, WEAPONSKILL_PISTOL_SILENCED, @@ -72,17 +75,19 @@ enum e_WEAPONSKILL WEAPONSKILL_SNIPERRIFLE, } -enum e_WEAPONSTATE +#define WEAPONSTATE: __TAG(WEAPONSTATE): +enum WEAPONSTATE: { - WEAPONSTATE_UNKNOWN = -1, + WEAPONSTATE_UNKNOWN = -1, WEAPONSTATE_NO_BULLETS, WEAPONSTATE_LAST_BULLET, WEAPONSTATE_MORE_BULLETS, - WEAPONSTATE_RELOADING, + WEAPONSTATE_RELOADING } // PVar enumeration -enum e_PLAYER_VARTYPE +#define PLAYER_VARTYPE: __TAG(PLAYER_VARTYPE): +enum PLAYER_VARTYPE: { PLAYER_VARTYPE_NONE, PLAYER_VARTYPE_INT, @@ -90,30 +95,34 @@ enum e_PLAYER_VARTYPE PLAYER_VARTYPE_FLOAT } -enum e_MAPICON +#define MAPICON: __TAG(MAPICON): +enum MAPICON: { - MAPICON_LOCAL, // displays in the player's local area - MAPICON_GLOBAL, // displays always - MAPICON_LOCAL_CHECKPOINT, // displays in the player's local area and has a checkpoint marker - MAPICON_GLOBAL_CHECKPOINT // displays always and has a checkpoint marker + MAPICON_LOCAL, // Displays in the player's local area + MAPICON_GLOBAL, // Displays always + MAPICON_LOCAL_CHECKPOINT, // Displays in the player's local area and has a checkpoint marker + MAPICON_GLOBAL_CHECKPOINT // Displays always and has a checkpoint marker } -enum e_CAMERA +#define CAMERA: __TAG(CAMERA): +enum CAMERA: { - CAMERA_MOVE = 1, + CAMERA_MOVE = 1, CAMERA_CUT } // Spectating -enum e_SPECTATE_MODE +#define SPECTATE_MODE: __TAG(SPECTATE_MODE): +enum SPECTATE_MODE: { - SPECTATE_MODE_NORMAL = 1, + SPECTATE_MODE_NORMAL = 1, SPECTATE_MODE_FIXED, SPECTATE_MODE_SIDE } // Recording for NPC playback -enum e_PLAYER_RECORDING_TYPE +#define PLAYER_RECORDING_TYPE: __TAG(PLAYER_RECORDING_TYPE): +enum PLAYER_RECORDING_TYPE: { PLAYER_RECORDING_TYPE_NONE, PLAYER_RECORDING_TYPE_DRIVER, @@ -136,16 +145,16 @@ enum e_PLAYER_RECORDING_TYPE /// The amount of ammunition for the second spawnweapon /// The third spawn-weapon for the player /// The amount of ammunition for the third spawnweapon -/// -/// -/// +/// +/// +/// native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /// (Re)Spawns a player. /// The ID of the player to spawn -/// -/// -/// +/// +/// +/// /// Kills the player if they are in a vehicle and then they spawn with a bottle in their hand. /// /// 1: The function executed successfully.
              @@ -160,11 +169,11 @@ native SpawnPlayer(playerid); /// The x coordinate to position the player at /// The y coordinate to position the player at /// The z coordinate to position the player at -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// Using this function on a player in a vehicle will instantly remove them from the vehicle. Useful for quickly ejecting players. /// /// 1: The function executed successfully.
              @@ -177,8 +186,8 @@ native SetPlayerPos(playerid, Float:x, Float:y, Float:z); /// The x coordinate to position the player at /// The x coordinate to position the player at /// The z coordinate to position the player at -/// -/// +/// +/// /// This function does not work if the new coordinates are far away from where the player currently is. The z height will be 0, which will likely put them underground. It is highly recommended that the MapAndreas plugin be used instead. /// /// 1: The function executed successfully.
              @@ -191,10 +200,10 @@ native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); /// A float variable in which to store the x coordinate in, passed by reference /// A float variable in which to store the y coordinate in, passed by reference /// A float variable in which to store the z coordinate in, passed by reference -/// -/// -/// -/// +/// +/// +/// +/// /// This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. /// true on success, false on failure (i.e. player not connected). native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); @@ -202,8 +211,8 @@ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /// Set a player's facing angle (z rotation). /// The ID of the player to set the facing angle of /// The angle the player should face -/// -/// +/// +/// /// Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. /// /// 1: The function executed successfully.
              @@ -214,8 +223,8 @@ native SetPlayerFacingAngle(playerid, Float:ang); /// Gets the angle a player is facing. /// The player you want to get the angle of /// The Float to store the angle in, passed by reference -/// -/// +/// +/// /// Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. /// Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. native GetPlayerFacingAngle(playerid, &Float:ang); @@ -226,9 +235,9 @@ native GetPlayerFacingAngle(playerid, &Float:ang); /// The x coordinate of the point to check the range to /// The y coordinate of the point to check the range to /// The z coordinate of the point to check the range to -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is in range, 0 if not. native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); @@ -238,9 +247,9 @@ native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Floa /// The x map coordinate /// The y map coordinate /// The z map coordinate -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// The distance between the player and the point as a float. native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); @@ -248,12 +257,12 @@ native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); /// Checks if a player is streamed in another player's client. /// The ID of the player to check is streamed in /// The ID of the player to check if playerid is streamed in for -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// Players aren't streamed in on their own client, so if playerid is the same as targetid it will return false! /// Players stream out if they are more than 150 meters away (see server.cfg - stream_distance) @@ -263,9 +272,9 @@ native bool:IsPlayerStreamedIn(targetid, playerid); /// Set a player's interior. A list of currently known interiors and their positions can be found here. /// The ID of the player to set the interior of /// The interior ID to set the player in -/// -/// -/// +/// +/// +/// /// /// 1: The function executed successfully.
              /// 0: The function failed to execute. This means the player is not connected. @@ -274,8 +283,8 @@ native SetPlayerInterior(playerid, interiorid); /// Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page. /// The player to get the interior ID of -/// -/// +/// +/// /// Always returns 0 for NPCs. /// The interior ID the player is currently in. native GetPlayerInterior(playerid); @@ -283,9 +292,9 @@ native GetPlayerInterior(playerid); /// Set the health of a player. /// The ID of the player to set the health of /// The value to set the player's health to. Max health that can be displayed in the HUD is 100, though higher values are valid -/// -/// -/// +/// +/// +/// /// Health is obtained rounded to integers: set 50.15, but get 50.0 /// If a player's health is set to 0 or a minus value, they will die instantly. /// If a player's health is below 10 or above 98303, their health bar will flash. @@ -298,9 +307,9 @@ native SetPlayerHealth(playerid, Float:health); /// The function GetPlayerHealth allows you to retrieve the health of a player. Useful for cheat detection, among other things. /// The ID of the player /// Float to store health, passed by reference -/// -/// -/// +/// +/// +/// /// /// Even though the health can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc.
              /// Health is obtained rounded to integers: set 50.15, but get 50.0 @@ -314,9 +323,9 @@ native GetPlayerHealth(playerid, &Float:health); /// Set a player's armor level. /// The ID of the player to set the armour of /// The amount of armour to set, as a percentage (float). Values larger than 100 are valid, but won't be displayed in the HUD's armour bar -/// -/// -/// +/// +/// +/// /// Armour is obtained rounded to integers: set 50.15, but get 50.0 /// The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. /// @@ -328,9 +337,9 @@ native SetPlayerArmour(playerid, Float:armour); /// This function stores the armour of a player into a variable. /// The ID of the player that you want to get the armour of /// The float to to store the armour in, passed by reference -/// -/// -/// +/// +/// +/// /// Even though the armour can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc. /// Armour is obtained rounded to integers: set 50.15, but get 50.0 /// The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. @@ -344,9 +353,9 @@ native GetPlayerArmour(playerid, &Float:armour); /// The ID of the player to set the weapon ammo of /// The ID of the weapon slot to set the ammo of. /// The amount of ammo to set -/// -/// -/// +/// +/// +/// /// Set the ammo to 0 to remove a weapon from a player's inventory. Note that the weapon will still show up in GetPlayerWeaponData, albeit with 0 ammo. /// /// 1: The function executed successfully. Success is also returned when the weapon slot specified is invalid (not 0-12).
              @@ -356,15 +365,15 @@ native SetPlayerAmmo(playerid, weaponslot, ammo); /// Gets the amount of ammo in a player's current weapon. /// The ID of the player whose ammo to get -/// -/// +/// +/// /// The ammo can hold 16-bit values, therefore values over 32767 will return erroneous values. /// The amount of ammo in the player's current weapon. native GetPlayerAmmo(playerid); /// Check the state of a player's weapon. /// The ID of the player to obtain the weapon state of -/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// Weapon states:
              @@ -377,13 +386,13 @@ native GetPlayerAmmo(playerid); ///
            ///
            /// The state of the player's weapon. 0 if player specified does not exist. -native e_WEAPONSTATE:GetPlayerWeaponState(playerid); +native __TAG(WEAPONSTATE):GetPlayerWeaponState(playerid); /// Check who a player is aiming at. /// The ID of the player to get the target of -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// Does not work for joypads/controllers, and after a certain distance. /// Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. @@ -392,9 +401,9 @@ native GetPlayerTargetPlayer(playerid); /// Gets ID of an actor which is aimed by certain player. /// The ID of the player to get the target of -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// Does not work for joypads/controllers, and after a certain distance. /// Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. @@ -404,17 +413,17 @@ native GetPlayerTargetActor(playerid); /// Set the team of a player. /// The ID of the player you want to set the team of /// The team to put the player in. Use NO_TEAM to remove the player from any team -/// -/// -/// +/// +/// +/// /// Players can not damage/kill players on the same team unless they use a knife to slit their throat. As of SA-MP 0.3x, players are also unable to damage vehicles driven by a player from the same team. This can be enabled with EnableVehicleFriendlyFire. /// 255 (or NO_TEAM) is the default team to be able to shoot other players, not 0. native SetPlayerTeam(playerid, teamid); /// Get the ID of the team the player is on. /// The ID of the player to get the team of -/// -/// +/// +/// /// /// 0-254: The player's team. (0 is a valid team).
            /// 255: Defined as NO_TEAM. The player is not on any team.
            @@ -425,7 +434,7 @@ native GetPlayerTeam(playerid); /// Set a player's score. Players' scores are shown in the scoreboard (shown by holding the TAB key). /// The ID of the player to set the score of /// The value to set the player's score to -/// +/// /// /// 1: The function executed successfully.
            /// 0: The function failed to execute. This means the player specified does not exist. @@ -434,8 +443,8 @@ native SetPlayerScore(playerid, score); /// This function returns a player's score as it was set using SetPlayerScore. /// The player to get the score of -/// -/// +/// +/// /// The player's score. native GetPlayerScore(playerid); @@ -444,7 +453,7 @@ native GetPlayerScore(playerid); /// The higher drunkenness levels affect the player's camera, and the car driving handling. The level of drunkenness increases when the player drinks from a bottle (You can use SetPlayerSpecialAction to give them bottles). /// /// The player you want to check the drunkenness level of -/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// An integer with the level of drunkenness of the player. native GetPlayerDrunkLevel(playerid); @@ -452,7 +461,7 @@ native GetPlayerDrunkLevel(playerid); /// Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control. /// The ID of the player to set the drunkenness of /// The level of drunkenness to set -/// +/// /// /// Players' drunk level will automatically decrease over time, based on their FPS (players with 50 FPS will lose 50 'levels' per second. This is useful for determining a player's FPS!).
            /// In 0.3a the drunk level will decrement and stop at 2000. In 0.3b+ the drunk level decrements to 0)
            @@ -469,17 +478,17 @@ native SetPlayerDrunkLevel(playerid, level); /// Set the colour of a player's nametag and marker (radar blip). /// The ID of the player whose colour to set /// The colour to set. Supports alpha values (RGBA) -/// -/// -/// +/// +/// +/// /// This function will change player's colour for everyone, even if player's colour was changed with SetPlayerMarkerForPlayer for any other player. /// If used under OnPlayerConnect, the affecting player will not see the colour in the TAB menu. native SetPlayerColor(playerid, colour); /// Gets the colour of the player's name and radar marker. Only works after SetPlayerColor. /// The ID of the player to get the colour of -/// -/// +/// +/// /// GetPlayerColor will return 0 unless SetPlayerColor has been used first. /// The player's colour. 0 if no colour set or player not connected. native GetPlayerColor(playerid); @@ -487,8 +496,8 @@ native GetPlayerColor(playerid); /// Set the skin of a player. A player's skin is their character model. /// The ID of the player to set the skin of /// The skin the player should use -/// -/// +/// +/// /// If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, they will become frozen or otherwise glitched. This can be fixed by using TogglePlayerControllable. Players can be detected as being crouched through GetPlayerSpecialAction (SPECIAL_ACTION_DUCK). /// Setting a player's skin when he is dead may crash players around him. /// Note that 'success' is reported even when skin ID is invalid (not 0-311, or 74), but the skin will be set to ID 0 (CJ). @@ -500,7 +509,7 @@ native SetPlayerSkin(playerid, skinid); /// Returns the class of the players skin. /// The player you want to get the skin from -/// +/// /// Returns the new skin after SetSpawnInfo is called but before the player actually respawns to get the new skin. /// Returns the old skin if the player was spawned through SpawnPlayer function. /// The skin ID (0 if invalid). @@ -508,7 +517,7 @@ native GetPlayerSkin(playerid); /// Returns the class of the players skin. /// The player you want to get the skin from -/// +/// /// Returns the new skin after SetSpawnInfo is called but before the player actually respawns to get the new skin. /// Returns the old skin if the player was spawned through SpawnPlayer function. /// The skin id (0 if invalid). @@ -518,8 +527,8 @@ native GetPlayerCustomSkin(playerid); /// The ID of the player to give a weapon to /// The ID of the weapon to give to the player /// The amount of ammo to give to the player -/// -/// +/// +/// /// /// 1: The function executed successfully.
            /// 0: The function failed to execute. This means the player is not connected.
            @@ -528,8 +537,8 @@ native GivePlayerWeapon(playerid, weaponid, ammo); /// Removes all weapons from a player. /// The ID of the player whose weapons to remove -/// -/// +/// +/// /// To remove individual weapons from a player, set their ammo to 0 using SetPlayerAmmo. /// /// 1: The function executed successfully.
            @@ -540,8 +549,8 @@ native ResetPlayerWeapons(playerid); /// Sets which weapon (that a player already has) the player is holding. /// The ID of the player to arm with a weapon /// The ID of the weapon that the player should be armed with -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// This function arms a player with a weapon they already have; it does not give them a new weapon. See GivePlayerWeapon. /// @@ -555,8 +564,8 @@ native SetPlayerArmedWeapon(playerid, weaponid); /// The weapon slot to get data for (0-12) /// A variable in which to store the weapon ID, passed by reference /// A variable in which to store the ammo, passed by reference -/// -/// +/// +/// /// Old weapons with no ammo left are still returned. /// /// 1: The function executed successfully.
            @@ -567,8 +576,8 @@ native GetPlayerWeaponData(playerid, slot, &weapons, &ammo); /// Give money to or take money from a player. /// The ID of the player to give money to or take money from /// The amount of money to give the player. Use a minus value to take money -/// -/// +/// +/// /// /// 1: The function executed successfully.
            /// 0: The function failed to execute. This means the player is not connected. @@ -577,8 +586,8 @@ native GivePlayerMoney(playerid, money); /// Reset a player's money to $0. /// The ID of the player to reset the money of -/// -/// +/// +/// /// /// 1: The function executed successfully.
            /// 0: The function failed to execute. This means the player is not connected. @@ -588,7 +597,7 @@ native ResetPlayerMoney(playerid); /// Sets the name of a player. /// The ID of the player to set the name of /// The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-z, [], (), $, @, ., _, =) -/// +/// /// Changing the players' name to the same name but with different character cases (e.g. "John" to "JOHN") will not work. /// If used in OnPlayerConnect, the new name will not be shown for the connecting player. /// Passing a null string as the new name will crash the server. @@ -602,16 +611,16 @@ native SetPlayerName(playerid, const name[]); /// Retrieves the amount of money a player has. /// The ID of the player to get the money of -/// -/// +/// +/// /// The amount of money the player has. native GetPlayerMoney(playerid); /// Get a player's current state. /// The ID of the player to get the current state of -/// -/// -/// +/// +/// +/// /// /// States:
            ///
              @@ -628,37 +637,37 @@ native GetPlayerMoney(playerid); ///
            ///
            /// The player's current state as an integer. -native e_PLAYER_STATE:GetPlayerState(playerid); +native __TAG(PLAYER_STATE):GetPlayerState(playerid); /// Get the specified player's IP address and store it in a string. /// The ID of the player to get the IP address of /// An array into which to store the player's IP address, passed by reference /// The maximum length of the IP address (recommended 16) -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// This function does not work when used in OnPlayerDisconnect because the player is already disconnected. It will return an invalid IP (255.255.255.255). Save players' IPs under OnPlayerConnect if they need to be used under OnPlayerDisconnect. /// 1 on success and 0 on failure. native GetPlayerIp(playerid, ip[], len = sizeof (ip)); /// Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back. /// The ID of the player to get the ping of -/// -/// -/// +/// +/// +/// /// Player's ping may be 65535 for a while after a player connects /// The current ping of the player (expressed in milliseconds). native GetPlayerPing(playerid); /// Returns the ID of the weapon a player is currently holding. /// The ID of the player to get the currently held weapon of -/// -/// -/// +/// +/// +/// /// Prior to version 0.3z R1-2, when the player state is PLAYER_STATE_PASSENGER this function returns the weapon held by the player before they entered the vehicle. If a cheat is used to spawn a weapon inside a vehicle, this function will not report it. /// The ID of the player's current weapon. Returns -1 if the player specified does not exist. native GetPlayerWeapon(playerid); @@ -668,7 +677,7 @@ native GetPlayerWeapon(playerid); /// Bitmask containing the player's key states. List of keys /// Up/down state /// Left/right state -/// +/// /// Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). /// As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. /// The keys are stored in the specified variables. @@ -678,11 +687,11 @@ native GetPlayerKeys(playerid, &keys, &updown, &leftright); /// The ID of the player to get the name of /// An array into which to store the name, passed by reference /// The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. /// The length of the player's name. 0 if player specified doesn't exist. native GetPlayerName(playerid, name[], len = sizeof (name)); @@ -691,9 +700,9 @@ native GetPlayerName(playerid, name[], len = sizeof (name)); /// The ID of the player to set the game time of /// Hour to set (0-23) /// Minutes to set (0-59) -/// -/// -/// +/// +/// +/// /// Using this function under OnPlayerConnect doesn't work. /// /// 1: The function executed successfully.
            @@ -705,9 +714,9 @@ native SetPlayerTime(playerid, hour, minute); /// The ID of the player to get the game time of /// A variable in which to store the hour, passed by reference /// A variable in which to store the minutes, passed by reference -/// -/// -/// +/// +/// +/// /// /// 1: The function executed successfully.
            /// 0: The function failed to execute. The player specified does not exist.
            @@ -728,25 +737,25 @@ native TogglePlayerClock(playerid, bool:toggle); /// Set a player's weather. /// The ID of the player whose weather to set /// The weather to set -/// -/// +/// +/// /// If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. native SetPlayerWeather(playerid, weather); /// Forces a player to go back to class selection. /// The player to send back to class selection -/// -/// -/// -/// +/// +/// +/// +/// /// The player will not return to class selection until they re-spawn. This can be achieved with TogglePlayerSpectating, as seen in the below example. native ForceClassSelection(playerid); /// Set a player's wanted level (6 brown stars under HUD). /// The ID of the player to set the wanted level of /// The wanted level to set for the player (0-6) -/// -/// +/// +/// /// /// 1: The function executed successfully.
            /// 0: The function failed to execute. The player specified does not exist. @@ -755,15 +764,15 @@ native SetPlayerWantedLevel(playerid, level); /// Gets the wanted level of a player. /// The ID of the player that you want to get the wanted level of -/// -/// +/// +/// /// The player's wanted level. native GetPlayerWantedLevel(playerid); /// Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default). /// The ID of player to set the fighting style of /// The fighting style that should be set -/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// This does not affect normal fist attacks - only special/secondary attacks (aim + press 'secondary attack' key). /// @@ -777,11 +786,11 @@ native GetPlayerWantedLevel(playerid); ///
          • FIGHT_STYLE_ELBOW
          • ///
          /// -native SetPlayerFightingStyle(playerid, e_FIGHT_STYLE:style); +native SetPlayerFightingStyle(playerid, __TAG(FIGHT_STYLE):style); /// Get the fighting style the player currently using. /// The ID of the player to get the fighting style of -/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// Fighting styles:
          @@ -795,16 +804,16 @@ native SetPlayerFightingStyle(playerid, e_FIGHT_STYLE:style); ///
        ///
        /// The ID of the fighting style of the player. -native e_FIGHT_STYLE:GetPlayerFightingStyle(playerid); +native __TAG(FIGHT_STYLE):GetPlayerFightingStyle(playerid); /// Set a player's velocity on the x, y and z axes. /// The player to apply the speed to /// The velocity (speed) on the x axis /// The velocity (speed) on the y axis /// The velocity (speed) on the z axis -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// 1: The function executed successfully.
        @@ -817,9 +826,9 @@ native SetPlayerVelocity(playerid, Float:x, Float:y, Float:z); /// A float variable in which to store the velocity on the x axis, passed by reference /// A float variable in which to store the velocity on the y axis, passed by reference /// A float variable in which to store the velocity on the z axis, passed by reference -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); @@ -827,7 +836,7 @@ native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); /// The ID of the player that will hear the crime report /// The ID of the suspect player whom will be described in the crime report /// The crime ID, which will be reported as a 10-code (i.e. 10-16 if 16 was passed as the crime) -/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// Crime list:
        @@ -863,8 +872,8 @@ native PlayCrimeReportForPlayer(playerid, suspectid, crime); /// The z position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) /// The distance over which the audio will be heard. Has no effect unless usepos is set to 1 (optional=50.0) /// Use the positions and distance specified. (optional=0) -/// -/// +/// +/// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// /// 1: The function executed successfully.
        @@ -874,16 +883,16 @@ native PlayAudioStreamForPlayer(playerid, const url[], Float:posX = 0.0, Float:p /// Stops the current audio stream for a player. /// The player you want to stop the audio stream for -/// -/// +/// +/// /// This function was added in SA-MP 0.3d and will not work in earlier versions! native StopAudioStreamForPlayer(playerid); /// Loads or unloads an interior script for a player (for example the ammunation menu). /// The ID of the player to load the interior script for /// The shop script to load. Leave blank ("") to unload scripts -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// This function does not support casino scripts. /// @@ -905,8 +914,8 @@ native SetPlayerShopName(playerid, const shopname[]); /// The ID of the player to set the weapon skill of /// The weapon to set the skill of /// The skill level to set for that weapon, ranging from 0 to 999. A level out of range will max it out -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// Weapon skills:
        @@ -924,12 +933,12 @@ native SetPlayerShopName(playerid, const shopname[]); ///
      • WEAPONSKILL_SNIPERRIFLE(10)
      • ///
      ///
      -native SetPlayerSkillLevel(playerid, e_WEAPONSKILL:skill, level); +native SetPlayerSkillLevel(playerid, __TAG(WEAPONSKILL):skill, level); /// Get the ID of the vehicle that the player is surfing (stuck to the roof of). /// The ID of the player you want to know the surfing vehicle ID of -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified is not connected, INVALID_VEHICLE_ID also. native GetPlayerSurfingVehicleID(playerid); @@ -947,8 +956,8 @@ native GetPlayerSurfingObjectID(playerid); /// The y coordinate around which the objects will be removed /// The z coordinate around which the objects will be removed /// The radius around the specified point to remove objects with the specified model -/// -/// +/// +/// /// This function was added in SA-MP 0.3d and will not work in earlier versions! /// There appears to be a limit of around 1000 lines/objects. There is no workaround. /// When removing the same object for a player, they will crash. Commonly, players crash when reconnecting to the server because the server removes buildings on OnPlayerConnect. @@ -963,10 +972,10 @@ native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, /// A float variable in which to save the x coordinate of where the bullet hit /// A float variable in which to save the y coordinate of where the bullet hit /// A float variable in which to save the z coordinate of where the bullet hit -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This function will only work when lag compensation is enabled. /// If the player hit nothing, the hit positions will be 0. This means you can't currently calculate how far a bullet travels through open air. @@ -997,9 +1006,9 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float /// z axis scale of the object (optional=1.0) /// The first object colour to set ARGB (optional=0) /// The second object colour to set ARGB (optional=0) -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// In version 0.3d and onwards, 10 objects can be attached to a single player (index 0-9). In earlier versions, the limit is 5 (index 0-4). /// This function is separate from the CreateObject / CreatePlayerObject pools. @@ -1032,8 +1041,8 @@ native SetPlayerAttachedObject(playerid, index, modelid, bone, Float:offsetX = 0 /// Remove an attached object from a player. /// The ID of the player to remove the object from /// The index of the object to remove (set with SetPlayerAttachedObject) -/// -/// +/// +/// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// 1 on success, 0 on failure. native RemovePlayerAttachedObject(playerid, index); @@ -1041,8 +1050,8 @@ native RemovePlayerAttachedObject(playerid, index); /// Check if a player has an object attached in the specified index (slot). /// The ID of the player to check /// The index (slot) to check -/// -/// +/// +/// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// 1 if used, 0 if not. native bool:IsPlayerAttachedObjectSlotUsed(playerid, index); @@ -1050,14 +1059,14 @@ native bool:IsPlayerAttachedObjectSlotUsed(playerid, index); /// Enter edition mode for an attached object. /// The ID of the player to enter in to edition mode /// The index (slot) of the attached object to edit -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. /// @@ -1077,25 +1086,25 @@ native EditAttachedObject(playerid, index); /// x-Coordinate /// y-Coordinate /// The text in the textdraw -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// /// If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.
      -/// must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
      +/// must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
      /// If the last character in the text is a space (" "), the text will all be blank.
      /// If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will.
      ///
      @@ -1117,21 +1126,21 @@ native PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[]) /// Destroy a player-textdraw. /// The ID of the player who's player-textdraw to destroy /// The ID of the textdraw to destroy -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! native PlayerTextDrawDestroy(playerid, PlayerText:text); @@ -1140,21 +1149,21 @@ native PlayerTextDrawDestroy(playerid, PlayerText:text); /// The ID of the player-textdraw to change the letter size of /// Width of a char /// Height of a char -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// When using this function purely for the benefit of affecting the textdraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements /// Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). @@ -1165,21 +1174,21 @@ native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:width, Float:he /// The ID of the player-textdraw to set the size of /// The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate /// The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// /// The x and y have different meanings with different PlayerTextDrawAlignment values:
      @@ -1200,44 +1209,44 @@ native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:width, Float:heig /// The ID of the player whose player-textdraw to set the alignment of /// The ID of the player-textdraw to set the alignment of /// 1-left 2-centered 3-right -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at PlayerTextDrawTextSize. -native PlayerTextDrawAlignment(playerid, PlayerText:text, e_TEXT_DRAW_ALIGN:alignment); +native PlayerTextDrawAlignment(playerid, PlayerText:text, __TAG(TEXT_DRAW_ALIGN):alignment); /// Sets the text colour of a player-textdraw. /// The ID of the player who's textdraw to set the colour of /// The TextDraw to change /// The colour in hexadecimal format -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// You can also use Gametext colours in textdraws. /// The textdraw must be re-shown to the player in order to update the colour. @@ -1247,21 +1256,21 @@ native PlayerTextDrawColor(playerid, PlayerText:text, colour); /// The ID of the player whose textdraw to toggle the box of /// The ID of the player-textdraw to toggle the box of /// 1 to use a box or 0 to not use a box -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! native PlayerTextDrawUseBox(playerid, PlayerText:text, bool:use); @@ -1269,21 +1278,21 @@ native PlayerTextDrawUseBox(playerid, PlayerText:text, bool:use); /// The ID of the player whose textdraw to set the box colour of /// The ID of the player textdraw to set the box colour of /// The colour to set. Alpha (transparency) is supported -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! native PlayerTextDrawBoxColor(playerid, PlayerText:text, colour); @@ -1291,21 +1300,21 @@ native PlayerTextDrawBoxColor(playerid, PlayerText:text, colour); /// The ID of the player to show the textdraw for /// The ID of the textdraw to show /// The size of the shadow. 0 will hide the shadow -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); @@ -1313,21 +1322,21 @@ native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); /// The ID of the player whose player-textdraw to set the outline of /// The ID of the player-textdraw to set the outline of /// The thickness of the outline -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! native PlayerTextDrawSetOutline(playerid, PlayerText:text, size); @@ -1335,21 +1344,21 @@ native PlayerTextDrawSetOutline(playerid, PlayerText:text, size); /// The ID of the player whose player-textdraw to set the background colour of /// The ID of the player-textdraw to set the background colour of /// The colour that the textdraw should be set to -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// If PlayerTextDrawSetOutline is used with size > 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in PlayerTextDrawColor native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); @@ -1358,21 +1367,21 @@ native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); /// The ID of the player whose player-textdraw to change the font of /// The ID of the player-textdraw to change the font of /// There are four font styles. A font value greater than 3 does not display, and anything greater than 16 crashes the client. See http://wiki.sa-mp.com/wiki/PlayerTextDrawFont -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! native PlayerTextDrawFont(playerid, PlayerText:text, font); @@ -1380,21 +1389,21 @@ native PlayerTextDrawFont(playerid, PlayerText:text, font); /// The ID of the player whose player-textdraw to set the proportionality of /// The ID of the player-textdraw to set the proportionality of /// 1 to enable proportionality, 0 to disable -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! native PlayerTextDrawSetProportional(playerid, PlayerText:text, bool:set); @@ -1402,9 +1411,9 @@ native PlayerTextDrawSetProportional(playerid, PlayerText:text, bool:set); /// The ID of the player whose player-textdraw to set the selectability of /// The ID of the player-textdraw to set the selectability of /// Set the player-textdraw selectable (1) or non-selectable (0). By default this is 0 -/// -/// -/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// PlayerTextDrawSetSelectable MUST be used BEFORE the textdraw is shown to the player. /// Use PlayerTextDrawTextSize to define the clickable area. @@ -1413,42 +1422,42 @@ native PlayerTextDrawSetSelectable(playerid, PlayerText:text, bool:set); /// Show a player-textdraw to the player it was created for. /// The ID of the player to show the textdraw for /// The ID of the textdraw to show -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! native PlayerTextDrawShow(playerid, PlayerText:text); /// Hide a player-textdraw from the player it was created for. /// The ID of the player to hide the textdraw for /// The ID of the textdraw to hide -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! native PlayerTextDrawHide(playerid, PlayerText:text); @@ -1456,21 +1465,21 @@ native PlayerTextDrawHide(playerid, PlayerText:text); /// The ID of the player who's textdraw string to set /// The ID of the textdraw to change /// The new string for the TextDraw -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// There are limits to the length of textdraw strings! See Limits for more info. /// You don't have to show the TextDraw again in order to apply the changes. @@ -1480,10 +1489,10 @@ native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); /// The PlayerTextDraw player ID /// The textdraw ID that will display the 3D preview /// The GTA SA or SA:MP model ID to display -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. /// @@ -1499,11 +1508,11 @@ native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelIndex); /// The y rotation value /// The z rotation value /// The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW and already have a model set in order for this function to have effect. native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); @@ -1513,10 +1522,10 @@ native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:rotX, Float: /// The ID of the player's player-textdraw to change /// The colour to set the vehicle's primary colour to /// The colour to set the vehicle's secondary colour to -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3x and will not work in earlier versions! /// The textdraw MUST use the font TEXT_DRAW_FONT_MODEL_PREVIEW and be showing a vehicle in order for this function to have effect. native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, colour1, colour2); @@ -1527,12 +1536,12 @@ native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, colour1, colour /// The ID of the player whose player variable will be set /// The name of the player variable /// The integer to be set -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// Variables aren't reset until after OnPlayerDisconnect is called, so the values are still accessible in OnPlayerDisconnect. /// /// 1: The function executed successfully.
      @@ -1543,12 +1552,12 @@ native SetPVarInt(playerid, const pvar[], value); /// Gets an integer player variable's value. /// The ID of the player whose player variable to get /// The name of the player variable (case-insensitive). Assigned in SetPVarInt -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// The integer value of the specified player variable. It will still return 0 if the variable is not set, or the player does not exist. native GetPVarInt(playerid, const pvar[]); @@ -1556,12 +1565,12 @@ native GetPVarInt(playerid, const pvar[]); /// The ID of the player whose player variable will be set /// The name of the player variable /// The string you want to save in the player variable -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// native SetPVarString(playerid, const pvar[], const value[]); /// Gets a player variable as a string. @@ -1569,12 +1578,12 @@ native SetPVarString(playerid, const pvar[], const value[]); /// The name of the player variable, set by SetPVarString /// The array in which to store the string value in, passed by reference /// The maximum length of the returned string -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// If length of string is zero (value not set), output text will not be updated or set to anything and will remain with old data, neccesying that you clear the variable to blank value if GetPVarString returns 0 if that behavior is undesired /// The length of the string. native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); @@ -1583,12 +1592,12 @@ native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); /// The ID of the player whose player variable will be set /// The name of the player variable /// The float you want to save in the player variable -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// /// 1: The function executed successfully.
      /// 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. @@ -1598,24 +1607,24 @@ native SetPVarFloat(playerid, const pvar[], Float:value); /// Gets a player variable as a float. /// The ID of the player whose player variable you want to get /// The name of the player variable -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// The float from the specified player variable. native Float:GetPVarFloat(playerid, const pvar[]); /// Deletes a previously set player variable. /// The ID of the player whose player variable to delete /// The name of the player variable to delete -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings). /// /// 1: The function executed successfully.
      @@ -1625,8 +1634,8 @@ native DeletePVar(playerid, const pvar[]); /// Each PVar (player-variable) has its own unique identification number for lookup, this function returns the highest ID set for a player. /// The ID of the player to get the upper PVar index of -/// -/// +/// +/// /// The highest set PVar ID. native GetPVarsUpperIndex(playerid); @@ -1635,22 +1644,22 @@ native GetPVarsUpperIndex(playerid); /// The index of the player's pVar /// A string to store the pVar's name in, passed by reference /// The max length of the returned string -/// -/// -/// -/// +/// +/// +/// +/// native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); /// Gets the type (integer, float or string) of a player variable. /// The ID of the player whose player variable to get the type of /// The name of the player variable to get the type of -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// /// Variable types:
      ///
        @@ -1661,7 +1670,7 @@ native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); ///
      ///
      /// Returns the type of the PVar. See table below. -native e_PLAYER_VARTYPE:GetPVarType(playerid, const pvar[]); +native __TAG(PLAYER_VARTYPE):GetPVarType(playerid, const pvar[]); #if MAX_CHATBUBBLE_LENGTH < 1 || MAX_CHATBUBBLE_LENGTH > 144 #error MAX_CHATBUBBLE_LENGTH must be >= 1 and <= 144 @@ -1684,10 +1693,10 @@ native SetPlayerChatBubble(playerid, const text[], colour, Float:drawdistance, e /// The ID of the player to put in a vehicle /// The ID of the vehicle to put the player in /// The ID of the seat to put the player in -/// -/// -/// -/// +/// +/// +/// +/// /// If this function is used on a player that is already in a vehicle, other players will still see them in their previous vehicle. To fix this, first remove the player from the vehicle. /// If the seat is invalid or is taken, will cause a crash when they EXIT the vehicle. /// You can use GetPlayerVehicleSeat in a loop to check if a seat is occupied by any players. @@ -1709,17 +1718,17 @@ native PutPlayerInVehicle(playerid, vehicleid, seatid); /// This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. /// The ID of the player in the vehicle that you want to get the ID of -/// -/// -/// -/// +/// +/// +/// +/// /// ID of the vehicle or 0 if not in a vehicle. native GetPlayerVehicleID(playerid); /// Find out which seat a player is in. /// The ID of the player you want to get the seat of -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// Sometimes the result can be 128 which is an invalid seat ID. Circumstances of this are not yet known, but it is best to discard information when returned seat number is 128. /// The ID of the seat the player is in. -1 is not in vehicle, 0 is the driver, 1 is the front passenger, and 2 & 3 are the rear passengers. @@ -1727,7 +1736,7 @@ native GetPlayerVehicleSeat(playerid); /// Removes/ejects a player from their vehicle. /// The ID of the player to remove from their vehicle -/// +/// /// /// The exiting animation is not synced for other players.
      /// This function will not work when used in OnPlayerEnterVehicle, because the player isn't in the vehicle when the callback is called. Use OnPlayerStateChange instead.
      @@ -1754,9 +1763,9 @@ native TogglePlayerControllable(playerid, bool:toggle); /// x coordinate for the sound to play at. (0 for no position) /// y coordinate for the sound to play at. (0 for no position) /// z coordinate for the sound to play at. (0 for no position) -/// -/// -/// +/// +/// +/// /// Only use the coordinates if you want the sound to be played at a certain position. Set coordinates all to 0 to just play the sound. /// /// 1: The function executed successfully.
      @@ -1775,9 +1784,9 @@ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); /// Setting this to 1 will freeze the player at the end of the animation. 0 will not /// Timer in milliseconds. For a never-ending loop it should be 0 /// Set to 1 to make server sync the animation with all other players in streaming radius. 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) (optional=0) -/// -/// -/// The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. +/// +/// +/// The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. /// An invalid animation library will crash the player's game. /// This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, bool:forceSync = false); @@ -1785,7 +1794,7 @@ native ApplyAnimation(playerid, const animationLibrary[], const animationName[], /// Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). /// The ID of the player to clear the animations of /// Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) -/// +/// /// ClearAnimations doesn't do anything when the animation ends if we pass 1 for the freeze parameter in ApplyAnimation. /// Unlike some other ways to remove player from a vehicle, this will also reset the vehicle's velocity to zero, instantly stopping the car. Player will appear on top of the vehicle with the same location as he was in his car seat. /// This function always returns 1, even when the player specified is not connected. @@ -1793,7 +1802,7 @@ native ClearAnimations(playerid, bool:forceSync = false); /// Returns the index of any running applied animations. /// ID of the player of whom you want to get the animation index of -/// +/// /// This function was added in SA-MP 0.3b and will not work in earlier versions! /// 0 if there is no animation applied. native GetPlayerAnimationIndex(playerid); // return the index of any running applied animations (0 if none are running) @@ -1804,15 +1813,15 @@ native GetPlayerAnimationIndex(playerid); // return the index of any running app /// Size of the string that stores the animation library /// String variable that stores the animation name /// Size of the string that stores the animation name -/// +/// /// This function was added in SA-MP 0.3b and will not work in earlier versions! /// 1 on success, 0 on failure. native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibrary), animationName[], len2 = sizeof (animationName)); // get the animation lib/name for the index /// Retrieves a player's current special action. /// The ID of the player to get the special action of -/// -/// +/// +/// /// /// Special actions: (marked with * cannot be set)
      ///
        @@ -1848,13 +1857,13 @@ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibra ///
      ///
      /// The special action of the player. -native e_SPECIAL_ACTION:GetPlayerSpecialAction(playerid); +native __TAG(SPECIAL_ACTION):GetPlayerSpecialAction(playerid); /// This function allows to set players special action. /// The player that should perform the action /// The action that should be performed -/// -/// +/// +/// /// Removing jetpacks from players by setting their special action to 0 causes the sound to stay until death. /// /// Special actions: (marked with * cannot be set)
      @@ -1894,7 +1903,7 @@ native e_SPECIAL_ACTION:GetPlayerSpecialAction(playerid); /// 1: The function executed successfully.
      /// 0: The function failed to execute. This means the player is not connected. ///
      -native SetPlayerSpecialAction(playerid, e_SPECIAL_ACTION:actionid); +native SetPlayerSpecialAction(playerid, __TAG(SPECIAL_ACTION):actionid); /// Disables collisions between occupied vehicles for a player. /// The ID of the player for whom you want to disable collisions @@ -1927,15 +1936,15 @@ native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); /// Disables (hides/destroys) a player's set checkpoint. Players can only have a single checkpoint set at a time. Checkpoints don't need to be disabled before setting another one. /// The ID of the player whose checkpoint to disable -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// /// 1: The function executed successfully. Success is also returned if the player doesn't have a checkpoint shown already.
      /// 0: The function failed to execute. This means the player is not connected. @@ -1952,15 +1961,15 @@ native DisablePlayerCheckpoint(playerid); /// y-Coordinate of the next point, for the arrow facing direction /// z-Coordinate of the next point, for the arrow facing direction /// Size (diameter) of the checkpoint -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// If a race checkpoint is already set it will use the size of that checkpoint instead of the new one. /// /// Race checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly.
      @@ -1974,15 +1983,15 @@ native SetPlayerRaceCheckpoint(playerid, type, Float:centerX, Float:centerY, Flo /// Disable any initialized race checkpoints for a specific player, since you can only have one at any given time. /// The player to disable the current checkpoint for -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// native DisablePlayerRaceCheckpoint(playerid); /// Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in). @@ -1991,7 +2000,7 @@ native DisablePlayerRaceCheckpoint(playerid); /// The minimum x coordinate the player can go to /// The maximum y coordinate the player can go to /// The minimum y coordinate the player can go to -/// +/// /// This function does not work if used in OnPlayerConnect /// A player's world boundaries can be reset by setting them to 20000.0, -20000.0, 20000.0, -20000.0. These are the default values. /// This function doesn't work in interiors! @@ -2001,19 +2010,19 @@ native SetPlayerWorldBounds(playerid, Float:maxX, Float:minX, Float:maxY, Float: /// The player that will see the player's changed blip/nametag colour /// The player whose colour will be changed /// New colour. (RGBA) -/// -/// -/// -/// +/// +/// +/// +/// native SetPlayerMarkerForPlayer(playerid, targetid, colour); /// This functions allows you to toggle the drawing of player nametags, healthbars and armor bars which display above their head. For use of a similar function like this on a global level, ShowNameTags function. /// Player who will see the results of this function /// Player whose name tag will be shown or hidden /// 1-show name tag, 0-hide name tag -/// -/// -/// +/// +/// +/// /// ShowNameTags must be set to 1 to be able to show name tags with ShowPlayerNameTagForPlayer, that means that in order to be effective you need to ShowPlayerNameTagForPlayer(forplayerid, playerid, 0) ahead of time(OnPlayerStreamIn is a good spot). native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); @@ -2026,8 +2035,8 @@ native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); /// The icon to set /// The colour of the icon (RGBA). This should only be used with the square icon (ID: 0) /// The style of icon (optional=MAPICON_LOCAL) -/// -/// +/// +/// /// If you use an invalid marker type, it will create ID 1 (White Square). /// If you use an icon ID that is already in use, it will replace the current map icon using that ID. /// Marker type 1 (square), 2 (player blip), 4 (north), and 56 (single airstrip blip) will cause your game to crash if you have map legends enabled while viewing the map. @@ -2044,12 +2053,12 @@ native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); /// 1: The function executed successfully.
      /// 0: The function failed to execute. Player is not connected. ///
      -native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, colour, e_MAPICON:style = MAPICON_LOCAL); +native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, colour, __TAG(MAPICON):style = MAPICON_LOCAL); /// Removes a map icon that was set earlier for a player using SetPlayerMapIcon. /// The ID of the player whose icon to remove /// The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon -/// +/// /// /// 1: The function executed successfully.
      /// 0: The function failed to execute. @@ -2061,7 +2070,7 @@ native RemovePlayerMapIcon(playerid, iconid); /// 1 to allow, 0 to disallow /// This function, as of 0.3d, is deprecated. Check OnPlayerClickMap. /// This function will work only if AllowAdminTeleport is enabled, and you have to be an admin. -/// +/// #pragma deprecated Use `OnPlayerClickMap`. native AllowPlayerTeleport(playerid, bool:allow); @@ -2072,8 +2081,8 @@ native AllowPlayerTeleport(playerid, bool:allow); /// The x coordinate to place the camera at /// The y coordinate to place the camera at /// The z coordinate to place the camera at -/// -/// +/// +/// /// You may also have to use SetPlayerCameraLookAt with this function in order to work properly. /// Use SetCameraBehindPlayer to reset the camera to behind the player. /// Using the camera functions directly after enabling spectator mode doesn't work. @@ -2089,21 +2098,21 @@ native SetPlayerCameraPos(playerid,Float:x, Float:y, Float:z); /// The y coordinate for the player's camera to look at /// The z coordinate for the player's camera to look at /// The style of the change. Can be used to interpolate (change slowly) from old pos to new pos using CAMERA_MOVE. Added in 0.3e. Leave out for older versions (optional=CAMERA_CUT) -/// -/// -/// -/// +/// +/// +/// +/// /// Using the camera functions directly after enabling spectator mode doesn't work. /// /// 1: The function executed successfully.
      /// 0: The function failed to execute. The player specified does not exist. ///
      -native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, e_CAMERA:cut = CAMERA_CUT); +native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, __TAG(CAMERA):cut = CAMERA_CUT); /// Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos. /// The player you want to restore the camera for -/// -/// +/// +/// native SetCameraBehindPlayer(playerid); /// Get the position of the player's camera. @@ -2111,11 +2120,11 @@ native SetCameraBehindPlayer(playerid); /// A float variable to store the x coordinate in, passed by reference /// A float variable to store the y coordinate in, passed by reference /// A float variable to store the z coordinate in, passed by reference -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// Player's camera positions are only updated once a second, unless aiming. /// It is recommended to set a 1 second timer if you wish to take action that relies on a player's camera position. @@ -2126,7 +2135,7 @@ native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z); /// A float to store the x coordinate, passed by reference /// A float to store the y coordinate, passed by reference /// A float to store the z coordinate, passed by reference -/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// In 0.3a the camera front vector is only obtainable when player is inside a rhino, S.W.A.T tank, fire truck, or on foot. /// Since 0.3b the camera data can be obtained when the player is in any vehicle or on foot. @@ -2135,11 +2144,11 @@ native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z); /// Returns the current GTA camera mode for the requested player. The camera modes are useful in determining whether a player is aiming, doing a passenger driveby etc. /// The ID of the player whose camera mode to retrieve -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// The camera mode as an integer (or -1 if player is not connected). native GetPlayerCameraMode(playerid); @@ -2147,9 +2156,9 @@ native GetPlayerCameraMode(playerid); /// Toggle camera targeting functions for a player. Disabled by default to save bandwidth. /// The ID of the player to toggle camera targeting functions for /// 1 to enable camera targeting functions and 0 to disable them -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// /// 1: The function executed successfully.
      @@ -2159,9 +2168,9 @@ native EnablePlayerCameraTarget(playerid, bool:enable); /// Allows you to retrieve the ID of the object the player is looking at. /// The ID of the player to check -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. /// The ID of the object playerid is looking at. If INVALID_OBJECT_ID (65535) is returned, playerid isn't looking at any object. @@ -2169,10 +2178,10 @@ native GetPlayerCameraTargetObject(playerid); /// Get the ID of the vehicle the player is looking at. /// The ID of the player to check -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. /// This function can (obviously) only return one vehicle ID at a time, while the player may be looking at multiple. It generally seems to detect the closest vehicle first. @@ -2181,10 +2190,10 @@ native GetPlayerCameraTargetVehicle(playerid); /// Allows you to retrieve the ID of the player the playerid is looking at. /// The ID of the player to check -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. /// Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerid is aming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerid is looking at (reference point is the center of the screen). @@ -2193,11 +2202,11 @@ native GetPlayerCameraTargetPlayer(playerid); /// Allows you to retrieve the ID of the actor the player is looking at (if any). /// The ID of the player to get the target actor of -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. /// This function only tells you which actor (if any) the player is looking at. To find out if they are aiming at them, you need to use GetPlayerTargetActor. @@ -2206,9 +2215,9 @@ native GetPlayerCameraTargetActor(playerid); /// Retrieves the aspect ratio of a player's camera. /// The ID of the player to get the camera aspect ratio of -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// The return value of this function represents the value of the "widescreen" option in the game's display settings, not the actual aspect ratio of the player's display. /// The aspect ratio of the player's camera, as a float. The aspect ratio can be one of three values: 4:3 (1.3333334, Float:0x3FAAAAAB) when widescreen is turned off, 5:4 (1.2470589, Float:0x3F9F9FA0) when letterbox mode is turned on, and 16:9 (1.7764707, Float:0x3FE36364) when widescreen is turned on regardless of the letterbox mode. @@ -2216,9 +2225,9 @@ native Float:GetPlayerCameraAspectRatio(playerid); /// Retrieves the game camera zoom level for a given player. /// The ID of the player to get the camera zoom level of -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This retrieves the zoom level of the GAME camera, not the camera WEAPON. /// The player's camera zoom level (camera, sniper etc.), a float. @@ -2227,7 +2236,7 @@ native Float:GetPlayerCameraZoom(playerid); /// You can use this function to attach the player camera to objects. /// The ID of the player which will have your camera attached on object /// The object ID which you want to attach the player camera -/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// You need to create the object first, before attempting to attach a player camera for that. native AttachCameraToObject(playerid, objectid); @@ -2235,9 +2244,9 @@ native AttachCameraToObject(playerid, objectid); /// Attaches a player's camera to a player-object. The player is able to move their camera while it is attached to an object. Can be used with MovePlayerObject and AttachPlayerObjectToVehicle. /// The ID of the player which will have their camera attached to a player-object /// The ID of the player-object to which the player's camera will be attached -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// The player-object must be created before attempting to attach the player's camera to it. native AttachCameraToPlayerObject(playerid, objectid); @@ -2252,12 +2261,12 @@ native AttachCameraToPlayerObject(playerid, objectid); /// The z position the camera should move to /// Time in milliseconds /// The jumpcut to use. Set to CAMERA_MOVE for a smooth movement (optional=CAMERA_CUT) -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, e_CAMERA:cut = CAMERA_CUT); +native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, __TAG(CAMERA):cut = CAMERA_CUT); /// Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. /// The ID of the player the camera should be moved for @@ -2269,20 +2278,20 @@ native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Flo /// The z position the camera should move to /// Time in milliseconds to complete interpolation /// The 'jumpcut' to use. Set to CAMERA_MOVE for interpolation (optional=CAMERA_CUT) -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, e_CAMERA:cut = CAMERA_CUT); +native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, __TAG(CAMERA):cut = CAMERA_CUT); // Player conditionals /// Checks if a player is connected (if an ID is taken by a connected player). /// The ID of the player to check -/// -/// -/// +/// +/// +/// /// This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. /// 1 if the player is connected, 0 if not. native bool:IsPlayerConnected(playerid); @@ -2290,43 +2299,43 @@ native bool:IsPlayerConnected(playerid); /// Checks if a player is in a specific vehicle. /// ID of the player /// ID of the vehicle -/// -/// +/// +/// /// 1 if the player is in the vehicle, 0 if not. native bool:IsPlayerInVehicle(playerid, vehicleid); /// Check if a player is inside any vehicle (as a driver or passenger). /// The ID of the player to check -/// -/// +/// +/// /// 1 if the player is in a vehicle, 0 if not. native bool:IsPlayerInAnyVehicle(playerid); /// Check if the player is currently inside a checkpoint, this could be used for properties or teleport points for example. /// The player you want to know the status of -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// 0 if player isn't in his checkpoint else 1. native bool:IsPlayerInCheckpoint(playerid); /// Check if the player is inside their current set race checkpoint (SetPlayerRaceCheckpoint). /// The ID of the player to check -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// 1 is the player is in a race checkpoint, 0 if not. native bool:IsPlayerInRaceCheckpoint(playerid); @@ -2335,8 +2344,8 @@ native bool:IsPlayerInRaceCheckpoint(playerid); /// Set the virtual world of a player. They can only see other players or vehicles that are in that same world. /// The ID of the player you want to set the virtual world of /// The virtual world ID to put the player in -/// -/// +/// +/// /// The default virtual world is 0 /// /// 1: The function executed successfully.
      @@ -2346,9 +2355,9 @@ native SetPlayerVirtualWorld(playerid, virtualWorld); /// Retrieves the current virtual world the player is in. /// The ID of the player to get the virtual world of -/// -/// -/// +/// +/// +/// /// The ID of the virtual world the player is currently in. native GetPlayerVirtualWorld(playerid); @@ -2357,7 +2366,7 @@ native GetPlayerVirtualWorld(playerid); /// Toggle stunt bonuses for a player. Enabled by default. /// The ID of the player to toggle stunt bonuses for /// 1 to enable stunt bonuses and 0 to disable them -/// +/// /// /// 1: The function executed successfully.
      /// 0: The function failed to execute. The player is not connected. @@ -2366,14 +2375,14 @@ native EnableStuntBonusForPlayer(playerid, bool:enable); /// Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie). /// 1 to enable stunt bonuses or 0 to disable them -/// +/// native EnableStuntBonusForAll(bool:enable); /// Toggle whether a player is in spectator mode or not. While in spectator mode a player can spectate (watch) other players and vehicles. After using this function, either PlayerSpectatePlayer or PlayerSpectateVehicle needs to be used. /// The ID of the player who should spectate /// 1 to enable spectating and 0 to disable -/// -/// +/// +/// /// If the player is not loaded in before setting the spectate status to false, the connection can be closed unexpectedly. /// When spectator mode is disabled, OnPlayerSpawn will automatically be called, if you wish to restore player to state before spectating, you will have to handle that in OnPlayerSpawn. Note also, that player can also go to class selection before if they used F4 during spectate, a player also CAN die in spectate mode due to various glitches. /// When a player is in spectate mode their HUD is hidden, making it useful for setting a player's camera without the HUD. Also, objects near the player's camera will be streamed in, making this useful for interpolating cameras. @@ -2387,8 +2396,8 @@ native TogglePlayerSpectating(playerid, bool:toggle); /// The ID of the player that will spectate /// The ID of the player that should be spectated /// The mode to spectate with (optional=SPECTATE_MODE_NORMAL) -/// -/// +/// +/// /// Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. /// playerid and targetid's virtual world and interior must be the same for this function to work properly. /// @@ -2403,44 +2412,44 @@ native TogglePlayerSpectating(playerid, bool:toggle); /// 1: The function executed successfully.
      /// 0: The function failed to execute. One of the players specified does not exist. ///
      -native PlayerSpectatePlayer(playerid, targetid, e_SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); +native PlayerSpectatePlayer(playerid, targetid, __TAG(SPECTATE_MODE):mode = SPECTATE_MODE_NORMAL); /// Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. /// The ID of the player who should spectate a vehicle /// The ID of the vehicle the player should spectate /// The spectate mode. Can generally be left blank as it defaults to 'normal' -/// -/// +/// +/// /// Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. /// playerid and targetid have to be in the same interior for this function to work properly. /// /// 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.
      /// 0: The function failed to execute. The player, vehicle, or both don't exist. ///
      -native PlayerSpectateVehicle(playerid, targetid, e_SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); +native PlayerSpectateVehicle(playerid, targetid, __TAG(SPECTATE_MODE):mode = SPECTATE_MODE_NORMAL); /// Starts recording a player's movements to a file, which can then be reproduced by an NPC. /// The ID of the player to record /// The type of recording /// The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback -/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native StartRecordingPlayerData(playerid, e_PLAYER_RECORDING_TYPE:recordType, const recordFile[]); +native StartRecordingPlayerData(playerid, __TAG(PLAYER_RECORDING_TYPE):recordType, const recordFile[]); /// Stops all the recordings that had been started with StartRecordingPlayerData for a specific player. /// The player you want to stop the recordings of -/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! native StopRecordingPlayerData(playerid); /// Display the cursor and allow the player to select a textdraw. /// The ID of the player that should be able to select a textdraw /// The colour of the textdraw when hovering over with mouse (RGBA) -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// TextDrawSetSelectable or PlayerTextDrawSetSelectable MUST be used first, to allow a textdraw to be selectable. /// It is the TEXT which will be highlighted when hovered over, NOT the box (if one is shown). @@ -2448,9 +2457,9 @@ native SelectTextDraw(playerid, hoverColour); // enables the mouse so the player /// Cancel textdraw selection with the mouse. /// The ID of the player that should be the textdraw selection disabled -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// This function calls OnPlayerClickTextDraw with INVALID_TEXT_DRAW (65535). Using this function inside OnPlayerClickTextDraw without catching this case will cause clients to go into an infinite loop. native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mouse @@ -2464,7 +2473,7 @@ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mou /// The z coordinate of the explosion /// The explosion type /// The radius of the explosion -/// +/// /// This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! /// There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. /// This function always returns 1, even if the function failed to excute (player doesn't exist, invalid radius, or invalid explosion type). diff --git a/a_samp.inc b/a_samp.inc index a85a952..fcc9d7a 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -15,94 +15,162 @@ #define SAMP_CONST_CORRECT -#pragma tabsize 4 // Ignores warning 217 for properly indented PAWNO code // It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8 +#pragma tabsize 4 // -------------------------------------------------- // Defines // -------------------------------------------------- // Limits -#if !defined MAX_PLAYER_NAME - #define MAX_PLAYER_NAME (24) +#if defined MAX_PLAYER_NAME + static const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; + #undef MAX_PLAYER_NAME + const MAX_PLAYER_NAME = __MAX_PLAYER_NAME; +#else + const MAX_PLAYER_NAME = 24; +#endif + +#if defined MAX_PLAYERS + static const __MAX_PLAYERS = MAX_PLAYERS; + #undef MAX_PLAYERS + const MAX_PLAYERS = __MAX_PLAYERS; +#else + const MAX_PLAYERS = 1000; #endif -#if !defined MAX_PLAYERS - #define MAX_PLAYERS (1000) +#if defined MAX_VEHICLES + static const __MAX_VEHICLES = MAX_VEHICLES; + #undef MAX_VEHICLES + const MAX_VEHICLES = __MAX_VEHICLES; +#else + const MAX_VEHICLES = 2000; #endif -#if !defined MAX_VEHICLES - #define MAX_VEHICLES (2000) +#if defined MAX_ACTORS + static const __MAX_ACTORS = MAX_ACTORS; + #undef MAX_ACTORS + const MAX_ACTORS = __MAX_ACTORS; +#else + const MAX_ACTORS = 1000; #endif -#if !defined MAX_ACTORS - #define MAX_ACTORS (1000) +#if defined MAX_OBJECTS + static const __MAX_OBJECTS = MAX_OBJECTS; + #undef MAX_OBJECTS + const MAX_OBJECTS = __MAX_OBJECTS; +#else + const MAX_OBJECTS = 2000; #endif -#if !defined MAX_OBJECTS - #define MAX_OBJECTS (2000) +#if defined MAX_GANG_ZONES + static const __MAX_GANG_ZONES = MAX_GANG_ZONES; + #undef MAX_GANG_ZONES + const MAX_GANG_ZONES = __MAX_GANG_ZONES; +#else + const MAX_GANG_ZONES = 1024; #endif -#if !defined MAX_GANG_ZONES - #define MAX_GANG_ZONES (1024) +#if defined MAX_TEXT_DRAWS + static const Text:__MAX_TEXT_DRAWS = Text:MAX_TEXT_DRAWS; + #undef MAX_TEXT_DRAWS + const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; +#else + const Text:MAX_TEXT_DRAWS = Text:2048; #endif -#if !defined MAX_TEXT_DRAWS - #define MAX_TEXT_DRAWS (Text:2048) +#if defined MAX_PLAYER_TEXT_DRAWS + static const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:MAX_PLAYER_TEXT_DRAWS; + #undef MAX_PLAYER_TEXT_DRAWS + const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:__MAX_PLAYER_TEXT_DRAWS; +#else + const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:256; #endif -#if !defined MAX_PLAYER_TEXT_DRAWS - #define MAX_PLAYER_TEXT_DRAWS (PlayerText:256) +#if defined MAX_MENUS + static const Menu:__MAX_MENUS = Menu:MAX_MENUS; + #undef MAX_MENUS + const Menu:MAX_MENUS = Menu:__MAX_MENUS; +#else + const Menu:MAX_MENUS = Menu:128; #endif -#if !defined MAX_MENUS - #define MAX_MENUS (Menu:128) +#if defined MAX_3DTEXT_GLOBAL + static const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:MAX_3DTEXT_GLOBAL; + #undef MAX_3DTEXT_GLOBAL + const Text3D:MAX_3DTEXT_GLOBAL = Text3D:__MAX_3DTEXT_GLOBAL; +#else + const Text3D:MAX_3DTEXT_GLOBAL = Text3D:1024; #endif -#if !defined MAX_3DTEXT_GLOBAL - #define MAX_3DTEXT_GLOBAL (Text3D:1024) +#if defined MAX_3DTEXT_PLAYER + static const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:MAX_3DTEXT_PLAYER; + #undef MAX_3DTEXT_PLAYER + const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:__MAX_3DTEXT_PLAYER; +#else + const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:1024; #endif -#if !defined MAX_3DTEXT_PLAYER - #define MAX_3DTEXT_PLAYER (PlayerText3D:1024) +#if defined MAX_PICKUPS + static const __MAX_PICKUPS = MAX_PICKUPS; + #undef MAX_PICKUPS + const MAX_PICKUPS = __MAX_PICKUPS; +#else + const MAX_PICKUPS = 4096; #endif -#if !defined MAX_PICKUPS - #define MAX_PICKUPS (4096) +#if defined NO_TAGS + #define __TAG(%0) _ +#elseif defined STRONG_TAGS + #define __TAG(%0) E_%0 +#else // if defined WEAK_TAGS + #define __TAG(%0) e_%0 + #define WEAK_TAGS +#endif +#if defined MORE_TAGS + #define __MORE(%0) __TAG(%0) +#else + #define __MORE(%0) _ + #define LESS_TAGS #endif +#define __LESS __TAG // Invalids -#define NO_TEAM (255) - -#define INVALID_PLAYER_ID (0xFFFF) -#define INVALID_VEHICLE_ID (0xFFFF) -#define INVALID_ACTOR_ID (0xFFFF) -#define INVALID_OBJECT_ID (0xFFFF) -#define INVALID_MENU (Menu:0xFF) -#define INVALID_TEXT_DRAW (Text:0xFFFF) -#define INVALID_PLAYER_TEXT_DRAW (PlayerText:0xFFFF) -#define INVALID_GANG_ZONE (-1) -#define INVALID_3DTEXT_ID (Text3D:0xFFFF) -#define INVALID_PLAYER_3DTEXT_ID (PlayerText3D:0xFFFF) +const NO_TEAM = 0xFF; + +const INVALID_PLAYER_ID = 0xFFFF; +const INVALID_VEHICLE_ID = 0xFFFF; +const INVALID_ACTOR_ID = 0xFFFF; +const INVALID_OBJECT_ID = 0xFFFF; +const Menu:INVALID_MENU = Menu:0xFF; +const Text:INVALID_TEXT_DRAW = Text:0xFFFF; +const PlayerText:INVALID_PLAYER_TEXT_DRAW = PlayerText:0xFFFF; +const INVALID_GANG_ZONE = 0xFFFFFFFF; +const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; +const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; // States -enum e_PLAYER_STATE +#define PLAYER_STATE: __TAG(PLAYER_STATE): +enum PLAYER_STATE: { PLAYER_STATE_NONE, PLAYER_STATE_ONFOOT, PLAYER_STATE_DRIVER, PLAYER_STATE_PASSENGER, - PLAYER_STATE_EXIT_VEHICLE, // (used internally) - PLAYER_STATE_ENTER_VEHICLE_DRIVER, // (used internally) - PLAYER_STATE_ENTER_VEHICLE_PASSENGER, // (used internally) - PLAYER_STATE_WASTED, + PLAYER_STATE_WASTED = 7, PLAYER_STATE_SPAWNED, PLAYER_STATE_SPECTATING } +// Deprecated. +#define PLAYER_STATE_EXIT_VEHICLE (4) +#define PLAYER_STATE_ENTER_VEHICLE_DRIVER (5) +#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER (6) + // Marker modes used by ShowPlayerMarkers() -enum e_PLAYER_MARKERS +#define PLAYER_MARKERS: __TAG(PLAYER_MARKERS): +enum PLAYER_MARKERS: { PLAYER_MARKERS_MODE_OFF, PLAYER_MARKERS_MODE_GLOBAL, @@ -110,9 +178,10 @@ enum e_PLAYER_MARKERS } // Weapons -enum e_WEAPON +#define WEAPON: __TAG(WEAPON): +enum WEAPON: { - WEAPON_BRASSKNUCKLE = 1, + WEAPON_BRASSKNUCKLE = 1, WEAPON_GOLFCLUB, WEAPON_NITESTICK, WEAPON_KNIFE, @@ -130,7 +199,7 @@ enum e_WEAPON WEAPON_GRENADE, WEAPON_TEARGAS, WEAPON_MOLTOV, - WEAPON_COLT45 = 22, + WEAPON_COLT45 = 22, WEAPON_SILENCED, WEAPON_DEAGLE, WEAPON_SHOTGUN, @@ -152,16 +221,17 @@ enum e_WEAPON WEAPON_SPRAYCAN, WEAPON_FIREEXTINGUISHER, WEAPON_CAMERA, - WEAPON_PARACHUTE = 46, - WEAPON_VEHICLE = 49, - WEAPON_DROWN = 53, + WEAPON_PARACHUTE = 46, + WEAPON_VEHICLE = 49, + WEAPON_DROWN = 53, WEAPON_COLLISION, } // Keys -enum e_KEY (<<= 1) +#define KEY: __TAG(KEY): +enum KEY: (<<= 1) { - KEY_ACTION = 1, + KEY_ACTION = 1, KEY_CROUCH, KEY_FIRE, KEY_SPRINT, @@ -171,24 +241,25 @@ enum e_KEY (<<= 1) KEY_HANDBRAKE, KEY_LOOK_LEFT, KEY_SUBMISSION, - KEY_LOOK_BEHIND = KEY_SUBMISSION, + KEY_LOOK_BEHIND = KEY_SUBMISSION, KEY_WALK, KEY_ANALOG_UP, KEY_ANALOG_DOWN, KEY_ANALOG_LEFT, KEY_ANALOG_RIGHT, - KEY_YES = 65536, + KEY_YES = 65536, KEY_NO, KEY_CTRL_BACK, - KEY_UP = -128, - KEY_DOWN = 128, - KEY_LEFT = -128, - KEY_RIGHT = 128, + KEY_UP = -128, + KEY_DOWN = 128, + KEY_LEFT = -128, + KEY_RIGHT = 128, } // Player GUI Dialog -enum e_DIALOG_STYLE +#define DIALOG_STYLE: __TAG(DIALOG_STYLE): +enum DIALOG_STYLE: { DIALOG_STYLE_MSGBOX, DIALOG_STYLE_INPUT, @@ -199,21 +270,24 @@ enum e_DIALOG_STYLE } // Text Draw -enum e_TEXT_DRAW_FONT +#define TEXT_DRAW_FONT: __TAG(TEXT_DRAW_FONT): +enum TEXT_DRAW_FONT: { - TEXT_DRAW_FONT_SPRITE_DRAW = 4, - TEXT_DRAW_FONT_MODEL_PREVIEW = 5, + TEXT_DRAW_FONT_SPRITE_DRAW = 4, + TEXT_DRAW_FONT_MODEL_PREVIEW = 5, } -enum e_TEXT_DRAW_ALIGN +#define TEXT_DRAW_ALIGN: __TAG(TEXT_DRAW_ALIGN): +enum TEXT_DRAW_ALIGN: { - TEXT_DRAW_ALIGN_LEFT = 1, + TEXT_DRAW_ALIGN_LEFT = 1, TEXT_DRAW_ALIGN_CENTER, TEXT_DRAW_ALIGN_RIGHT } // SVar enumeration -enum e_SERVER_VARTYPE +#define SERVER_VARTYPE: __TAG(SERVER_VARTYPE): +enum SERVER_VARTYPE: { SERVER_VARTYPE_NONE, SERVER_VARTYPE_INT, @@ -222,32 +296,37 @@ enum e_SERVER_VARTYPE } // Artwork/NetModels -enum e_DOWNLOAD_REQUEST +#define DOWNLOAD_REQUEST: __TAG(DOWNLOAD_REQUEST): +enum DOWNLOAD_REQUEST: { DOWNLOAD_REQUEST_EMPTY, DOWNLOAD_REQUEST_MODEL_FILE, DOWNLOAD_REQUEST_TEXTURE_FILE } -enum e_CLICK_SOURCE +#define CLICK_SOURCE: __TAG(CLICK_SOURCE): +enum CLICK_SOURCE: { CLICK_SOURCE_SCOREBOARD } -enum e_EDIT_RESPONSE +#define EDIT_RESPONSE: __TAG(EDIT_RESPONSE): +enum EDIT_RESPONSE: { EDIT_RESPONSE_CANCEL, EDIT_RESPONSE_FINAL, EDIT_RESPONSE_UPDATE } -enum e_SELECT_OBJECT +#define SELECT_OBJECT: __TAG(SELECT_OBJECT): +enum SELECT_OBJECT: { - SELECT_OBJECT_GLOBAL_OBJECT = 1, + SELECT_OBJECT_GLOBAL_OBJECT = 1, SELECT_OBJECT_PLAYER_OBJECT } -enum e_BULLET_HIT_TYPE +#define BULLET_HIT_TYPE: __TAG(BULLET_HIT_TYPE): +enum BULLET_HIT_TYPE: { BULLET_HIT_TYPE_NONE, BULLET_HIT_TYPE_PLAYER, @@ -306,6 +385,7 @@ enum e_BULLET_HIT_TYPE #endif public const SAMP_INCLUDES_VERSION = 0x037030; +#pragma unused SAMP_INCLUDES_VERSION #include #include @@ -383,14 +463,14 @@ open.mp releases can use `A` as the first digit. /// Prints a string to the server console (not in-game chat) and logs (server_log.txt). /// The string to print - /// + /// native print(const string[]); /// Outputs a formatted string on the console (the server window, not the in-game chat). /// The format string /// Indefinite number of arguments of any tag - /// - /// + /// + /// /// The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. /// This function doesn't support packed strings. /// @@ -409,7 +489,7 @@ open.mp releases can use `A` as the first digit. /// /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) - native printf(const format[], {Float,_}:...); + native printf(const format[], {Float, _}:...); #endif /// Formats a string to include variables and other strings inside it. @@ -417,8 +497,8 @@ open.mp releases can use `A` as the first digit. /// The maximum length output can contain /// The format string /// Indefinite number of arguments of any tag -/// -/// +/// +/// /// This function doesn't support packed strings. /// /// Format Specifiers:
      @@ -442,9 +522,9 @@ native format(output[], len = sizeof (output), const format[], {Float, _}:...); /// The ID of the player to display the message to /// The colour of the message (RGBA) /// The text that will be displayed (max 144 characters) -/// -/// -/// +/// +/// +/// /// If a message is longer than 144 characters, it will not be sent. Truncation can be used to prevent this. Displaying a message on multiple lines will also solve this issue. /// Avoid using the percent sign (or format specifiers) in the actual message text without properly escaping it (like %%). It will result in crashes otherwise. /// You can use colour embedding for multiple colours in the message. @@ -457,29 +537,29 @@ native SendClientMessage(playerid, colour, const message[]); /// Displays a message in chat to all players. This is a multi-player equivalent of SendClientMessage. /// The colour of the message (RGBA) /// The message to show (max 144 characters) -/// -/// +/// +/// /// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. /// This function always returns 1. native SendClientMessageToAll(colour, const message[]); -/// Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. +/// Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. /// The ID of the player who will receive the message /// The sender's ID. If invalid, the message will not be sent /// The message that will be sent -/// -/// -/// -/// +/// +/// +/// +/// /// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. native SendPlayerMessageToPlayer(playerid, senderid, const message[]); /// Sends a message in the name of a player to all other players on the server. The line will start with the sender's name in their colour, followed by the message in white. /// The ID of the sender. If invalid, the message will not be sent /// The message that will be sent -/// -/// -/// +/// +/// +/// /// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. native SendPlayerMessageToAll(senderid, const message[]); @@ -487,12 +567,12 @@ native SendPlayerMessageToAll(senderid, const message[]); /// The ID of the killer (can be INVALID_PLAYER_ID) /// The ID of the player that died /// The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) -/// -/// -/// Death messages can be cleared by using a valid player ID for that is not connected. +/// +/// +/// Death messages can be cleared by using a valid player ID for that is not connected. /// To show a death message for just a single player, use SendDeathMessageToPlayer. /// You can use NPCs to create your own custom death reasons. -/// This function always returns 1, even if the function fails to execute. The function fails to execute (no death message shown) if is invalid. If is invalid, a generic skull-and-crossbones icon is shown. being invalid (INVALID_PLAYER_ID) is valid. +/// This function always returns 1, even if the function fails to execute. The function fails to execute (no death message shown) if is invalid. If is invalid, a generic skull-and-crossbones icon is shown. being invalid (INVALID_PLAYER_ID) is valid. native SendDeathMessage(killer, killee, weapon); /// Adds a death to the 'killfeed' on the right-hand side of the screen for a single player. @@ -500,8 +580,8 @@ native SendDeathMessage(killer, killee, weapon); /// The ID of the killer (can be INVALID_PLAYER_ID) /// The ID of the player that died /// The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) -/// -/// +/// +/// /// This Function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! /// /// 1: The function executed successfully.
      @@ -513,8 +593,8 @@ native SendDeathMessageToPlayer(playerid, killer, killee, weapon); /// The text to be displayed /// The duration of the text being shown in milliseconds /// The style of text to be displayed -/// -/// +/// +/// /// This function always returns 1. native GameTextForAll(const string[], time, style); @@ -523,8 +603,8 @@ native GameTextForAll(const string[], time, style); /// The text to be displayed /// The duration of the text being shown in milliseconds /// The style of text to be displayed -/// -/// +/// +/// /// /// 1: The function executed successfully. Success is reported when the style and/or time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.
      /// 0: The function failed to execute. This means either the string is null or the player is not connected. @@ -535,8 +615,8 @@ native GameTextForPlayer(playerid, const string[], time, style); /// Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server /// Interval in milliseconds /// Whether the timer should repeat or not -/// -/// +/// +/// /// Timer intervals are not accurate (roughly 25% off). There's a fix available here. /// Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. /// The function that should be called must be public. @@ -550,10 +630,10 @@ native SetTimer(const functionName[], interval, bool:repeating); /// Whether the timer should be called repeatedly (can only be stopped with KillTimer) or only once /// Special format indicating the types of values the timer will pass /// Indefinite number of arguments to pass (must follow format specified in previous parameter) -/// -/// -/// -/// +/// +/// +/// +/// /// Timer intervals are not accurate (roughly 25% off). There's a fix available here. /// Timer IDs are never used twice. You can use KillTimer() on a timer ID and it won't matter if it's running or not. /// The function that should be called must be public. @@ -574,21 +654,21 @@ native SetTimerEx(const functionName[], interval, bool:repeating, const format[] /// Kills (stops) a running timer. /// The ID of the timer to kill (returned by SetTimer or SetTimerEx) -/// -/// +/// +/// /// This function always returns 0. native KillTimer(timerid); /// Returns the uptime of the actual server (not the SA-MP server) in milliseconds. -/// +/// /// GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. /// One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. /// Uptime of the actual server (not the SA-MP server). native GetTickCount(); /// Returns the maximum number of players that can join the server, as set by the server variable 'maxplayers' in server.cfg. -/// -/// +/// +/// /// This function can not be used in place of MAX_PLAYERS. It can not be used at compile time (e.g. for array sizes). MAX_PLAYERS should always be re-defined to what the 'maxplayers' var will be, or higher. /// The maximum number of players that can join the server. native GetMaxPlayers(); @@ -597,7 +677,7 @@ native GetMaxPlayers(); /// Public function's name /// Tag/format of each variable /// 'Indefinite' number of arguments of any tag -/// +/// /// The value that the last public function returned. /// CallRemoteFunction crashes the server if it's passing an empty string. /// @@ -611,13 +691,13 @@ native GetMaxPlayers(); ///
    • s - a string
    • ///
    ///
    -native CallRemoteFunction(const function[], const format[], {Float,_}:...); +native CallRemoteFunction(const function[], const format[] = "", {Float, _}:...); /// Calls a public function from the script in which it is used. /// Public function's name /// Tag/format of each variable /// 'Indefinite' number of arguments of any tag -/// +/// /// The value that the only public function returned. /// CallLocalFunction crashes the server if it's passing an empty string. /// @@ -631,63 +711,63 @@ native CallRemoteFunction(const function[], const format[], {Float,_}:...); ///
  • s - a string
  • /// ///
    -native CallLocalFunction(const function[], const format[], {Float,_}:...); +native CallLocalFunction(const function[], const format[] = "", {Float, _}:...); /// Returns the norm (length) of the provided vector. /// The vector's magnitude on the x axis /// The vector's magnitude on the y axis /// The vector's magnitude on the z axis -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// The norm (length) of the provided vector as a float. native Float:VectorSize(Float:x, Float:y, Float:z); /// Get the inversed value of a sine in degrees. /// The sine for which to find the angle for -/// +/// /// The angle in degrees. native Float:asin(Float:value); /// Get the inversed value of a cosine in degrees. /// The cosine for which to find the angle for -/// +/// /// The angle in degrees. native Float:acos(Float:value); /// Get the inversed value of a tangent in degrees. /// The tangent for which to find the angle for -/// -/// +/// +/// /// The angle in degrees. native Float:atan(Float:value); /// Get the multi-valued inversed value of a tangent in degrees. /// y size /// x size -/// -/// +/// +/// /// The angle in degrees. native Float:atan2(Float:y, Float:x); /// Gets the highest playerid currently in use on the server. -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The highest playerid currently in use on the server or 0 if there are no connected players. native GetPlayerPoolSize(); /// Gets the highest vehicleid currently in use on the server. -/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The highest vehicleid currently in use on the server or 0 if there are no created vehicles. native GetVehiclePoolSize(); /// Gets the highest actorid created on the server. -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The highest actorid created on the server or 0 if there are no created actors. native GetActorPoolSize(); @@ -710,12 +790,12 @@ native SHA256_PassHash(const password[], const salt[], output[], size = sizeof ( /// Set an integer server variable. /// The name of the server variable /// The integer to be set -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// /// 1: The function executed successfully.
    @@ -725,12 +805,12 @@ native SetSVarInt(const svar[], value); /// Gets an integer server variable's value. /// The name of the server variable (case-insensitive). Assigned in SetSVarInt -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// The integer value of the specified server variable. It will still return 0 if the variable is not set. native GetSVarInt(const svar[]); @@ -738,12 +818,12 @@ native GetSVarInt(const svar[]); /// Set a string server variable. /// The name of the server variable /// The string to be set -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// /// 1: The function executed successfully.
    @@ -755,12 +835,12 @@ native SetSVarString(const svar[], const value[]); /// The name of the server variable (case-insensitive). Assigned in SetSVarString /// The array in which to store the string value in, passed by reference /// The maximum length of the returned string -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// The length of the string. native GetSVarString(const svar[], output[], len = sizeof (output)); @@ -768,12 +848,12 @@ native GetSVarString(const svar[], output[], len = sizeof (output)); /// Set a float server variable. /// The name of the server variable /// The float to be set -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// /// 1: The function executed successfully.
    @@ -783,24 +863,24 @@ native SetSVarFloat(const svar[], Float:value); /// Gets a float server variable's value. /// The name of the server variable (case-insensitive). Assigned in SetSVarFloat -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! /// The float value of the specified server variable. It will still return 0 if the variable is not set. native Float:GetSVarFloat(const svar[]); /// Deletes a previously set server variable. /// The name of the server variable to delete -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings. /// /// 1: The function executed successfully.
    @@ -809,8 +889,8 @@ native Float:GetSVarFloat(const svar[]); native DeleteSVar(const svar[]); /// Each SVar (server-variable) has its own unique identification number for lookup, this function returns the highest ID. -/// -/// +/// +/// /// The highest set SVar ID. native GetSVarsUpperIndex(); @@ -818,21 +898,21 @@ native GetSVarsUpperIndex(); /// The index of the sVar /// A string to store the sVar's name in, passed by reference /// The max length of the returned string -/// -/// -/// -/// +/// +/// +/// +/// native GetSVarNameAtIndex(index, output[], size = sizeof (output)); /// Gets the type (integer, float or string) of a server variable. /// The name of the server variable to get the type of -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// /// Variable types:
    ///
      @@ -843,7 +923,7 @@ native GetSVarNameAtIndex(index, output[], size = sizeof (output)); ///
    ///
    /// Returns the type of the SVar. See table below. -native e_SERVER_VARTYPE:GetSVarType(const svar[]); +native __TAG(SERVER_VARTYPE):GetSVarType(const svar[]); // Game @@ -853,8 +933,8 @@ native SetGameModeText(const string[]); /// This function is used to change the amount of teams used in the gamemode. It has no obvious way of being used, but can help to indicate the number of teams used for better (more effective) internal handling. This function should only be used in the OnGameModeInit callback. Important: You can pass 2 billion here if you like, this function has no effect at all. /// Number of teams the gamemode knows -/// -/// +/// +/// native SetTeamCount(count); /// Adds a class to class selection. Classes are used so players may spawn with a skin of their choice. @@ -879,9 +959,9 @@ native SetTeamCount(count); /// The maximum class ID is 319 (starting from 0, so a total of 320 classes). /// When this limit is reached, any more classes that are added will replace ID 319. /// -/// -/// -/// +/// +/// +/// native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /// This function is exactly the same as the AddPlayerClass function, with the addition of a team parameter. @@ -904,10 +984,10 @@ native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:a /// ///
    /// The maximum class ID is 319 (starting from 0, so a total of 320 classes). When this limit is reached, any more classes that are added will replace ID 319. -/// -/// -/// -/// +/// +/// +/// +/// native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /// Adds a 'static' vehicle (models are pre-loaded for players) to the gamemode. @@ -925,9 +1005,9 @@ native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawn /// ///
    /// Can only be used when the server first starts (under OnGameModeInit). -/// -/// -/// +/// +/// +/// native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2); /// Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from AddStaticVehicle in only one way: allows a respawn time to be set for when the vehicle is left unoccupied by the driver. @@ -947,9 +1027,9 @@ native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float /// ///
    /// Can only be used when the server first starts (under OnGameModeInit). -/// -/// -/// +/// +/// +/// native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2, respawnDelay, bool:addSiren = false); /// This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically). @@ -965,9 +1045,9 @@ native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Flo /// 0 if failed to create. ///
    /// This function doesn't return a pickup ID that you can use in, for example, OnPlayerPickUpPickup. Use CreatePickup if you'd like to assign IDs. -/// -/// -/// +/// +/// +/// native AddStaticPickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0); /// This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. @@ -977,9 +1057,9 @@ native AddStaticPickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0) /// The y coordinate to create the pickup at /// The z coordinate to create the pickup at /// The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds (optional=0) -/// -/// -/// +/// +/// +/// /// /// Known Bugs:
    /// Pickups that have a x or y lower than -4096.0 or bigger than 4096.0 won't show up and won't trigger OnPlayerPickUpPickup either. @@ -1016,24 +1096,24 @@ native CreatePickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0); /// Destroys a pickup created with CreatePickup. /// The ID of the pickup to destroy (returned by CreatePickup) -/// -/// +/// +/// native DestroyPickup(pickup); /// Toggle the drawing of nametags, health bars and armor bars above players. /// 0 to disable, 1 to enable (enabled by default) -/// -/// -/// +/// +/// +/// /// This function can only be used in OnGameModeInit. For other times, see ShowPlayerNameTagForPlayer. native ShowNameTags(bool:show); /// Toggles player markers (blips on the radar). Must be used when the server starts (OnGameModeInit). For other times, see SetPlayerMarkerForPlayer. /// The mode to use for markers. They can be streamed, meaning they are only visible to nearby players. See table below -/// -/// -/// -/// +/// +/// +/// +/// /// /// Marker modes:
    ///
      @@ -1043,17 +1123,17 @@ native ShowNameTags(bool:show); ///
    ///
    /// It is also possible to set a player's colour to a colour that has full transparency (no alpha value). This makes it possible to show markers on a per-player basis. -native ShowPlayerMarkers(e_PLAYER_MARKERS:mode); +native ShowPlayerMarkers(__TAG(PLAYER_MARKERS):mode); /// Ends the current gamemode. -/// +/// native GameModeExit(); /// Sets the world time (for all players) to a specific hour. /// The hour to set (0-23) -/// -/// -/// +/// +/// +/// /// To set the minutes and/or to set the time for individual players, see SetPlayerTime. /// This function is only relevant for players that do not use a passing clock - see TogglePlayerClock. native SetWorldTime(hour); @@ -1062,9 +1142,9 @@ native SetWorldTime(hour); /// The ID of the weapon to get the name of /// An array to store the weapon's name in, passed by reference /// The maximum length of the weapon name to store. -/// -/// -/// +/// +/// +/// /// /// 1: The function executed successfully.
    /// 0: The function failed to execute. The weapon specified does not exist. @@ -1077,36 +1157,36 @@ native GetWeaponName(weaponid, weapon[], len = sizeof (weapon)); native EnableTirePopping(bool:enable); // deprecated function /// Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles (SetPlayerTeam must be used!). -/// +/// /// This function was added in SA-MP 0.3x and will not work in earlier versions! native EnableVehicleFriendlyFire(); /// Toggle whether the usage of weapons in interiors is allowed or not. /// 1 to enable weapons in interiors (enabled by default), 0 to disable weapons in interiors /// This function does not work in the current SA:MP version! -/// -/// -/// +/// +/// +/// #pragma deprecated Use `OnPlayerInteriorChange`. native AllowInteriorWeapons(bool:allow); /// Set the world weather for all players. /// The weather to set -/// -/// +/// +/// /// If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. native SetWeather(weatherid); /// Get the currently set gravity. -/// +/// /// The current set gravity (as a float). native Float:GetGravity(); /// Set the gravity for all players. /// The value that the gravity should be set to (between -50 and 50) -/// -/// -/// +/// +/// +/// /// Default gravity is 0.008. /// This function always returns 1, even when it fails to execute if the gravity is out of the limits (lower than -50.0 or higher than +50.0). native SetGravity(Float:gravity); @@ -1114,15 +1194,15 @@ native SetGravity(Float:gravity); /// This function will determine whether RCON admins will be teleported to their waypoint when they set one. /// 0 to disable and 1 to enable /// This function, as of 0.3d, is deprecated. Please see OnPlayerClickMap. -/// -/// +/// +/// #pragma deprecated Use `OnPlayerClickMap`. native AllowAdminTeleport(bool:allow); /// This function does not work in the current SA:MP version! -/// -/// -/// +/// +/// +/// #pragma deprecated Use `CreatePickup`. native SetDeathDropAmount(amount); @@ -1132,7 +1212,7 @@ native SetDeathDropAmount(amount); /// The z coordinate of the explosion /// The type of explosion /// The explosion radius -/// +/// /// There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. /// This function always returns 1, even when the explosion type and/or radius values are invalid. native CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); @@ -1143,14 +1223,14 @@ native CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); native EnableZoneNames(bool:enable); /// Uses standard player walking animation (animation of the CJ skin) instead of custom animations for every skin (e.g. skating for skater skins). -/// -/// +/// +/// /// Only works when placed under OnGameModeInit. /// Not using this function causes two-handed weapons (not dual-handed - a single weapon that is held by both hands) to be held in only one hand. native UsePlayerPedAnims(); // Will cause the players to use CJ running/walking animations /// Disable all the interior entrances and exits in the game (the yellow arrows at doors). -/// +/// /// If the gamemode is changed after this function has been used, and the new gamemode doesn't disable markers, the markers will NOT reappear for already-connected players (but will for newly connected players). /// This function will only work if it has been used BEFORE a player connects (it is recommended to use it in OnGameModeInit). It will not remove a connected player's markers. /// This function always returns 1. @@ -1158,32 +1238,32 @@ native DisableInteriorEnterExits(); // will disable all interior enter/exits in /// Set the maximum distance to display the names of players. /// The distance to set -/// -/// -/// +/// +/// +/// /// Default distance is 70 SA units native SetNameTagDrawDistance(Float:distance); // Distance at which nametags will start rendering on the client. /// Disables the nametag Line-Of-Sight checking so that players can see nametags through objects. -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// This can not be reversed until the server restarts. native DisableNameTagLOS(); // Disables the nametag Line-Of-Sight checking /// Set a radius limitation for the chat. Only players at a certain distance from the player will see their message in the chat. Also changes the distance at which a player can see other players on the map at the same distance. /// The range in which players will be able to see chat -/// -/// -/// -/// +/// +/// +/// +/// native LimitGlobalChatRadius(Float:chatRadius); /// Set the player marker radius. /// The radius that markers will show at -/// -/// -/// +/// +/// +/// /// This Function was added in SA-MP 0.3a and will not work in earlier versions! native LimitPlayerMarkerRadius(Float:markerRadius); @@ -1192,8 +1272,8 @@ native LimitPlayerMarkerRadius(Float:markerRadius); /// Connect an NPC to the server. /// The name the NPC should connect as. Must follow the same rules as normal player names /// The NPC script name that is located in the npcmodes folder (without the .amx extension) -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// NPCs do not have nametags. These can be scripted with Attach3DTextLabelToPlayer. /// This function always return 1. @@ -1201,8 +1281,8 @@ native ConnectNPC(const name[], const script[]); /// Check if a player is an actual player or an NPC. /// The ID of the player to check -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the player is an NPC, 0 if not. native bool:IsPlayerNPC(playerid); @@ -1218,23 +1298,23 @@ native RedirectDownload(playerid, const url[]); /// Check if a player is logged in as an RCON admin. /// The ID of the player to check -/// -/// +/// +/// /// 1 if the player is an RCON admin, 0 if not. native bool:IsPlayerAdmin(playerid); /// Kicks a player from the server. They will have to quit the game and re-connect if they wish to continue playing. /// The ID of the player to kick -/// -/// +/// +/// /// As of SA-MP 0.3x, any action taken directly before Kick() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the kick. /// This function always returns 1, even if the function failed to execute (player specified doesn't exist). native Kick(playerid); /// Ban a player who is currently in the server. They will be unable to join the server ever again. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. BanEx can be used to give a reason for the ban. IP bans can be added/removed using the RCON banip and unbanip commands (SendRconCommand). /// The ID of the player to ban -/// -/// +/// +/// /// As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. /// native Ban(playerid); @@ -1242,16 +1322,16 @@ native Ban(playerid); /// Ban a player with a reason. /// The ID of the player to ban /// The reason for the ban -/// -/// +/// +/// /// As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. native BanEx(playerid, const reason[]); /// Sends an RCON (Remote Console) command. /// The RCON command to be executed -/// -/// -/// +/// +/// +/// /// Does not support login, due to the lack of a 'playerid' parameter. /// 'password 0' will remove the server's password if one is set. /// This function always returns 1. @@ -1262,16 +1342,16 @@ native SendRconCommand(const command[]); /// The ID of the player you want to get the networkstats of /// The string to store the networkstats in, passed by reference /// The length of the string that should be stored -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3c R4 and will not work in earlier versions! /// This function may not return accurate data when used under OnPlayerDisconnect if the player has quit normally. It usually returns accurate data if the player has been kicked or has timed out. native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); @@ -1279,16 +1359,16 @@ native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); /// Gets the server's network stats and stores them in a string. /// The string to store the network stats in, passed by reference /// The length of the string to be stored -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3c R4 and will not work in earlier versions! /// /// Example output:
    @@ -1319,9 +1399,9 @@ native GetNetworkStats(output[], size = sizeof (output)); /// The ID of the player to get the client version of /// The string to store the player's version in, passed by reference /// The maximum length of the version -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// The string the version gets stored in will be empty if playerid is an NPC. /// 1 on success and 0 on failure (if player specified doesn't exist). @@ -1330,16 +1410,16 @@ native GetPlayerVersion(playerid, version[], len = sizeof (version)); // Returns /// Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. /// The IP to block /// The time (in milliseconds) that the connection will be blocked for. 0 can be used for an indefinite block -/// -/// +/// +/// /// This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! /// Wildcards can be used with this function, for example blocking the IP 6.9.*.* will block all IPs where the first two octets are 6 and 9 respectively. Any number can be in place of an asterisk. native BlockIpAddress(const ipAddress[], timeMS); /// Unblock an IP address that was previously blocked using BlockIpAddress. /// The IP address to unblock -/// -/// +/// +/// /// This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! native UnBlockIpAddress(const ipAddress[]); @@ -1349,8 +1429,8 @@ native UnBlockIpAddress(const ipAddress[]); /// The name of the string variable to get the value of /// An array into which to store the value, passed by reference /// The length of the string that should be stored -/// -/// +/// +/// /// This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsString /// Using this function on anything other than a string (int, bool or float) or a nonexistent server variable, will crash your server! This is a bug. /// Type 'varlist' in the server console to display a list of available server variables and their types. @@ -1361,8 +1441,8 @@ native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); /// Get the integer value of a server variable. /// The name of the integer variable to get the value of -/// -/// +/// +/// /// This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsInt /// Type 'varlist' in the server console to display a list of available server variables and their types. /// The value of the specified server variable. 0 if the specified server variable is not an integer or doesn't exist. @@ -1371,8 +1451,8 @@ native GetServerVarAsInt(const cvar[]); /// Get the boolean value of a server variable. /// The name of the boolean variable to get the value of -/// -/// +/// +/// /// This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsBool /// Type 'varlist' in the server console to display a list of available server variables and their types. /// The value of the specified server variable. 0 if the specified server variable is not a boolean or doesn't exist. @@ -1384,8 +1464,8 @@ native bool:GetServerVarAsBool(const cvar[]); /// The name of the string variable to get the value of /// An array into which to store the value, passed by reference /// The length of the string that should be stored -/// -/// +/// +/// /// Type varlist in the server console to display a list of available console variables and their types. /// When filterscripts or plugins are specified as the cvar, this function only returns the name of the first specified filterscript or plugin. /// Using this function with anything other than a string (integer, boolean or float) will cause your server to crash. Using it with a nonexistent console variable will also cause your server to crash. @@ -1394,16 +1474,16 @@ native GetConsoleVarAsString(const cvar[], buffer[], len = sizeof (buffer)); /// Get the integer value of a console variable. /// The name of the integer variable to get the value of -/// -/// +/// +/// /// Type varlist in the server console to display a list of available console variables and their types. /// The value of the specified console variable. 0 if the specified console variable is not an integer or doesn't exist. native GetConsoleVarAsInt(const cvar[]); /// Get the boolean value of a console variable. /// The name of the boolean variable to get the value of -/// -/// +/// +/// /// Type varlist in the server console to display a list of available console variables and their types. /// The value of the specified console variable. 0 if the specified console variable is not a boolean or doesn't exist. native bool:GetConsoleVarAsBool(const cvar[]); @@ -1411,23 +1491,23 @@ native bool:GetConsoleVarAsBool(const cvar[]); // Extended admin network stats /// Gets the tick rate (like FPS) of the server. -/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// The server tick rate (per second). Returns 0 when the server is just started. native GetServerTickRate(); /// Gets the amount of time (in milliseconds) that a player has been connected to the server for. /// The ID of the player to get the connected time of -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// The return value is not reset to zero after changing the game mode (using the RCON command "gmx"). /// This function returns the amount of time (in milliseconds) that a player has been connected to the server for. 0 is returned if the player is not connected. @@ -1435,96 +1515,96 @@ native NetStats_GetConnectedTime(playerid); /// Gets the number of messages the server has received from the player. /// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This function returns the number of messages the server has received from the player. 0 is returned if the player is not connected. native NetStats_MessagesReceived(playerid); /// Gets the amount of data (in bytes) that the server has received from the player. /// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This function returns the number of bytes the server has received from the player. 0 is returned if the player is not connected. native NetStats_BytesReceived(playerid); /// Gets the number of messages the server has sent to the player. /// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// The number of messages the server has sent to the player. native NetStats_MessagesSent(playerid); /// Gets the amount of data (in bytes) that the server has sent to the player. /// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// This function returns the number of bytes the server has sent to the player. 0 is returned if the player is not connected. native NetStats_BytesSent(playerid); /// Gets the number of messages the player has received in the last second. /// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// the number of messages the player has received in the last second. native NetStats_MessagesRecvPerSecond(playerid); /// Gets the packet loss percentage of a player. Packet loss means data the player is sending to the server is being lost (or vice-versa). /// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// Anything greater than 0.0% should already be a cause of concern. Anything greater than 1.0% is outright bad. /// This function has been found to be currently unreliable the output is not as expected when compared to the client. Therefore this function should not be used as a packet loss kicker. @@ -1534,19 +1614,19 @@ native Float:NetStats_PacketLossPercent(playerid); /// Gets the player's current connection status. /// The ID of the player to get the connection status of -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! /// /// Status:
    @@ -1569,17 +1649,17 @@ native NetStats_ConnectionStatus(playerid); /// The ID of the player to get the IP and port of /// A string array to store the IP and port in, passed by reference /// The maximum length of the IP/port. 22 is recommended -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3z and will not work in earlier versions! native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); @@ -1592,13 +1672,13 @@ native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); /// The y position of the menu (640x460 canvas - 0 would put the menu at the far top) /// The width for the first column /// The width for the second column (optional=0.0) -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// /// This function merely CREATES the menu - ShowMenuForPlayer must be used to show it.
    /// You can only create and access 2 columns (0 and 1).
    @@ -1610,11 +1690,11 @@ native Menu:CreateMenu(const title[], columns, Float:x, Float:y, Float:col1width /// Destroys the specified menu. /// The menu ID to destroy -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// 1 if the destroying was successful, otherwise 0. native DestroyMenu(Menu:menuid); @@ -1632,20 +1712,20 @@ native DestroyMenu(Menu:menuid); /// ///
    /// The index of the row this item was added to. -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// native AddMenuItem(Menu:menuid, column, const text[]); /// Sets the caption of a column in a menu. /// ID of the menu to change /// The column (0 or 1) to set the header of /// The caption text for the column -/// -/// -/// +/// +/// +/// /// Crashes when passed an invalid menu ID. /// Note that you can add only 12 items with AddMenuItem. The 13th object of a menu would replace the header of the column which is correctly set with this function. native SetMenuColumnHeader(Menu:menuid, column, const heading[]); @@ -1653,12 +1733,12 @@ native SetMenuColumnHeader(Menu:menuid, column, const heading[]); /// Shows a previously created menu for a player. /// The ID of the menu to show. Returned by CreateMenu /// The ID of the player to whom the menu will be shown -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// Crashes the both server and player if an invalid menu ID given. /// /// 1: The function executed successfully.
    @@ -1669,10 +1749,10 @@ native ShowMenuForPlayer(Menu:menuid, playerid); /// Hides a menu for a player. /// The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow /// The ID of the player that the menu will be hidden for -/// -/// -/// -/// +/// +/// +/// +/// /// /// 1: The function executed successfully.
    /// 0: The function failed to execute. @@ -1681,25 +1761,25 @@ native HideMenuForPlayer(Menu:menuid, playerid); /// Check if a menu ID is vliad. /// The menu to check for existance -/// -/// +/// +/// /// 1 if the menu is valid, otherwise 0. native bool:IsValidMenu(Menu:menuid); /// Disable a menu. /// The ID of the menu to disable -/// -/// -/// +/// +/// +/// /// Crashes when passed an invalid menu ID. native DisableMenu(Menu:menuid); /// Disable a specific row in a menu for all players. It will be greyed-out and can't be selected by players. /// The ID of the menu to disable a row of. Ensure this is valid, as an invalid menu ID will crash the entire server /// The ID of the row to disable (rows start at 0) -/// -/// -/// +/// +/// +/// /// /// Crashes when passed an invalid menu ID.
    /// This function disabled the specified menu row for all players. There is no function to disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, and one without. Or one per player. @@ -1709,13 +1789,13 @@ native DisableMenuRow(Menu:menuid, row); /// Gets the ID of the menu the player is currently viewing (shown by ShowMenuForPlayer). /// The ID of the player to get the current menu of -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// Returns previous menu when none is displayed. /// The ID of the player's currently shown menu, or INVALID_MENU (255) if no menu shown. native Menu:GetPlayerMenu(playerid); @@ -1781,7 +1861,7 @@ native TextDrawTextSize(Text:text, Float:width, Float:height); /// The ID of the textdraw to set the alignment of /// 1-left 2-centered 3-right /// For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at TextDrawTextSize, also position coordinate become position of center of textdraw and not left/top edges. -native TextDrawAlignment(Text:text, e_TEXT_DRAW_ALIGN:alignment); +native TextDrawAlignment(Text:text, __TAG(TEXT_DRAW_ALIGN):alignment); /// Sets the text colour of a textdraw. /// The ID of the textdraw to change the colour of. @@ -1864,16 +1944,16 @@ native TextDrawShowForPlayer(playerid, Text:text); /// Hides a textdraw for a specific player. /// The ID of the player that the textdraw should be hidden for /// The ID of the textdraw to hide -/// -/// -/// +/// +/// +/// native TextDrawHideForPlayer(playerid, Text:text); /// Shows a textdraw for all players. /// The ID of the textdraw to show. Returned by TextDrawCreate -/// -/// -/// +/// +/// +/// /// /// 1: The function executed successfully.
    /// 0: The function failed to execute. This means the textdraw specified does not exist. @@ -1882,9 +1962,9 @@ native TextDrawShowForAll(Text:text); /// Hides a text draw for all players. /// The ID of the textdraw to hide (returned by TextDrawCreate) -/// -/// -/// +/// +/// +/// native TextDrawHideForAll(Text:text); /// Changes the text on a textdraw. @@ -1925,15 +2005,15 @@ native TextDrawSetPreviewVehCol(Text:text, colour1, colour2); /// The y coordinate for the south side of the gangzone /// The x coordinate for the east side of the gangzone /// The y coordinate for the north side of the gangzone -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// /// There is a limit of 1024 gangzones.
    /// Putting the parameters in the wrong order results in glitchy behavior. @@ -1944,45 +2024,45 @@ native GangZoneCreate(Float:minX, Float:minY, Float:maxX, Float:maxY); /// Destroy a gangzone. /// The ID of the zone to destroy -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// native GangZoneDestroy(zone); /// Show a gangzone for a player. Must be created with GangZoneCreate first. /// The ID of the player you would like to show the gangzone for. /// The ID of the gang zone to show for the player. Returned by GangZoneCreate /// The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// 1 if the gangzone was shown, otherwise 0 (non-existant). native GangZoneShowForPlayer(playerid, zone, colour); /// Shows a gangzone with the desired colour to all players. /// The ID of the gangzone to show (returned by GangZoneCreate) /// The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// /// 1: The function executed successfully. The gang zone was shown for all players.
    /// 0: The function failed to execute. The gangzone does not exist. @@ -1992,84 +2072,84 @@ native GangZoneShowForAll(zone, colour); /// Hides a gangzone for a player. /// The ID of the player to hide the gangzone for /// The ID of the zone to hide -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// native GangZoneHideForPlayer(playerid, zone); /// GangZoneHideForAll hides a gangzone from all players. /// The zone to hide -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// native GangZoneHideForAll(zone); /// Makes a gangzone flash for a player. /// The ID of the player to flash the gangzone for /// The ID of the zone to flash /// The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// native GangZoneFlashForPlayer(playerid, zone, flashColour); /// GangZoneFlashForAll flashes a gangzone for all players. /// The zone to flash /// The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// native GangZoneFlashForAll(zone, flashColour); /// Stops a gangzone flashing for a player. /// The ID of the player to stop the gangzone flashing for /// The ID of the gangzonezone to stop flashing -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// native GangZoneStopFlashForPlayer(playerid, zone); /// Stops a gangzone flashing for all players. /// The ID of the zone to stop flashing. Returned by GangZoneCreate -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// /// 1: The function executed successfully. Success is reported even if the gang zone wasn't flashing to begin with.
    /// 0: The function failed to execute. The gangzone specified does not exist. @@ -2087,16 +2167,16 @@ native GangZoneStopFlashForAll(zone); /// The distance from where you are able to see the 3D Text Label /// The virtual world in which you are able to see the 3D Text /// Test the line-of-sight so this text can't be seen through objects (optional=0) -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// -/// If is empty, the server/clients next to the text might crash!
    +/// If is empty, the server/clients next to the text might crash!
    /// If the virtualWorld is set as -1 the text will not appear. ///
    /// drawdistance seems to be a lot smaller when spectating. @@ -2106,13 +2186,13 @@ native Text3D:Create3DTextLabel(const text[], colour, Float:x, Float:y, Float:z, /// Delete a 3D text label (created with Create3DTextLabel). /// The ID of the 3D text label to delete -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// 1 if the 3D text label was deleted, otherwise 0. native Delete3DTextLabel(Text3D:textid); @@ -2123,13 +2203,13 @@ native Delete3DTextLabel(Text3D:textid); /// The x offset from the player /// The y offset from the player /// The z offset from the player -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// 1: The function executed successfully.
    @@ -2143,13 +2223,13 @@ native Attach3DTextLabelToPlayer(Text3D:textid, parentid, Float:offsetX, Float:o /// The offset-x coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). /// The offset-y coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). /// The offset-z coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// Attach3DTextLabelToPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions! native Attach3DTextLabelToVehicle(Text3D:textid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ); @@ -2157,15 +2237,15 @@ native Attach3DTextLabelToVehicle(Text3D:textid, parentid, Float:offsetX, Float: /// The 3D Text Label you want to update /// The colour the 3D Text Label should have from now on /// The new text which the 3D Text Label should have from now on -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// If is empty, the server/clients next to the text might crash! +/// If is empty, the server/clients next to the text might crash! native Update3DTextLabelText(Text3D:textid, colour, const text[]); // Per-player 3D Text Labels @@ -2181,15 +2261,15 @@ native Update3DTextLabelText(Text3D:textid, colour, const text[]); /// The player you want to attach the 3D Text Label to. (optional=INVALID_PLAYER_ID) /// The vehicle you want to attach the 3D Text Label to. (optional=INVALID_VEHICLE_ID) /// Test the line-of-sight so this text can't be seen through walls (optional=0) -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// If is empty, the server/clients next to the text might crash! +/// If is empty, the server/clients next to the text might crash! /// drawdistance seems to be a lot smaller when spectating. /// The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayerid = INVALID_PLAYER_ID, parentVehicleid = INVALID_VEHICLE_ID, bool:testLOS = false); @@ -2197,12 +2277,12 @@ native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Floa /// Destroy a 3D text label that was created using CreatePlayer3DTextLabel. /// The ID of the player whose 3D text label to delete /// The ID of the player's 3D text label to delete -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// 1: The function executed successfully.
    @@ -2215,15 +2295,15 @@ native DeletePlayer3DTextLabel(playerid, PlayerText3D:textid); /// The 3D Text Label you want to update /// The colour the 3D Text Label should have from now on /// The new text which the 3D Text Label should have from now on -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// If is empty, the server/clients next to the text might crash! +/// If is empty, the server/clients next to the text might crash! native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const text[]); /// Shows the player a synchronous (only one at a time) dialog box. @@ -2234,8 +2314,8 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const /// The text to display in the main dialog. Use \n to start a new line and \t to tabulate /// The text on the left button /// The text on the right button. Leave it blank ( "" ) to hide it -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// Use colour embedding for multiple colours in the text. /// Using -1 as dialogid closes all dialogs currently shown on the client's screen. @@ -2243,7 +2323,7 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const /// 1: The function executed successfully.
    /// 0: The function failed to execute. This means the player is not connected.
    ///
    -native ShowPlayerDialog(playerid, dialogid, e_DIALOG_STYLE:style, const caption[], const info[], const button1[], const button2[]); +native ShowPlayerDialog(playerid, dialogid, __TAG(DIALOG_STYLE):style, const caption[], const info[], const button1[], const button2[]); /// Get a players unique ID. /// The player to get the unique ID of @@ -2256,9 +2336,9 @@ native gpci(playerid, output[], size = sizeof (output)); // -------------------------------------------------- /// This callback is triggered when the gamemode starts. -/// -/// -/// +/// +/// +/// /// This function can also be used in a filterscript to detect if the gamemode changes with RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. /// /// 0 - Will prevent other filterscripts from receiving this callback.
    @@ -2268,10 +2348,10 @@ native gpci(playerid, output[], size = sizeof (output)); forward OnGameModeInit(); /// This callback is called when a gamemode ends, either through 'gmx', the server being shut down, or GameModeExit. -/// -/// -/// -/// +/// +/// +/// +/// /// This function can also be used in a filterscript to detect if the gamemode changes with RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. /// When using OnGameModeExit in conjunction with the 'rcon gmx' console command keep in mind there is a potential for client bugs to occur an example of this is excessive RemoveBuildingForPlayer calls during OnGameModeInit which could result in a client crash. /// This callback will NOT be called if the server crashes or the process is killed by other means, such as using the Linux kill command or pressing the close-button on the Windows console. @@ -2283,24 +2363,24 @@ forward OnGameModeInit(); forward OnGameModeExit(); /// This callback is called when a filterscript is initialized (loaded). It is only called inside the filterscript which is starting. -/// -/// -/// +/// +/// +/// /// This callback does not handle returns. forward OnFilterScriptInit(); /// This callback is called when a filterscript is unloaded. It is only called inside the filterscript which is unloaded. -/// -/// -/// +/// +/// +/// /// This callback does not handle returns. forward OnFilterScriptExit(); /// This callback is called when a player connects to the server. /// The ID of the player that connected -/// -/// -/// +/// +/// +/// /// This callback can also be called by NPC. /// /// 0 - Will prevent other filterscripts from receiving this callback.
    @@ -2312,9 +2392,9 @@ forward OnPlayerConnect(playerid); /// This callback is called when a player disconnects from the server. /// The ID of the player that disconnected /// The reason for the disconnection. See table below -/// -/// -/// +/// +/// +/// /// This callback can also be called by NPC. /// Some functions might not work correctly when used in this callback because the player is already disconnected when the callback is called. This means that you can't get unambiguous information from functions like GetPlayerIp and GetPlayerPos. /// @@ -2334,11 +2414,11 @@ forward OnPlayerDisconnect(playerid, reason); /// This callback is called when a player spawns.(i.e. after caling SpawnPlayer function). /// The ID of the player that spawned -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This callback can also be called by NPC. /// The game sometimes deducts $100 from players after spawn. /// @@ -2352,9 +2432,9 @@ forward OnPlayerSpawn(playerid); /// The ID of the player that died /// The ID of the player that killed the player who died, or INVALID_PLAYER_ID if there was none /// The ID of the reason for the player's death -/// -/// -/// +/// +/// +/// /// /// The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    /// The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    @@ -2370,10 +2450,10 @@ forward OnPlayerDeath(playerid, killerid, reason); /// This callback is called when a vehicle respawns. /// The ID of the vehicle that spawned -/// -/// -/// -/// +/// +/// +/// +/// /// /// 0 - Will prevent other filterscripts from receiving this callback.
    /// 1 - Indicates that this callback will be passed to the next filterscript.
    @@ -2384,8 +2464,8 @@ forward OnVehicleSpawn(vehicleid); /// This callback is called when a vehicle is destroyed - either by exploding or becoming submerged in water. /// The ID of the vehicle that was destroyed /// The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player -/// -/// +/// +/// /// This callback can also be called by NPC. /// This callback will also be called when a vehicle enters water, but the vehicle can be saved from destruction by teleportation or driving out (if only partially submerged). The callback won't be called a second time, and the vehicle may disappear when the driver exits, or after a short time. /// @@ -2397,9 +2477,9 @@ forward OnVehicleDeath(vehicleid, killerid); /// Called when a player sends a chat message. /// The ID of the player who typed the text /// The text the player typed -/// -/// -/// +/// +/// +/// /// This callback can also be called by NPC. /// /// Returning 0 in this callback will stop the text from being sent to all players.
    @@ -2410,9 +2490,9 @@ forward OnPlayerText(playerid, text[]); /// This callback is called when a player enters a command into the client chat window. Commands are anything that start with a forward slash, e.g. /help. /// The ID of the player that entered a command /// The command that was entered (including the forward slash) -/// -/// -/// +/// +/// +/// /// This callback can also be called by NPC. /// /// Return 1 if the command was processed, otherwise 0; If the command was not found both in filterscripts and in gamemode, the player will be received a message: SERVER: Unknown command.
    @@ -2423,8 +2503,8 @@ forward OnPlayerCommandText(playerid, cmdtext[]); /// Called when a player changes class at class selection (and when class selection first appears). /// The ID of the player that changed class /// The ID of the current class being viewed (returned by AddPlayerClass) -/// -/// +/// +/// /// This callback can also be called by NPC. /// This callback is also called when a player presses F4. /// @@ -2437,10 +2517,10 @@ forward OnPlayerRequestClass(playerid, classid); /// ID of the player who attempts to enter a vehicle /// ID of the vehicle the player is attempting to enter /// 0 if entering as driver. 1 if entering as passenger -/// -/// -/// -/// +/// +/// +/// +/// /// This callback is called when a player BEGINS to enter a vehicle, not when they HAVE entered it. See OnPlayerStateChange. /// This callback is still called if the player is denied entry to the vehicle (e.g. it is locked or full). /// @@ -2452,10 +2532,10 @@ forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); /// This callback is called when a player starts to exit a vehicle. /// The ID of the player that is exiting a vehicle /// The ID of the vehicle the player is exiting -/// -/// -/// -/// +/// +/// +/// +/// /// Not called if the player falls off a bike or is removed from a vehicle by other means such as using SetPlayerPos. /// You must use OnPlayerStateChange and check if their old state is PLAYER_STATE_DRIVER or PLAYER_STATE_PASSENGER and their new state is PLAYER_STATE_ONFOOT. /// @@ -2468,10 +2548,10 @@ forward OnPlayerExitVehicle(playerid, vehicleid); /// The ID of the player that changed state /// The player's new state /// The player's previous state -/// -/// -/// -/// +/// +/// +/// +/// /// This callback can also be called by NPC. /// /// States:
    @@ -2492,19 +2572,19 @@ forward OnPlayerExitVehicle(playerid, vehicleid); /// This callback does not handle returns.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerStateChange(playerid, /*e_PLAYER_STATE:*/newstate, /*e_PLAYER_STATE:*/oldstate); +forward OnPlayerStateChange(playerid, /*__TAG(PLAYER_STATE):*/newstate, /*__TAG(PLAYER_STATE):*/oldstate); /// This callback is called when a player enters the checkpoint set for that player. /// The player who entered the checkpoint -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This callback can also be called by NPC. /// /// This callback does not handle returns.
    @@ -2514,15 +2594,15 @@ forward OnPlayerEnterCheckpoint(playerid); /// This callback is called when a player leaves the checkpoint set for them by SetPlayerCheckpoint. Only one checkpoint can be set at a time. /// The ID of the player that left their checkpoint -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This callback can also be called by NPC. /// /// This callback does not handle returns.
    @@ -2532,15 +2612,15 @@ forward OnPlayerLeaveCheckpoint(playerid); /// This callback is called when a player enters a race checkpoint. /// The ID of the player who entered the race checkpoint -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This callback can also be called by NPC. /// /// This callback does not handle returns.
    @@ -2550,15 +2630,15 @@ forward OnPlayerEnterRaceCheckpoint(playerid); /// This callback is called when a player leaves the race checkpoint. /// The ID of the player that left the race checkpoint -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// This callback can also be called by NPC. /// /// This callback does not handle returns.
    @@ -2568,8 +2648,8 @@ forward OnPlayerLeaveRaceCheckpoint(playerid); /// This callback is called when a command is sent through the server console, remote RCON, or via the in-game "/rcon command". /// A string containing the command that was typed, as well as any passed parameters -/// -/// +/// +/// /// You will need to include this callback in a loaded filterscript for it to work in the gamemode! /// "/rcon" is not included in "cmd" when a player types a command. /// If you use the print function here, it will send a message to the player who typed the command in-game as well as the log. @@ -2583,8 +2663,8 @@ forward OnRconCommand(cmd[]); /// Called when a player attempts to spawn via class selection either by pressing SHIFT or clicking the 'Spawn' button. /// The ID of the player that requested to spawn -/// -/// +/// +/// /// This callback can also be called by NPC. /// To prevent players from spawning with certain classes, the last viewed class must be saved in a variable in OnPlayerRequestClass. /// @@ -2595,10 +2675,10 @@ forward OnPlayerRequestSpawn(playerid); /// This callback is called when an object is moved after MoveObject (when it stops moving). /// The ID of the object that was moved -/// -/// -/// -/// +/// +/// +/// +/// /// SetObjectPos does not work when used in this callback. To fix it, recreate the object. /// /// This callback does not handle returns.
    @@ -2609,10 +2689,10 @@ forward OnObjectMoved(objectid); /// This callback is called when a player object is moved after MovePlayerObject (when it stops moving). /// The playerid the object is assigned to /// The ID of the player object that was moved -/// -/// -/// -/// +/// +/// +/// +/// /// This callback can also be called for NPC. /// /// This callback does not handle returns.
    @@ -2623,8 +2703,8 @@ forward OnPlayerObjectMoved(playerid, objectid); /// Called when a player picks up a pickup created with CreatePickup. /// The ID of the player that picked up the pickup /// The ID of the pickup, returned by CreatePickup -/// -/// +/// +/// /// /// This callback does not handle returns.
    /// It is always called first in gamemode. @@ -2635,10 +2715,10 @@ forward OnPlayerPickUpPickup(playerid, pickupid); /// The ID of the driver of the vehicle /// The ID of the vehicle which is modded /// The ID of the component which was added to the vehicle -/// -/// -/// -/// +/// +/// +/// +/// /// This callback is NOT called by AddVehicleComponent. /// /// Return 0 to desync the mod (or an invalid mod) from propagating and / or crashing players.
    @@ -2650,10 +2730,10 @@ forward OnVehicleMod(playerid, vehicleid, componentid); /// The ID of the player that entered or exited the modshop /// 1 if the player entered or 0 if they exited /// The interior ID of the modshop that the player is entering (or 0 if exiting) -/// -/// -/// -/// +/// +/// +/// +/// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// Players collide when they get into the same mod shop. /// @@ -2666,10 +2746,10 @@ forward OnEnterExitModShop(playerid, enterexit, interiorid); /// The ID of the player that changed the paintjob of their vehicle /// The ID of the vehicle that had its paintjob changed /// The ID of the new paintjob -/// -/// -/// -/// +/// +/// +/// +/// /// This callback is not called by ChangeVehiclePaintjob. /// /// This callback does not handle returns. Returning 0 won't deny the paintjob change.
    @@ -2682,11 +2762,11 @@ forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); /// The ID of the vehicle that was resprayed /// The color that the vehicle's primary color was changed to /// The color that the vehicle's secondary color was changed to -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// Previewing a component inside a mod shop might call this callback. /// This callback is not called by ChangeVehicleColor. /// @@ -2698,8 +2778,8 @@ forward OnVehicleRespray(playerid, vehicleid, color1, color2); /// This callback is called when a vehicle element such as doors, tires, panels, or lights change their damage status. /// The ID of the vehicle that was changed its damage status /// The ID of the player who synced the change in the damage status (who had the car damaged or repaired) -/// -/// +/// +/// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// This does not include vehicle health changes /// @@ -2719,7 +2799,7 @@ forward OnVehicleDamageStatusUpdate(vehicleid, playerid); /// The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version /// The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version /// The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// +/// /// This callback was added in SA-MP 0.3c R3 and will not work in earlier versions! /// This callback is called very frequently per second per unoccupied vehicle. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. /// GetVehiclePos will return the old coordinates of the vehicle before this update. @@ -2732,13 +2812,13 @@ forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new /// This callback is called when a player selects an item from a menu (ShowMenuForPlayer). /// The ID of the player that selected a menu item /// The ID of the row that was selected. The first row is ID 0 -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// /// The menu ID is not passed to this callback. GetPlayerMenu must be used to determine which menu the player selected an item on. /// /// This callback does not handle returns.
    @@ -2748,9 +2828,9 @@ forward OnPlayerSelectedMenuRow(playerid, row); /// Called when a player exits a menu. /// The ID of the player that exited the menu -/// -/// -/// +/// +/// +/// /// /// This callback does not handle returns.
    /// It is always called first in gamemode. @@ -2761,10 +2841,10 @@ forward OnPlayerExitedMenu(playerid); /// The playerid who changed interior /// The interior the player is now in /// The interior the player was in before -/// -/// -/// -/// +/// +/// +/// +/// /// /// This callback does not handle returns.
    /// It is always called first in gamemode. @@ -2775,7 +2855,7 @@ forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); /// The ID of the player that pressed or released a key /// A map (bitmask) of the keys currently held - see here /// A map (bitmask) of the keys held prior to the current change - see here -/// +/// /// This callback can also be called by NPC. /// /// Useful macros:
    @@ -2803,9 +2883,9 @@ forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys); /// The IP of the player that tried to log in to RCON /// The password used to login with /// 0 if the password was incorrect or 1 if it was correct -/// -/// -/// +/// +/// +/// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// This callback is only called when /rcon login is used in-game. /// This callback is only called when the player is not yet logged in. When the player is logged in, OnRconCommand is called instead. @@ -2830,9 +2910,9 @@ forward OnPlayerUpdate(playerid); /// This callback is called when a player is streamed by some other player's client. /// The ID of the player who has been streamed /// The ID of the player that streamed the other player in -/// -/// -/// +/// +/// +/// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// This callback can also be called by NPC. /// @@ -2844,9 +2924,9 @@ forward OnPlayerStreamIn(playerid, forplayerid); /// This callback is called when a player is streamed out from some other player's client. /// The player who has been destreamed /// The player who has destreamed the other player -/// -/// -/// +/// +/// +/// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// This callback can also be called by NPC. /// @@ -2858,9 +2938,9 @@ forward OnPlayerStreamOut(playerid, forplayerid); /// Called when a vehicle is streamed to a player's client. /// The ID of the vehicle that streamed in for the player /// The ID of the player who the vehicle streamed in for -/// -/// -/// +/// +/// +/// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// This callback can also be called by NPC. /// @@ -2872,9 +2952,9 @@ forward OnVehicleStreamIn(vehicleid, forplayerid); /// This callback is called when a vehicle is streamed out for a player's client (it's so far away that they can't see it). /// The ID of the vehicle that streamed out /// The ID of the player who is no longer streaming the vehicle -/// -/// -/// +/// +/// +/// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// This callback can also be called by NPC. /// @@ -2886,8 +2966,8 @@ forward OnVehicleStreamOut(vehicleid, forplayerid); /// This callback is called when an actor is streamed in by a player's client. /// The ID of the actor that has been streamed in for the player /// The ID of the player that streamed the actor in -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This callback can also be called by NPC. /// It is always called first in filterscripts. @@ -2897,8 +2977,8 @@ forward OnActorStreamIn(actorid, forplayerid); /// This callback is called when an actor is streamed out by a player's client. /// The ID of the actor that has been streamed out for the player /// The ID of the player that streamed the actor out -/// -/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// This callback can also be called by NPC. /// It is always called first in filterscripts. @@ -2911,7 +2991,7 @@ forward OnActorStreamOut(actorid, forplayerid); /// 1 for left button and 0 for right button (if only one button shown, always 1) /// The ID of the list item selected by the player (starts at 0) (only if using a list style dialog) /// The text entered into the input box by the player or the selected list item text -/// +/// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! /// A player's dialog doesn't hide when the gamemode restarts, causing the server to print "Warning: PlayerDialogResponse PlayerId: 0 dialog ID doesn't match last sent dialog ID" if a player responded to this dialog after restart. /// Parameters can contain different values, based on dialog's style. @@ -2927,8 +3007,8 @@ forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]); /// The amount of damage the player took (health and armour combined) /// The ID of the weapon/reason for the damage /// The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) -/// -/// +/// +/// /// This callback was added in SA-MP 0.3d and will not work in earlier versions! /// GetPlayerHealth and GetPlayerArmour will return the old amounts of the player before this callback. /// @@ -2950,7 +3030,7 @@ forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) /// The amount of health/armour damagedid has lost (combined) /// The reason that caused the damage /// The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) -/// +/// /// This callback was added in SA-MP 0.3d and will not work in earlier versions! /// /// Keep in mind this function can be inaccurate in some cases.
    @@ -2973,14 +3053,14 @@ forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart /// The amount of health/armour damaged_actorid has lost /// The reason that caused the damage /// The body part that was hit -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// /// This callback was added in SA-MP 0.3.7 and will not work in earlier versions! /// This function does not get called if the actor is set invulnerable (WHICH IS BY DEFAULT). See SetActorInvulnerable. /// @@ -2995,9 +3075,9 @@ forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponi /// The X float coordinate where the player clicked /// The Y float coordinate where the player clicked /// The Z float coordinate where the player clicked (inaccurate - see note below) -/// -/// -/// +/// +/// +/// /// This callback was added in SA-MP 0.3d and will not work in earlier versions! /// The Z value returned will be 0 (invalid) if it is far away from the player; use the MapAndreas plugin to get a more accurate Z coordinate. /// @@ -3010,8 +3090,8 @@ forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); /// This callback is called when a player clicks on a textdraw or cancels the select mode with the Escape key. /// The ID of the player that clicked on the textdraw /// The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection was cancelled -/// -/// +/// +/// /// This callback was added in SA-MP 0.3e and will not work in earlier versions! /// The clickable area is defined by TextDrawTextSize. The x and y parameters passed to that function must not be zero or negative. /// Do not use CancelSelectTextDraw unconditionally within this callback. This results in an infinite loop. @@ -3024,9 +3104,9 @@ forward OnPlayerClickTextDraw(playerid, Text:clickedid); /// This callback is called when a player clicks on a player-textdraw. It is not called when player cancels the select mode (ESC) - however, OnPlayerClickTextDraw is. /// The ID of the player that selected a textdraw /// The ID of the player-textdraw that the player selected -/// -/// -/// +/// +/// +/// /// This callback was added in SA-MP 0.3e and will not work in earlier versions! /// When a player presses ESC to cancel selecting a textdraw, OnPlayerClickTextDraw is called with a textdraw ID of INVALID_TEXT_DRAW. OnPlayerClickPlayerTextDraw won't be called also. /// @@ -3039,11 +3119,11 @@ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); /// The ID of the player attempting to connect /// The IP address of the player attempting to connect /// The port of the attempted connection -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This callback was added in SA-MP 0.3z R2-2 and will not work in earlier versions! /// /// 1 - Will prevent other filterscripts from receiving this callback.
    @@ -3055,11 +3135,11 @@ forward OnIncomingConnection(playerid, ip_address[], port); /// This callback is called when a player sent a trailer update. /// The ID of the player who sent a trailer update /// The Trailer being updated -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This callback was added in SA-MP 0.3z R4 and will not work in earlier versions! /// This callback is called very frequently per second per trailer. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. /// @@ -3073,7 +3153,7 @@ forward OnTrailerUpdate(playerid, vehicleid); /// The ID of the player that toggled the siren (driver) /// The ID of the vehicle of which the siren was toggled for /// 0 if siren was turned off, 1 if siren was turned on -/// +/// /// This callback was added in SA-MP 0.3.7 and will not work in earlier versions! /// This callback can also be called by NPC. /// This callback is only called when a vehicle's siren is toggled on or off, NOT when the alternate siren is in use (holding horn). @@ -3087,9 +3167,9 @@ forward OnVehicleSirenStateChange(playerid, vehicleid, newstate); /// This callback is called when a player finishes downloading custom models. For more information on how to add custom models to your server, see the release thread and this tutorial. /// The ID of the player that finished downloading custom models /// The ID of the virtual world the player finished downloading custom models for -/// -/// -/// +/// +/// +/// /// This callback was added in SA-MP 0.3DL and will not work in earlier versions! /// This callback is called every time a player changes virtual worlds, even if there are no custom models present in that world. /// This callback does not handle returns. @@ -3100,15 +3180,15 @@ forward OnPlayerRequestDownload(playerid, type, crc); /// The ID of the player that clicked on a player on the scoreboard /// The ID of the player that was clicked on /// The source of the player's click -/// +/// /// This callback was added in SA-MP 0.3a and will not work in earlier versions! -/// There is currently only one (0 - CLICK_SOURCE_SCOREBOARD). The existence of this argument suggests that more sources may be supported in the future. +/// There is currently only one (0 - CLICK_SOURCE_SCOREBOARD). The existence of this argument suggests that more sources may be supported in the future. /// /// 1 - Will prevent other filterscripts from receiving this callback.
    /// 0 - Indicates that this callback will be passed to the next filterscript.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerClickPlayer(playerid, clickedplayerid, e_CLICK_SOURCE:source); +forward OnPlayerClickPlayer(playerid, clickedplayerid, /*__TAG(CLICK_SOURCE):*/source); /// This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). /// The ID of the player that edited an object @@ -3121,10 +3201,10 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, e_CLICK_SOURCE:source); /// The X rotation for the object that was edited /// The Y rotation for the object that was edited /// The Z rotation for the object that was edited -/// -/// -/// -/// +/// +/// +/// +/// /// This callback was added in SA-MP 0.3e and will not work in earlier versions! /// When using EDIT_RESPONSE_UPDATE be aware that this callback will not be called when releasing an edit in progress resulting in the last update of EDIT_RESPONSE_UPDATE being out of sync of the objects current position. /// @@ -3132,7 +3212,7 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, e_CLICK_SOURCE:source); /// 0 - Indicates that this callback will be passed to the next script.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerEditObject(playerid, playerobject, objectid, /*e_EDIT_RESPONSE:*/response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); +forward OnPlayerEditObject(playerid, playerobject, objectid, /*__TAG(EDIT_RESPONSE):*/response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); /// This callback is called when a player ends attached object edition mode. /// The ID of the player that ended edition mode @@ -3149,8 +3229,8 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, /*e_EDIT_RESPONSE:* /// The X scale for the attached object that was edited /// The Y scale for the attached object that was edited /// The Z scale for the attached object that was edited -/// -/// +/// +/// /// This callback was added in SA-MP 0.3e and will not work in earlier versions! /// Editions should be discarded if response was 0 (cancelled). This must be done by storing the offsets etc. in an array BEFORE using EditAttachedObject. /// @@ -3158,7 +3238,7 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, /*e_EDIT_RESPONSE:* /// 0 - Indicates that this callback will be passed to the next script.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerEditAttachedObject(playerid, /*e_EDIT_RESPONSE:*/response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); +forward OnPlayerEditAttachedObject(playerid, /*__TAG(EDIT_RESPONSE):*/response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); /// This callback is called when a player selects an object after SelectObject has been used. /// The ID of the player that selected an object @@ -3168,14 +3248,14 @@ forward OnPlayerEditAttachedObject(playerid, /*e_EDIT_RESPONSE:*/response, index /// The X position of the selected object /// The Y position of the selected object /// The Z position of the selected object -/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// /// 1 - Will prevent other scripts from receiving this callback.
    /// 0 - Indicates that this callback will be passed to the next script.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerSelectObject(playerid, e_SELECT_OBJECT:type, objectid, modelid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerSelectObject(playerid, /*__TAG(SELECT_OBJECT):*/type, objectid, modelid, Float:fX, Float:fY, Float:fZ); /// This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). /// The ID of the player that shot a weapon @@ -3185,8 +3265,8 @@ forward OnPlayerSelectObject(playerid, e_SELECT_OBJECT:type, objectid, modelid, /// The X coordinate that the shot hit /// The Y coordinate that the shot hit /// The Z coordinate that the shot hit -/// -/// +/// +/// /// This callback was added in SA-MP 0.3z and will not work in earlier versions! /// ///
  • BULLET_HIT_TYPE_NONE(0)
  • @@ -3217,14 +3297,14 @@ forward OnPlayerSelectObject(playerid, e_SELECT_OBJECT:type, objectid, modelid, /// 1 - Allow the bullet to cause damage.
    /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. ///
    -forward OnPlayerWeaponShot(playerid, weaponid, e_BULLET_HIT_TYPE:hittype, hitid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerWeaponShot(playerid, weaponid, /*__TAG(BULLET_HIT_TYPE):*/hittype, hitid, Float:fX, Float:fY, Float:fZ); /// This callback is called when a SendClientCheck request comletes /// The ID of the player checked /// The type of check performed /// The address requested /// The result of the check -/// +/// forward OnClientCheckResponse(playerid, actionid, memaddr, retndata); /// This callback is called when a SendClientCheck request comletes diff --git a/a_vehicles.inc b/a_vehicles.inc index a0aeed1..3e4c268 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -18,7 +18,8 @@ // Defines // -------------------------------------------------- -enum e_CARMODTYPE +#define CARMODTYPE: __TAG(CARMODTYPE): +enum CARMODTYPE: { CARMODTYPE_SPOILER, CARMODTYPE_HOOD, @@ -36,25 +37,29 @@ enum e_CARMODTYPE CARMODTYPE_VENT_LEFT } -enum e_VEHICLE_PARAMS +#define VEHICLE_PARAMS: __TAG(VEHICLE_PARAMS): +enum VEHICLE_PARAMS: { - VEHICLE_PARAMS_UNSET = -1, + VEHICLE_PARAMS_UNSET = -1, VEHICLE_PARAMS_OFF, - VEHICLE_PARAMS_ON, + VEHICLE_PARAMS_ON } -enum e_VEHICLE_MODEL_INFO +#define VEHICLE_MODEL_INFO: __TAG(VEHICLE_MODEL_INFO): +enum VEHICLE_MODEL_INFO: { - VEHICLE_MODEL_INFO_SIZE = 1, + VEHICLE_MODEL_INFO_SIZE = 1, VEHICLE_MODEL_INFO_FRONTSEAT, VEHICLE_MODEL_INFO_REARSEAT, VEHICLE_MODEL_INFO_PETROLCAP, VEHICLE_MODEL_INFO_WHEELSFRONT, VEHICLE_MODEL_INFO_WHEELSREAR, VEHICLE_MODEL_INFO_WHEELSMID, - VEHICLE_MODEL_INFO_FRONT_BUMPER_Z, - VEHICLE_MODEL_INFO_REAR_BUMPER_Z + VEHICLE_MODEL_INFO_FRONT_BUMPER, + VEHICLE_MODEL_INFO_REAR_BUMPER } +#define VEHICLE_MODEL_INFO_FRONT_BUMPER_Z VEHICLE_MODEL_INFO_FRONT_BUMPER +#define VEHICLE_MODEL_INFO_REAR_BUMPER_Z VEHICLE_MODEL_INFO_REAR_BUMPER // Vehicle @@ -68,12 +73,12 @@ enum e_VEHICLE_MODEL_INFO /// The secondary colour ID /// The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning /// Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=false) -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// /// Trains can only be added with AddStaticVehicle and AddStaticVehicleEx. /// /// The vehicle ID of the vehicle created (1 to MAX_VEHICLES).
    @@ -83,9 +88,9 @@ native CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:rotation, colour1 /// Destroy a vehicle. It will disappear instantly. /// The ID of the vehicle to destroy -/// -/// -/// +/// +/// +/// /// /// 1: The function executed successfully.
    /// 0: The function failed to execute. The vehicle does not exist. @@ -95,11 +100,11 @@ native DestroyVehicle(vehicleid); /// Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) for a player. /// The ID of the vehicle to check /// The ID of the player to check -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// 0: Vehicle is not streamed in for the player, or the function failed to execute (player and/or vehicle do not exist).
    @@ -112,9 +117,9 @@ native bool:IsVehicleStreamedIn(vehicleid, playerid); /// A float variable in which to store the x coordinate, passed by reference /// A float variable in which to store the y coordinate, passed by reference /// A float variable in which to store the z coordinate, passed by reference -/// -/// -/// +/// +/// +/// /// /// 1: The function executed successfully.
    /// 0: The function failed to execute. The vehicle specified does not exist. @@ -126,9 +131,9 @@ native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); /// The x coordinate to position the vehicle at /// The y coordinate to position the vehicle at /// The z coordinate to position the vehicle at -/// -/// -/// +/// +/// +/// /// An empty vehicle will not fall after being teleported into the air. /// /// 1: The function executed successfully.
    @@ -139,11 +144,11 @@ native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); /// Get the rotation of a vehicle on the z axis (yaw). /// The ID of the vehicle to get the z angle of /// A float variable in which to store the z rotation, passed by reference -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// /// 1: The function executed successfully.
    /// 0: The function failed to execute. This means the vehicle does not exist. @@ -156,7 +161,7 @@ native GetVehicleZAngle(vehicleid, &Float:angle); /// A float variable in which to store the second quaternion angle, passed by reference /// A float variable in which to store the third quaternion angle, passed by reference /// A float variable in which to store the fourth quaternion angle, passed by reference -/// +/// /// This function was added in SA-MP 0.3b and will not work in earlier versions! /// /// To euler:
    @@ -185,8 +190,8 @@ native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z) /// The x map coordinate /// The y map coordinate /// The z map coordinate -/// -/// +/// +/// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// A float containing the distance from the point specified in the coordinates. native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); @@ -194,8 +199,8 @@ native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); /// Set the z rotation (yaw) of a vehicle. /// The ID of the vehicle to set the rotation of /// The z angle to set -/// -/// +/// +/// /// A vehicle's x and y (pitch and roll) rotation will be reset when this function is used. The x and y rotations can not be set. /// This function does not work on unoccupied vehicles. /// @@ -209,7 +214,7 @@ native SetVehicleZAngle(vehicleid, Float:angle); /// The ID of the player to set the vehicle's parameters for /// 0 to disable the objective or 1 to show it. This is a bobbing yellow arrow above the vehicle /// 0 to unlock the doors or 1 to lock them -/// +/// /// Vehicles must be respawned for the 'objective' to be removed. This can be circumvented somewhat using Get/SetVehicleParamsEx which do not require the vehicle to be respawned. It is worth noting however that the object will be disabled on a global scale, and this is only useful if only one player has the vehicle as an objective. /// Since 0.3a you will have to reapply this function when OnVehicleStreamIn is called. /// @@ -219,9 +224,9 @@ native SetVehicleZAngle(vehicleid, Float:angle); native SetVehicleParamsForPlayer(vehicleid, playerid, objective, doors); /// Use this function before any player connects (OnGameModeInit) to tell all clients that the script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when players enter/exit vehicles and headlights automatically coming on when it is dark. -/// -/// -/// +/// +/// +/// /// This Function was added in SA-MP 0.3c and will not work in earlier versions! /// Is it not possible to reverse this function after it has been used. You must either use it or not use it. /// This function always returns 1. It cannot fail to execute. @@ -236,9 +241,9 @@ native ManualVehicleEngineAndLights(); /// Bonnet (hood) status. 0 - Closed, 1 - Open /// Boot/trunk status. 0 - Closed, 1 - Open /// Toggle the objective arrow above the vehicle. 0 - Off, 1 - On -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// The alarm will not reset when finished, you'll need to reset it by yourself with this function. /// Lights also operate during the day (Only when ManualVehicleEngineAndLights is enabled). @@ -246,7 +251,7 @@ native ManualVehicleEngineAndLights(); /// 1: The function executed successfully.
    /// 0: The function failed to execute. This means the vehicle does not exist. ///
    -native SetVehicleParamsEx(vehicleid, e_VEHICLE_PARAMS:engine, e_VEHICLE_PARAMS:lights, e_VEHICLE_PARAMS:alarm, e_VEHICLE_PARAMS:doors, e_VEHICLE_PARAMS:bonnet, e_VEHICLE_PARAMS:boot, e_VEHICLE_PARAMS:objective); +native SetVehicleParamsEx(vehicleid, __TAG(VEHICLE_PARAMS):engine, __TAG(VEHICLE_PARAMS):lights, __TAG(VEHICLE_PARAMS):alarm, __TAG(VEHICLE_PARAMS):doors, __TAG(VEHICLE_PARAMS):bonnet, __TAG(VEHICLE_PARAMS):boot, __TAG(VEHICLE_PARAMS):objective); /// Gets a vehicle's parameters. /// The ID of the vehicle to get the parameters from @@ -257,14 +262,14 @@ native SetVehicleParamsEx(vehicleid, e_VEHICLE_PARAMS:engine, e_VEHICLE_PARAMS:l /// Get the bonnet/hood status. If 1, it's open /// Get the boot/trunk status. 1 means it is open /// Get the objective status. 1 means the objective is on -/// +/// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset'). -native GetVehicleParamsEx(vehicleid, &e_VEHICLE_PARAMS:engine, &e_VEHICLE_PARAMS:lights, &e_VEHICLE_PARAMS:alarm, &e_VEHICLE_PARAMS:doors, &e_VEHICLE_PARAMS:bonnet, &e_VEHICLE_PARAMS:boot, &e_VEHICLE_PARAMS:objective); +native GetVehicleParamsEx(vehicleid, &__TAG(VEHICLE_PARAMS):engine, &__TAG(VEHICLE_PARAMS):lights, &__TAG(VEHICLE_PARAMS):alarm, &__TAG(VEHICLE_PARAMS):doors, &__TAG(VEHICLE_PARAMS):bonnet, &__TAG(VEHICLE_PARAMS):boot, &__TAG(VEHICLE_PARAMS):objective); /// Returns a vehicle's siren state (on/off). /// The ID of the vehicle to get the siren state of -/// +/// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// -1 if unset (off), 0 if off, 1 if on native GetVehicleParamsSirenState(vehicleid); @@ -275,9 +280,9 @@ native GetVehicleParamsSirenState(vehicleid); /// The state of the passenger door. 1 to open, 0 to close /// The state of the rear left door (if available). 1 to open, 0 to close /// The state of the rear right door (if available). 1 to open, 0 to close -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// 1 is open, 0 is closed native SetVehicleParamsCarDoors(vehicleid, frontLeft, frontRight, rearLeft, rearRight); @@ -288,9 +293,9 @@ native SetVehicleParamsCarDoors(vehicleid, frontLeft, frontRight, rearLeft, rear /// The integer to save the state of the passenger's door to /// The integer to save the state of the rear left door to (if available) /// The integer to save the state of the rear right door to (if available) -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. native GetVehicleParamsCarDoors(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); @@ -301,9 +306,9 @@ native GetVehicleParamsCarDoors(vehicleid, &frontLeft, &frontRight, &rearLeft, & /// The state of the passenger window. 0 to open, 1 to close /// The state of the rear left window (if available). 0 to open, 1 to close /// The state of the rear right window (if available). 0 to open, 1 to close -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! native SetVehicleParamsCarWindows(vehicleid, frontLeft, frontRight, rearLeft, rearRight); @@ -313,9 +318,9 @@ native SetVehicleParamsCarWindows(vehicleid, frontLeft, frontRight, rearLeft, re /// The integer to save the state of the passengers window to /// The integer to save the state of the rear left window to (if available) /// The integer to save the state of the rear right window to (if available) -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3.7 and will not work in earlier versions! /// The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. /// The vehicle's windows state is stored in the specified variables. @@ -323,8 +328,8 @@ native GetVehicleParamsCarWindows(vehicleid, &frontLeft, &frontRight, &rearLeft, /// Sets a vehicle back to the position at where it was created. /// The ID of the vehicle to respawn -/// -/// +/// +/// /// /// 1: The function executed successfully.
    /// 0: The function failed to execute. The vehicle does not exist. @@ -334,8 +339,8 @@ native SetVehicleToRespawn(vehicleid); /// Links a vehicle to an interior. Vehicles can only be seen by players in the same interior (SetPlayerInterior). /// The ID of the vehicle to link to an interior /// The Interior ID to link it to -/// -/// +/// +/// /// /// 1: The function executed successfully.
    /// 0: The function failed to execute. This means the vehicle does not exist.
    @@ -352,29 +357,29 @@ native LinkVehicleToInterior(vehicleid, interiorid); /// ///
    /// Using an invalid component ID crashes the player's game. There are no internal checks for this. -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// native AddVehicleComponent(vehicleid, componentid); /// Remove a component from a vehicle. /// ID of the vehicle /// ID of the component to remove -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// native RemoveVehicleComponent(vehicleid, componentid); /// Change a vehicle's primary and secondary colours. /// The ID of the vehicle to change the colours of /// The new vehicle's primary Color ID /// The new vehicle's secondary Color ID -/// -/// +/// +/// /// Some vehicles have only a primary colour and some can not have the colour changed at all. A few (cement, squallo) have 4 colours, of which 2 can not be changed in SA:MP /// /// 1: The function executed successfully. The vehicle's colour was successfully changed.
    @@ -385,8 +390,8 @@ native ChangeVehicleColor(vehicleid, colour1, colour2); /// Change a vehicle's paintjob (for plain colours see ChangeVehicleColor). /// The ID of the vehicle to change the paintjob of /// The ID of the Paintjob to apply. Use 3 to remove a paintjob -/// -/// +/// +/// /// /// Known Bugs:
    /// This function calls OnVehicleRespray.
    @@ -398,10 +403,10 @@ native ChangeVehiclePaintjob(vehicleid, paintjobid); /// Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%). /// The ID of the vehicle to set the health of /// The health, given as a float value -/// -/// -/// -/// +/// +/// +/// +/// /// Full vehicle health is 1000, however higher values are possible and increase the health of the vehicle. /// /// Health:
    @@ -422,9 +427,9 @@ native SetVehicleHealth(vehicleid, Float:health); /// Get the health of a vehicle. /// The ID of the vehicle to get the health of /// A float variable in which to store the vehicle's health, passed by reference -/// -/// -/// +/// +/// +/// /// Full vehicle health is 1000, however higher values are possible and increase the health of the vehicle. /// /// Health:
    @@ -445,42 +450,42 @@ native GetVehicleHealth(vehicleid, &Float:health); /// Attach a vehicle to another vehicle as a trailer. /// The ID of the vehicle that will be pulled /// The ID of the vehicle that will pull the trailer -/// -/// -/// +/// +/// +/// /// This will only work if both vehicles are streamed in for a player (check IsVehicleStreamedIn). /// This function always returns 1, even if neither of the vehicle IDs passed are valid. native AttachTrailerToVehicle(trailerid, vehicleid); /// Detach the connection between a vehicle and its trailer, if any. /// ID of the pulling vehicle -/// -/// -/// +/// +/// +/// native DetachTrailerFromVehicle(vehicleid); /// Checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer to get the vehicle ID of the trailer (if any). /// The ID of the vehicle to check for trailers -/// -/// -/// +/// +/// +/// /// 1 if the vehicle has a trailer attached, 0 if not. native bool:IsTrailerAttachedToVehicle(vehicleid); /// Get the ID of the trailer attached to a vehicle. /// The ID of the vehicle to get the trailer of -/// -/// -/// +/// +/// +/// /// The vehicle ID of the trailer or 0 if no trailer is attached. native GetVehicleTrailer(vehicleid); /// Set a vehicle numberPlate. /// The ID of the vehicle to set the number plate of /// The text that should be displayed on the number plate -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// You can use colour embedding on the number plate text. /// @@ -499,20 +504,20 @@ native SetVehicleNumberPlate(vehicleid, const numberPlate[]); /// Gets the model ID of a vehicle. /// The ID of the vehicle to get the model of -/// -/// -/// -/// +/// +/// +/// +/// /// The vehicle's model ID, or 0 if the vehicle doesn't exist. native GetVehicleModel(vehicleid); /// Retrieves the installed component ID (modshop mod(ification)) on a vehicle in a specific slot. /// The ID of the vehicle to check for the component /// The component slot to check for components (see below) -/// -/// -/// -/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// Slots:
    @@ -543,23 +548,23 @@ native GetVehicleModel(vehicleid); /// ///
    /// The ID of the component installed in the specified slot. Returns 0 if no component in specified vehicle's specified slot, or if vehicle doesn't exist. -native GetVehicleComponentInSlot(vehicleid, e_CARMODTYPE:slot); // There is 1 slot for each CARMODTYPE_* +native GetVehicleComponentInSlot(vehicleid, __TAG(CARMODTYPE):slot); // There is 1 slot for each CARMODTYPE_* /// Find out what type of component a certain ID is. /// The component ID to check -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// The component slot ID of the specified component or -1 if the component is invalid. -native e_CARMODTYPE:GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID +native __TAG(CARMODTYPE):GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID /// Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.). /// The ID of the vehicle to repair -/// -/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// 1: The function executed successfully.
    @@ -572,9 +577,9 @@ native RepairVehicle(vehicleid); // Repairs the damage model and resets the heal /// A float variable in to which to store the vehicle's x velocity, passed by reference /// A float variable in to which to store the vehicle's y velocity, passed by reference /// A float variable in to which to store the vehicle's z velocity, passed by reference -/// -/// -/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// Multiply vector with 250.66667 for kmph or 199.416667 for mph or something... /// @@ -601,8 +606,8 @@ native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); /// The amount of velocity in the angular x direction /// The amount of velocity in the angular y direction /// The amount of velocity in the angular z direction -/// -/// +/// +/// /// This function was added in SA-MP 0.3b and will not work in earlier versions! /// This function has no effect on un-occupied vehicles and does not effect trains. /// @@ -617,11 +622,11 @@ native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); /// A variable to store the door damage data in, passed by reference /// A variable to store the light damage data in, passed by reference /// A variable to store the tire damage data in, passed by reference -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This Callback was added in SA-MP 0.3a and will not work in earlier versions! /// /// Door states:
    @@ -667,11 +672,11 @@ native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); /// A set of bits containing the door damage status /// A set of bits containing the light damage status /// A set of bits containing the tire damage status -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// /// Door states:
    @@ -713,7 +718,7 @@ native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); /// A float to store the x value /// A float to store the y value /// A float to store the z value -/// +/// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// /// Information types:
    @@ -729,28 +734,28 @@ native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); ///
  • VEHICLE_MODEL_INFO_REAR_BUMPER_Z - height of the rear bumper
  • /// ///
    -native GetVehicleModelInfo(vehiclemodel, e_VEHICLE_MODEL_INFO:infotype, &Float:x, &Float:y, &Float:z); +native GetVehicleModelInfo(vehiclemodel, __TAG(VEHICLE_MODEL_INFO):infotype, &Float:x, &Float:y, &Float:z); // Virtual Worlds /// Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their own virtual world. /// The ID of vehicle to set the virtual world of /// The ID of the virtual world to put the vehicle in -/// -/// +/// +/// native SetVehicleVirtualWorld(vehicleid, virtualWorld); /// Get the virtual world of a vehicle. /// The ID of the vehicle to get the virtual world of -/// -/// +/// +/// /// The virtual world that the vehicle is in. native GetVehicleVirtualWorld(vehicleid); /// Check if a vehicle ID is valid. /// The ID of the vehicle to check -/// -/// +/// +/// /// true or false. native bool:IsValidVehicle(vehicleid); From fc55463595f9109bf8241cd15005cdb45452a90b Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 9 May 2021 17:40:04 +0100 Subject: [PATCH 015/104] More correct tag syntax. --- a_http.inc | 2 +- a_npc.inc | 2 +- a_objects.inc | 4 ++-- a_players.inc | 32 ++++++++++++++++---------------- a_samp.inc | 24 ++++++++++++------------ a_vehicles.inc | 10 +++++----- 6 files changed, 37 insertions(+), 37 deletions(-) diff --git a/a_http.inc b/a_http.inc index 1ef1191..e2c240f 100644 --- a/a_http.inc +++ b/a_http.inc @@ -68,7 +68,7 @@ enum HTTP_ERROR: ///
  • + standard HTTP response codes
  • /// ///
    -native HTTP(index, __TAG(HTTP_METHOD):method, const url[], const data[], const callback[]); +native HTTP(index, HTTP_METHOD:method, const url[], const data[], const callback[]); // example HTTP callback: public MyHttpResponse(index, responseCode, const data[]) { ... } diff --git a/a_npc.inc b/a_npc.inc index 315b91d..1b8e2ec 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -644,7 +644,7 @@ native bool:IsPlayerConnected(playerid); /// The filename to be loaded, without the .rec extension /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! -native StartRecordingPlayback(__TAG(PLAYER_RECORDING_TYPE):playbacktype, const recordFile[]); +native StartRecordingPlayback(PLAYER_RECORDING_TYPE:playbacktype, const recordFile[]); /// This will stop the current .rec file which is being ran by the NPC, making it stay idle until some other order is given. /// diff --git a/a_objects.inc b/a_objects.inc index b9502e6..6f9bdce 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -592,7 +592,7 @@ native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const /// 1: The function executed successfully.
    /// 0: The function failed to execute. ///
    -native SetObjectMaterialText(objectid, const text[], materialIndex = 0, __TAG(OBJECT_MATERIAL_SIZE):materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, __TAG(OBJECT_MATERIAL_TEXT_ALIGN):textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); +native SetObjectMaterialText(objectid, const text[], materialIndex = 0, OBJECT_MATERIAL_SIZE:materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, OBJECT_MATERIAL_TEXT_ALIGN:textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); /// Replace the texture of a player object with text. /// The ID of the player whose player object to set the text of @@ -637,7 +637,7 @@ native SetObjectMaterialText(objectid, const text[], materialIndex = 0, __TAG(OB ///
  • OBJECT_MATERIAL_SIZE_512x512 140
  • /// ///
    -native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialIndex = 0, __TAG(OBJECT_MATERIAL_SIZE):materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, __TAG(OBJECT_MATERIAL_TEXT_ALIGN):textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); +native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialIndex = 0, OBJECT_MATERIAL_SIZE:materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, OBJECT_MATERIAL_TEXT_ALIGN:textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); /// Allows camera collisions with newly created objects to be disabled by default. /// 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) diff --git a/a_players.inc b/a_players.inc index f38ed89..6eba583 100644 --- a/a_players.inc +++ b/a_players.inc @@ -386,7 +386,7 @@ native GetPlayerAmmo(playerid); /// ///
    /// The state of the player's weapon. 0 if player specified does not exist. -native __TAG(WEAPONSTATE):GetPlayerWeaponState(playerid); +native WEAPONSTATE:GetPlayerWeaponState(playerid); /// Check who a player is aiming at. /// The ID of the player to get the target of @@ -637,7 +637,7 @@ native GetPlayerMoney(playerid); /// ///
    /// The player's current state as an integer. -native __TAG(PLAYER_STATE):GetPlayerState(playerid); +native PLAYER_STATE:GetPlayerState(playerid); /// Get the specified player's IP address and store it in a string. /// The ID of the player to get the IP address of @@ -786,7 +786,7 @@ native GetPlayerWantedLevel(playerid); ///
  • FIGHT_STYLE_ELBOW
  • /// ///
    -native SetPlayerFightingStyle(playerid, __TAG(FIGHT_STYLE):style); +native SetPlayerFightingStyle(playerid, FIGHT_STYLE:style); /// Get the fighting style the player currently using. /// The ID of the player to get the fighting style of @@ -804,7 +804,7 @@ native SetPlayerFightingStyle(playerid, __TAG(FIGHT_STYLE):style); /// ///
    /// The ID of the fighting style of the player. -native __TAG(FIGHT_STYLE):GetPlayerFightingStyle(playerid); +native FIGHT_STYLE:GetPlayerFightingStyle(playerid); /// Set a player's velocity on the x, y and z axes. /// The player to apply the speed to @@ -933,7 +933,7 @@ native SetPlayerShopName(playerid, const shopname[]); ///
  • WEAPONSKILL_SNIPERRIFLE(10)
  • /// ///
    -native SetPlayerSkillLevel(playerid, __TAG(WEAPONSKILL):skill, level); +native SetPlayerSkillLevel(playerid, WEAPONSKILL:skill, level); /// Get the ID of the vehicle that the player is surfing (stuck to the roof of). /// The ID of the player you want to know the surfing vehicle ID of @@ -1226,7 +1226,7 @@ native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:width, Float:heig /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! /// For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at PlayerTextDrawTextSize. -native PlayerTextDrawAlignment(playerid, PlayerText:text, __TAG(TEXT_DRAW_ALIGN):alignment); +native PlayerTextDrawAlignment(playerid, PlayerText:text, TEXT_DRAW_ALIGN:alignment); /// Sets the text colour of a player-textdraw. /// The ID of the player who's textdraw to set the colour of @@ -1670,7 +1670,7 @@ native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); /// ///
    /// Returns the type of the PVar. See table below. -native __TAG(PLAYER_VARTYPE):GetPVarType(playerid, const pvar[]); +native PLAYER_VARTYPE:GetPVarType(playerid, const pvar[]); #if MAX_CHATBUBBLE_LENGTH < 1 || MAX_CHATBUBBLE_LENGTH > 144 #error MAX_CHATBUBBLE_LENGTH must be >= 1 and <= 144 @@ -1857,7 +1857,7 @@ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibra /// ///
    /// The special action of the player. -native __TAG(SPECIAL_ACTION):GetPlayerSpecialAction(playerid); +native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); /// This function allows to set players special action. /// The player that should perform the action @@ -1903,7 +1903,7 @@ native __TAG(SPECIAL_ACTION):GetPlayerSpecialAction(playerid); /// 1: The function executed successfully.
    /// 0: The function failed to execute. This means the player is not connected. ///
    -native SetPlayerSpecialAction(playerid, __TAG(SPECIAL_ACTION):actionid); +native SetPlayerSpecialAction(playerid, SPECIAL_ACTION:actionid); /// Disables collisions between occupied vehicles for a player. /// The ID of the player for whom you want to disable collisions @@ -2053,7 +2053,7 @@ native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); /// 1: The function executed successfully.
    /// 0: The function failed to execute. Player is not connected. ///
    -native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, colour, __TAG(MAPICON):style = MAPICON_LOCAL); +native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, colour, MAPICON:style = MAPICON_LOCAL); /// Removes a map icon that was set earlier for a player using SetPlayerMapIcon. /// The ID of the player whose icon to remove @@ -2107,7 +2107,7 @@ native SetPlayerCameraPos(playerid,Float:x, Float:y, Float:z); /// 1: The function executed successfully.
    /// 0: The function failed to execute. The player specified does not exist. ///
    -native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, __TAG(CAMERA):cut = CAMERA_CUT); +native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, CAMERA:cut = CAMERA_CUT); /// Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos. /// The player you want to restore the camera for @@ -2266,7 +2266,7 @@ native AttachCameraToPlayerObject(playerid, objectid); /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, __TAG(CAMERA):cut = CAMERA_CUT); +native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAMERA:cut = CAMERA_CUT); /// Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. /// The ID of the player the camera should be moved for @@ -2283,7 +2283,7 @@ native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Flo /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, __TAG(CAMERA):cut = CAMERA_CUT); +native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAMERA:cut = CAMERA_CUT); // Player conditionals @@ -2412,7 +2412,7 @@ native TogglePlayerSpectating(playerid, bool:toggle); /// 1: The function executed successfully.
    /// 0: The function failed to execute. One of the players specified does not exist. ///
    -native PlayerSpectatePlayer(playerid, targetid, __TAG(SPECTATE_MODE):mode = SPECTATE_MODE_NORMAL); +native PlayerSpectatePlayer(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); /// Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. /// The ID of the player who should spectate a vehicle @@ -2426,7 +2426,7 @@ native PlayerSpectatePlayer(playerid, targetid, __TAG(SPECTATE_MODE):mode = SPEC /// 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.
    /// 0: The function failed to execute. The player, vehicle, or both don't exist. ///
    -native PlayerSpectateVehicle(playerid, targetid, __TAG(SPECTATE_MODE):mode = SPECTATE_MODE_NORMAL); +native PlayerSpectateVehicle(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); /// Starts recording a player's movements to a file, which can then be reproduced by an NPC. /// The ID of the player to record @@ -2434,7 +2434,7 @@ native PlayerSpectateVehicle(playerid, targetid, __TAG(SPECTATE_MODE):mode = SPE /// The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! -native StartRecordingPlayerData(playerid, __TAG(PLAYER_RECORDING_TYPE):recordType, const recordFile[]); +native StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE:recordType, const recordFile[]); /// Stops all the recordings that had been started with StartRecordingPlayerData for a specific player. /// The player you want to stop the recordings of diff --git a/a_samp.inc b/a_samp.inc index fcc9d7a..afb116e 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -169,8 +169,8 @@ enum PLAYER_STATE: #define PLAYER_STATE_ENTER_VEHICLE_PASSENGER (6) // Marker modes used by ShowPlayerMarkers() -#define PLAYER_MARKERS: __TAG(PLAYER_MARKERS): -enum PLAYER_MARKERS: +#define PLAYER_MARKERS_MODE: __TAG(PLAYER_MARKERS_MODE): +enum PLAYER_MARKERS_MODE: { PLAYER_MARKERS_MODE_OFF, PLAYER_MARKERS_MODE_GLOBAL, @@ -923,7 +923,7 @@ native GetSVarNameAtIndex(index, output[], size = sizeof (output)); /// ///
    /// Returns the type of the SVar. See table below. -native __TAG(SERVER_VARTYPE):GetSVarType(const svar[]); +native SERVER_VARTYPE:GetSVarType(const svar[]); // Game @@ -1123,7 +1123,7 @@ native ShowNameTags(bool:show); /// ///
    /// It is also possible to set a player's colour to a colour that has full transparency (no alpha value). This makes it possible to show markers on a per-player basis. -native ShowPlayerMarkers(__TAG(PLAYER_MARKERS):mode); +native ShowPlayerMarkers(PLAYER_MARKERS_MODE:mode); /// Ends the current gamemode. /// @@ -1861,7 +1861,7 @@ native TextDrawTextSize(Text:text, Float:width, Float:height); /// The ID of the textdraw to set the alignment of /// 1-left 2-centered 3-right /// For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at TextDrawTextSize, also position coordinate become position of center of textdraw and not left/top edges. -native TextDrawAlignment(Text:text, __TAG(TEXT_DRAW_ALIGN):alignment); +native TextDrawAlignment(Text:text, TEXT_DRAW_ALIGN:alignment); /// Sets the text colour of a textdraw. /// The ID of the textdraw to change the colour of. @@ -2323,7 +2323,7 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const /// 1: The function executed successfully.
    /// 0: The function failed to execute. This means the player is not connected.
    ///
    -native ShowPlayerDialog(playerid, dialogid, __TAG(DIALOG_STYLE):style, const caption[], const info[], const button1[], const button2[]); +native ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE:style, const caption[], const info[], const button1[], const button2[]); /// Get a players unique ID. /// The player to get the unique ID of @@ -2572,7 +2572,7 @@ forward OnPlayerExitVehicle(playerid, vehicleid); /// This callback does not handle returns.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerStateChange(playerid, /*__TAG(PLAYER_STATE):*/newstate, /*__TAG(PLAYER_STATE):*/oldstate); +forward OnPlayerStateChange(playerid, /*PLAYER_STATE:*/newstate, /*PLAYER_STATE:*/oldstate); /// This callback is called when a player enters the checkpoint set for that player. /// The player who entered the checkpoint @@ -3188,7 +3188,7 @@ forward OnPlayerRequestDownload(playerid, type, crc); /// 0 - Indicates that this callback will be passed to the next filterscript.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerClickPlayer(playerid, clickedplayerid, /*__TAG(CLICK_SOURCE):*/source); +forward OnPlayerClickPlayer(playerid, clickedplayerid, /*CLICK_SOURCE:*/source); /// This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). /// The ID of the player that edited an object @@ -3212,7 +3212,7 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, /*__TAG(CLICK_SOURCE):*/s /// 0 - Indicates that this callback will be passed to the next script.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerEditObject(playerid, playerobject, objectid, /*__TAG(EDIT_RESPONSE):*/response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); +forward OnPlayerEditObject(playerid, playerobject, objectid, /*EDIT_RESPONSE:*/response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); /// This callback is called when a player ends attached object edition mode. /// The ID of the player that ended edition mode @@ -3238,7 +3238,7 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, /*__TAG(EDIT_RESPON /// 0 - Indicates that this callback will be passed to the next script.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerEditAttachedObject(playerid, /*__TAG(EDIT_RESPONSE):*/response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); +forward OnPlayerEditAttachedObject(playerid, /*EDIT_RESPONSE:*/response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); /// This callback is called when a player selects an object after SelectObject has been used. /// The ID of the player that selected an object @@ -3255,7 +3255,7 @@ forward OnPlayerEditAttachedObject(playerid, /*__TAG(EDIT_RESPONSE):*/response, /// 0 - Indicates that this callback will be passed to the next script.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerSelectObject(playerid, /*__TAG(SELECT_OBJECT):*/type, objectid, modelid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerSelectObject(playerid, /*SELECT_OBJECT:*/type, objectid, modelid, Float:fX, Float:fY, Float:fZ); /// This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). /// The ID of the player that shot a weapon @@ -3297,7 +3297,7 @@ forward OnPlayerSelectObject(playerid, /*__TAG(SELECT_OBJECT):*/type, objectid, /// 1 - Allow the bullet to cause damage.
    /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. ///
    -forward OnPlayerWeaponShot(playerid, weaponid, /*__TAG(BULLET_HIT_TYPE):*/hittype, hitid, Float:fX, Float:fY, Float:fZ); +forward OnPlayerWeaponShot(playerid, weaponid, /*BULLET_HIT_TYPE:*/hittype, hitid, Float:fX, Float:fY, Float:fZ); /// This callback is called when a SendClientCheck request comletes /// The ID of the player checked diff --git a/a_vehicles.inc b/a_vehicles.inc index 3e4c268..144db57 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -251,7 +251,7 @@ native ManualVehicleEngineAndLights(); /// 1: The function executed successfully.
    /// 0: The function failed to execute. This means the vehicle does not exist. ///
    -native SetVehicleParamsEx(vehicleid, __TAG(VEHICLE_PARAMS):engine, __TAG(VEHICLE_PARAMS):lights, __TAG(VEHICLE_PARAMS):alarm, __TAG(VEHICLE_PARAMS):doors, __TAG(VEHICLE_PARAMS):bonnet, __TAG(VEHICLE_PARAMS):boot, __TAG(VEHICLE_PARAMS):objective); +native SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS:engine, VEHICLE_PARAMS:lights, VEHICLE_PARAMS:alarm, VEHICLE_PARAMS:doors, VEHICLE_PARAMS:bonnet, VEHICLE_PARAMS:boot, VEHICLE_PARAMS:objective); /// Gets a vehicle's parameters. /// The ID of the vehicle to get the parameters from @@ -265,7 +265,7 @@ native SetVehicleParamsEx(vehicleid, __TAG(VEHICLE_PARAMS):engine, __TAG(VEHICLE /// /// This function was added in SA-MP 0.3c and will not work in earlier versions! /// If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset'). -native GetVehicleParamsEx(vehicleid, &__TAG(VEHICLE_PARAMS):engine, &__TAG(VEHICLE_PARAMS):lights, &__TAG(VEHICLE_PARAMS):alarm, &__TAG(VEHICLE_PARAMS):doors, &__TAG(VEHICLE_PARAMS):bonnet, &__TAG(VEHICLE_PARAMS):boot, &__TAG(VEHICLE_PARAMS):objective); +native GetVehicleParamsEx(vehicleid, &VEHICLE_PARAMS:engine, &VEHICLE_PARAMS:lights, &VEHICLE_PARAMS:alarm, &VEHICLE_PARAMS:doors, &VEHICLE_PARAMS:bonnet, &VEHICLE_PARAMS:boot, &VEHICLE_PARAMS:objective); /// Returns a vehicle's siren state (on/off). /// The ID of the vehicle to get the siren state of @@ -548,7 +548,7 @@ native GetVehicleModel(vehicleid); /// ///
    /// The ID of the component installed in the specified slot. Returns 0 if no component in specified vehicle's specified slot, or if vehicle doesn't exist. -native GetVehicleComponentInSlot(vehicleid, __TAG(CARMODTYPE):slot); // There is 1 slot for each CARMODTYPE_* +native GetVehicleComponentInSlot(vehicleid, CARMODTYPE:slot); // There is 1 slot for each CARMODTYPE_* /// Find out what type of component a certain ID is. /// The component ID to check @@ -559,7 +559,7 @@ native GetVehicleComponentInSlot(vehicleid, __TAG(CARMODTYPE):slot); // There is /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// The component slot ID of the specified component or -1 if the component is invalid. -native __TAG(CARMODTYPE):GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID +native CARMODTYPE:GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID /// Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.). /// The ID of the vehicle to repair @@ -734,7 +734,7 @@ native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); ///
  • VEHICLE_MODEL_INFO_REAR_BUMPER_Z - height of the rear bumper
  • /// ///
    -native GetVehicleModelInfo(vehiclemodel, __TAG(VEHICLE_MODEL_INFO):infotype, &Float:x, &Float:y, &Float:z); +native GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO:infotype, &Float:x, &Float:y, &Float:z); // Virtual Worlds From 1c03741e9d899883a89577ee8c41e600bdb7bae1 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 9 May 2021 18:33:20 +0100 Subject: [PATCH 016/104] Callback tags. --- a_samp.inc | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index afb116e..fc0e54d 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -2572,7 +2572,10 @@ forward OnPlayerExitVehicle(playerid, vehicleid); /// This callback does not handle returns.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerStateChange(playerid, /*PLAYER_STATE:*/newstate, /*PLAYER_STATE:*/oldstate); +#if !defined PLAYER_STATE + #define PLAYER_STATE: _: +#endif +forward OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate); /// This callback is called when a player enters the checkpoint set for that player. /// The player who entered the checkpoint @@ -3188,7 +3191,10 @@ forward OnPlayerRequestDownload(playerid, type, crc); /// 0 - Indicates that this callback will be passed to the next filterscript.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerClickPlayer(playerid, clickedplayerid, /*CLICK_SOURCE:*/source); +#if !defined CLICK_SOURCE + #define CLICK_SOURCE: _: +#endif +forward OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source); /// This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). /// The ID of the player that edited an object @@ -3212,7 +3218,10 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, /*CLICK_SOURCE:*/source); /// 0 - Indicates that this callback will be passed to the next script.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerEditObject(playerid, playerobject, objectid, /*EDIT_RESPONSE:*/response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); +#if !defined EDIT_RESPONSE + #define EDIT_RESPONSE: _: +#endif +forward OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); /// This callback is called when a player ends attached object edition mode. /// The ID of the player that ended edition mode @@ -3238,7 +3247,10 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, /*EDIT_RESPONSE:*/r /// 0 - Indicates that this callback will be passed to the next script.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerEditAttachedObject(playerid, /*EDIT_RESPONSE:*/response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); +#if !defined EDIT_RESPONSE + #define EDIT_RESPONSE: _: +#endif +forward OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); /// This callback is called when a player selects an object after SelectObject has been used. /// The ID of the player that selected an object @@ -3255,7 +3267,10 @@ forward OnPlayerEditAttachedObject(playerid, /*EDIT_RESPONSE:*/response, index, /// 0 - Indicates that this callback will be passed to the next script.
    /// It is always called first in filterscripts. ///
    -forward OnPlayerSelectObject(playerid, /*SELECT_OBJECT:*/type, objectid, modelid, Float:fX, Float:fY, Float:fZ); +#if !defined SELECT_OBJECT + #define SELECT_OBJECT: _: +#endif +forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Float:fX, Float:fY, Float:fZ); /// This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). /// The ID of the player that shot a weapon @@ -3297,7 +3312,10 @@ forward OnPlayerSelectObject(playerid, /*SELECT_OBJECT:*/type, objectid, modelid /// 1 - Allow the bullet to cause damage.
    /// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. ///
    -forward OnPlayerWeaponShot(playerid, weaponid, /*BULLET_HIT_TYPE:*/hittype, hitid, Float:fX, Float:fY, Float:fZ); +#if !defined BULLET_HIT_TYPE + #define BULLET_HIT_TYPE: _: +#endif +forward OnPlayerWeaponShot(playerid, weaponid, BULLET_HIT_TYPE:hittype, hitid, Float:fX, Float:fY, Float:fZ); /// This callback is called when a SendClientCheck request comletes /// The ID of the player checked From 3704e4843211badfc6021055762bdfe9e5faa49f Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 9 May 2021 18:48:06 +0100 Subject: [PATCH 017/104] Document progressive tag enhancement. --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/README.md b/README.md index 79ca70f..863acf0 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,57 @@ The current latest version is **0.3.7-R2-2-1**. The master branch HEAD does not currently contain any RC libaries. +## Tags + +The latest version of the SA:MP includes introduce many more tags to functions and callbacks. These +are useful in the long run, but slightly annoying to upgrade to. There are three symbols: +`NO_TAGS`, `WEAK_TAGS`, and `STRONG_TAGS`; that you can define before including ``, each one +enabling progressively more checks: + +```pawn +#define STRONG_TAGS +#include +``` + +To encourage some adoption, the default is `WEAK_TAGS`. Most old code uses will simply give a +warning when the wrong tag is found: + +```pawn +// Gives a warning: +SetPlayerControllable(playerid, 1); + +// Should be: +SetPlayerControllable(playerid, true); +``` + +However, there's a problem - callbacks give an error: + +```pawn +forward OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate); + +public OnPlayerStateChange(playerid, newstate, oldstate) +{ +} +``` + +This gives an error, when it should be fine. Fixing it in a mode is easy - just use the correct +tags on the variables in the callbacks. Fixing it in a generic library needs a few extra lines to +define a default tag when one isn't found (i.e. the user isn't using the improved includes): + +```pawn +#if !defined PLAYER_STATE + // Use the default tag (none, `_:`) when the improved includes aren't found. + #define PLAYER_STATE: _: +#endif +public OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate) +{ + return Hooked_OnPlayerStateChange(playerid, newstate, oldstate); +} + +// Don't forget to use ALS as normal. +forward Hooked_OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate); +``` + ## Why? The package management system built into the `sampctl` tool is based on GitHub From cf78bdb15023d141e91b52c634c6e605459b6f63 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 9 May 2021 20:54:02 +0100 Subject: [PATCH 018/104] List of all updated callbacks. --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/README.md b/README.md index 863acf0..a3f3a47 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,62 @@ public OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstat forward Hooked_OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate); ``` +### Complete List + +* `OnPlayerStateChange` + +```pawn +#if !defined PLAYER_STATE + #define PLAYER_STATE: _: +#endif +forward OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate); +``` + +* `OnPlayerClickPlayer` + +```pawn +#if !defined CLICK_SOURCE + #define CLICK_SOURCE: _: +#endif +forward OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source); +``` + +* `OnPlayerEditObject` + +```pawn +#if !defined EDIT_RESPONSE + #define EDIT_RESPONSE: _: +#endif +forward OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); +``` + +* `OnPlayerEditAttachedObject` + +```pawn +#if !defined EDIT_RESPONSE + #define EDIT_RESPONSE: _: +#endif +forward OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); +``` + +* `OnPlayerSelectObject` + +```pawn +#if !defined SELECT_OBJECT + #define SELECT_OBJECT: _: +#endif +forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Float:fX, Float:fY, Float:fZ); +``` + +* `OnPlayerWeaponShot` + +```pawn +#if !defined BULLET_HIT_TYPE + #define BULLET_HIT_TYPE: _: +#endif +forward OnPlayerWeaponShot(playerid, weaponid, BULLET_HIT_TYPE:hittype, hitid, Float:fX, Float:fY, Float:fZ); +``` + ## Why? The package management system built into the `sampctl` tool is based on GitHub From 1d46eb28fc01a52f941bd63c41f5ac937ec165c1 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 11 May 2021 19:44:21 +0100 Subject: [PATCH 019/104] `KEY:`. --- README.md | 9 +++++++++ a_npc.inc | 2 +- a_players.inc | 2 +- a_samp.inc | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a3f3a47..cbdc244 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,15 @@ forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Fl forward OnPlayerWeaponShot(playerid, weaponid, BULLET_HIT_TYPE:hittype, hitid, Float:fX, Float:fY, Float:fZ); ``` +* `OnPlayerKeyStateChange` + +```pawn +#if !defined KEY + #define KEY: _: +#endif +forward OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys); +``` + ## Why? The package management system built into the `sampctl` tool is based on GitHub diff --git a/a_npc.inc b/a_npc.inc index 1b8e2ec..ffb7b61 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -553,7 +553,7 @@ native bool:IsVehicleStreamedIn(vehicleid); /// Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). /// As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. /// The keys are stored in the specified variables. -native GetPlayerKeys(playerid, &keys, &updown, &leftright); +native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); /// Gets the angle a player is facing. /// The player you want to get the angle of diff --git a/a_players.inc b/a_players.inc index 6eba583..570263a 100644 --- a/a_players.inc +++ b/a_players.inc @@ -681,7 +681,7 @@ native GetPlayerWeapon(playerid); /// Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). /// As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. /// The keys are stored in the specified variables. -native GetPlayerKeys(playerid, &keys, &updown, &leftright); +native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); /// Get a player's name. /// The ID of the player to get the name of diff --git a/a_samp.inc b/a_samp.inc index fc0e54d..c637cc9 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -2880,7 +2880,7 @@ forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); /// This callback does not handle returns.
    /// It is always called first in gamemode. ///
    -forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys); +forward OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys); /// This callback is called when someone attempts to log in to RCON in-game; successful or not. /// The IP of the player that tried to log in to RCON From e075fb135b4b198c7114b373317df58e963f8819 Mon Sep 17 00:00:00 2001 From: Y-Less Date: Tue, 31 Aug 2021 22:32:40 +0200 Subject: [PATCH 020/104] Internal enum names. --- a_samp.inc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index c637cc9..e588ee4 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -152,7 +152,7 @@ const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; // States #define PLAYER_STATE: __TAG(PLAYER_STATE): -enum PLAYER_STATE: +enum PLAYER_STATE:__PLAYER_STATE { PLAYER_STATE_NONE, PLAYER_STATE_ONFOOT, @@ -170,7 +170,7 @@ enum PLAYER_STATE: // Marker modes used by ShowPlayerMarkers() #define PLAYER_MARKERS_MODE: __TAG(PLAYER_MARKERS_MODE): -enum PLAYER_MARKERS_MODE: +enum PLAYER_MARKERS_MODE:__PLAYER_MARKERS_MODE { PLAYER_MARKERS_MODE_OFF, PLAYER_MARKERS_MODE_GLOBAL, @@ -179,7 +179,7 @@ enum PLAYER_MARKERS_MODE: // Weapons #define WEAPON: __TAG(WEAPON): -enum WEAPON: +enum WEAPON:__WEAPON { WEAPON_BRASSKNUCKLE = 1, WEAPON_GOLFCLUB, @@ -229,7 +229,7 @@ enum WEAPON: // Keys #define KEY: __TAG(KEY): -enum KEY: (<<= 1) +enum KEY:__KEY (<<= 1) { KEY_ACTION = 1, KEY_CROUCH, @@ -259,7 +259,7 @@ enum KEY: (<<= 1) // Player GUI Dialog #define DIALOG_STYLE: __TAG(DIALOG_STYLE): -enum DIALOG_STYLE: +enum DIALOG_STYLE:__DIALOG_STYLE { DIALOG_STYLE_MSGBOX, DIALOG_STYLE_INPUT, @@ -271,14 +271,14 @@ enum DIALOG_STYLE: // Text Draw #define TEXT_DRAW_FONT: __TAG(TEXT_DRAW_FONT): -enum TEXT_DRAW_FONT: +enum TEXT_DRAW_FONT:__TEXT_DRAW_FONT { TEXT_DRAW_FONT_SPRITE_DRAW = 4, TEXT_DRAW_FONT_MODEL_PREVIEW = 5, } #define TEXT_DRAW_ALIGN: __TAG(TEXT_DRAW_ALIGN): -enum TEXT_DRAW_ALIGN: +enum TEXT_DRAW_ALIGN:__TEXT_DRAW_ALIGN { TEXT_DRAW_ALIGN_LEFT = 1, TEXT_DRAW_ALIGN_CENTER, @@ -287,7 +287,7 @@ enum TEXT_DRAW_ALIGN: // SVar enumeration #define SERVER_VARTYPE: __TAG(SERVER_VARTYPE): -enum SERVER_VARTYPE: +enum SERVER_VARTYPE:__SERVER_VARTYPE { SERVER_VARTYPE_NONE, SERVER_VARTYPE_INT, @@ -297,7 +297,7 @@ enum SERVER_VARTYPE: // Artwork/NetModels #define DOWNLOAD_REQUEST: __TAG(DOWNLOAD_REQUEST): -enum DOWNLOAD_REQUEST: +enum DOWNLOAD_REQUEST:__DOWNLOAD_REQUEST { DOWNLOAD_REQUEST_EMPTY, DOWNLOAD_REQUEST_MODEL_FILE, @@ -305,13 +305,13 @@ enum DOWNLOAD_REQUEST: } #define CLICK_SOURCE: __TAG(CLICK_SOURCE): -enum CLICK_SOURCE: +enum CLICK_SOURCE:__CLICK_SOURCE { CLICK_SOURCE_SCOREBOARD } #define EDIT_RESPONSE: __TAG(EDIT_RESPONSE): -enum EDIT_RESPONSE: +enum EDIT_RESPONSE:__EDIT_RESPONSE { EDIT_RESPONSE_CANCEL, EDIT_RESPONSE_FINAL, @@ -319,14 +319,14 @@ enum EDIT_RESPONSE: } #define SELECT_OBJECT: __TAG(SELECT_OBJECT): -enum SELECT_OBJECT: +enum SELECT_OBJECT:__SELECT_OBJECT { SELECT_OBJECT_GLOBAL_OBJECT = 1, SELECT_OBJECT_PLAYER_OBJECT } #define BULLET_HIT_TYPE: __TAG(BULLET_HIT_TYPE): -enum BULLET_HIT_TYPE: +enum BULLET_HIT_TYPE:__BULLET_HIT_TYPE { BULLET_HIT_TYPE_NONE, BULLET_HIT_TYPE_PLAYER, From 367be13cf7f8cb8ac381667111e3f04f2f5588d4 Mon Sep 17 00:00:00 2001 From: Y-Less Date: Tue, 31 Aug 2021 22:37:18 +0200 Subject: [PATCH 021/104] Internal enum names. --- a_players.inc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/a_players.inc b/a_players.inc index 570263a..15c1c83 100644 --- a/a_players.inc +++ b/a_players.inc @@ -24,7 +24,7 @@ #endif #define SPECIAL_ACTION: __TAG(SPECIAL_ACTION): -enum SPECIAL_ACTION: +enum SPECIAL_ACTION:__SPECIAL_ACTION { SPECIAL_ACTION_NONE, SPECIAL_ACTION_DUCK, @@ -49,7 +49,7 @@ enum SPECIAL_ACTION: } #define FIGHT_STYLE: __TAG(FIGHT_STYLE): -enum FIGHT_STYLE: +enum FIGHT_STYLE:__FIGHT_STYLE { FIGHT_STYLE_NORMAL = 4, FIGHT_STYLE_BOXING, @@ -60,7 +60,7 @@ enum FIGHT_STYLE: } #define WEAPONSKILL: __TAG(WEAPONSKILL): -enum WEAPONSKILL: +enum WEAPONSKILL:__WEAPONSKILL { WEAPONSKILL_PISTOL, WEAPONSKILL_PISTOL_SILENCED, @@ -76,7 +76,7 @@ enum WEAPONSKILL: } #define WEAPONSTATE: __TAG(WEAPONSTATE): -enum WEAPONSTATE: +enum WEAPONSTATE:__WEAPONSTATE { WEAPONSTATE_UNKNOWN = -1, WEAPONSTATE_NO_BULLETS, @@ -87,7 +87,7 @@ enum WEAPONSTATE: // PVar enumeration #define PLAYER_VARTYPE: __TAG(PLAYER_VARTYPE): -enum PLAYER_VARTYPE: +enum PLAYER_VARTYPE:__PLAYER_VARTYPE { PLAYER_VARTYPE_NONE, PLAYER_VARTYPE_INT, @@ -96,7 +96,7 @@ enum PLAYER_VARTYPE: } #define MAPICON: __TAG(MAPICON): -enum MAPICON: +enum MAPICON:__MAPICON { MAPICON_LOCAL, // Displays in the player's local area MAPICON_GLOBAL, // Displays always @@ -105,7 +105,7 @@ enum MAPICON: } #define CAMERA: __TAG(CAMERA): -enum CAMERA: +enum CAMERA:__CAMERA { CAMERA_MOVE = 1, CAMERA_CUT @@ -113,7 +113,7 @@ enum CAMERA: // Spectating #define SPECTATE_MODE: __TAG(SPECTATE_MODE): -enum SPECTATE_MODE: +enum SPECTATE_MODE:_SPECTATE_MODE { SPECTATE_MODE_NORMAL = 1, SPECTATE_MODE_FIXED, @@ -122,7 +122,7 @@ enum SPECTATE_MODE: // Recording for NPC playback #define PLAYER_RECORDING_TYPE: __TAG(PLAYER_RECORDING_TYPE): -enum PLAYER_RECORDING_TYPE: +enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE { PLAYER_RECORDING_TYPE_NONE, PLAYER_RECORDING_TYPE_DRIVER, From 54eaddeaf2ea887b9eddd6e8c66c481e7e12199f Mon Sep 17 00:00:00 2001 From: Y-Less Date: Tue, 31 Aug 2021 22:38:44 +0200 Subject: [PATCH 022/104] Internal enum names. --- a_http.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a_http.inc b/a_http.inc index e2c240f..0c85a67 100644 --- a/a_http.inc +++ b/a_http.inc @@ -19,7 +19,7 @@ // HTTP requests #define HTTP_METHOD: __TAG(HTTP_METHOD): -enum HTTP_METHOD: +enum HTTP_METHOD:__HTTP_METHOD { HTTP_GET = 1, HTTP_POST, @@ -30,7 +30,7 @@ enum HTTP_METHOD: // These codes compliment ordinary HTTP response codes returned in 'responseCode' // (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error) #define HTTP_ERROR: __TAG(HTTP_ERROR): -enum HTTP_ERROR: +enum HTTP_ERROR:__HTTP_ERROR { HTTP_ERROR_BAD_HOST = 1, HTTP_ERROR_NO_SOCKET, From 32f9805033ccd32ea8a4b06bb36064f659c05f8f Mon Sep 17 00:00:00 2001 From: Y-Less Date: Tue, 31 Aug 2021 22:39:26 +0200 Subject: [PATCH 023/104] Internal enum names. --- a_npc.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index ffb7b61..fd9f7db 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -152,7 +152,7 @@ const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; // States #define PLAYER_STATE: __TAG(PLAYER_STATE): -enum PLAYER_STATE: +enum PLAYER_STATE:__PLAYER_STATE { PLAYER_STATE_NONE, PLAYER_STATE_ONFOOT, @@ -165,7 +165,7 @@ enum PLAYER_STATE: // Weapons #define WEAPON: __TAG(WEAPON): -enum WEAPON: +enum WEAPON:__WEAPON { WEAPON_BRASSKNUCKLE = 1, WEAPON_GOLFCLUB, @@ -215,7 +215,7 @@ enum WEAPON: // Keys #define KEY: __TAG(KEY): -enum KEY: (<<= 1) +enum KEY:__KEY (<<= 1) { KEY_ACTION = 1, KEY_CROUCH, @@ -244,7 +244,7 @@ enum KEY: (<<= 1) } #define PLAYER_RECORDING_TYPE: __TAG(PLAYER_RECORDING_TYPE): -enum PLAYER_RECORDING_TYPE: +enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE { PLAYER_RECORDING_TYPE_NONE, PLAYER_RECORDING_TYPE_DRIVER, From 8bd490d3d81e8f9ef6b46b4f77f352a4168ad891 Mon Sep 17 00:00:00 2001 From: Y-Less Date: Tue, 31 Aug 2021 22:39:49 +0200 Subject: [PATCH 024/104] Internal enum names. --- a_objects.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a_objects.inc b/a_objects.inc index 6f9bdce..c67c35d 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -19,7 +19,7 @@ // -------------------------------------------------- #define OBJECT_MATERIAL_SIZE: __TAG(OBJECT_MATERIAL_SIZE): -enum OBJECT_MATERIAL_SIZE: (+= 10) +enum OBJECT_MATERIAL_SIZE:__OBJECT_MATERIAL_SIZE (+= 10) { OBJECT_MATERIAL_SIZE_32x32 = 10, OBJECT_MATERIAL_SIZE_64x32, @@ -38,7 +38,7 @@ enum OBJECT_MATERIAL_SIZE: (+= 10) } #define OBJECT_MATERIAL_TEXT_ALIGN: __TAG(OBJECT_MATERIAL_TEXT_ALIGN): -enum OBJECT_MATERIAL_TEXT_ALIGN: +enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN { OBJECT_MATERIAL_TEXT_ALIGN_LEFT, OBJECT_MATERIAL_TEXT_ALIGN_CENT, From 7dc15f49f42d5beb465cdaa44ee6aadd1bfebf82 Mon Sep 17 00:00:00 2001 From: Y-Less Date: Tue, 31 Aug 2021 22:40:32 +0200 Subject: [PATCH 025/104] Internal enum names. --- a_vehicles.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/a_vehicles.inc b/a_vehicles.inc index 144db57..b98c6de 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -19,7 +19,7 @@ // -------------------------------------------------- #define CARMODTYPE: __TAG(CARMODTYPE): -enum CARMODTYPE: +enum CARMODTYPE:__CARMODTYPE { CARMODTYPE_SPOILER, CARMODTYPE_HOOD, @@ -38,7 +38,7 @@ enum CARMODTYPE: } #define VEHICLE_PARAMS: __TAG(VEHICLE_PARAMS): -enum VEHICLE_PARAMS: +enum VEHICLE_PARAMS:__VEHICLE_PARAMS { VEHICLE_PARAMS_UNSET = -1, VEHICLE_PARAMS_OFF, @@ -46,7 +46,7 @@ enum VEHICLE_PARAMS: } #define VEHICLE_MODEL_INFO: __TAG(VEHICLE_MODEL_INFO): -enum VEHICLE_MODEL_INFO: +enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO { VEHICLE_MODEL_INFO_SIZE = 1, VEHICLE_MODEL_INFO_FRONTSEAT, From 5ad1825b08090d557d7e3bd269a46b66f1198cca Mon Sep 17 00:00:00 2001 From: Y-Less Date: Sat, 4 Dec 2021 13:39:48 +0000 Subject: [PATCH 026/104] Fix a typo in `__SPECTATE_MODE` name. --- a_players.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a_players.inc b/a_players.inc index 15c1c83..911ee11 100644 --- a/a_players.inc +++ b/a_players.inc @@ -113,7 +113,7 @@ enum CAMERA:__CAMERA // Spectating #define SPECTATE_MODE: __TAG(SPECTATE_MODE): -enum SPECTATE_MODE:_SPECTATE_MODE +enum SPECTATE_MODE:__SPECTATE_MODE { SPECTATE_MODE_NORMAL = 1, SPECTATE_MODE_FIXED, From e13694a51a75d8c4d893577d22473026dc19b62e Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 4 Dec 2021 14:11:17 +0000 Subject: [PATCH 027/104] More robust file inclusion/lookup. --- a_samp.inc | 108 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 96 insertions(+), 12 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index e588ee4..2e483f8 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -387,19 +387,103 @@ enum BULLET_HIT_TYPE:__BULLET_HIT_TYPE public const SAMP_INCLUDES_VERSION = 0x037030; #pragma unused SAMP_INCLUDES_VERSION -#include -#include -#include -#include -#include
    -native SetPlayerAmmo(playerid, weaponid, ammo); +native SetPlayerAmmo(playerid, WEAPON:weaponid, ammo); /// Gets the amount of ammo in a player's current weapon. /// The ID of the player whose ammo to get @@ -533,7 +533,7 @@ native GetPlayerCustomSkin(playerid); /// 1: The function executed successfully.
    /// 0: The function failed to execute. This means the player is not connected.
    ///
    -native GivePlayerWeapon(playerid, weaponid, ammo); +native GivePlayerWeapon(playerid, WEAPON:weaponid, ammo); /// Removes all weapons from a player. /// The ID of the player whose weapons to remove @@ -557,7 +557,7 @@ native ResetPlayerWeapons(playerid); /// 1: The function executed successfully. Success is returned even when the function fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).
    /// 0: The function failed to execute. The player is not connected. ///
    -native SetPlayerArmedWeapon(playerid, weaponid); +native SetPlayerArmedWeapon(playerid, WEAPON:weaponid); /// Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot). /// The ID of the player whose weapon data to retrieve @@ -571,7 +571,7 @@ native SetPlayerArmedWeapon(playerid, weaponid); /// 1: The function executed successfully.
    /// 0: The function failed to execute. The player isn't connected and/or the weapon slot specified is invalid (valid is 0-12). ///
    -native GetPlayerWeaponData(playerid, slot, &weapons, &ammo); +native GetPlayerWeaponData(playerid, slot, &WEAPON:weapons, &ammo); /// Give money to or take money from a player. /// The ID of the player to give money to or take money from @@ -670,7 +670,7 @@ native GetPlayerPing(playerid); /// /// Prior to version 0.3z R1-2, when the player state is PLAYER_STATE_PASSENGER this function returns the weapon held by the player before they entered the vehicle. If a cheat is used to spawn a weapon inside a vehicle, this function will not report it. /// The ID of the player's current weapon. Returns -1 if the player specified does not exist. -native GetPlayerWeapon(playerid); +native WEAPON:GetPlayerWeapon(playerid); /// Check which keys a player is pressing. /// The ID of the player to get the keys of diff --git a/a_samp.inc b/a_samp.inc index 83a9ccd..90a34f7 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -232,6 +232,7 @@ enum WEAPON:__WEAPON WEAPON_VEHICLE = 49, WEAPON_DROWN = 53, WEAPON_COLLISION, + WEAPON_SPLAT = WEAPON_COLLISION, } // Keys From 29fa6faea9d1081a08fbc5a851358028667a192b Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 29 Jan 2022 14:09:08 +0000 Subject: [PATCH 034/104] Two small camel case fixes. --- a_npc.inc | 4 ++-- a_players.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index 6073b3c..c08e5cb 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -647,11 +647,11 @@ native GetPlayerName(playerid, name[], len = sizeof (name)); native bool:IsPlayerConnected(playerid); /// This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. -/// The type of recording to be loaded +/// The type of recording to be loaded /// The filename to be loaded, without the .rec extension /// /// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! -native StartRecordingPlayback(PLAYER_RECORDING_TYPE:playbacktype, const recordFile[]); +native StartRecordingPlayback(PLAYER_RECORDING_TYPE:playbackType, const recordFile[]); /// This will stop the current .rec file which is being ran by the NPC, making it stay idle until some other order is given. /// diff --git a/a_players.inc b/a_players.inc index f107109..0adf0be 100644 --- a/a_players.inc +++ b/a_players.inc @@ -890,7 +890,7 @@ native StopAudioStreamForPlayer(playerid); /// Loads or unloads an interior script for a player (for example the ammunation menu). /// The ID of the player to load the interior script for -/// The shop script to load. Leave blank ("") to unload scripts +/// The shop script to load. Leave blank ("") to unload scripts /// /// /// This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -908,7 +908,7 @@ native StopAudioStreamForPlayer(playerid); ///
  • "AMMUN5" Ammunation 5
  • /// /// -native SetPlayerShopName(playerid, const shopname[]); +native SetPlayerShopName(playerid, const shopName[]); /// Set the skill level of a certain weapon type for a player. /// The ID of the player to set the weapon skill of From b9aa7e938560a2eddb7e56ddbc6f3ac312d56fef Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 29 Jan 2022 14:53:06 +0000 Subject: [PATCH 035/104] More parameter renames, and `GPCI`. --- a_players.inc | 6 +++--- a_samp.inc | 13 ++++++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/a_players.inc b/a_players.inc index 0adf0be..6e4549b 100644 --- a/a_players.inc +++ b/a_players.inc @@ -1680,12 +1680,12 @@ native PLAYER_VARTYPE:GetPVarType(playerid, const pvar[]); /// The player which should have the chat bubble /// The text to display /// The text colour -/// The distance from where players are able to see the chat bubble -/// The time in miliseconds the bubble should be displayed for +/// The distance from where players are able to see the chat bubble +/// The time in miliseconds the bubble should be displayed for /// This function was added in SA-MP 0.3a and will not work in earlier versions! /// You can't see your own chatbubbles. The same applies to attached 3D text labels. /// You can use colour embedding for multiple colours in the message. -native SetPlayerChatBubble(playerid, const text[], colour, Float:drawdistance, expiretime); +native SetPlayerChatBubble(playerid, const text[], colour, Float:drawDistance, expireTime); // Player control diff --git a/a_samp.inc b/a_samp.inc index 90a34f7..72e3634 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -2419,9 +2419,16 @@ native ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE:style, const caption[], /// Get a players unique ID. /// The player to get the unique ID of -/// Where to save the unique ID -/// The size of "output" (the serial) -native gpci(playerid, output[], size = sizeof (output)); +/// Where to save the unique ID +/// The len of "serial" (the serial) +#pragma deprecated Use `GPCI`. +native gpci(playerid, serial[], len = lenof (serial)); + +/// Get a players unique ID. +/// The player to get the unique ID of +/// Where to save the unique ID +/// The len of "serial" (the serial) +native GPCI(playerid, serial[], len = lenof (serial)) = gpci; // -------------------------------------------------- // Forwards (Callback declarations) From 5ebff26898abf2433fbdd0e7364776492b298783 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 29 Jan 2022 20:13:48 +0000 Subject: [PATCH 036/104] Missing tags. --- a_npc.inc | 6 +++--- a_players.inc | 2 +- a_samp.inc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index c08e5cb..b18ad6e 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -502,7 +502,7 @@ native SendCommand(const command[]); /// /// /// The player's current state as an integer. -native GetPlayerState(playerid); +native PLAYER_STATE:GetPlayerState(playerid); /// Get the position of a player, represented by x, y and z coordinates. /// The ID of the player to get the position of @@ -525,7 +525,7 @@ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /// /// ID of the vehicle or 0 if not in a vehicle. native GetPlayerVehicleid(playerid); -native GetPlayerArmedWeapon(playerid); +native WEAPON:GetPlayerArmedWeapon(playerid); native GetPlayerHealth(playerid); native GetPlayerArmour(playerid); @@ -535,7 +535,7 @@ native GetPlayerArmour(playerid); /// /// /// The special action of the player. -native GetPlayerSpecialAction(playerid); +native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); /// Checks if a player is streamed in for an NPC. Only nearby players are streamed in. /// The ID of the player to check diff --git a/a_players.inc b/a_players.inc index 6e4549b..98c48b7 100644 --- a/a_players.inc +++ b/a_players.inc @@ -2090,7 +2090,7 @@ native AllowPlayerTeleport(playerid, bool:allow); /// 1: The function executed successfully.
    /// 0: The function failed to execute. The player specified doesn't exist. ///
    -native SetPlayerCameraPos(playerid,Float:x, Float:y, Float:z); +native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); /// Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos. /// The ID of the player whose camera to set diff --git a/a_samp.inc b/a_samp.inc index 72e3634..7473364 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -1241,7 +1241,7 @@ native SetWorldTime(hour); /// 1: The function executed successfully.
    /// 0: The function failed to execute. The weapon specified does not exist. ///
    -native GetWeaponName(weaponid, weapon[], len = sizeof (weapon)); +native GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); /// 1 to enable, 0 to disable tire popping /// This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. From 2a73ac8fce18932bbe124c9264800521e884d54d Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 30 Jan 2022 12:41:58 +0000 Subject: [PATCH 037/104] `GetPlayerVehicleid` -> `GetPlayerVehicleID`. --- a_npc.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a_npc.inc b/a_npc.inc index b18ad6e..e3d65b5 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -524,7 +524,7 @@ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /// /// /// ID of the vehicle or 0 if not in a vehicle. -native GetPlayerVehicleid(playerid); +native GetPlayerVehicleID(playerid); native WEAPON:GetPlayerArmedWeapon(playerid); native GetPlayerHealth(playerid); From 171bb782949bfb01376595bbbf2efd9745a86d2b Mon Sep 17 00:00:00 2001 From: Y_Less Date: Mon, 31 Jan 2022 14:58:25 +0000 Subject: [PATCH 038/104] Remove `lenof`. --- a_samp.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 7473364..ed62ea3 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -2420,15 +2420,15 @@ native ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE:style, const caption[], /// Get a players unique ID. /// The player to get the unique ID of /// Where to save the unique ID -/// The len of "serial" (the serial) +/// The size of "output" (the serial) #pragma deprecated Use `GPCI`. -native gpci(playerid, serial[], len = lenof (serial)); +native gpci(playerid, serial[], len = sizeof (serial)); /// Get a players unique ID. /// The player to get the unique ID of /// Where to save the unique ID -/// The len of "serial" (the serial) -native GPCI(playerid, serial[], len = lenof (serial)) = gpci; +/// The size of "serial" (the serial) +native GPCI(playerid, serial[], len = sizeof (serial)) = gpci; // -------------------------------------------------- // Forwards (Callback declarations) From f1667dfe5a66c68029f679308ebc923b6ebfa827 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Mon, 31 Jan 2022 15:18:31 +0000 Subject: [PATCH 039/104] Spacing fix. --- a_samp.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a_samp.inc b/a_samp.inc index ed62ea3..3032162 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -281,7 +281,7 @@ enum DIALOG_STYLE:__DIALOG_STYLE #define TEXT_DRAW_FONT: __TAG(TEXT_DRAW_FONT): enum TEXT_DRAW_FONT:__TEXT_DRAW_FONT { - TEXT_DRAW_FONT_SPRITE_DRAW = 4, + TEXT_DRAW_FONT_SPRITE_DRAW = 4, TEXT_DRAW_FONT_MODEL_PREVIEW = 5, } From ebea75e52ef49af5bedab676b8c47855b78a43be Mon Sep 17 00:00:00 2001 From: Y_Less Date: Mon, 31 Jan 2022 15:30:45 +0000 Subject: [PATCH 040/104] Rename `CAMERA:` to `CAM_MOVE:` and add `CAM_MODE:`, for less clashy names. --- a_players.inc | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/a_players.inc b/a_players.inc index 98c48b7..61334fb 100644 --- a/a_players.inc +++ b/a_players.inc @@ -104,13 +104,33 @@ enum MAPICON:__MAPICON MAPICON_GLOBAL_CHECKPOINT // Displays always and has a checkpoint marker } -#define CAMERA: __TAG(CAMERA): -enum CAMERA:__CAMERA +#define CAM_MOVE: __TAG(CAM_MOVE): +enum CAM_MOVE:__CAMERA { CAMERA_MOVE = 1, CAMERA_CUT } +#define CAM_MODE: __TAG(CAM_MODE): +enum CAM_MODE:__CAM_MODE +{ + CAM_MODE_DISCONNECTED = -1, + CAM_MODE_NONE = 0, + CAM_MODE_BEHINDCAR = 3, + CAM_MODE_FOLLOWPED = 4, + CAM_MODE_SNIPER = 7, + CAM_MODE_ROCKETLAUNCHER = 8, + CAM_MODE_FIXED = 15, + CAM_MODE_1STPERSON = 16, + CAM_MODE_CAM_ON_A_STRING = 18, + CAM_MODE_BEHINDBOAT = 22, + CAM_MODE_CAMERA = 46, + CAM_MODE_ROCKETLAUNCHER_HS = 51, + CAM_MODE_AIMWEAPON = 53, + CAM_MODE_AIMWEAPON_FROMCAR = 55, + CAM_MODE_DW_HELI_CHASE = 56 +} + // Spectating #define SPECTATE_MODE: __TAG(SPECTATE_MODE): enum SPECTATE_MODE:__SPECTATE_MODE @@ -2107,7 +2127,7 @@ native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); /// 1: The function executed successfully.
    /// 0: The function failed to execute. The player specified does not exist. ///
    -native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, CAMERA:cut = CAMERA_CUT); +native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, CAM_MOVE:cut = CAMERA_CUT); /// Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos. /// The player you want to restore the camera for @@ -2151,7 +2171,7 @@ native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z); /// /// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! /// The camera mode as an integer (or -1 if player is not connected). -native GetPlayerCameraMode(playerid); +native CAM_MODE:GetPlayerCameraMode(playerid); /// Toggle camera targeting functions for a player. Disabled by default to save bandwidth. /// The ID of the player to toggle camera targeting functions for @@ -2266,7 +2286,7 @@ native AttachCameraToPlayerObject(playerid, objectid); /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAMERA:cut = CAMERA_CUT); +native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAM_MOVE:cut = CAMERA_CUT); /// Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. /// The ID of the player the camera should be moved for @@ -2283,7 +2303,7 @@ native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Flo /// /// This function was added in SA-MP 0.3e and will not work in earlier versions! /// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. -native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAMERA:cut = CAMERA_CUT); +native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAM_MOVE:cut = CAMERA_CUT); // Player conditionals From 6ffb6a89d3ff60ff1ebd041924e98fae418ef822 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Mon, 31 Jan 2022 21:54:59 +0000 Subject: [PATCH 041/104] Fonts and `centre`. --- a_samp.inc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 3032162..bb2e5b3 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -281,15 +281,20 @@ enum DIALOG_STYLE:__DIALOG_STYLE #define TEXT_DRAW_FONT: __TAG(TEXT_DRAW_FONT): enum TEXT_DRAW_FONT:__TEXT_DRAW_FONT { - TEXT_DRAW_FONT_SPRITE_DRAW = 4, - TEXT_DRAW_FONT_MODEL_PREVIEW = 5, + TEXT_DRAW_FONT_0, + TEXT_DRAW_FONT_1, + TEXT_DRAW_FONT_2, + TEXT_DRAW_FONT_3, + TEXT_DRAW_FONT_SPRITE_DRAW, + TEXT_DRAW_FONT_MODEL_PREVIEW, } #define TEXT_DRAW_ALIGN: __TAG(TEXT_DRAW_ALIGN): enum TEXT_DRAW_ALIGN:__TEXT_DRAW_ALIGN { TEXT_DRAW_ALIGN_LEFT = 1, - TEXT_DRAW_ALIGN_CENTER, + TEXT_DRAW_ALIGN_CENTRE, + TEXT_DRAW_ALIGN_CENTER = TEXT_DRAW_ALIGN_CENTRE, TEXT_DRAW_ALIGN_RIGHT } @@ -2006,7 +2011,7 @@ native TextDrawBackgroundColor(Text:text, colour); /// The TextDraw to change /// There are four font styles, see http://wiki.sa-mp.com/wiki/PlayerTextDrawFont. Font value 4 specifies that this is a txd sprite; 5 specifies that this textdraw can display preview models. A font value greater than 5 does not display, and anything greater than 16 crashes the client /// If you want to change the font of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. -native TextDrawFont(Text:text, font); +native TextDrawFont(Text:text, TEXT_DRAW_FONT:font); /// Appears to scale text spacing to a proportional ratio. Useful when using TextDrawLetterSize to ensure the text has even character spacing. /// The ID of the textdraw to set the proportionality of From 7e89741c0c5f90b1d164311dcf3447df0aa06402 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Mon, 31 Jan 2022 21:55:10 +0000 Subject: [PATCH 042/104] TD fonts. --- a_players.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a_players.inc b/a_players.inc index 61334fb..7c223f4 100644 --- a/a_players.inc +++ b/a_players.inc @@ -1403,7 +1403,7 @@ native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); /// /// /// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -native PlayerTextDrawFont(playerid, PlayerText:text, font); +native PlayerTextDrawFont(playerid, PlayerText:text, TEXT_DRAW_FONT:font); /// Appears to scale text spacing to a proportional ratio. Useful when using PlayerTextDrawLetterSize to ensure the text has even character spacing. /// The ID of the player whose player-textdraw to set the proportionality of From 9e171527a7808c1e85799f04c8aa2e9324c5a9b4 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Wed, 2 Feb 2022 19:46:50 +0000 Subject: [PATCH 043/104] `forceSync` isn't a boolean. --- a_players.inc | 4 ++-- a_samp.inc | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/a_players.inc b/a_players.inc index 7c223f4..3cf7c27 100644 --- a/a_players.inc +++ b/a_players.inc @@ -1809,7 +1809,7 @@ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); /// The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. /// An invalid animation library will crash the player's game. /// This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). -native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, bool:forceSync = false); +native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, FORCE_SYNC:forceSync = SYNC_NONE); /// Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). /// The ID of the player to clear the animations of @@ -1818,7 +1818,7 @@ native ApplyAnimation(playerid, const animationLibrary[], const animationName[], /// ClearAnimations doesn't do anything when the animation ends if we pass 1 for the freeze parameter in ApplyAnimation. /// Unlike some other ways to remove player from a vehicle, this will also reset the vehicle's velocity to zero, instantly stopping the car. Player will appear on top of the vehicle with the same location as he was in his car seat. /// This function always returns 1, even when the player specified is not connected. -native ClearAnimations(playerid, bool:forceSync = false); +native ClearAnimations(playerid, FORCE_SYNC:forceSync = SYNC_NONE); /// Returns the index of any running applied animations. /// ID of the player of whom you want to get the animation index of diff --git a/a_samp.inc b/a_samp.inc index bb2e5b3..9f1b1ab 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -348,6 +348,14 @@ enum BULLET_HIT_TYPE:__BULLET_HIT_TYPE BULLET_HIT_TYPE_PLAYER_OBJECT } +#define FORCE_SYNC: __TAG(FORCE_SYNC): +enum FORCE_SYNC:__FORCE_SYNC +{ + SYNC_NONE, // Don't force sync to anyone else. + SYNC_ALL, // Sync to all streamed-in players. + SYNC_OTHER // Sync to all streamed-in players, except the player with the animation. +} + // Limits #if MAX_PLAYER_NAME < 3 || MAX_PLAYER_NAME > 24 #error MAX_PLAYER_NAME must be >= 3 and <= 24 From 643f3bb36a262df63cc5abca5acff2df23ef414f Mon Sep 17 00:00:00 2001 From: Y-Less Date: Wed, 2 Feb 2022 20:37:57 +0000 Subject: [PATCH 044/104] Move readme sections to make more sense. --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 232ac92..97614b1 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,14 @@ The current latest version is **0.3.7-R2-2-1**. The master branch HEAD does not currently contain any RC libaries. +## Why? + +The package management system built into the `sampctl` tool is based on GitHub +(Similar to that of the Go language) so it simplifies the process to have the +standard library stored here on GitHub too. This means there doesn't need to be +any special-case code written for the standard library, it can just be a package +like all others. + ## Tags The latest version of the SA:MP includes introduce many more tags to functions and callbacks. These @@ -123,14 +131,6 @@ forward OnPlayerWeaponShot(playerid, weaponid, BULLET_HIT_TYPE:hittype, hitid, F forward OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys); ``` -## Why? - -The package management system built into the `sampctl` tool is based on GitHub -(Similar to that of the Go language) so it simplifies the process to have the -standard library stored here on GitHub too. This means there doesn't need to be -any special-case code written for the standard library, it can just be a package -like all others. - ## How Do Versions Work? ### Versions are represented by [Git Tags](https://help.github.com/articles/working-with-tags/) From 7927f63785d96276ed19b34a700c73999bb2c047 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 5 Feb 2022 11:52:11 +0000 Subject: [PATCH 045/104] Variable name fix. --- a_samp.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 9f1b1ab..7c2fc46 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -1395,8 +1395,8 @@ native bool:IsPlayerNPC(playerid); native AddCharModel(baseid, newid, const dff[], const textureLibrary[]); native AddSimpleModel(virtualWorld, baseid, newid, const dff[], const textureLibrary[]); native AddSimpleModelTimed(virtualWorld, baseid, newid, const dff[], const textureLibrary[], timeOn, timeOff); -native FindModelFileNameFromCRC(crc, output[], retstr_size = sizeof (output)); -native FindTextureFileNameFromCRC(crc, output[], retstr_size = sizeof (output)); +native FindModelFileNameFromCRC(crc, output[], size = sizeof (output)); +native FindTextureFileNameFromCRC(crc, output[], size = sizeof (output)); native RedirectDownload(playerid, const url[]); // Admin From f9d22ce03fb5296ae2aa652dbad9a761ad591001 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 22 Feb 2022 10:35:50 +0000 Subject: [PATCH 046/104] Fix the pawndoc bug on `print`/`printf`. --- a_samp.inc | 76 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 7c2fc46..e93d22d 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -563,40 +563,58 @@ open.mp releases can use `A` as the first digit. // Util -#if !defined _console_included - #define _console_included - - /// Prints a string to the server console (not in-game chat) and logs (server_log.txt). - /// The string to print - /// +/// Prints a string to the server console (not in-game chat) and logs (server_log.txt). +/// The string to print +/// +#if defined _console_included + static stock a_samp_unused_print(const string[]) + { + #pragma unused string + // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still + // put in the output, unattached to any function. So make a function. + } +#else native print(const string[]); +#endif - /// Outputs a formatted string on the console (the server window, not the in-game chat). - /// The format string - /// Indefinite number of arguments of any tag - /// - /// - /// The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. - /// This function doesn't support packed strings. - /// - /// Format Specifiers:
    - ///
      - ///
    • %i - integer (whole number)
    • - ///
    • %d - integer (whole number).
    • - ///
    • %s - string
    • - ///
    • %f - floating-point number (Float: tag)
    • - ///
    • %c - ASCII character
    • - ///
    • %x - hexadecimal number
    • - ///
    • %b - binary number
    • - ///
    • %% - literal %
    • - ///
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • - ///
    - ///
    - /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. - /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) +/// Outputs a formatted string on the console (the server window, not the in-game chat). +/// The format string +/// Indefinite number of arguments of any tag +/// +/// +/// The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. +/// This function doesn't support packed strings. +/// +/// Format Specifiers:
    +///
      +///
    • %i - integer (whole number)
    • +///
    • %d - integer (whole number).
    • +///
    • %s - string
    • +///
    • %f - floating-point number (Float: tag)
    • +///
    • %c - ASCII character
    • +///
    • %x - hexadecimal number
    • +///
    • %b - binary number
    • +///
    • %% - literal %
    • +///
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • +///
    +///
    +/// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. +/// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) +#if defined _console_included + static stock a_samp_unused_printf(const format[], {Float, _}:...) + { + #pragma unused format + // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still + // put in the output, unattached to any function. So make a function. + } +#else native printf(const format[], {Float, _}:...); #endif +#if !defined _console_included + #define _console_included +#endif + /// Formats a string to include variables and other strings inside it. /// The string to output the result to /// The maximum length output can contain From 9f1f59fa53aaaf6677814d9691ee9fe7220bf6d6 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 16:11:30 +0000 Subject: [PATCH 047/104] Switch pawndoc style. --- a_actor.inc | 386 ++-- a_http.inc | 60 +- a_npc.inc | 682 ++++--- a_objects.inc | 1122 ++++++----- a_players.inc | 4335 +++++++++++++++++++++------------------- a_samp.inc | 5199 ++++++++++++++++++++++++++---------------------- a_sampdb.inc | 202 +- a_vehicles.inc | 1302 ++++++------ 8 files changed, 7164 insertions(+), 6124 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 54da024..3b2d1f6 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -1,6 +1,6 @@ /* SA-MP Actor Functions * - * (c) Copyright 2015, SA-MP Team + * (c) Copyright 2015, SA-MP Team * */ @@ -14,211 +14,243 @@ #pragma tabsize 4 -/// 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. -/// The model ID (skin ID) the actor should have -/// The x coordinate to create the actor at -/// The y coordinate to create the actor at -/// The z coordinate to create the actor at -/// The facing angle (rotation) for the actor to have -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// -/// Actors are completely separate from NPCs. They do NOT use player IDs/slots on the server and CANNOT be handled like NPCs.
    -/// Actors are limited to 1000 (MAX_ACTORS).
    -/// Actors can be pushed by vehicles, use a timer to put them back at their positions.
    -/// As of 0.3.7 R2 actors default to being invulnerable. -///
    -/// -/// The created Actor ID (start at 0).
    -/// INVALID_ACTOR_ID (65535) If the actor limit (1000) is reached. -///
    +/** + * 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. + * The model ID (skin ID) the actor should have + * The x coordinate to create the actor at + * The y coordinate to create the actor at + * The z coordinate to create the actor at + * The facing angle (rotation) for the actor to have + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * + * Actors are completely separate from NPCs. They do NOT use player IDs/slots on the server and CANNOT be handled like NPCs.
    + * Actors are limited to 1000 (MAX_ACTORS).
    + * Actors can be pushed by vehicles, use a timer to put them back at their positions.
    + * As of 0.3.7 R2 actors default to being invulnerable. + *
    + * + * The created Actor ID (start at 0).
    + * INVALID_ACTOR_ID (65535) If the actor limit (1000) is reached. + *
    + */ native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); -/// Destroy an actor which was created with CreateActor. -/// The ID of the actor to destroy. Returned by CreateActor -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The actor with the ID specified does not exist. -///
    +/** + * Destroy an actor which was created with CreateActor. + * The ID of the actor to destroy. Returned by CreateActor + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The actor with the ID specified does not exist. + *
    + */ native DestroyActor(actorid); -/// Checks if an actor is streamed in for a player. -/// The ID of the actor -/// The ID of the player -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// 1 if the actor is streamed in for the player, or 0 if it is not. +/** + * Checks if an actor is streamed in for a player. + * The ID of the actor + * The ID of the player + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * 1 if the actor is streamed in for the player, or 0 if it is not. + */ native bool:IsActorStreamedIn(actorid, playerid); -/// Set the virtual world of an actor. Only players in the same world will see the actor. -/// The ID of the actor (returned by CreateActor) to set the virtual world of -/// The virtual world to put the actor ID -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The actor specified does not exist. -///
    +/** + * Set the virtual world of an actor. Only players in the same world will see the actor. + * The ID of the actor (returned by CreateActor) to set the virtual world of + * The virtual world to put the actor ID + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The actor specified does not exist. + *
    + */ native SetActorVirtualWorld(actorid, virtualWorld); -/// Get the virtual world of an actor. -/// The ID of the actor to get the virtual world of -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The virtual world of the actor. By default this is 0. Also returns 0 if actor specified does not exist. +/** + * Get the virtual world of an actor. + * The ID of the actor to get the virtual world of + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * The virtual world of the actor. By default this is 0. Also returns 0 if actor specified does not exist. + */ native GetActorVirtualWorld(actorid); -/// Apply an animation to an actor. -/// The ID of the actor to apply the animation to -/// The animation library from which to apply an animation -/// The name of the animation to apply, within the specified library -/// The speed to play the animation (use 4.1) -/// If set to 1, the animation will loop. If set to 0, the animation will play once -/// If set to 0, the actor is returned to their old x coordinate once the animation is complete (for animations that move the actor such as walking). 1 will not return them to their old position -/// Same as above but for the y axis. Should be kept the same as the previous parameter -/// Setting this to 1 will freeze an actor at the end of the animation. 0 will not -/// Timer in milliseconds. For a never-ending loop it should be 0 -/// -/// You must preload the animation library for the player the actor will be applying the animation for, and not for the actor. Otherwise, the animation won't be applied to the actor until the function is executed again. -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The actor specified does not exist. -///
    +/** + * Apply an animation to an actor. + * The ID of the actor to apply the animation to + * The animation library from which to apply an animation + * The name of the animation to apply, within the specified library + * The speed to play the animation (use 4.1) + * If set to 1, the animation will loop. If set to 0, the animation will play once + * If set to 0, the actor is returned to their old x coordinate once the animation is complete (for animations that move the actor such as walking). 1 will not return them to their old position + * Same as above but for the y axis. Should be kept the same as the previous parameter + * Setting this to 1 will freeze an actor at the end of the animation. 0 will not + * Timer in milliseconds. For a never-ending loop it should be 0 + * + * You must preload the animation library for the player the actor will be applying the animation for, and not for the actor. Otherwise, the animation won't be applied to the actor until the function is executed again. + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The actor specified does not exist. + *
    + */ native ApplyActorAnimation(actorid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); -/// Clear any animations applied to an actor. -/// The ID of the actor (returned by CreateActor) to clear the animations for -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The actor specified does not exist. -///
    +/** + * Clear any animations applied to an actor. + * The ID of the actor (returned by CreateActor) to clear the animations for + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The actor specified does not exist. + *
    + */ native ClearActorAnimations(actorid); -/// Set the position of an actor. -/// The ID of the actor to set the position of. Returned by CreateActor -/// The x coordinate to position the actor at -/// The y coordinate to position the actor at -/// The z coordinate to position the actor at -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// When creating an actor with CreateActor, you specify it's position. You do not need to use this function unless you want to change its position later. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The actor specified does not exist. -///
    +/** + * Set the position of an actor. + * The ID of the actor to set the position of. Returned by CreateActor + * The x coordinate to position the actor at + * The y coordinate to position the actor at + * The z coordinate to position the actor at + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * When creating an actor with CreateActor, you specify it's position. You do not need to use this function unless you want to change its position later. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The actor specified does not exist. + *
    + */ native SetActorPos(actorid, Float:x, Float:y, Float:z); -/// Get the position of an actor. -/// The ID of the actor to get the position of. Returned by CreateActor -/// A float variable, passed by reference, in which to store the x coordinate of the actor -/// A float variable, passed by reference, in which to store the y coordinate of the actor -/// A float variable, passed by reference, in which to store the z coordinate of the actor -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The actor specified does not exist.
    -///
    +/** + * Get the position of an actor. + * The ID of the actor to get the position of. Returned by CreateActor + * A float variable, passed by reference, in which to store the x coordinate of the actor + * A float variable, passed by reference, in which to store the y coordinate of the actor + * A float variable, passed by reference, in which to store the z coordinate of the actor + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The actor specified does not exist.
    + *
    + */ native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); -/// Set the facing angle of an actor. -/// The ID of the actor to set the facing angle of. Returned by CreateActor -/// The facing angle to set for the actor -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// Players will see actor's facing angle changed only when it is restreamed to them. -/// When creating an actor with CreateActor, you specify it's facing angle. You do not need to use this function unless you want to change its facing angle later. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The actor specified does not exist. -///
    +/** + * Set the facing angle of an actor. + * The ID of the actor to set the facing angle of. Returned by CreateActor + * The facing angle to set for the actor + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * Players will see actor's facing angle changed only when it is restreamed to them. + * When creating an actor with CreateActor, you specify it's facing angle. You do not need to use this function unless you want to change its facing angle later. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The actor specified does not exist. + *
    + */ native SetActorFacingAngle(actorid, Float:angle); -/// Get the facing angle of an actor. -/// The ID of the actor to get the facing angle of. Returned by CreateActor -/// A float variable, passed by reference, in to which the actor's facing angle will be stored -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The actor specified does not exist. -///
    +/** + * Get the facing angle of an actor. + * The ID of the actor to get the facing angle of. Returned by CreateActor + * A float variable, passed by reference, in to which the actor's facing angle will be stored + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The actor specified does not exist. + *
    + */ native GetActorFacingAngle(actorid, &Float:angle); -/// Set the health of an actor. -/// The ID of the actor to set the health of -/// The value to set the actors's health to -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// -/// 1 on success.
    -/// 0 on failure (i.e. actor is not created). -///
    +/** + * Set the health of an actor. + * The ID of the actor to set the health of + * The value to set the actors's health to + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * + * 1 on success.
    + * 0 on failure (i.e. actor is not created). + *
    + */ native SetActorHealth(actorid, Float:health); -/// Get the health of an actor. -/// The ID of the actor to get the health of -/// A float variable, passed by reference, in to which to store the actor's health -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// -/// 1 - success.
    -/// 0 - failure (i.e. actor is not created).
    -///
    +/** + * Get the health of an actor. + * The ID of the actor to get the health of + * A float variable, passed by reference, in to which to store the actor's health + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * + * 1 - success.
    + * 0 - failure (i.e. actor is not created).
    + *
    + */ native GetActorHealth(actorid, &Float:health); -/// Toggle an actor's invulnerability. -/// The ID of the actor to set invulnerability -/// false to make them vulnerable, true to make them invulnerable (optional=true) -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// Once set invulnerable, the actor does not call OnPlayerGiveDamageActor. -/// Players will have actor's invulnerability state changed only when it is restreamed to them. -/// -/// 1 - Success.
    -/// 0 - Failure (i.e. Actor is not created). -///
    +/** + * Toggle an actor's invulnerability. + * The ID of the actor to set invulnerability + * false to make them vulnerable, true to make them invulnerable (optional=true) + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * Once set invulnerable, the actor does not call OnPlayerGiveDamageActor. + * Players will have actor's invulnerability state changed only when it is restreamed to them. + * + * 1 - Success.
    + * 0 - Failure (i.e. Actor is not created). + *
    + */ native SetActorInvulnerable(actorid, bool:invulnerable = true); -/// Check if an actor is invulnerable. -/// The ID of the actor to check -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// 1 if the actor is invulnerable, 0 otherwise. +/** + * Check if an actor is invulnerable. + * The ID of the actor to check + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * 1 if the actor is invulnerable, 0 otherwise. + */ native bool:IsActorInvulnerable(actorid); -/// Checks if an actor ID is valid. -/// The ID of the actor to check -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// 1 if the actor is valid, 0 if not. +/** + * Checks if an actor ID is valid. + * The ID of the actor to check + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * 1 if the actor is valid, 0 if not. + */ native bool:IsValidActor(actorid); diff --git a/a_http.inc b/a_http.inc index 0c85a67..de80b59 100644 --- a/a_http.inc +++ b/a_http.inc @@ -1,6 +1,6 @@ /* SA-MP threaded HTTP/1.0 client for pawn * - * (c) Copyright 2010, SA-MP Team + * (c) Copyright 2010, SA-MP Team * */ @@ -40,34 +40,36 @@ enum HTTP_ERROR:__HTTP_ERROR HTTP_ERROR_MALFORMED_RESPONSE } -/// Sends a threaded HTTP request. -/// ID used to differentiate requests that are sent to the same callback (useful for playerids) -/// The type of request you wish to send -/// The URL you want to request. (Without 'http://') -/// Any POST data you want to send with the request -/// Name of the callback function you want to use to handle responses to this request -/// This function was added in SA-MP 0.3b and will not work in earlier versions! -/// 1 on success, 0 on failure. -/// -/// Request types:
    -///
      -///
    • HTTP_GET
    • -///
    • HTTP_POST
    • -///
    • HTTP_HEAD
    • -///
    -///
    -/// -/// Response codes:
    -///
      -///
    • HTTP_ERROR_BAD_HOST
    • -///
    • HTTP_ERROR_NO_SOCKET
    • -///
    • HTTP_ERROR_CANT_CONNECT
    • -///
    • HTTP_ERROR_CANT_WRITE
    • -///
    • HTTP_ERROR_CONTENT_TOO_BIG
    • -///
    • HTTP_ERROR_MALFORMED_RESPONSE
    • -///
    • + standard HTTP response codes
    • -///
    -///
    +/** + * Sends a threaded HTTP request. + * ID used to differentiate requests that are sent to the same callback (useful for playerids) + * The type of request you wish to send + * The URL you want to request. (Without 'http://') + * Any POST data you want to send with the request + * Name of the callback function you want to use to handle responses to this request + * This function was added in SA-MP 0.3b and will not work in earlier versions! + * 1 on success, 0 on failure. + * + * Request types:
    + *
      + *
    • HTTP_GET
    • + *
    • HTTP_POST
    • + *
    • HTTP_HEAD
    • + *
    + *
    + * + * Response codes:
    + *
      + *
    • HTTP_ERROR_BAD_HOST
    • + *
    • HTTP_ERROR_NO_SOCKET
    • + *
    • HTTP_ERROR_CANT_CONNECT
    • + *
    • HTTP_ERROR_CANT_WRITE
    • + *
    • HTTP_ERROR_CONTENT_TOO_BIG
    • + *
    • HTTP_ERROR_MALFORMED_RESPONSE
    • + *
    • + standard HTTP response codes
    • + *
    + *
    + */ native HTTP(index, HTTP_METHOD:method, const url[], const data[], const callback[]); // example HTTP callback: public MyHttpResponse(index, responseCode, const data[]) { ... } diff --git a/a_npc.inc b/a_npc.inc index e3d65b5..eeb4f8a 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -1,6 +1,6 @@ /* SA-MP NPC Functions * - * (c) Copyright 2009, SA-MP Team + * (c) Copyright 2009, SA-MP Team * */ @@ -358,401 +358,491 @@ open.mp releases can use `A` as the first digit. #if !defined _console_included #define _console_included - /// Prints a string to the server console (not in-game chat) and logs (server_log.txt). - /// The string to print - /// + * Prints a string to the server console (not in-game chat) and logs (server_log.txt). + * The string to print + * native print(const string[]); - /// Outputs a formatted string on the console (the server window, not the in-game chat). - /// The format string - /// Indefinite number of arguments of any tag - /// - /// - /// The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. - /// This function doesn't support packed strings. - /// - /// Format Specifiers:
    - ///
      - ///
    • %i - integer (whole number)
    • - ///
    • %d - integer (whole number).
    • - ///
    • %s - string
    • - ///
    • %f - floating-point number (Float: tag)
    • - ///
    • %c - ASCII character
    • - ///
    • %x - hexadecimal number
    • - ///
    • %b - binary number
    • - ///
    • %% - literal %
    • - ///
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • - ///
    - ///
    - /// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. - /// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + * Outputs a formatted string on the console (the server window, not the in-game chat). + * The format string + * Indefinite number of arguments of any tag + * + * + * The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. + * This function doesn't support packed strings. + * + * Format Specifiers:
    + *
      + *
    • %i - integer (whole number)
    • + *
    • %d - integer (whole number).
    • + *
    • %s - string
    • + *
    • %f - floating-point number (Float: tag)
    • + *
    • %c - ASCII character
    • + *
    • %x - hexadecimal number
    • + *
    • %b - binary number
    • + *
    • %% - literal %
    • + *
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • + *
    + *
    + * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) native printf(const format[], {Float, _}:...); #endif -/// Formats a string to include variables and other strings inside it. -/// The string to output the result to -/// The maximum length output can contain -/// The format string -/// Indefinite number of arguments of any tag -/// -/// -/// This function doesn't support packed strings. -/// -/// Format Specifiers:
    -///
      -///
    • %i - integer (whole number)
    • -///
    • %d - integer (whole number).
    • -///
    • %s - string
    • -///
    • %f - floating-point number (Float: tag)
    • -///
    • %c - ASCII character
    • -///
    • %x - hexadecimal number
    • -///
    • %b - binary number
    • -///
    • %% - literal %
    • -///
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • -///
    -///
    -/// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. -/// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) +/** + * Formats a string to include variables and other strings inside it. + * The string to output the result to + * The maximum length output can contain + * The format string + * Indefinite number of arguments of any tag + * + * + * This function doesn't support packed strings. + * + * Format Specifiers:
    + *
      + *
    • %i - integer (whole number)
    • + *
    • %d - integer (whole number).
    • + *
    • %s - string
    • + *
    • %f - floating-point number (Float: tag)
    • + *
    • %c - ASCII character
    • + *
    • %x - hexadecimal number
    • + *
    • %b - binary number
    • + *
    • %% - literal %
    • + *
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • + *
    + *
    + * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + */ native format(output[], len = sizeof (output), const format[], {Float, _}:...); -/// Sets a 'timer' to call a function after some time. Can be set to repeat. -/// Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server -/// Interval in milliseconds -/// Whether the timer should repeat or not -/// -/// -/// Timer intervals are not accurate (roughly 25% off). There's a fix available here. -/// Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. -/// The function that should be called must be public. -/// The use of many timers will result in increased memory/cpu usage. -/// The ID of the timer that was started. Timer IDs start at 1. +/** + * Sets a 'timer' to call a function after some time. Can be set to repeat. + * Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server + * Interval in milliseconds + * Whether the timer should repeat or not + * + * + * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. + * The function that should be called must be public. + * The use of many timers will result in increased memory/cpu usage. + * The ID of the timer that was started. Timer IDs start at 1. + */ native SetTimer(const functionName[], interval, bool:repeating); -/// Kills (stops) a running timer. -/// The ID of the timer to kill (returned by SetTimer or SetTimerEx) -/// -/// -/// This function always returns 0. +/** + * Kills (stops) a running timer. + * The ID of the timer to kill (returned by SetTimer or SetTimerEx) + * + * + * This function always returns 0. + */ native KillTimer(timerid); -/// Returns the uptime of the actual server (not the SA-MP server) in milliseconds. -/// -/// GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. -/// One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. -/// Uptime of the actual server (not the SA-MP server). +/** + * Returns the uptime of the actual server (not the SA-MP server) in milliseconds. + * + * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. + * One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. + * Uptime of the actual server (not the SA-MP server). + */ native GetTickCount(); -/// Get the inversed value of a sine in degrees. -/// The sine for which to find the angle for -/// -/// The angle in degrees. +/** + * Get the inversed value of a sine in degrees. + * The sine for which to find the angle for + * + * The angle in degrees. + */ native Float:asin(Float:value); -/// Get the inversed value of a cosine in degrees. -/// The cosine for which to find the angle for -/// -/// The angle in degrees. +/** + * Get the inversed value of a cosine in degrees. + * The cosine for which to find the angle for + * + * The angle in degrees. + */ native Float:acos(Float:value); -/// Get the inversed value of a tangent in degrees. -/// The tangent for which to find the angle for -/// -/// -/// The angle in degrees. +/** + * Get the inversed value of a tangent in degrees. + * The tangent for which to find the angle for + * + * + * The angle in degrees. + */ native Float:atan(Float:value); -/// Get the multi-valued inversed value of a tangent in degrees. -/// y size -/// x size -/// -/// -/// The angle in degrees. +/** + * Get the multi-valued inversed value of a tangent in degrees. + * y size + * x size + * + * + * The angle in degrees. + */ native Float:atan2(Float:y, Float:x); -/// This will send a player text by the bot, just like using SendPlayerMessageToAll, but this function is to be used inside the NPC scripts. -/// The text to be sent by the NPC -/// -/// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This will send a player text by the bot, just like using SendPlayerMessageToAll, but this function is to be used inside the NPC scripts. + * The text to be sent by the NPC + * + * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! + */ native SendChat(const message[]); -/// This will force the NPC to write a desired command, and this way, getting the effects it would produce. -/// The command text to be sent by the NPC -/// -/// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This will force the NPC to write a desired command, and this way, getting the effects it would produce. + * The command text to be sent by the NPC + * + * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! + */ native SendCommand(const command[]); -/// Get a player's current state. -/// The ID of the player to get the current state of -/// -/// -/// -/// -/// States:
    -///
      -///
    • PLAYER_STATE_NONE - empty (while initializing)
    • -///
    • PLAYER_STATE_ONFOOT - player is on foot
    • -///
    • PLAYER_STATE_DRIVER - player is the driver of a vehicle
    • -///
    • PLAYER_STATE_PASSENGER - player is passenger of a vehicle
    • -///
    • PLAYER_STATE_WASTED - player is dead or on class selection
    • -///
    • PLAYER_STATE_SPAWNED - player is spawned
    • -///
    • PLAYER_STATE_SPECTATING - player is spectating
    • -///
    • PLAYER_STATE_EXIT_VEHICLE - player exits a vehicle
    • -///
    • PLAYER_STATE_ENTER_VEHICLE_DRIVER - player enters a vehicle as driver
    • -///
    • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger
    • -///
    -///
    -/// The player's current state as an integer. +/** + * Get a player's current state. + * The ID of the player to get the current state of + * + * + * + * + * States:
    + *
      + *
    • PLAYER_STATE_NONE - empty (while initializing)
    • + *
    • PLAYER_STATE_ONFOOT - player is on foot
    • + *
    • PLAYER_STATE_DRIVER - player is the driver of a vehicle
    • + *
    • PLAYER_STATE_PASSENGER - player is passenger of a vehicle
    • + *
    • PLAYER_STATE_WASTED - player is dead or on class selection
    • + *
    • PLAYER_STATE_SPAWNED - player is spawned
    • + *
    • PLAYER_STATE_SPECTATING - player is spectating
    • + *
    • PLAYER_STATE_EXIT_VEHICLE - player exits a vehicle
    • + *
    • PLAYER_STATE_ENTER_VEHICLE_DRIVER - player enters a vehicle as driver
    • + *
    • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger
    • + *
    + *
    + * The player's current state as an integer. + */ native PLAYER_STATE:GetPlayerState(playerid); -/// Get the position of a player, represented by x, y and z coordinates. -/// The ID of the player to get the position of -/// A float variable in which to store the x coordinate in, passed by reference -/// A float variable in which to store the y coordinate in, passed by reference -/// A float variable in which to store the z coordinate in, passed by reference -/// -/// -/// -/// -/// This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. -/// true on success, false on failure (i.e. player not connected). +/** + * Get the position of a player, represented by x, y and z coordinates. + * The ID of the player to get the position of + * A float variable in which to store the x coordinate in, passed by reference + * A float variable in which to store the y coordinate in, passed by reference + * A float variable in which to store the z coordinate in, passed by reference + * + * + * + * + * This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. + * true on success, false on failure (i.e. player not connected). + */ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); -/// This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. -/// The ID of the player in the vehicle that you want to get the ID of -/// -/// -/// -/// -/// ID of the vehicle or 0 if not in a vehicle. +/** + * This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. + * The ID of the player in the vehicle that you want to get the ID of + * + * + * + * + * ID of the vehicle or 0 if not in a vehicle. + */ native GetPlayerVehicleID(playerid); native WEAPON:GetPlayerArmedWeapon(playerid); native GetPlayerHealth(playerid); native GetPlayerArmour(playerid); -/// Retrieves a player's current special action. -/// The ID of the player to get the special action of -/// -/// -/// The special action of the player. +/** + * Retrieves a player's current special action. + * The ID of the player to get the special action of + * + * + * The special action of the player. + */ native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); -/// Checks if a player is streamed in for an NPC. Only nearby players are streamed in. -/// The ID of the player to check -/// -/// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! -/// 1 if the player is streamed in, 0 if not. +/** + * Checks if a player is streamed in for an NPC. Only nearby players are streamed in. + * The ID of the player to check + * + * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! + * 1 if the player is streamed in, 0 if not. + */ native bool:IsPlayerStreamedIn(playerid); -/// Checks if a vehicle is streamed in for an NPC. Only nearby vehicles are streamed in. -/// The ID of the vehicle to check -/// -/// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! -/// 1 if the vehicle is streamed in, 0 if not. +/** + * Checks if a vehicle is streamed in for an NPC. Only nearby vehicles are streamed in. + * The ID of the vehicle to check + * + * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! + * 1 if the vehicle is streamed in, 0 if not. + */ native bool:IsVehicleStreamedIn(vehicleid); -/// Check which keys a player is pressing. -/// The ID of the player to get the keys of -/// Bitmask containing the player's key states. List of keys -/// Up/down state -/// Left/right state -/// -/// Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). -/// As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. -/// The keys are stored in the specified variables. +/** + * Check which keys a player is pressing. + * The ID of the player to get the keys of + * Bitmask containing the player's key states. List of keys + * Up/down state + * Left/right state + * + * Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). + * As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. + * The keys are stored in the specified variables. + */ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); -/// Gets the angle a player is facing. -/// The player you want to get the angle of -/// The Float to store the angle in, passed by reference -/// Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. -/// Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. +/** + * Gets the angle a player is facing. + * The player you want to get the angle of + * The Float to store the angle in, passed by reference + * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. + * Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. + */ native GetPlayerFacingAngle(playerid, &Float:ang); -/// Get the current location of the NPC. -/// A float to save the x coordinate, passed by reference -/// A float to save the y coordinate, passed by reference -/// A float to save the z coordinate, passed by reference -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Get the current location of the NPC. + * A float to save the x coordinate, passed by reference + * A float to save the y coordinate, passed by reference + * A float to save the z coordinate, passed by reference + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + */ native GetMyPos(&Float:x, &Float:y, &Float:z); -/// Set the position of the NPC. -/// The x coordinate to put the NPC at -/// The y coordinate to put the NPC at -/// The z coordinate to put the NPC at -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Set the position of the NPC. + * The x coordinate to put the NPC at + * The y coordinate to put the NPC at + * The z coordinate to put the NPC at + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + */ native SetMyPos(Float:x, Float:y, Float:z); -/// Get the current facing angle of the NPC. -/// A float to save the angle in, passed by reference -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// The facing angle is stored in the specified variable. +/** + * Get the current facing angle of the NPC. + * A float to save the angle in, passed by reference + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * The facing angle is stored in the specified variable. + */ native GetMyFacingAngle(&Float:ang); -/// Set the NPC's facing angle. -/// The new NPC's facing angle -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// This function does not return any specific values. +/** + * Set the NPC's facing angle. + * The new NPC's facing angle + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * This function does not return any specific values. + */ native SetMyFacingAngle(Float:ang); -/// Get the distance between the NPC and a point. -/// The x coordinate of the point -/// The y coordinate of the point -/// The z coordinate of the point -/// A float to save the distance in, passed by reference -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// This function does not return any specific values. +/** + * Get the distance between the NPC and a point. + * The x coordinate of the point + * The y coordinate of the point + * The z coordinate of the point + * A float to save the distance in, passed by reference + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * This function does not return any specific values. + */ native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); -/// Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. -/// The ID of the player -/// The furthest distance the player can be from the point to be in range -/// The x coordinate of the point to check the range to -/// The y coordinate of the point to check the range to -/// The z coordinate of the point to check the range to -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// 1 if the player is in range, 0 if not. +/** + * Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. + * The ID of the player + * The furthest distance the player can be from the point to be in range + * The x coordinate of the point to check the range to + * The y coordinate of the point to check the range to + * The z coordinate of the point to check the range to + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * 1 if the player is in range, 0 if not. + */ native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); -/// Get a player's name. -/// The ID of the player to get the name of -/// An array into which to store the name, passed by reference -/// The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME -/// -/// -/// -/// -/// -/// A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. -/// The length of the player's name. 0 if player specified doesn't exist. +/** + * Get a player's name. + * The ID of the player to get the name of + * An array into which to store the name, passed by reference + * The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME + * + * + * + * + * + * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. + * The length of the player's name. 0 if player specified doesn't exist. + */ native GetPlayerName(playerid, name[], len = sizeof (name)); -/// Checks if a player is connected (if an ID is taken by a connected player). -/// The ID of the player to check -/// -/// -/// -/// This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. -/// 1 if the player is connected, 0 if not. +/** + * Checks if a player is connected (if an ID is taken by a connected player). + * The ID of the player to check + * + * + * + * This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. + * 1 if the player is connected, 0 if not. + */ native bool:IsPlayerConnected(playerid); -/// This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. -/// The type of recording to be loaded -/// The filename to be loaded, without the .rec extension -/// -/// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. + * The type of recording to be loaded + * The filename to be loaded, without the .rec extension + * + * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! + */ native StartRecordingPlayback(PLAYER_RECORDING_TYPE:playbackType, const recordFile[]); -/// This will stop the current .rec file which is being ran by the NPC, making it stay idle until some other order is given. -/// -/// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This will stop the current .rec file which is being ran by the NPC, making it stay idle until some other order is given. + * + * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! + */ native StopRecordingPlayback(); -/// This will pause playing back the recording. -/// -/// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This will pause playing back the recording. + * + * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! + */ native PauseRecordingPlayback(); -/// This will resume the paused recording. -/// -/// This NPC function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This will resume the paused recording. + * + * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! + */ native ResumeRecordingPlayback(); // -------------------------------------------------- // Forwards (Callback declarations) // -------------------------------------------------- -/// Gets called when a NPC script is loaded. -/// -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Gets called when a NPC script is loaded. + * + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnNPCModeInit(); -/// Gets called when a NPC-script unloaded. -/// -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Gets called when a NPC-script unloaded. + * + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnNPCModeExit(); -/// Gets called when a NPC successfully connects to the server. -/// The playerid the NPC has been given -/// -/// -/// -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Gets called when a NPC successfully connects to the server. + * The playerid the NPC has been given + * + * + * + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnNPCConnect(myplayerid); -/// Gets called when the NPC gets disconnected from the server. -/// The reason why the bot has disconnected from the server -/// -/// -/// -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Gets called when the NPC gets disconnected from the server. + * The reason why the bot has disconnected from the server + * + * + * + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnNPCDisconnect(reason[]); -/// Gets called when a NPC spawned. -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Gets called when a NPC spawned. + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnNPCSpawn(); -/// Gets called when a NPC enters a vehicle. -/// The vehicleid from the Vehicle the NPC enters -/// The seatid the NPC uses -/// -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Gets called when a NPC enters a vehicle. + * The vehicleid from the Vehicle the NPC enters + * The seatid the NPC uses + * + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnNPCEnterVehicle(vehicleid, seatid); -/// Gets called when a NPC leaves a vehicle. -/// -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Gets called when a NPC leaves a vehicle. + * + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnNPCExitVehicle(); -/// This callback gets called whenever the NPC sees a ClientMessage. This will be everytime a SendClientMessageToAll function is used and everytime a SendClientMessage function is sent towards the NPC. This callback won't be called when someone says something. For a version of this with player text, see OnPlayerText. -/// The colour the ClientMessage is -/// The actual message -/// -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This callback gets called whenever the NPC sees a ClientMessage. This will be everytime a SendClientMessageToAll function is used and everytime a SendClientMessage function is sent towards the NPC. This callback won't be called when someone says something. For a version of this with player text, see OnPlayerText. + * The colour the ClientMessage is + * The actual message + * + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnClientMessage(colour, text[]); -/// Just as the player version of the callback, this callback is called when any player dies. -/// The player who has died -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Just as the player version of the callback, this callback is called when any player dies. + * The player who has died + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnPlayerDeath(playerid); -/// Opposed to the player version of this callback, this callback is called everytime anyone says anything in the chat. This includes any player, any other NPC, or the same NPC himself. -/// The player who has written something in the chat -/// The text written by playerid -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Opposed to the player version of this callback, this callback is called everytime anyone says anything in the chat. This includes any player, any other NPC, or the same NPC himself. + * The player who has written something in the chat + * The text written by playerid + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnPlayerText(playerid, text[]); -/// This callback is called when a player is streamed in for an NPC. Only nearby players are streamed in. -/// The ID of the player that is now streamed in for the NPC -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This callback is called when a player is streamed in for an NPC. Only nearby players are streamed in. + * The ID of the player that is now streamed in for the NPC + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnPlayerStreamIn(playerid); -/// This callback is called when a player is streamed out the NPC. -/// The player who has been destreamed -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This callback is called when a player is streamed out the NPC. + * The player who has been destreamed + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnPlayerStreamOut(playerid); -/// This callback is called when a vehicle is streamed by the NPC. A simpler definition would be when the NPC sees the grey vehicle icon appear on his map. -/// The vehicle that has been streamed -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This callback is called when a vehicle is streamed by the NPC. A simpler definition would be when the NPC sees the grey vehicle icon appear on his map. + * The vehicle that has been streamed + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnVehicleStreamIn(vehicleid); -/// This callback is called when a vehicle is streamed out for an NPC. -/// The vehicle that was streamed out -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This callback is called when a vehicle is streamed out for an NPC. + * The vehicle that was streamed out + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnVehicleStreamOut(vehicleid); -/// This callback is called when a recorded file being reproduced with StartRecordingPlayback has reached to its end. -/// This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! +/** + * This callback is called when a recorded file being reproduced with StartRecordingPlayback has reached to its end. + * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! + */ forward OnRecordingPlaybackEnd(); diff --git a/a_objects.inc b/a_objects.inc index c67c35d..a54216e 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -1,6 +1,6 @@ /* SA-MP Object Functions * - * (c) Copyright 2005-2015, SA-MP Team + * (c) Copyright 2005-2015, SA-MP Team * */ @@ -50,601 +50,677 @@ enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN // Objects -/// Creates an object at specified coordinates in the game world. -/// The model to create -/// The x coordinate to create the object at -/// The y coordinate to create the object at -/// The z coordinate to create the object at -/// The x rotation of the object -/// The y rotation of the object -/// The z rotation of the object -/// The distance that San Andreas renders objects at. 0.0 will cause objects to render at their default distances. Usable since 0.3b, limited to 300 prior to 0.3x (optional=0.0) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// Objects that emit light (lampposts, police lights, bollard lights, neons etc.) that have a greater rotation than 16.26 degrees (or -16.26) on either the x or y axis will stop shining. This effect also applies to light objects attached to other objects, players and vehicles. -/// If a light object is attached to a car and the car is rotated over 16.26 degrees (like in a rollover), the object will also stop emitting light. This is a GTA:SA issue and is not caused by a bug in SA-MP. -/// -/// In case the light is attached to another object, one fix for this is to set SyncRotation to false in AttachObjectToObject. This will ensure the light stays at 0 rotation. This would only really work for objects that consist ONLY of light, so wouldn't work for the police light for example. -/// There is a limit of 1000 objects (MAX_OBJECTS). To circumvent this limit, you can use a streamer -/// The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. +/** + * Creates an object at specified coordinates in the game world. + * The model to create + * The x coordinate to create the object at + * The y coordinate to create the object at + * The z coordinate to create the object at + * The x rotation of the object + * The y rotation of the object + * The z rotation of the object + * The distance that San Andreas renders objects at. 0.0 will cause objects to render at their default distances. Usable since 0.3b, limited to 300 prior to 0.3x (optional=0.0) + * + * + * + * + * + * + * + * + * + * + * + * + * Objects that emit light (lampposts, police lights, bollard lights, neons etc.) that have a greater rotation than 16.26 degrees (or -16.26) on either the x or y axis will stop shining. This effect also applies to light objects attached to other objects, players and vehicles. + * If a light object is attached to a car and the car is rotated over 16.26 degrees (like in a rollover), the object will also stop emitting light. This is a GTA:SA issue and is not caused by a bug in SA-MP. + * + * In case the light is attached to another object, one fix for this is to set SyncRotation to false in AttachObjectToObject. This will ensure the light stays at 0 rotation. This would only really work for objects that consist ONLY of light, so wouldn't work for the police light for example. + * There is a limit of 1000 objects (MAX_OBJECTS). To circumvent this limit, you can use a streamer + * The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. + */ native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, Float:rotZ, Float:drawDistance = 0.0); -/// Attach an object to a vehicle. -/// The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first -/// The ID of the vehicle to attach the object to -/// The x axis offset from the vehicle to attach the object to -/// The y axis offset from the vehicle to attach the object to -/// The z axis offset from the vehicle to attach the object to -/// The x rotation offset for the object -/// The y rotation offset for the object -/// The z rotation offset for the object -/// -/// -/// -/// -/// This function was added in SA-MP 0.3c and will not work in earlier versions! -/// The object must be created first. -/// When the vehicle is destroyed or respawned, the attached objects won't be destroyed with it; they will remain stationary at the position the vehicle disappeared and be reattached to the next vehicle to claim the vehicle ID that the objects were attached to. +/** + * Attach an object to a vehicle. + * The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first + * The ID of the vehicle to attach the object to + * The x axis offset from the vehicle to attach the object to + * The y axis offset from the vehicle to attach the object to + * The z axis offset from the vehicle to attach the object to + * The x rotation offset for the object + * The y rotation offset for the object + * The z rotation offset for the object + * + * + * + * + * This function was added in SA-MP 0.3c and will not work in earlier versions! + * The object must be created first. + * When the vehicle is destroyed or respawned, the attached objects won't be destroyed with it; they will remain stationary at the position the vehicle disappeared and be reattached to the next vehicle to claim the vehicle ID that the objects were attached to. + */ native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); -/// You can use this function to attach objects to other objects. The objects will folow the main object. -/// The object to attach to another object -/// The object to attach the object to -/// The distance between the main object and the object in the x direction -/// The distance between the main object and the object in the y direction -/// The distance between the main object and the object in the z direction -/// The x rotation between the object and the main object -/// The y rotation between the object and the main object -/// The z rotation between the object and the main object -/// If set to 0, objectid's rotation will not change with 's (optional=1) -/// -/// -/// -/// This function was added in SA-MP 0.3d and will not work in earlier versions! -/// -///
      -///
    • Both objects need to be created before attempting to attach them.
    • -///
    • There is no player-object version of this function (AttachPlayerObjectToObject), meaning it will not be supported by streamers.
    • -///
    -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. -///
    +/** + * You can use this function to attach objects to other objects. The objects will folow the main object. + * The object to attach to another object + * The object to attach the object to + * The distance between the main object and the object in the x direction + * The distance between the main object and the object in the y direction + * The distance between the main object and the object in the z direction + * The x rotation between the object and the main object + * The y rotation between the object and the main object + * The z rotation between the object and the main object + * If set to 0, objectid's rotation will not change with 's (optional=1) + * + * + * + * This function was added in SA-MP 0.3d and will not work in earlier versions! + * + *
      + *
    • Both objects need to be created before attempting to attach them.
    • + *
    • There is no player-object version of this function (AttachPlayerObjectToObject), meaning it will not be supported by streamers.
    • + *
    + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. + *
    + */ native AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); -/// Attach an object to a player. -/// The ID of the object to attach to the player -/// The ID of the player to attach the object to -/// The distance between the player and the object in the x direction -/// The distance between the player and the object in the y direction -/// The distance between the player and the object in the z direction -/// The x rotation between the object and the player -/// The y rotation between the object and the player -/// The z rotation between the object and the player -/// -/// -/// -/// -/// -/// This function always returns 0. +/** + * Attach an object to a player. + * The ID of the object to attach to the player + * The ID of the player to attach the object to + * The distance between the player and the object in the x direction + * The distance between the player and the object in the y direction + * The distance between the player and the object in the z direction + * The x rotation between the object and the player + * The y rotation between the object and the player + * The z rotation between the object and the player + * + * + * + * + * + * This function always returns 0. + */ native AttachObjectToPlayer(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); -/// Change the position of an object. -/// The ID of the object to set the position of. Returned by CreateObject -/// The x coordinate to position the object at -/// The y coordinate to position the object at -/// The z coordinate to position the object at -/// -/// -/// -/// -/// This function always returns 1, even if the object specified does not exist. +/** + * Change the position of an object. + * The ID of the object to set the position of. Returned by CreateObject + * The x coordinate to position the object at + * The y coordinate to position the object at + * The z coordinate to position the object at + * + * + * + * + * This function always returns 1, even if the object specified does not exist. + */ native SetObjectPos(objectid, Float:x, Float:y, Float:z); -/// Get the position of an object. -/// The ID of the object to get the position of. -/// A variable in which to store the x coordinate, passed by reference -/// A variable in which to store the y coordinate, passed by reference -/// A variable in which to store the z coordinate, passed by reference -/// -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The specified object does not exist. -///
    +/** + * Get the position of an object. + * The ID of the object to get the position of. + * A variable in which to store the x coordinate, passed by reference + * A variable in which to store the y coordinate, passed by reference + * A variable in which to store the z coordinate, passed by reference + * + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The specified object does not exist. + *
    + */ native GetObjectPos(objectid, &Float:x, &Float:y, &Float:z); -/// Set the rotation of an object on the three axes (x, y and z). -/// The ID of the object to set the rotation of -/// The x rotation -/// The y rotation -/// The z rotation -/// -/// -/// -/// -/// This function always returns 1, even if the object doesn't exist. +/** + * Set the rotation of an object on the three axes (x, y and z). + * The ID of the object to set the rotation of + * The x rotation + * The y rotation + * The z rotation + * + * + * + * + * This function always returns 1, even if the object doesn't exist. + */ native SetObjectRot(objectid, Float:rotX, Float:rotY, Float:rotZ); -/// Use this function to get the objects current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. -/// The objectid of the object you want to get the rotation from -/// The variable to store the x rotation, passed by reference -/// The variable to store the y rotation, passed by reference -/// The variable to store the z rotation, passed by reference -/// -/// -/// -/// -/// The object's rotation is stored in the referenced variables, not in the return value. +/** + * Use this function to get the objects current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. + * The objectid of the object you want to get the rotation from + * The variable to store the x rotation, passed by reference + * The variable to store the y rotation, passed by reference + * The variable to store the z rotation, passed by reference + * + * + * + * + * The object's rotation is stored in the referenced variables, not in the return value. + */ native GetObjectRot(objectid, &Float:rotX, &Float:rotY, &Float:rotZ); -/// Get the model ID of an object. -/// The ID of the object to get the model of -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The model ID of the object. -1 if does not exist. +/** + * Get the model ID of an object. + * The ID of the object to get the model of + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * The model ID of the object. -1 if does not exist. + */ native GetObjectModel(objectid); -/// Disable collisions between players' cameras and the specified object. -/// The ID of the object to disable camera collisions on -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The object specified does not exist. -///
    +/** + * Disable collisions between players' cameras and the specified object. + * The ID of the object to disable camera collisions on + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The object specified does not exist. + *
    + */ native SetObjectNoCameraCol(objectid); -/// Checks if an object with the ID provided exists. -/// The ID of the object to check the existence of -/// -/// -/// -/// This is to check if an object exists, not if a model is valid. -/// 1 if the object exists, 0 if not. +/** + * Checks if an object with the ID provided exists. + * The ID of the object to check the existence of + * + * + * + * This is to check if an object exists, not if a model is valid. + * 1 if the object exists, 0 if not. + */ native bool:IsValidObject(objectid); -/// Destroys (removes) an object that was created using CreateObject. -/// The ID of the object to destroy. Returned by CreateObject -/// -/// -/// +/** + * Destroys (removes) an object that was created using CreateObject. + * The ID of the object to destroy. Returned by CreateObject + * + * + * + */ native DestroyObject(objectid); -/// Move an object to a new position with a set speed. Players/vehicles will 'surf' the object as it moves. -/// The ID of the object to move -/// The x coordinate to move the object to -/// The y coordinate to move the object to -/// The z coordinate to move the object to -/// The speed at which to move the object (units per second) -/// The FINAL x rotation (optional=-1000.0) -/// The FINAL y rotation (optional=-1000.0) -/// The FINAL z rotation (optional=-1000.0) -/// -/// -/// -/// -/// -/// -/// -/// This function can be used to make objects rotate smoothly. In order to achieve this however, the object must also be moved. The specified rotation is the rotation the object will have after the movement. Hence the object will not rotate when no movement is applied. For a script example take a look at the ferriswheel.pwn filterscript made by Kye included in the server package (SA-MP 0.3d and above). -/// To fully understand the above note, you can (but not limited to) increase the z position by (+0.001) and then (-0.001) after moving it again, as not changing the x, y or z will not rotate the object. -/// The time it will take for the object to move in milliseconds. +/** + * Move an object to a new position with a set speed. Players/vehicles will 'surf' the object as it moves. + * The ID of the object to move + * The x coordinate to move the object to + * The y coordinate to move the object to + * The z coordinate to move the object to + * The speed at which to move the object (units per second) + * The FINAL x rotation (optional=-1000.0) + * The FINAL y rotation (optional=-1000.0) + * The FINAL z rotation (optional=-1000.0) + * + * + * + * + * + * + * + * This function can be used to make objects rotate smoothly. In order to achieve this however, the object must also be moved. The specified rotation is the rotation the object will have after the movement. Hence the object will not rotate when no movement is applied. For a script example take a look at the ferriswheel.pwn filterscript made by Kye included in the server package (SA-MP 0.3d and above). + * To fully understand the above note, you can (but not limited to) increase the z position by (+0.001) and then (-0.001) after moving it again, as not changing the x, y or z will not rotate the object. + * The time it will take for the object to move in milliseconds. + */ native MoveObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); -/// Stop a moving object after MoveObject has been used. -/// The ID of the object to stop moving -/// -/// -/// -/// +/** + * Stop a moving object after MoveObject has been used. + * The ID of the object to stop moving + * + * + * + * + */ native StopObject(objectid); -/// Checks if the given objectid is moving. -/// The objectid you want to check if is moving -/// -/// -/// -/// -/// This function was added in SA-MP 0.3d and will not work in earlier versions! -/// 1 if the object is moving, 0 if not. +/** + * Checks if the given objectid is moving. + * The objectid you want to check if is moving + * + * + * + * + * This function was added in SA-MP 0.3d and will not work in earlier versions! + * 1 if the object is moving, 0 if not. + */ native bool:IsObjectMoving(objectid); -/// Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical User Interface). -/// The ID of the player that should edit the object -/// The ID of the object to be edited by the player -/// -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. -/// -/// 1: The function executed successfully. Success is reported when a non-existent object is specified, but nothing will happen.
    -/// 0: The function failed to execute. The player is not connected. -///
    +/** + * Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical User Interface). + * The ID of the player that should edit the object + * The ID of the object to be edited by the player + * + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. + * + * 1: The function executed successfully. Success is reported when a non-existent object is specified, but nothing will happen.
    + * 0: The function failed to execute. The player is not connected. + *
    + */ native EditObject(playerid, objectid); -/// Allows players to edit a player-object (position and rotation) with a GUI and their mouse. -/// The ID of the player that should edit the object -/// The object to be edited by the player -/// -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. Player or object not valid. -///
    +/** + * Allows players to edit a player-object (position and rotation) with a GUI and their mouse. + * The ID of the player that should edit the object + * The object to be edited by the player + * + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. Player or object not valid. + *
    + */ native EditPlayerObject(playerid, objectid); -/// Display the cursor and allow the player to select an object. OnPlayerSelectObject is called when the player selects an object. -/// The ID of the player that should be able to select the object -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! +/** + * Display the cursor and allow the player to select an object. OnPlayerSelectObject is called when the player selects an object. + * The ID of the player that should be able to select the object + * + * + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + */ native SelectObject(playerid); -/// Cancel object edition mode for a player. -/// The ID of the player to cancel edition for -/// -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! +/** + * Cancel object edition mode for a player. + * The ID of the player to cancel edition for + * + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + */ native CancelEdit(playerid); -/// Creates an object which will be visible to only one player. -/// The ID of the player to create the object for -/// The model to create -/// The x coordinate to create the object at -/// The y coordinate to create the object at -/// The z coordinate to create the object at -/// The x rotation of the object -/// The y rotation of the object -/// The z rotation of the object -/// The distance from which objects will appear to players. 0.0 will cause an object to render at its default distance. Leaving this parameter out will cause objects to be rendered at their default distance. The maximum usable distance is 300 in versions prior to 0.3x, in which drawdistance can be unlimited (optional=0.0) -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// The 'DrawDistance' parameter was added in 0.3b. It must be left out in scripts for older versions of SA:MP. -/// The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. +/** + * Creates an object which will be visible to only one player. + * The ID of the player to create the object for + * The model to create + * The x coordinate to create the object at + * The y coordinate to create the object at + * The z coordinate to create the object at + * The x rotation of the object + * The y rotation of the object + * The z rotation of the object + * The distance from which objects will appear to players. 0.0 will cause an object to render at its default distance. Leaving this parameter out will cause objects to be rendered at their default distance. The maximum usable distance is 300 in versions prior to 0.3x, in which drawdistance can be unlimited (optional=0.0) + * + * + * + * + * + * + * + * + * + * + * + * The 'DrawDistance' parameter was added in 0.3b. It must be left out in scripts for older versions of SA:MP. + * The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. + */ native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, Float:rotZ, Float:drawDistance = 0.0); -/// Attach a player object to a vehicle. -/// The ID of the player the object was created for -/// The ID of the object to attach to the vehicle -/// The ID of the vehicle to attach the object to -/// The x position offset for attachment -/// The y position offset for attachment -/// The z position offset for attachment -/// The x rotation offset for attachment -/// The y rotation offset for attachment -/// The z rotation offset for attachment -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// You need to create the object before attempting to attach it to a vehicle. +/** + * Attach a player object to a vehicle. + * The ID of the player the object was created for + * The ID of the object to attach to the vehicle + * The ID of the vehicle to attach the object to + * The x position offset for attachment + * The y position offset for attachment + * The z position offset for attachment + * The x rotation offset for attachment + * The y rotation offset for attachment + * The z rotation offset for attachment + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * You need to create the object before attempting to attach it to a vehicle. + */ native AttachPlayerObjectToVehicle(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); -/// Sets the position of a player-object to the specified coordinates. -/// The ID of the player whose player-object to set the position of -/// The ID of the player-object to set the position of. Returned by CreatePlayerObject -/// The x coordinate to put the object at -/// The y coordinate to put the object at -/// The z coordinate to put the object at -/// -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. Player and/or object do not exist. -///
    +/** + * Sets the position of a player-object to the specified coordinates. + * The ID of the player whose player-object to set the position of + * The ID of the player-object to set the position of. Returned by CreatePlayerObject + * The x coordinate to put the object at + * The y coordinate to put the object at + * The z coordinate to put the object at + * + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. Player and/or object do not exist. + *
    + */ native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); -/// Get the position of a player object (CreatePlayerObject). -/// The ID of the player whose player object to get the position of -/// The object's ID of which you want the current location -/// A float variable in which to store the x coordinate, passed by reference -/// A float variable in which to store the y coordinate, passed by reference -/// A float variable in which to store the z coordinate, passed by reference -/// -/// -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player and/or the object don't exist.
    -/// The object's position is stored in the specified variables. -///
    +/** + * Get the position of a player object (CreatePlayerObject). + * The ID of the player whose player object to get the position of + * The object's ID of which you want the current location + * A float variable in which to store the x coordinate, passed by reference + * A float variable in which to store the y coordinate, passed by reference + * A float variable in which to store the z coordinate, passed by reference + * + * + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player and/or the object don't exist.
    + * The object's position is stored in the specified variables. + *
    + */ native GetPlayerObjectPos(playerid, objectid, &Float:x, &Float:y, &Float:z); -/// Set the rotation of an object on the x, y and z axis. -/// The ID of the player whose player-object to rotate -/// The ID of the player-object to rotate -/// The x rotation to set -/// The y rotation to set -/// The z rotation to set -/// -/// -/// -/// -/// To smoothly rotate an object, see MovePlayerObject. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. -///
    +/** + * Set the rotation of an object on the x, y and z axis. + * The ID of the player whose player-object to rotate + * The ID of the player-object to rotate + * The x rotation to set + * The y rotation to set + * The z rotation to set + * + * + * + * + * To smoothly rotate an object, see MovePlayerObject. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. + *
    + */ native SetPlayerObjectRot(playerid, objectid, Float:rotX, Float:rotY, Float:rotZ); -/// Use this function to get the object's current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. -/// The player you associated this object to -/// The objectid of the object you want to get the rotation from -/// The variable to store the x rotation, passed by reference -/// The variable to store the y rotation, passed by reference -/// The variable to store the z rotation, passed by reference -/// -/// -/// -/// -/// The object's rotation is stored in the specified variables. +/** + * Use this function to get the object's current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. + * The player you associated this object to + * The objectid of the object you want to get the rotation from + * The variable to store the x rotation, passed by reference + * The variable to store the y rotation, passed by reference + * The variable to store the z rotation, passed by reference + * + * + * + * + * The object's rotation is stored in the specified variables. + */ native GetPlayerObjectRot(playerid, objectid, &Float:rotX, &Float:rotY, &Float:rotZ); -/// Retrieve the model ID of a player-object. -/// The ID of the player whose player-object to get the model of -/// The ID of the player-object of which to retrieve the model ID -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The model ID of the player object. If the player or object don't exist, it will return -1 or 0 if the player or object does not exist. +/** + * Retrieve the model ID of a player-object. + * The ID of the player whose player-object to get the model of + * The ID of the player-object of which to retrieve the model ID + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * The model ID of the player object. If the player or object don't exist, it will return -1 or 0 if the player or object does not exist. + */ native GetPlayerObjectModel(playerid, objectid); -/// Toggles a player object camera collision. -/// The playerid the object belongs to -/// The ID of the object you want to toggle -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). -/// 1 regardless of if the object exists or not. +/** + * Toggles a player object camera collision. + * The playerid the object belongs to + * The ID of the object you want to toggle + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). + * 1 regardless of if the object exists or not. + */ native SetPlayerObjectNoCameraCol(playerid, objectid); -/// Checks if the given object ID is valid for the given player. -/// The ID of the player whose player-object to validate -/// The ID of the object to validate -/// -/// -/// -/// 1 if the object exists, 0 if not. +/** + * Checks if the given object ID is valid for the given player. + * The ID of the player whose player-object to validate + * The ID of the object to validate + * + * + * + * 1 if the object exists, 0 if not. + */ native bool:IsValidPlayerObject(playerid, objectid); -/// Destroy a player-object created using CreatePlayerObject. -/// The ID of the player whose player-object to destroy -/// The ID of the player-object to destroy. Returned by CreatePlayerObject -/// -/// -/// +/** + * Destroy a player-object created using CreatePlayerObject. + * The ID of the player whose player-object to destroy + * The ID of the player-object to destroy. Returned by CreatePlayerObject + * + * + * + */ native DestroyPlayerObject(playerid, objectid); -/// Move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects. -/// The ID of the player whose player-object to move -/// The ID of the object to move -/// The x coordinate to move the object to -/// The y coordinate to move the object to -/// The z coordinate to move the object to -/// The speed at which to move the object -/// The final x rotation (optional=-1000.0) -/// The final y rotation (optional=-1000.0) -/// The final z rotation (optional=-1000.0) -/// -/// -/// -/// -/// -/// -/// -/// 0.3d R2 and older versions do not have the rotational parameters. -/// The time it will take for the object to move in milliseconds. +/** + * Move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects. + * The ID of the player whose player-object to move + * The ID of the object to move + * The x coordinate to move the object to + * The y coordinate to move the object to + * The z coordinate to move the object to + * The speed at which to move the object + * The final x rotation (optional=-1000.0) + * The final y rotation (optional=-1000.0) + * The final z rotation (optional=-1000.0) + * + * + * + * + * + * + * + * 0.3d R2 and older versions do not have the rotational parameters. + * The time it will take for the object to move in milliseconds. + */ native MovePlayerObject(playerid, objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); -/// Stop a moving player-object after MovePlayerObject has been used. -/// The ID of the player whose player-object to stop -/// The ID of the player-object to stop -/// -/// -/// -/// +/** + * Stop a moving player-object after MovePlayerObject has been used. + * The ID of the player whose player-object to stop + * The ID of the player-object to stop + * + * + * + * + */ native StopPlayerObject(playerid, objectid); -/// Checks if the given player objectid is moving. -/// The ID of the player whose player-object is checked -/// The player objectid you want to check if is moving -/// -/// -/// -/// -/// This function was added in SA-MP 0.3d and will not work in earlier versions! -/// 1 if the player object is moving, 0 if not. +/** + * Checks if the given player objectid is moving. + * The ID of the player whose player-object is checked + * The player objectid you want to check if is moving + * + * + * + * + * This function was added in SA-MP 0.3d and will not work in earlier versions! + * 1 if the player object is moving, 0 if not. + */ native bool:IsPlayerObjectMoving(playerid, objectid); -/// The same as AttachObjectToPlayer but for objects which were created for player. -/// The ID of the player which is linked with the object -/// The objectid you want to attach to the player -/// The ID of the player you want to attach to the object -/// The distance between the player and the object in the x direction -/// The distance between the player and the object in the y direction -/// The distance between the player and the object in the z direction -/// The x rotation -/// The y rotation -/// The z rotation -/// -/// -/// -/// -/// This function was removed in SA-MP 0.3. +/** + * The same as AttachObjectToPlayer but for objects which were created for player. + * The ID of the player which is linked with the object + * The objectid you want to attach to the player + * The ID of the player you want to attach to the object + * The distance between the player and the object in the x direction + * The distance between the player and the object in the y direction + * The distance between the player and the object in the z direction + * The x rotation + * The y rotation + * The z rotation + * + * + * + * + * This function was removed in SA-MP 0.3. + */ native AttachPlayerObjectToPlayer(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); -/// Replace the texture of an object with the texture from another model in the game. -/// The ID of the object to change the texture of -/// The material index on the object to change (0 to 15) -/// The modelid on which the replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the texture -/// The name of the txd file which contains the replacement texture (use "none" if not required) -/// The name of the texture to use as the replacement (use "none" if not required) -/// The object colour to set, as an integer or hex in ARGB colour format. Using 0 keeps the existing material colour (optional=0) -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// Vertex lightning of the object will disappear if material colour is changed. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. -///
    +/** + * Replace the texture of an object with the texture from another model in the game. + * The ID of the object to change the texture of + * The material index on the object to change (0 to 15) + * The modelid on which the replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the texture + * The name of the txd file which contains the replacement texture (use "none" if not required) + * The name of the texture to use as the replacement (use "none" if not required) + * The object colour to set, as an integer or hex in ARGB colour format. Using 0 keeps the existing material colour (optional=0) + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * Vertex lightning of the object will disappear if material colour is changed. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. + *
    + */ native SetObjectMaterial(objectid, materialIndex, modelid, const textureLibrary[], const textureName[], materialColour = 0); -/// Replace the texture of a player-object with the texture from another model in the game. -/// The ID of the player the object is associated to -/// The ID of the object to replace the texture of -/// The material index on the object to change (0 to 15) -/// The modelid on which replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the existing texture -/// The name of the txd file which contains the replacement texture (use "none" if not required) -/// The name of the texture to use as the replacement (use "none" if not required) -/// The object colour to set (ARGB). Using 0 keeps the existing material colour (optional=0) -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// Vertex lightning of the object will disappear if material colour is changed. +/** + * Replace the texture of a player-object with the texture from another model in the game. + * The ID of the player the object is associated to + * The ID of the object to replace the texture of + * The material index on the object to change (0 to 15) + * The modelid on which replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the existing texture + * The name of the txd file which contains the replacement texture (use "none" if not required) + * The name of the texture to use as the replacement (use "none" if not required) + * The object colour to set (ARGB). Using 0 keeps the existing material colour (optional=0) + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * Vertex lightning of the object will disappear if material colour is changed. + */ native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const textureLibrary[], const textureName[], materialColour = 0); -/// Replace the texture of an object with text. -/// The ID of the object to replace the texture of with text -/// The text to show on the object. (MAX 2048 characters) -/// The object's material index to replace with text (optional=0) -/// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) -/// The font to use (optional="Arial") -/// The size of the text (MAX 255) (optional=24) -/// Bold text. Set to 1 for bold, 0 for not (optional=1) -/// The colour of the text, in ARGB format (optional=-1) -/// The background colour, in ARGB format (optional=0) -/// The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// Color embedding can be used for multiple colours in the text. -/// -/// Alignment:
    -///
      -///
    • OBJECT_MATERIAL_TEXT_ALIGN_LEFT 0
    • -///
    • OBJECT_MATERIAL_TEXT_ALIGN_CENTER 1
    • -///
    • OBJECT_MATERIAL_TEXT_ALIGN_RIGHT 2
    • -///
    -///
    -/// -/// Sizes:
    -///
      -///
    • OBJECT_MATERIAL_SIZE_32x32 10
    • -///
    • OBJECT_MATERIAL_SIZE_64x32 20
    • -///
    • OBJECT_MATERIAL_SIZE_64x64 30
    • -///
    • OBJECT_MATERIAL_SIZE_128x32 40
    • -///
    • OBJECT_MATERIAL_SIZE_128x64 50
    • -///
    • OBJECT_MATERIAL_SIZE_128x128 60
    • -///
    • OBJECT_MATERIAL_SIZE_256x32 70
    • -///
    • OBJECT_MATERIAL_SIZE_256x64 80
    • -///
    • OBJECT_MATERIAL_SIZE_256x128 90
    • -///
    • OBJECT_MATERIAL_SIZE_256x256 100
    • -///
    • OBJECT_MATERIAL_SIZE_512x64 110
    • -///
    • OBJECT_MATERIAL_SIZE_512x128 120
    • -///
    • OBJECT_MATERIAL_SIZE_512x256 130
    • -///
    • OBJECT_MATERIAL_SIZE_512x512 140
    • -///
    -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. -///
    +/** + * Replace the texture of an object with text. + * The ID of the object to replace the texture of with text + * The text to show on the object. (MAX 2048 characters) + * The object's material index to replace with text (optional=0) + * The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) + * The font to use (optional="Arial") + * The size of the text (MAX 255) (optional=24) + * Bold text. Set to 1 for bold, 0 for not (optional=1) + * The colour of the text, in ARGB format (optional=-1) + * The background colour, in ARGB format (optional=0) + * The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * Color embedding can be used for multiple colours in the text. + * + * Alignment:
    + *
      + *
    • OBJECT_MATERIAL_TEXT_ALIGN_LEFT 0
    • + *
    • OBJECT_MATERIAL_TEXT_ALIGN_CENTER 1
    • + *
    • OBJECT_MATERIAL_TEXT_ALIGN_RIGHT 2
    • + *
    + *
    + * + * Sizes:
    + *
      + *
    • OBJECT_MATERIAL_SIZE_32x32 10
    • + *
    • OBJECT_MATERIAL_SIZE_64x32 20
    • + *
    • OBJECT_MATERIAL_SIZE_64x64 30
    • + *
    • OBJECT_MATERIAL_SIZE_128x32 40
    • + *
    • OBJECT_MATERIAL_SIZE_128x64 50
    • + *
    • OBJECT_MATERIAL_SIZE_128x128 60
    • + *
    • OBJECT_MATERIAL_SIZE_256x32 70
    • + *
    • OBJECT_MATERIAL_SIZE_256x64 80
    • + *
    • OBJECT_MATERIAL_SIZE_256x128 90
    • + *
    • OBJECT_MATERIAL_SIZE_256x256 100
    • + *
    • OBJECT_MATERIAL_SIZE_512x64 110
    • + *
    • OBJECT_MATERIAL_SIZE_512x128 120
    • + *
    • OBJECT_MATERIAL_SIZE_512x256 130
    • + *
    • OBJECT_MATERIAL_SIZE_512x512 140
    • + *
    + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. + *
    + */ native SetObjectMaterialText(objectid, const text[], materialIndex = 0, OBJECT_MATERIAL_SIZE:materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, OBJECT_MATERIAL_TEXT_ALIGN:textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); -/// Replace the texture of a player object with text. -/// The ID of the player whose player object to set the text of -/// The ID of the object on which to place the text -/// The text to set -/// The material index to replace with text (optional=0) -/// The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) -/// The font to use (optional="Arial") -/// The size of the text (MAX 255) (optional=24) -/// Bold text. Set to 1 for bold, 0 for not (optional=1) -/// The colour of the text (optional=-1) -/// The background colour (optional=0) -/// The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// Color embedding can be used for multiple colours in the text. -/// -/// Alignment:
    -///
      -///
    • OBJECT_MATERIAL_TEXT_ALIGN_LEFT 0
    • -///
    • OBJECT_MATERIAL_TEXT_ALIGN_CENTER 1
    • -///
    • OBJECT_MATERIAL_TEXT_ALIGN_RIGHT 2
    • -///
    -///
    -/// -/// Sizes:
    -///
      -///
    • OBJECT_MATERIAL_SIZE_32x32 10
    • -///
    • OBJECT_MATERIAL_SIZE_64x32 20
    • -///
    • OBJECT_MATERIAL_SIZE_64x64 30
    • -///
    • OBJECT_MATERIAL_SIZE_128x32 40
    • -///
    • OBJECT_MATERIAL_SIZE_128x64 50
    • -///
    • OBJECT_MATERIAL_SIZE_128x128 60
    • -///
    • OBJECT_MATERIAL_SIZE_256x32 70
    • -///
    • OBJECT_MATERIAL_SIZE_256x64 80
    • -///
    • OBJECT_MATERIAL_SIZE_256x128 90
    • -///
    • OBJECT_MATERIAL_SIZE_256x256 100
    • -///
    • OBJECT_MATERIAL_SIZE_512x64 110
    • -///
    • OBJECT_MATERIAL_SIZE_512x128 120
    • -///
    • OBJECT_MATERIAL_SIZE_512x256 130
    • -///
    • OBJECT_MATERIAL_SIZE_512x512 140
    • -///
    -///
    +/** + * Replace the texture of a player object with text. + * The ID of the player whose player object to set the text of + * The ID of the object on which to place the text + * The text to set + * The material index to replace with text (optional=0) + * The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) + * The font to use (optional="Arial") + * The size of the text (MAX 255) (optional=24) + * Bold text. Set to 1 for bold, 0 for not (optional=1) + * The colour of the text (optional=-1) + * The background colour (optional=0) + * The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * Color embedding can be used for multiple colours in the text. + * + * Alignment:
    + *
      + *
    • OBJECT_MATERIAL_TEXT_ALIGN_LEFT 0
    • + *
    • OBJECT_MATERIAL_TEXT_ALIGN_CENTER 1
    • + *
    • OBJECT_MATERIAL_TEXT_ALIGN_RIGHT 2
    • + *
    + *
    + * + * Sizes:
    + *
      + *
    • OBJECT_MATERIAL_SIZE_32x32 10
    • + *
    • OBJECT_MATERIAL_SIZE_64x32 20
    • + *
    • OBJECT_MATERIAL_SIZE_64x64 30
    • + *
    • OBJECT_MATERIAL_SIZE_128x32 40
    • + *
    • OBJECT_MATERIAL_SIZE_128x64 50
    • + *
    • OBJECT_MATERIAL_SIZE_128x128 60
    • + *
    • OBJECT_MATERIAL_SIZE_256x32 70
    • + *
    • OBJECT_MATERIAL_SIZE_256x64 80
    • + *
    • OBJECT_MATERIAL_SIZE_256x128 90
    • + *
    • OBJECT_MATERIAL_SIZE_256x256 100
    • + *
    • OBJECT_MATERIAL_SIZE_512x64 110
    • + *
    • OBJECT_MATERIAL_SIZE_512x128 120
    • + *
    • OBJECT_MATERIAL_SIZE_512x256 130
    • + *
    • OBJECT_MATERIAL_SIZE_512x512 140
    • + *
    + *
    + */ native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialIndex = 0, OBJECT_MATERIAL_SIZE:materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, OBJECT_MATERIAL_TEXT_ALIGN:textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); -/// Allows camera collisions with newly created objects to be disabled by default. -/// 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// This function only affects the camera collision of objects created AFTER its use - it does not toggle existing objects' camera collisions. -/// This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). +/** + * Allows camera collisions with newly created objects to be disabled by default. + * 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * This function only affects the camera collision of objects created AFTER its use - it does not toggle existing objects' camera collisions. + * This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). + */ native SetObjectsDefaultCameraCol(bool:disable); diff --git a/a_players.inc b/a_players.inc index 3cf7c27..bbc9c33 100644 --- a/a_players.inc +++ b/a_players.inc @@ -1,6 +1,6 @@ /* SA-MP Player Functions * - * (c) Copyright 2005-2017, SA-MP Team + * (c) Copyright 2005-2017, SA-MP Team * */ @@ -151,858 +151,990 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE // Player -/// This function can be used to change the spawn information of a specific player. It allows you to automatically set someone's spawn weapons, their team, skin and spawn position, normally used in case of minigames or automatic-spawn systems. This function is more crash-safe then using SetPlayerSkin in OnPlayerSpawn and/or OnPlayerRequestClass, even though this has been fixed in 0.2. -/// The Playerid of who you want to set the spawn information -/// The Team-ID of the chosen player -/// The skin which the player will spawn with -/// The x-coordinate of the player's spawn position -/// The y-coordinate of the player's spawn position -/// The z-coordinate of the player's spawn position -/// The direction in which the player needs to be facing after spawning -/// The first spawn-weapon for the player -/// The amount of ammunition for the primary spawnweapon -/// The second spawn-weapon for the player -/// The amount of ammunition for the second spawnweapon -/// The third spawn-weapon for the player -/// The amount of ammunition for the third spawnweapon -/// -/// -/// +/** + * This function can be used to change the spawn information of a specific player. It allows you to automatically set someone's spawn weapons, their team, skin and spawn position, normally used in case of minigames or automatic-spawn systems. This function is more crash-safe then using SetPlayerSkin in OnPlayerSpawn and/or OnPlayerRequestClass, even though this has been fixed in 0.2. + * The Playerid of who you want to set the spawn information + * The Team-ID of the chosen player + * The skin which the player will spawn with + * The x-coordinate of the player's spawn position + * The y-coordinate of the player's spawn position + * The z-coordinate of the player's spawn position + * The direction in which the player needs to be facing after spawning + * The first spawn-weapon for the player + * The amount of ammunition for the primary spawnweapon + * The second spawn-weapon for the player + * The amount of ammunition for the second spawnweapon + * The third spawn-weapon for the player + * The amount of ammunition for the third spawnweapon + * + * + * + */ native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); -/// (Re)Spawns a player. -/// The ID of the player to spawn -/// -/// -/// -/// Kills the player if they are in a vehicle and then they spawn with a bottle in their hand. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected. -///
    +/** + * (Re)Spawns a player. + * The ID of the player to spawn + * + * + * + * Kills the player if they are in a vehicle and then they spawn with a bottle in their hand. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected. + *
    + */ native SpawnPlayer(playerid); // Player info -/// Set a player's position. -/// The ID of the player to set the position of -/// The x coordinate to position the player at -/// The y coordinate to position the player at -/// The z coordinate to position the player at -/// -/// -/// -/// -/// -/// Using this function on a player in a vehicle will instantly remove them from the vehicle. Useful for quickly ejecting players. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player specified does not exist. -///
    +/** + * Set a player's position. + * The ID of the player to set the position of + * The x coordinate to position the player at + * The y coordinate to position the player at + * The z coordinate to position the player at + * + * + * + * + * + * Using this function on a player in a vehicle will instantly remove them from the vehicle. Useful for quickly ejecting players. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player specified does not exist. + *
    + */ native SetPlayerPos(playerid, Float:x, Float:y, Float:z); -/// This sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position. -/// The ID of the player to set the position of -/// The x coordinate to position the player at -/// The x coordinate to position the player at -/// The z coordinate to position the player at -/// -/// -/// This function does not work if the new coordinates are far away from where the player currently is. The z height will be 0, which will likely put them underground. It is highly recommended that the MapAndreas plugin be used instead. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player specified does not exist. -///
    +/** + * This sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position. + * The ID of the player to set the position of + * The x coordinate to position the player at + * The x coordinate to position the player at + * The z coordinate to position the player at + * + * + * This function does not work if the new coordinates are far away from where the player currently is. The z height will be 0, which will likely put them underground. It is highly recommended that the MapAndreas plugin be used instead. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player specified does not exist. + *
    + */ native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); -/// Get the position of a player, represented by x, y and z coordinates. -/// The ID of the player to get the position of -/// A float variable in which to store the x coordinate in, passed by reference -/// A float variable in which to store the y coordinate in, passed by reference -/// A float variable in which to store the z coordinate in, passed by reference -/// -/// -/// -/// -/// This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. -/// true on success, false on failure (i.e. player not connected). +/** + * Get the position of a player, represented by x, y and z coordinates. + * The ID of the player to get the position of + * A float variable in which to store the x coordinate in, passed by reference + * A float variable in which to store the y coordinate in, passed by reference + * A float variable in which to store the z coordinate in, passed by reference + * + * + * + * + * This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. + * true on success, false on failure (i.e. player not connected). + */ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); -/// Set a player's facing angle (z rotation). -/// The ID of the player to set the facing angle of -/// The angle the player should face -/// -/// -/// Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player specified does not exist. -///
    +/** + * Set a player's facing angle (z rotation). + * The ID of the player to set the facing angle of + * The angle the player should face + * + * + * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player specified does not exist. + *
    + */ native SetPlayerFacingAngle(playerid, Float:ang); -/// Gets the angle a player is facing. -/// The player you want to get the angle of -/// The Float to store the angle in, passed by reference -/// -/// -/// Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. -/// Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. +/** + * Gets the angle a player is facing. + * The player you want to get the angle of + * The Float to store the angle in, passed by reference + * + * + * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. + * Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. + */ native GetPlayerFacingAngle(playerid, &Float:ang); -/// Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. -/// The ID of the player -/// The furthest distance the player can be from the point to be in range -/// The x coordinate of the point to check the range to -/// The y coordinate of the point to check the range to -/// The z coordinate of the point to check the range to -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// 1 if the player is in range, 0 if not. +/** + * Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. + * The ID of the player + * The furthest distance the player can be from the point to be in range + * The x coordinate of the point to check the range to + * The y coordinate of the point to check the range to + * The z coordinate of the point to check the range to + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * 1 if the player is in range, 0 if not. + */ native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); -/// Calculate the distance between a player and a map coordinate. -/// The ID of the player to calculate the distance from -/// The x map coordinate -/// The y map coordinate -/// The z map coordinate -/// -/// -/// -/// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! -/// The distance between the player and the point as a float. +/** + * Calculate the distance between a player and a map coordinate. + * The ID of the player to calculate the distance from + * The x map coordinate + * The y map coordinate + * The z map coordinate + * + * + * + * This function was added in SA-MP 0.3c R3 and will not work in earlier versions! + * The distance between the player and the point as a float. + */ native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); -/// Checks if a player is streamed in another player's client. -/// The ID of the player to check is streamed in -/// The ID of the player to check if playerid is streamed in for -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// Players aren't streamed in on their own client, so if playerid is the same as targetid it will return false! -/// Players stream out if they are more than 150 meters away (see server.cfg - stream_distance) -/// 1 if the player is streamed in, 0 if not. +/** + * Checks if a player is streamed in another player's client. + * The ID of the player to check is streamed in + * The ID of the player to check if playerid is streamed in for + * + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * Players aren't streamed in on their own client, so if playerid is the same as targetid it will return false! + * Players stream out if they are more than 150 meters away (see server.cfg - stream_distance) + * 1 if the player is streamed in, 0 if not. + */ native bool:IsPlayerStreamedIn(targetid, playerid); -/// Set a player's interior. A list of currently known interiors and their positions can be found here. -/// The ID of the player to set the interior of -/// The interior ID to set the player in -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected. -///
    +/** + * Set a player's interior. A list of currently known interiors and their positions can be found here. + * The ID of the player to set the interior of + * The interior ID to set the player in + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected. + *
    + */ native SetPlayerInterior(playerid, interiorid); -/// Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page. -/// The player to get the interior ID of -/// -/// -/// Always returns 0 for NPCs. -/// The interior ID the player is currently in. +/** + * Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page. + * The player to get the interior ID of + * + * + * Always returns 0 for NPCs. + * The interior ID the player is currently in. + */ native GetPlayerInterior(playerid); -/// Set the health of a player. -/// The ID of the player to set the health of -/// The value to set the player's health to. Max health that can be displayed in the HUD is 100, though higher values are valid -/// -/// -/// -/// Health is obtained rounded to integers: set 50.15, but get 50.0 -/// If a player's health is set to 0 or a minus value, they will die instantly. -/// If a player's health is below 10 or above 98303, their health bar will flash. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player specified does not exist. -///
    +/** + * Set the health of a player. + * The ID of the player to set the health of + * The value to set the player's health to. Max health that can be displayed in the HUD is 100, though higher values are valid + * + * + * + * Health is obtained rounded to integers: set 50.15, but get 50.0 + * If a player's health is set to 0 or a minus value, they will die instantly. + * If a player's health is below 10 or above 98303, their health bar will flash. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player specified does not exist. + *
    + */ native SetPlayerHealth(playerid, Float:health); -/// The function GetPlayerHealth allows you to retrieve the health of a player. Useful for cheat detection, among other things. -/// The ID of the player -/// Float to store health, passed by reference -/// -/// -/// -/// -/// Even though the health can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc.
    -/// Health is obtained rounded to integers: set 50.15, but get 50.0 -///
    -/// -/// 1 - success.
    -/// 0 - failure (i.e. player not connected).
    -///
    +/** + * The function GetPlayerHealth allows you to retrieve the health of a player. Useful for cheat detection, among other things. + * The ID of the player + * Float to store health, passed by reference + * + * + * + * + * Even though the health can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc.
    + * Health is obtained rounded to integers: set 50.15, but get 50.0 + *
    + * + * 1 - success.
    + * 0 - failure (i.e. player not connected).
    + *
    + */ native GetPlayerHealth(playerid, &Float:health); -/// Set a player's armor level. -/// The ID of the player to set the armour of -/// The amount of armour to set, as a percentage (float). Values larger than 100 are valid, but won't be displayed in the HUD's armour bar -/// -/// -/// -/// Armour is obtained rounded to integers: set 50.15, but get 50.0 -/// The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player specified does not exist. -///
    +/** + * Set a player's armor level. + * The ID of the player to set the armour of + * The amount of armour to set, as a percentage (float). Values larger than 100 are valid, but won't be displayed in the HUD's armour bar + * + * + * + * Armour is obtained rounded to integers: set 50.15, but get 50.0 + * The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player specified does not exist. + *
    + */ native SetPlayerArmour(playerid, Float:armour); -/// This function stores the armour of a player into a variable. -/// The ID of the player that you want to get the armour of -/// The float to to store the armour in, passed by reference -/// -/// -/// -/// Even though the armour can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc. -/// Armour is obtained rounded to integers: set 50.15, but get 50.0 -/// The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. -/// -/// 1 - success.
    -/// 0 - failure (i.e. player not connected).
    -///
    +/** + * This function stores the armour of a player into a variable. + * The ID of the player that you want to get the armour of + * The float to to store the armour in, passed by reference + * + * + * + * Even though the armour can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc. + * Armour is obtained rounded to integers: set 50.15, but get 50.0 + * The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. + * + * 1 - success.
    + * 0 - failure (i.e. player not connected).
    + *
    + */ native GetPlayerArmour(playerid, &Float:armour); -/// Set the ammo of a player's weapon. -/// The ID of the player to set the weapon ammo of -/// The ID of the weapon to set the ammo of. -/// The amount of ammo to set -/// -/// -/// -/// Set the ammo to 0 to remove a weapon from a player's inventory. Note that the weapon will still show up in GetPlayerWeaponData, albeit with 0 ammo. -/// -/// 1: The function executed successfully. Success is also returned when the weapon specified is invalid.
    -/// 0: The function failed to execute. The player isn't connected.
    -///
    +/** + * Set the ammo of a player's weapon. + * The ID of the player to set the weapon ammo of + * The ID of the weapon to set the ammo of. + * The amount of ammo to set + * + * + * + * Set the ammo to 0 to remove a weapon from a player's inventory. Note that the weapon will still show up in GetPlayerWeaponData, albeit with 0 ammo. + * + * 1: The function executed successfully. Success is also returned when the weapon specified is invalid.
    + * 0: The function failed to execute. The player isn't connected.
    + *
    + */ native SetPlayerAmmo(playerid, WEAPON:weaponid, ammo); -/// Gets the amount of ammo in a player's current weapon. -/// The ID of the player whose ammo to get -/// -/// -/// The ammo can hold 16-bit values, therefore values over 32767 will return erroneous values. -/// The amount of ammo in the player's current weapon. +/** + * Gets the amount of ammo in a player's current weapon. + * The ID of the player whose ammo to get + * + * + * The ammo can hold 16-bit values, therefore values over 32767 will return erroneous values. + * The amount of ammo in the player's current weapon. + */ native GetPlayerAmmo(playerid); -/// Check the state of a player's weapon. -/// The ID of the player to obtain the weapon state of -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// Weapon states:
    -///
      -///
    • WEAPONSTATE_UNKNOWN - unknown (Set when in a vehicle)
    • -///
    • WEAPONSTATE_NO_BULLETS - The weapon has no remaining ammo
    • -///
    • WEAPONSTATE_LAST_BULLET - the weapon has one remaining bullet
    • -///
    • WEAPONSTATE_MORE_BULLETS - the weapon has multiple bullets
    • -///
    • WEAPONSTATE_RELOADING - the player is reloading their weapon
    • -///
    -///
    -/// The state of the player's weapon. 0 if player specified does not exist. +/** + * Check the state of a player's weapon. + * The ID of the player to obtain the weapon state of + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * Weapon states:
    + *
      + *
    • WEAPONSTATE_UNKNOWN - unknown (Set when in a vehicle)
    • + *
    • WEAPONSTATE_NO_BULLETS - The weapon has no remaining ammo
    • + *
    • WEAPONSTATE_LAST_BULLET - the weapon has one remaining bullet
    • + *
    • WEAPONSTATE_MORE_BULLETS - the weapon has multiple bullets
    • + *
    • WEAPONSTATE_RELOADING - the player is reloading their weapon
    • + *
    + *
    + * The state of the player's weapon. 0 if player specified does not exist. + */ native WEAPONSTATE:GetPlayerWeaponState(playerid); -/// Check who a player is aiming at. -/// The ID of the player to get the target of -/// -/// -/// -/// This function was added in SA-MP 0.3d and will not work in earlier versions! -/// Does not work for joypads/controllers, and after a certain distance. -/// Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. -/// The ID of the target player, or INVALID_PLAYER_ID if none. +/** + * Check who a player is aiming at. + * The ID of the player to get the target of + * + * + * + * This function was added in SA-MP 0.3d and will not work in earlier versions! + * Does not work for joypads/controllers, and after a certain distance. + * Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. + * The ID of the target player, or INVALID_PLAYER_ID if none. + */ native GetPlayerTargetPlayer(playerid); -/// Gets ID of an actor which is aimed by certain player. -/// The ID of the player to get the target of -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// Does not work for joypads/controllers, and after a certain distance. -/// Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. -/// The ID of the targeted actor, or INVALID_ACTOR_ID if none. +/** + * Gets ID of an actor which is aimed by certain player. + * The ID of the player to get the target of + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * Does not work for joypads/controllers, and after a certain distance. + * Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. + * The ID of the targeted actor, or INVALID_ACTOR_ID if none. + */ native GetPlayerTargetActor(playerid); -/// Set the team of a player. -/// The ID of the player you want to set the team of -/// The team to put the player in. Use NO_TEAM to remove the player from any team -/// -/// -/// -/// Players can not damage/kill players on the same team unless they use a knife to slit their throat. As of SA-MP 0.3x, players are also unable to damage vehicles driven by a player from the same team. This can be enabled with EnableVehicleFriendlyFire. -/// 255 (or NO_TEAM) is the default team to be able to shoot other players, not 0. +/** + * Set the team of a player. + * The ID of the player you want to set the team of + * The team to put the player in. Use NO_TEAM to remove the player from any team + * + * + * + * Players can not damage/kill players on the same team unless they use a knife to slit their throat. As of SA-MP 0.3x, players are also unable to damage vehicles driven by a player from the same team. This can be enabled with EnableVehicleFriendlyFire. + * 255 (or NO_TEAM) is the default team to be able to shoot other players, not 0. + */ native SetPlayerTeam(playerid, teamid); -/// Get the ID of the team the player is on. -/// The ID of the player to get the team of -/// -/// -/// -/// 0-254: The player's team. (0 is a valid team).
    -/// 255: Defined as NO_TEAM. The player is not on any team.
    -/// -1: The function failed to execute. Player is not connected. -///
    +/** + * Get the ID of the team the player is on. + * The ID of the player to get the team of + * + * + * + * 0-254: The player's team. (0 is a valid team).
    + * 255: Defined as NO_TEAM. The player is not on any team.
    + * -1: The function failed to execute. Player is not connected. + *
    + */ native GetPlayerTeam(playerid); -/// Set a player's score. Players' scores are shown in the scoreboard (shown by holding the TAB key). -/// The ID of the player to set the score of -/// The value to set the player's score to -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player specified does not exist. -///
    +/** + * Set a player's score. Players' scores are shown in the scoreboard (shown by holding the TAB key). + * The ID of the player to set the score of + * The value to set the player's score to + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player specified does not exist. + *
    + */ native SetPlayerScore(playerid, score); -/// This function returns a player's score as it was set using SetPlayerScore. -/// The player to get the score of -/// -/// -/// The player's score. +/** + * This function returns a player's score as it was set using SetPlayerScore. + * The player to get the score of + * + * + * The player's score. + */ native GetPlayerScore(playerid); -/// -/// Checks the player's level of drunkenness. If the level is less than 2000, the player is sober. The player's level of drunkness goes down slowly automatically (1 level per frame) but will always reach 2000 at the end (in 0.3b it will stop at 0). -/// The higher drunkenness levels affect the player's camera, and the car driving handling. The level of drunkenness increases when the player drinks from a bottle (You can use SetPlayerSpecialAction to give them bottles). -/// -/// The player you want to check the drunkenness level of -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// An integer with the level of drunkenness of the player. +/** + * + * Checks the player's level of drunkenness. If the level is less than 2000, the player is sober. The player's level of drunkness goes down slowly automatically (1 level per frame) but will always reach 2000 at the end (in 0.3b it will stop at 0). + * The higher drunkenness levels affect the player's camera, and the car driving handling. The level of drunkenness increases when the player drinks from a bottle (You can use SetPlayerSpecialAction to give them bottles). + * + * The player you want to check the drunkenness level of + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * An integer with the level of drunkenness of the player. + */ native GetPlayerDrunkLevel(playerid); -/// Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control. -/// The ID of the player to set the drunkenness of -/// The level of drunkenness to set -/// -/// -/// Players' drunk level will automatically decrease over time, based on their FPS (players with 50 FPS will lose 50 'levels' per second. This is useful for determining a player's FPS!).
    -/// In 0.3a the drunk level will decrement and stop at 2000. In 0.3b+ the drunk level decrements to 0)
    -/// Levels over 2000 make the player drunk (camera swaying and vehicles difficult to control).
    -/// Max drunk level is 50000.
    -/// While the drunk level is above 5000, the player's HUD (radar etc.) will be hidden. -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected. -///
    +/** + * Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control. + * The ID of the player to set the drunkenness of + * The level of drunkenness to set + * + * + * Players' drunk level will automatically decrease over time, based on their FPS (players with 50 FPS will lose 50 'levels' per second. This is useful for determining a player's FPS!).
    + * In 0.3a the drunk level will decrement and stop at 2000. In 0.3b+ the drunk level decrements to 0)
    + * Levels over 2000 make the player drunk (camera swaying and vehicles difficult to control).
    + * Max drunk level is 50000.
    + * While the drunk level is above 5000, the player's HUD (radar etc.) will be hidden. + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected. + *
    + */ native SetPlayerDrunkLevel(playerid, level); -/// Set the colour of a player's nametag and marker (radar blip). -/// The ID of the player whose colour to set -/// The colour to set. Supports alpha values (RGBA) -/// -/// -/// -/// This function will change player's colour for everyone, even if player's colour was changed with SetPlayerMarkerForPlayer for any other player. -/// If used under OnPlayerConnect, the affecting player will not see the colour in the TAB menu. +/** + * Set the colour of a player's nametag and marker (radar blip). + * The ID of the player whose colour to set + * The colour to set. Supports alpha values (RGBA) + * + * + * + * This function will change player's colour for everyone, even if player's colour was changed with SetPlayerMarkerForPlayer for any other player. + * If used under OnPlayerConnect, the affecting player will not see the colour in the TAB menu. + */ native SetPlayerColor(playerid, colour); -/// Gets the colour of the player's name and radar marker. Only works after SetPlayerColor. -/// The ID of the player to get the colour of -/// -/// -/// GetPlayerColor will return 0 unless SetPlayerColor has been used first. -/// The player's colour. 0 if no colour set or player not connected. +/** + * Gets the colour of the player's name and radar marker. Only works after SetPlayerColor. + * The ID of the player to get the colour of + * + * + * GetPlayerColor will return 0 unless SetPlayerColor has been used first. + * The player's colour. 0 if no colour set or player not connected. + */ native GetPlayerColor(playerid); -/// Set the skin of a player. A player's skin is their character model. -/// The ID of the player to set the skin of -/// The skin the player should use -/// -/// -/// If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, they will become frozen or otherwise glitched. This can be fixed by using TogglePlayerControllable. Players can be detected as being crouched through GetPlayerSpecialAction (SPECIAL_ACTION_DUCK). -/// Setting a player's skin when he is dead may crash players around him. -/// Note that 'success' is reported even when skin ID is invalid (not 0-311, or 74), but the skin will be set to ID 0 (CJ). -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player specified does not exist.
    -///
    +/** + * Set the skin of a player. A player's skin is their character model. + * The ID of the player to set the skin of + * The skin the player should use + * + * + * If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, they will become frozen or otherwise glitched. This can be fixed by using TogglePlayerControllable. Players can be detected as being crouched through GetPlayerSpecialAction (SPECIAL_ACTION_DUCK). + * Setting a player's skin when he is dead may crash players around him. + * Note that 'success' is reported even when skin ID is invalid (not 0-311, or 74), but the skin will be set to ID 0 (CJ). + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player specified does not exist.
    + *
    + */ native SetPlayerSkin(playerid, skinid); -/// Returns the class of the players skin. -/// The player you want to get the skin from -/// -/// Returns the new skin after SetSpawnInfo is called but before the player actually respawns to get the new skin. -/// Returns the old skin if the player was spawned through SpawnPlayer function. -/// The skin ID (0 if invalid). +/** + * Returns the class of the players skin. + * The player you want to get the skin from + * + * Returns the new skin after SetSpawnInfo is called but before the player actually respawns to get the new skin. + * Returns the old skin if the player was spawned through SpawnPlayer function. + * The skin ID (0 if invalid). + */ native GetPlayerSkin(playerid); -/// Returns the class of the players skin. -/// The player you want to get the skin from -/// -/// Returns the new skin after SetSpawnInfo is called but before the player actually respawns to get the new skin. -/// Returns the old skin if the player was spawned through SpawnPlayer function. -/// The skin id (0 if invalid). +/** + * Returns the class of the players skin. + * The player you want to get the skin from + * + * Returns the new skin after SetSpawnInfo is called but before the player actually respawns to get the new skin. + * Returns the old skin if the player was spawned through SpawnPlayer function. + * The skin id (0 if invalid). + */ native GetPlayerCustomSkin(playerid); -/// Give a player a weapon with a specified amount of ammo. -/// The ID of the player to give a weapon to -/// The ID of the weapon to give to the player -/// The amount of ammo to give to the player -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected.
    -///
    +/** + * Give a player a weapon with a specified amount of ammo. + * The ID of the player to give a weapon to + * The ID of the weapon to give to the player + * The amount of ammo to give to the player + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected.
    + *
    + */ native GivePlayerWeapon(playerid, WEAPON:weaponid, ammo); -/// Removes all weapons from a player. -/// The ID of the player whose weapons to remove -/// -/// -/// To remove individual weapons from a player, set their ammo to 0 using SetPlayerAmmo. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player specified does not exist. -///
    +/** + * Removes all weapons from a player. + * The ID of the player whose weapons to remove + * + * + * To remove individual weapons from a player, set their ammo to 0 using SetPlayerAmmo. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player specified does not exist. + *
    + */ native ResetPlayerWeapons(playerid); -/// Sets which weapon (that a player already has) the player is holding. -/// The ID of the player to arm with a weapon -/// The ID of the weapon that the player should be armed with -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// This function arms a player with a weapon they already have; it does not give them a new weapon. See GivePlayerWeapon. -/// -/// 1: The function executed successfully. Success is returned even when the function fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).
    -/// 0: The function failed to execute. The player is not connected. -///
    +/** + * Sets which weapon (that a player already has) the player is holding. + * The ID of the player to arm with a weapon + * The ID of the weapon that the player should be armed with + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * This function arms a player with a weapon they already have; it does not give them a new weapon. See GivePlayerWeapon. + * + * 1: The function executed successfully. Success is returned even when the function fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).
    + * 0: The function failed to execute. The player is not connected. + *
    + */ native SetPlayerArmedWeapon(playerid, WEAPON:weaponid); -/// Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot). -/// The ID of the player whose weapon data to retrieve -/// The weapon slot to get data for (0-12) -/// A variable in which to store the weapon ID, passed by reference -/// A variable in which to store the ammo, passed by reference -/// -/// -/// Old weapons with no ammo left are still returned. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player isn't connected and/or the weapon slot specified is invalid (valid is 0-12). -///
    +/** + * Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot). + * The ID of the player whose weapon data to retrieve + * The weapon slot to get data for (0-12) + * A variable in which to store the weapon ID, passed by reference + * A variable in which to store the ammo, passed by reference + * + * + * Old weapons with no ammo left are still returned. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player isn't connected and/or the weapon slot specified is invalid (valid is 0-12). + *
    + */ native GetPlayerWeaponData(playerid, slot, &WEAPON:weapons, &ammo); -/// Give money to or take money from a player. -/// The ID of the player to give money to or take money from -/// The amount of money to give the player. Use a minus value to take money -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected. -///
    +/** + * Give money to or take money from a player. + * The ID of the player to give money to or take money from + * The amount of money to give the player. Use a minus value to take money + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected. + *
    + */ native GivePlayerMoney(playerid, money); -/// Reset a player's money to $0. -/// The ID of the player to reset the money of -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected. -///
    +/** + * Reset a player's money to $0. + * The ID of the player to reset the money of + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected. + *
    + */ native ResetPlayerMoney(playerid); -/// Sets the name of a player. -/// The ID of the player to set the name of -/// The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-z, [], (), $, @, ., _, =) -/// -/// Changing the players' name to the same name but with different character cases (e.g. "John" to "JOHN") will not work. -/// If used in OnPlayerConnect, the new name will not be shown for the connecting player. -/// Passing a null string as the new name will crash the server. -/// Player names can be up to 24 characters when using this function, but when joining the server from the SA-MP server browser, players' names must be no more than 20 and less than 3 characters (the server will deny entry). This allows for 4 characters extra when using SetPlayerName. -/// -/// 1 The name was changed successfully.
    -/// 0 The player already has that name.
    -/// -1 The name can not be changed (it's already in use, too long or has invalid characters). -///
    +/** + * Sets the name of a player. + * The ID of the player to set the name of + * The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-z, [], (), $, @, ., _, =) + * + * Changing the players' name to the same name but with different character cases (e.g. "John" to "JOHN") will not work. + * If used in OnPlayerConnect, the new name will not be shown for the connecting player. + * Passing a null string as the new name will crash the server. + * Player names can be up to 24 characters when using this function, but when joining the server from the SA-MP server browser, players' names must be no more than 20 and less than 3 characters (the server will deny entry). This allows for 4 characters extra when using SetPlayerName. + * + * 1 The name was changed successfully.
    + * 0 The player already has that name.
    + * -1 The name can not be changed (it's already in use, too long or has invalid characters). + *
    + */ native SetPlayerName(playerid, const name[]); -/// Retrieves the amount of money a player has. -/// The ID of the player to get the money of -/// -/// -/// The amount of money the player has. +/** + * Retrieves the amount of money a player has. + * The ID of the player to get the money of + * + * + * The amount of money the player has. + */ native GetPlayerMoney(playerid); -/// Get a player's current state. -/// The ID of the player to get the current state of -/// -/// -/// -/// -/// States:
    -///
      -///
    • PLAYER_STATE_NONE - empty (while initializing)
    • -///
    • PLAYER_STATE_ONFOOT - player is on foot
    • -///
    • PLAYER_STATE_DRIVER - player is the driver of a vehicle
    • -///
    • PLAYER_STATE_PASSENGER - player is passenger of a vehicle
    • -///
    • PLAYER_STATE_WASTED - player is dead or on class selection
    • -///
    • PLAYER_STATE_SPAWNED - player is spawned
    • -///
    • PLAYER_STATE_SPECTATING - player is spectating
    • -///
    • PLAYER_STATE_EXIT_VEHICLE - player exits a vehicle
    • -///
    • PLAYER_STATE_ENTER_VEHICLE_DRIVER - player enters a vehicle as driver
    • -///
    • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger
    • -///
    -///
    -/// The player's current state as an integer. +/** + * Get a player's current state. + * The ID of the player to get the current state of + * + * + * + * + * States:
    + *
      + *
    • PLAYER_STATE_NONE - empty (while initializing)
    • + *
    • PLAYER_STATE_ONFOOT - player is on foot
    • + *
    • PLAYER_STATE_DRIVER - player is the driver of a vehicle
    • + *
    • PLAYER_STATE_PASSENGER - player is passenger of a vehicle
    • + *
    • PLAYER_STATE_WASTED - player is dead or on class selection
    • + *
    • PLAYER_STATE_SPAWNED - player is spawned
    • + *
    • PLAYER_STATE_SPECTATING - player is spectating
    • + *
    • PLAYER_STATE_EXIT_VEHICLE - player exits a vehicle
    • + *
    • PLAYER_STATE_ENTER_VEHICLE_DRIVER - player enters a vehicle as driver
    • + *
    • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger
    • + *
    + *
    + * The player's current state as an integer. + */ native PLAYER_STATE:GetPlayerState(playerid); -/// Get the specified player's IP address and store it in a string. -/// The ID of the player to get the IP address of -/// An array into which to store the player's IP address, passed by reference -/// The maximum length of the IP address (recommended 16) -/// -/// -/// -/// -/// -/// -/// -/// This function does not work when used in OnPlayerDisconnect because the player is already disconnected. It will return an invalid IP (255.255.255.255). Save players' IPs under OnPlayerConnect if they need to be used under OnPlayerDisconnect. -/// 1 on success and 0 on failure. +/** + * Get the specified player's IP address and store it in a string. + * The ID of the player to get the IP address of + * An array into which to store the player's IP address, passed by reference + * The maximum length of the IP address (recommended 16) + * + * + * + * + * + * + * + * This function does not work when used in OnPlayerDisconnect because the player is already disconnected. It will return an invalid IP (255.255.255.255). Save players' IPs under OnPlayerConnect if they need to be used under OnPlayerDisconnect. + * 1 on success and 0 on failure. + */ native GetPlayerIp(playerid, ip[], len = sizeof (ip)); -/// Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back. -/// The ID of the player to get the ping of -/// -/// -/// -/// Player's ping may be 65535 for a while after a player connects -/// The current ping of the player (expressed in milliseconds). +/** + * Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back. + * The ID of the player to get the ping of + * + * + * + * Player's ping may be 65535 for a while after a player connects + * The current ping of the player (expressed in milliseconds). + */ native GetPlayerPing(playerid); -/// Returns the ID of the weapon a player is currently holding. -/// The ID of the player to get the currently held weapon of -/// -/// -/// -/// Prior to version 0.3z R1-2, when the player state is PLAYER_STATE_PASSENGER this function returns the weapon held by the player before they entered the vehicle. If a cheat is used to spawn a weapon inside a vehicle, this function will not report it. -/// The ID of the player's current weapon. Returns -1 if the player specified does not exist. +/** + * Returns the ID of the weapon a player is currently holding. + * The ID of the player to get the currently held weapon of + * + * + * + * Prior to version 0.3z R1-2, when the player state is PLAYER_STATE_PASSENGER this function returns the weapon held by the player before they entered the vehicle. If a cheat is used to spawn a weapon inside a vehicle, this function will not report it. + * The ID of the player's current weapon. Returns -1 if the player specified does not exist. + */ native WEAPON:GetPlayerWeapon(playerid); -/// Check which keys a player is pressing. -/// The ID of the player to get the keys of -/// Bitmask containing the player's key states. List of keys -/// Up/down state -/// Left/right state -/// -/// Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). -/// As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. -/// The keys are stored in the specified variables. +/** + * Check which keys a player is pressing. + * The ID of the player to get the keys of + * Bitmask containing the player's key states. List of keys + * Up/down state + * Left/right state + * + * Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). + * As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. + * The keys are stored in the specified variables. + */ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); -/// Get a player's name. -/// The ID of the player to get the name of -/// An array into which to store the name, passed by reference -/// The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME -/// -/// -/// -/// -/// -/// A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. -/// The length of the player's name. 0 if player specified doesn't exist. +/** + * Get a player's name. + * The ID of the player to get the name of + * An array into which to store the name, passed by reference + * The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME + * + * + * + * + * + * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. + * The length of the player's name. 0 if player specified doesn't exist. + */ native GetPlayerName(playerid, name[], len = sizeof (name)); -/// Sets the game time for a player. If a player's clock is enabled (TogglePlayerClock) the time displayed by it will update automatically. -/// The ID of the player to set the game time of -/// Hour to set (0-23) -/// Minutes to set (0-59) -/// -/// -/// -/// Using this function under OnPlayerConnect doesn't work. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player specified does not exist. -///
    +/** + * Sets the game time for a player. If a player's clock is enabled (TogglePlayerClock) the time displayed by it will update automatically. + * The ID of the player to set the game time of + * Hour to set (0-23) + * Minutes to set (0-59) + * + * + * + * Using this function under OnPlayerConnect doesn't work. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player specified does not exist. + *
    + */ native SetPlayerTime(playerid, hour, minute); -/// Get the player's current game time. Set by SetWorldTime or SetPlayerTime, or by the game automatically if TogglePlayerClock is used. -/// The ID of the player to get the game time of -/// A variable in which to store the hour, passed by reference -/// A variable in which to store the minutes, passed by reference -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player specified does not exist.
    -///
    +/** + * Get the player's current game time. Set by SetWorldTime or SetPlayerTime, or by the game automatically if TogglePlayerClock is used. + * The ID of the player to get the game time of + * A variable in which to store the hour, passed by reference + * A variable in which to store the minutes, passed by reference + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player specified does not exist.
    + *
    + */ native GetPlayerTime(playerid, &hour, &minute); -/// Toggle the in-game clock (top-right corner) for a specific player. When this is enabled, time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) when set using SetWeather/SetPlayerWeather. -/// The player whose clock you want to enable/disable -/// 1 to show and 0 to hide. Hidden by default -/// Time is not synced with other players! Time can be synced using SetPlayerTime. -/// Time will automatically advance 6 hours when the player dies. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The specified player does not exist. -///
    +/** + * Toggle the in-game clock (top-right corner) for a specific player. When this is enabled, time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) when set using SetWeather/SetPlayerWeather. + * The player whose clock you want to enable/disable + * 1 to show and 0 to hide. Hidden by default + * Time is not synced with other players! Time can be synced using SetPlayerTime. + * Time will automatically advance 6 hours when the player dies. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The specified player does not exist. + *
    + */ native TogglePlayerClock(playerid, bool:toggle); -/// Set a player's weather. -/// The ID of the player whose weather to set -/// The weather to set -/// -/// -/// If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. +/** + * Set a player's weather. + * The ID of the player whose weather to set + * The weather to set + * + * + * If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. + */ native SetPlayerWeather(playerid, weather); -/// Forces a player to go back to class selection. -/// The player to send back to class selection -/// -/// -/// -/// -/// The player will not return to class selection until they re-spawn. This can be achieved with TogglePlayerSpectating, as seen in the below example. +/** + * Forces a player to go back to class selection. + * The player to send back to class selection + * + * + * + * + * The player will not return to class selection until they re-spawn. This can be achieved with TogglePlayerSpectating, as seen in the below example. + */ native ForceClassSelection(playerid); -/// Set a player's wanted level (6 brown stars under HUD). -/// The ID of the player to set the wanted level of -/// The wanted level to set for the player (0-6) -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player specified does not exist. -///
    +/** + * Set a player's wanted level (6 brown stars under HUD). + * The ID of the player to set the wanted level of + * The wanted level to set for the player (0-6) + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player specified does not exist. + *
    + */ native SetPlayerWantedLevel(playerid, level); -/// Gets the wanted level of a player. -/// The ID of the player that you want to get the wanted level of -/// -/// -/// The player's wanted level. +/** + * Gets the wanted level of a player. + * The ID of the player that you want to get the wanted level of + * + * + * The player's wanted level. + */ native GetPlayerWantedLevel(playerid); -/// Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default). -/// The ID of player to set the fighting style of -/// The fighting style that should be set -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// This does not affect normal fist attacks - only special/secondary attacks (aim + press 'secondary attack' key). -/// -/// Fighting styles:
    -///
      -///
    • FIGHT_STYLE_NORMAL
    • -///
    • FIGHT_STYLE_BOXING
    • -///
    • FIGHT_STYLE_KUNGFU
    • -///
    • FIGHT_STYLE_KNEEHEAD
    • -///
    • FIGHT_STYLE_GRABKICK
    • -///
    • FIGHT_STYLE_ELBOW
    • -///
    -///
    +/** + * Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default). + * The ID of player to set the fighting style of + * The fighting style that should be set + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * This does not affect normal fist attacks - only special/secondary attacks (aim + press 'secondary attack' key). + * + * Fighting styles:
    + *
      + *
    • FIGHT_STYLE_NORMAL
    • + *
    • FIGHT_STYLE_BOXING
    • + *
    • FIGHT_STYLE_KUNGFU
    • + *
    • FIGHT_STYLE_KNEEHEAD
    • + *
    • FIGHT_STYLE_GRABKICK
    • + *
    • FIGHT_STYLE_ELBOW
    • + *
    + *
    + */ native SetPlayerFightingStyle(playerid, FIGHT_STYLE:style); -/// Get the fighting style the player currently using. -/// The ID of the player to get the fighting style of -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// Fighting styles:
    -///
      -///
    • FIGHT_STYLE_NORMAL
    • -///
    • FIGHT_STYLE_BOXING
    • -///
    • FIGHT_STYLE_KUNGFU
    • -///
    • FIGHT_STYLE_KNEEHEAD
    • -///
    • FIGHT_STYLE_GRABKICK
    • -///
    • FIGHT_STYLE_ELBOW
    • -///
    -///
    -/// The ID of the fighting style of the player. +/** + * Get the fighting style the player currently using. + * The ID of the player to get the fighting style of + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * Fighting styles:
    + *
      + *
    • FIGHT_STYLE_NORMAL
    • + *
    • FIGHT_STYLE_BOXING
    • + *
    • FIGHT_STYLE_KUNGFU
    • + *
    • FIGHT_STYLE_KNEEHEAD
    • + *
    • FIGHT_STYLE_GRABKICK
    • + *
    • FIGHT_STYLE_ELBOW
    • + *
    + *
    + * The ID of the fighting style of the player. + */ native FIGHT_STYLE:GetPlayerFightingStyle(playerid); -/// Set a player's velocity on the x, y and z axes. -/// The player to apply the speed to -/// The velocity (speed) on the x axis -/// The velocity (speed) on the y axis -/// The velocity (speed) on the z axis -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected. -///
    +/** + * Set a player's velocity on the x, y and z axes. + * The player to apply the speed to + * The velocity (speed) on the x axis + * The velocity (speed) on the y axis + * The velocity (speed) on the z axis + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected. + *
    + */ native SetPlayerVelocity(playerid, Float:x, Float:y, Float:z); -/// Get the velocity (speed) of a player on the x, y and z axes. -/// The player to get the speed from -/// A float variable in which to store the velocity on the x axis, passed by reference -/// A float variable in which to store the velocity on the y axis, passed by reference -/// A float variable in which to store the velocity on the z axis, passed by reference -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Get the velocity (speed) of a player on the x, y and z axes. + * The player to get the speed from + * A float variable in which to store the velocity on the x axis, passed by reference + * A float variable in which to store the velocity on the y axis, passed by reference + * A float variable in which to store the velocity on the z axis, passed by reference + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + */ native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); -/// This function plays a crime report for a player - just like in single-player when CJ commits a crime. -/// The ID of the player that will hear the crime report -/// The ID of the suspect player whom will be described in the crime report -/// The crime ID, which will be reported as a 10-code (i.e. 10-16 if 16 was passed as the crime) -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// Crime list:
    -///
      -///
    • 3 10-71 Advise nature of fire (size, type, contents of building)
    • -///
    • 4 10-47 Emergency road repairs needed
    • -///
    • 5 10-81 Breatherlizer Report
    • -///
    • 6 10-24 Assignment Completed
    • -///
    • 7 10-21 Call () by phone
    • -///
    • 8 10-21 Call () by phone
    • -///
    • 9 10-21 Call () by phone
    • -///
    • 10 10-17 Meet Complainant
    • -///
    • 11 10-81 Breatherlizer Report
    • -///
    • 12 10-91 Pick up prisoner/subject
    • -///
    • 13 10-28 Vehicle registration information
    • -///
    • 14 10-81 Breathalyzer
    • -///
    • 15 10-28 Vehicle registration information
    • -///
    • 16 10-91 Pick up prisoner/subject
    • -///
    • 17 10-34 Riot
    • -///
    • 18 10-37 (Investigate) suspicious vehicle
    • -///
    • 19 10-81 Breathalyzer
    • -///
    • 21 10-7 Out of service
    • -///
    • 22 10-7 Out of service
    • -///
    -///
    +/** + * This function plays a crime report for a player - just like in single-player when CJ commits a crime. + * The ID of the player that will hear the crime report + * The ID of the suspect player whom will be described in the crime report + * The crime ID, which will be reported as a 10-code (i.e. 10-16 if 16 was passed as the crime) + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * Crime list:
    + *
      + *
    • 3 10-71 Advise nature of fire (size, type, contents of building)
    • + *
    • 4 10-47 Emergency road repairs needed
    • + *
    • 5 10-81 Breatherlizer Report
    • + *
    • 6 10-24 Assignment Completed
    • + *
    • 7 10-21 Call () by phone
    • + *
    • 8 10-21 Call () by phone
    • + *
    • 9 10-21 Call () by phone
    • + *
    • 10 10-17 Meet Complainant
    • + *
    • 11 10-81 Breatherlizer Report
    • + *
    • 12 10-91 Pick up prisoner/subject
    • + *
    • 13 10-28 Vehicle registration information
    • + *
    • 14 10-81 Breathalyzer
    • + *
    • 15 10-28 Vehicle registration information
    • + *
    • 16 10-91 Pick up prisoner/subject
    • + *
    • 17 10-34 Riot
    • + *
    • 18 10-37 (Investigate) suspicious vehicle
    • + *
    • 19 10-81 Breathalyzer
    • + *
    • 21 10-7 Out of service
    • + *
    • 22 10-7 Out of service
    • + *
    + *
    + */ native PlayCrimeReportForPlayer(playerid, suspectid, crime); -/// Play an 'audio stream' for a player. Normal audio files also work (e.g. MP3). -/// The ID of the player to play the audio for -/// The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist -/// The x position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) -/// The y position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) -/// The z position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) -/// The distance over which the audio will be heard. Has no effect unless usepos is set to 1 (optional=50.0) -/// Use the positions and distance specified. (optional=0) -/// -/// -/// This function was added in SA-MP 0.3d and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player specified does not exist. -///
    +/** + * Play an 'audio stream' for a player. Normal audio files also work (e.g. MP3). + * The ID of the player to play the audio for + * The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist + * The x position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) + * The y position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) + * The z position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) + * The distance over which the audio will be heard. Has no effect unless usepos is set to 1 (optional=50.0) + * Use the positions and distance specified. (optional=0) + * + * + * This function was added in SA-MP 0.3d and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player specified does not exist. + *
    + */ native PlayAudioStreamForPlayer(playerid, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, bool:usepos = false); -/// Stops the current audio stream for a player. -/// The player you want to stop the audio stream for -/// -/// -/// This function was added in SA-MP 0.3d and will not work in earlier versions! +/** + * Stops the current audio stream for a player. + * The player you want to stop the audio stream for + * + * + * This function was added in SA-MP 0.3d and will not work in earlier versions! + */ native StopAudioStreamForPlayer(playerid); -/// Loads or unloads an interior script for a player (for example the ammunation menu). -/// The ID of the player to load the interior script for -/// The shop script to load. Leave blank ("") to unload scripts -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// This function does not support casino scripts. -/// -/// Shop names:
    -///
      -///
    • "FDPIZA" Pizza Stack
    • -///
    • "FDBURG" Burger Shot
    • -///
    • "FDCHICK"Cluckin' Bell
    • -///
    • "AMMUN1" Ammunation 1
    • -///
    • "AMMUN2" Ammunation 2
    • -///
    • "AMMUN3" Ammunation 3
    • -///
    • "AMMUN4" Ammunation 4
    • -///
    • "AMMUN5" Ammunation 5
    • -///
    -///
    +/** + * Loads or unloads an interior script for a player (for example the ammunation menu). + * The ID of the player to load the interior script for + * The shop script to load. Leave blank ("") to unload scripts + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * This function does not support casino scripts. + * + * Shop names:
    + *
      + *
    • "FDPIZA" Pizza Stack
    • + *
    • "FDBURG" Burger Shot
    • + *
    • "FDCHICK"Cluckin' Bell
    • + *
    • "AMMUN1" Ammunation 1
    • + *
    • "AMMUN2" Ammunation 2
    • + *
    • "AMMUN3" Ammunation 3
    • + *
    • "AMMUN4" Ammunation 4
    • + *
    • "AMMUN5" Ammunation 5
    • + *
    + *
    + */ native SetPlayerShopName(playerid, const shopName[]); -/// Set the skill level of a certain weapon type for a player. -/// The ID of the player to set the weapon skill of -/// The weapon to set the skill of -/// The skill level to set for that weapon, ranging from 0 to 999. A level out of range will max it out -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// Weapon skills:
    -///
      -///
    • WEAPONSKILL_PISTOL(0)
    • -///
    • WEAPONSKILL_PISTOL_SILENCED(1)
    • -///
    • WEAPONSKILL_DESERT_EAGLE(2)
    • -///
    • WEAPONSKILL_SHOTGUN(3)
    • -///
    • WEAPONSKILL_SAWNOFF_SHOTGUN(4)
    • -///
    • WEAPONSKILL_SPAS12_SHOTGUN(5)
    • -///
    • WEAPONSKILL_MICRO_UZI(6)
    • -///
    • WEAPONSKILL_MP5(7)
    • -///
    • WEAPONSKILL_AK47(8)
    • -///
    • WEAPONSKILL_M4(9)
    • -///
    • WEAPONSKILL_SNIPERRIFLE(10)
    • -///
    -///
    +/** + * Set the skill level of a certain weapon type for a player. + * The ID of the player to set the weapon skill of + * The weapon to set the skill of + * The skill level to set for that weapon, ranging from 0 to 999. A level out of range will max it out + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * Weapon skills:
    + *
      + *
    • WEAPONSKILL_PISTOL(0)
    • + *
    • WEAPONSKILL_PISTOL_SILENCED(1)
    • + *
    • WEAPONSKILL_DESERT_EAGLE(2)
    • + *
    • WEAPONSKILL_SHOTGUN(3)
    • + *
    • WEAPONSKILL_SAWNOFF_SHOTGUN(4)
    • + *
    • WEAPONSKILL_SPAS12_SHOTGUN(5)
    • + *
    • WEAPONSKILL_MICRO_UZI(6)
    • + *
    • WEAPONSKILL_MP5(7)
    • + *
    • WEAPONSKILL_AK47(8)
    • + *
    • WEAPONSKILL_M4(9)
    • + *
    • WEAPONSKILL_SNIPERRIFLE(10)
    • + *
    + *
    + */ native SetPlayerSkillLevel(playerid, WEAPONSKILL:skill, level); -/// Get the ID of the vehicle that the player is surfing (stuck to the roof of). -/// The ID of the player you want to know the surfing vehicle ID of -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified is not connected, INVALID_VEHICLE_ID also. +/** + * Get the ID of the vehicle that the player is surfing (stuck to the roof of). + * The ID of the player you want to know the surfing vehicle ID of + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified is not connected, INVALID_VEHICLE_ID also. + */ native GetPlayerSurfingVehicleID(playerid); -/// Returns the ID of the object the player is surfing on. -/// The ID of the player surfing the object -/// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! -/// The ID of the moving object the player is surfing. If the player isn't surfing a moving object, it will return INVALID_OBJECT_ID. +/** + * Returns the ID of the object the player is surfing on. + * The ID of the player surfing the object + * This function was added in SA-MP 0.3c R3 and will not work in earlier versions! + * The ID of the moving object the player is surfing. If the player isn't surfing a moving object, it will return INVALID_OBJECT_ID. + */ native GetPlayerSurfingObjectID(playerid); -/// Removes a standard San Andreas model for a single player within a specified range. -/// The ID of the player to remove the objects for -/// The model to remove -/// The x coordinate around which the objects will be removed -/// The y coordinate around which the objects will be removed -/// The z coordinate around which the objects will be removed -/// The radius around the specified point to remove objects with the specified model -/// -/// -/// This function was added in SA-MP 0.3d and will not work in earlier versions! -/// There appears to be a limit of around 1000 lines/objects. There is no workaround. -/// When removing the same object for a player, they will crash. Commonly, players crash when reconnecting to the server because the server removes buildings on OnPlayerConnect. -/// In SA-MP 0.3.7 you can use -1 for the modelid to remove all objects within the specified radius. +/** + * Removes a standard San Andreas model for a single player within a specified range. + * The ID of the player to remove the objects for + * The model to remove + * The x coordinate around which the objects will be removed + * The y coordinate around which the objects will be removed + * The z coordinate around which the objects will be removed + * The radius around the specified point to remove objects with the specified model + * + * + * This function was added in SA-MP 0.3d and will not work in earlier versions! + * There appears to be a limit of around 1000 lines/objects. There is no workaround. + * When removing the same object for a player, they will crash. Commonly, players crash when reconnecting to the server because the server removes buildings on OnPlayerConnect. + * In SA-MP 0.3.7 you can use -1 for the modelid to remove all objects within the specified radius. + */ native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, Float:centerZ, Float:radius); -/// Retrieves the start and end (hit) position of the last bullet a player fired. -/// The ID of the player to get the last bullet shot information of -/// A float variable in which to save the x coordinate of where the bullet originated from -/// A float variable in which to save the y coordinate of where the bullet originated from -/// A float variable in which to save the z coordinate of where the bullet originated from -/// A float variable in which to save the x coordinate of where the bullet hit -/// A float variable in which to save the y coordinate of where the bullet hit -/// A float variable in which to save the z coordinate of where the bullet hit -/// -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// This function will only work when lag compensation is enabled. -/// If the player hit nothing, the hit positions will be 0. This means you can't currently calculate how far a bullet travels through open air. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player specified does not exist.
    -///
    +/** + * Retrieves the start and end (hit) position of the last bullet a player fired. + * The ID of the player to get the last bullet shot information of + * A float variable in which to save the x coordinate of where the bullet originated from + * A float variable in which to save the y coordinate of where the bullet originated from + * A float variable in which to save the z coordinate of where the bullet originated from + * A float variable in which to save the x coordinate of where the bullet hit + * A float variable in which to save the y coordinate of where the bullet hit + * A float variable in which to save the z coordinate of where the bullet hit + * + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * This function will only work when lag compensation is enabled. + * If the player hit nothing, the hit positions will be 0. This means you can't currently calculate how far a bullet travels through open air. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player specified does not exist.
    + *
    + */ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float:originZ, &Float:hitPosX, &Float:hitPosY, &Float:hitPosZ); // Attached to bone objects @@ -1010,1500 +1142,1685 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float #error MAX_PLAYER_ATTACHED_OBJECTS must be >= 1 and <= 10 #endif -/// Attach an object to a specific bone on a player. -/// The ID of the player to attach the object to -/// The index (slot) to assign the object to (0-9 since 0.3d, 0-4 in previous versions) -/// The model to attach -/// The bone to attach the object to -/// x axis offset for the object position (optional=0.0) -/// y axis offset for the object position (optional=0.0) -/// z axis offset for the object position (optional=0.0) -/// x axis rotation of the object (optional=0.0) -/// y axis rotation of the object (optional=0.0) -/// z axis rotation of the object (optional=0.0) -/// x axis scale of the object (optional=1.0) -/// y axis scale of the object (optional=1.0) -/// z axis scale of the object (optional=1.0) -/// The first object colour to set ARGB (optional=0) -/// The second object colour to set ARGB (optional=0) -/// -/// -/// -/// This function was added in SA-MP 0.3c and will not work in earlier versions! -/// In version 0.3d and onwards, 10 objects can be attached to a single player (index 0-9). In earlier versions, the limit is 5 (index 0-4). -/// This function is separate from the CreateObject / CreatePlayerObject pools. -/// -/// Bone IDs:
    -///
      -///
    • 1 - spine
    • -///
    • 2 - head
    • -///
    • 3 - left upper arm
    • -///
    • 4 - right upper arm
    • -///
    • 5 - left hand
    • -///
    • 6 - right hand
    • -///
    • 7 - left thigh
    • -///
    • 8 - right thigh
    • -///
    • 9 - left foot
    • -///
    • 10 - right foot
    • -///
    • 11 - right calf
    • -///
    • 12 - left calf
    • -///
    • 13 - left forearm
    • -///
    • 14 - right forearm
    • -///
    • 15 - left clavicle (shoulder)
    • -///
    • 16 - right clavicle (shoulder)
    • -///
    • 17 - neck
    • -///
    • 18 - jaw
    • -///
    -///
    -/// 1 on success, 0 on failure. +/** + * Attach an object to a specific bone on a player. + * The ID of the player to attach the object to + * The index (slot) to assign the object to (0-9 since 0.3d, 0-4 in previous versions) + * The model to attach + * The bone to attach the object to + * x axis offset for the object position (optional=0.0) + * y axis offset for the object position (optional=0.0) + * z axis offset for the object position (optional=0.0) + * x axis rotation of the object (optional=0.0) + * y axis rotation of the object (optional=0.0) + * z axis rotation of the object (optional=0.0) + * x axis scale of the object (optional=1.0) + * y axis scale of the object (optional=1.0) + * z axis scale of the object (optional=1.0) + * The first object colour to set ARGB (optional=0) + * The second object colour to set ARGB (optional=0) + * + * + * + * This function was added in SA-MP 0.3c and will not work in earlier versions! + * In version 0.3d and onwards, 10 objects can be attached to a single player (index 0-9). In earlier versions, the limit is 5 (index 0-4). + * This function is separate from the CreateObject / CreatePlayerObject pools. + * + * Bone IDs:
    + *
      + *
    • 1 - spine
    • + *
    • 2 - head
    • + *
    • 3 - left upper arm
    • + *
    • 4 - right upper arm
    • + *
    • 5 - left hand
    • + *
    • 6 - right hand
    • + *
    • 7 - left thigh
    • + *
    • 8 - right thigh
    • + *
    • 9 - left foot
    • + *
    • 10 - right foot
    • + *
    • 11 - right calf
    • + *
    • 12 - left calf
    • + *
    • 13 - left forearm
    • + *
    • 14 - right forearm
    • + *
    • 15 - left clavicle (shoulder)
    • + *
    • 16 - right clavicle (shoulder)
    • + *
    • 17 - neck
    • + *
    • 18 - jaw
    • + *
    + *
    + * 1 on success, 0 on failure. + */ native SetPlayerAttachedObject(playerid, index, modelid, bone, Float:offsetX = 0.0, Float:offsetY = 0.0, Float:offsetZ = 0.0, Float:rotX = 0.0, Float:rotY = 0.0, Float:rotZ = 0.0, Float:scaleX = 1.0, Float:scaleY = 1.0, Float:scaleZ = 1.0, materialColour1 = 0, materialColour2 = 0); -/// Remove an attached object from a player. -/// The ID of the player to remove the object from -/// The index of the object to remove (set with SetPlayerAttachedObject) -/// -/// -/// This function was added in SA-MP 0.3c and will not work in earlier versions! -/// 1 on success, 0 on failure. +/** + * Remove an attached object from a player. + * The ID of the player to remove the object from + * The index of the object to remove (set with SetPlayerAttachedObject) + * + * + * This function was added in SA-MP 0.3c and will not work in earlier versions! + * 1 on success, 0 on failure. + */ native RemovePlayerAttachedObject(playerid, index); -/// Check if a player has an object attached in the specified index (slot). -/// The ID of the player to check -/// The index (slot) to check -/// -/// -/// This function was added in SA-MP 0.3c and will not work in earlier versions! -/// 1 if used, 0 if not. +/** + * Check if a player has an object attached in the specified index (slot). + * The ID of the player to check + * The index (slot) to check + * + * + * This function was added in SA-MP 0.3c and will not work in earlier versions! + * 1 if used, 0 if not. + */ native bool:IsPlayerAttachedObjectSlotUsed(playerid, index); -/// Enter edition mode for an attached object. -/// The ID of the player to enter in to edition mode -/// The index (slot) of the attached object to edit -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. -/// -/// There are 7 clickable buttons in edition mode.
    -/// The three single icons that have x/y/z on them can be dragged to edit position/rotation/scale.
    -/// The four buttons in a row are to select the edition mode and save edition: [Move] [Rotate] [Scale] [Save].
    -/// Clicking save will call OnPlayerEditAttachedObject. -///
    -/// Players will be able to scale objects up to a very large or negative value size. Limits should be put in place using OnPlayerEditAttachedObject to abort the edit. -/// 1 on success and 0 on failure. +/** + * Enter edition mode for an attached object. + * The ID of the player to enter in to edition mode + * The index (slot) of the attached object to edit + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. + * + * There are 7 clickable buttons in edition mode.
    + * The three single icons that have x/y/z on them can be dragged to edit position/rotation/scale.
    + * The four buttons in a row are to select the edition mode and save edition: [Move] [Rotate] [Scale] [Save].
    + * Clicking save will call OnPlayerEditAttachedObject. + *
    + * Players will be able to scale objects up to a very large or negative value size. Limits should be put in place using OnPlayerEditAttachedObject to abort the edit. + * 1 on success and 0 on failure. + */ native EditAttachedObject(playerid, index); // Per-player TextDraws -/// Creates a textdraw for a single player. This can be used as a way around the global text-draw limit. -/// The ID of the player to create the textdraw for -/// x-Coordinate -/// y-Coordinate -/// The text in the textdraw -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -/// -/// If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.
    -/// must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
    -/// If the last character in the text is a space (" "), the text will all be blank.
    -/// If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will.
    -///
    -/// -/// This applies ONLY to sa-mp versions before 0.3z:

    -/// Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
    -/// If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.
    -///
    -/// Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ Doesn't work beyond 255th character. -/// -/// The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using PlayerTextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
    -/// This function merely CREATES the textdraw, you must use PlayerTextDrawShow to show it to a player.
    -/// It is recommended to use WHOLE numbers instead of decimal positions when creating player textdraws to ensure resolution friendly design.
    -///
    -/// Player-textdraws are automatically destroyed when a player disconnects. -/// The ID of the created textdraw. +/** + * Creates a textdraw for a single player. This can be used as a way around the global text-draw limit. + * The ID of the player to create the textdraw for + * x-Coordinate + * y-Coordinate + * The text in the textdraw + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * + * If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.
    + * must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
    + * If the last character in the text is a space (" "), the text will all be blank.
    + * If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will.
    + *
    + * + * This applies ONLY to sa-mp versions before 0.3z:

    + * Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
    + * If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.
    + *
    + * Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ Doesn't work beyond 255th character. + * + * The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using PlayerTextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
    + * This function merely CREATES the textdraw, you must use PlayerTextDrawShow to show it to a player.
    + * It is recommended to use WHOLE numbers instead of decimal positions when creating player textdraws to ensure resolution friendly design.
    + *
    + * Player-textdraws are automatically destroyed when a player disconnects. + * The ID of the created textdraw. + */ native PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[]); -/// Destroy a player-textdraw. -/// The ID of the player who's player-textdraw to destroy -/// The ID of the textdraw to destroy -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! +/** + * Destroy a player-textdraw. + * The ID of the player who's player-textdraw to destroy + * The ID of the textdraw to destroy + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + */ native PlayerTextDrawDestroy(playerid, PlayerText:text); -/// Sets the width and height of the letters in a player-textdraw. -/// The ID of the player whose player-textdraw to set the letter size of -/// The ID of the player-textdraw to change the letter size of -/// Width of a char -/// Height of a char -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -/// When using this function purely for the benefit of affecting the textdraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements -/// Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). +/** + * Sets the width and height of the letters in a player-textdraw. + * The ID of the player whose player-textdraw to set the letter size of + * The ID of the player-textdraw to change the letter size of + * Width of a char + * Height of a char + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * When using this function purely for the benefit of affecting the textdraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements + * Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). + */ native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:width, Float:height); -/// Change the size of a player-textdraw (box if PlayerTextDrawUseBox is enabled and/or clickable area for use with PlayerTextDrawSetSelectable). -/// The ID of the player whose player-textdraw to set the size of -/// The ID of the player-textdraw to set the size of -/// The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate -/// The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -/// -/// The x and y have different meanings with different PlayerTextDrawAlignment values:
    -///
      -///
    • 1 (left): they are the right-most corner of the box, absolute coordinates.
    • -///
    • 2 (center): they need to inverted (switch the two) and the x value is the overall width of the box.
    • -///
    • 3 (right): the x and y are the coordinates of the left-most corner of the box
    • -///
    -///
    -/// -/// Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).
    -/// The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).
    -/// This function defines the clickable area for use with PlayerTextDrawSetSelectable, whether a box is shown or not. -///
    +/** + * Change the size of a player-textdraw (box if PlayerTextDrawUseBox is enabled and/or clickable area for use with PlayerTextDrawSetSelectable). + * The ID of the player whose player-textdraw to set the size of + * The ID of the player-textdraw to set the size of + * The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate + * The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * + * The x and y have different meanings with different PlayerTextDrawAlignment values:
    + *
      + *
    • 1 (left): they are the right-most corner of the box, absolute coordinates.
    • + *
    • 2 (center): they need to inverted (switch the two) and the x value is the overall width of the box.
    • + *
    • 3 (right): the x and y are the coordinates of the left-most corner of the box
    • + *
    + *
    + * + * Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).
    + * The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).
    + * This function defines the clickable area for use with PlayerTextDrawSetSelectable, whether a box is shown or not. + *
    + */ native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:width, Float:height); -/// Set the text alignment of a player-textdraw. -/// The ID of the player whose player-textdraw to set the alignment of -/// The ID of the player-textdraw to set the alignment of -/// 1-left 2-centered 3-right -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -/// For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at PlayerTextDrawTextSize. +/** + * Set the text alignment of a player-textdraw. + * The ID of the player whose player-textdraw to set the alignment of + * The ID of the player-textdraw to set the alignment of + * 1-left 2-centered 3-right + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at PlayerTextDrawTextSize. + */ native PlayerTextDrawAlignment(playerid, PlayerText:text, TEXT_DRAW_ALIGN:alignment); -/// Sets the text colour of a player-textdraw. -/// The ID of the player who's textdraw to set the colour of -/// The TextDraw to change -/// The colour in hexadecimal format -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -/// You can also use Gametext colours in textdraws. -/// The textdraw must be re-shown to the player in order to update the colour. +/** + * Sets the text colour of a player-textdraw. + * The ID of the player who's textdraw to set the colour of + * The TextDraw to change + * The colour in hexadecimal format + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * You can also use Gametext colours in textdraws. + * The textdraw must be re-shown to the player in order to update the colour. + */ native PlayerTextDrawColor(playerid, PlayerText:text, colour); -/// Toggle the box on a player-textdraw. -/// The ID of the player whose textdraw to toggle the box of -/// The ID of the player-textdraw to toggle the box of -/// 1 to use a box or 0 to not use a box -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! +/** + * Toggle the box on a player-textdraw. + * The ID of the player whose textdraw to toggle the box of + * The ID of the player-textdraw to toggle the box of + * 1 to use a box or 0 to not use a box + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + */ native PlayerTextDrawUseBox(playerid, PlayerText:text, bool:use); -/// Sets the colour of a textdraw's box (PlayerTextDrawUseBox). -/// The ID of the player whose textdraw to set the box colour of -/// The ID of the player textdraw to set the box colour of -/// The colour to set. Alpha (transparency) is supported -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! +/** + * Sets the colour of a textdraw's box (PlayerTextDrawUseBox). + * The ID of the player whose textdraw to set the box colour of + * The ID of the player textdraw to set the box colour of + * The colour to set. Alpha (transparency) is supported + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + */ native PlayerTextDrawBoxColor(playerid, PlayerText:text, colour); -/// Show a player-textdraw to the player it was created for. -/// The ID of the player to show the textdraw for -/// The ID of the textdraw to show -/// The size of the shadow. 0 will hide the shadow -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! +/** + * Show a player-textdraw to the player it was created for. + * The ID of the player to show the textdraw for + * The ID of the textdraw to show + * The size of the shadow. 0 will hide the shadow + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + */ native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); -/// Set the outline of a player-textdraw. The outline colour cannot be changed unless PlayerTextDrawBackgroundColor is used. -/// The ID of the player whose player-textdraw to set the outline of -/// The ID of the player-textdraw to set the outline of -/// The thickness of the outline -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! +/** + * Set the outline of a player-textdraw. The outline colour cannot be changed unless PlayerTextDrawBackgroundColor is used. + * The ID of the player whose player-textdraw to set the outline of + * The ID of the player-textdraw to set the outline of + * The thickness of the outline + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + */ native PlayerTextDrawSetOutline(playerid, PlayerText:text, size); -/// Adjust the background colour of a player-textdraw. -/// The ID of the player whose player-textdraw to set the background colour of -/// The ID of the player-textdraw to set the background colour of -/// The colour that the textdraw should be set to -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -/// If PlayerTextDrawSetOutline is used with size > 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in PlayerTextDrawColor +/** + * Adjust the background colour of a player-textdraw. + * The ID of the player whose player-textdraw to set the background colour of + * The ID of the player-textdraw to set the background colour of + * The colour that the textdraw should be set to + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * If PlayerTextDrawSetOutline is used with size > 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in PlayerTextDrawColor + */ native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); -/// Change the font of a player-textdraw. -/// The ID of the player whose player-textdraw to change the font of -/// The ID of the player-textdraw to change the font of -/// There are four font styles. A font value greater than 3 does not display, and anything greater than 16 crashes the client. See http://wiki.sa-mp.com/wiki/PlayerTextDrawFont -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! +/** + * Change the font of a player-textdraw. + * The ID of the player whose player-textdraw to change the font of + * The ID of the player-textdraw to change the font of + * There are four font styles. A font value greater than 3 does not display, and anything greater than 16 crashes the client. See http://wiki.sa-mp.com/wiki/PlayerTextDrawFont + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + */ native PlayerTextDrawFont(playerid, PlayerText:text, TEXT_DRAW_FONT:font); -/// Appears to scale text spacing to a proportional ratio. Useful when using PlayerTextDrawLetterSize to ensure the text has even character spacing. -/// The ID of the player whose player-textdraw to set the proportionality of -/// The ID of the player-textdraw to set the proportionality of -/// 1 to enable proportionality, 0 to disable -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! +/** + * Appears to scale text spacing to a proportional ratio. Useful when using PlayerTextDrawLetterSize to ensure the text has even character spacing. + * The ID of the player whose player-textdraw to set the proportionality of + * The ID of the player-textdraw to set the proportionality of + * 1 to enable proportionality, 0 to disable + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + */ native PlayerTextDrawSetProportional(playerid, PlayerText:text, bool:set); -/// Toggles whether a player-textdraw can be selected or not. -/// The ID of the player whose player-textdraw to set the selectability of -/// The ID of the player-textdraw to set the selectability of -/// Set the player-textdraw selectable (1) or non-selectable (0). By default this is 0 -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -/// PlayerTextDrawSetSelectable MUST be used BEFORE the textdraw is shown to the player. -/// Use PlayerTextDrawTextSize to define the clickable area. +/** + * Toggles whether a player-textdraw can be selected or not. + * The ID of the player whose player-textdraw to set the selectability of + * The ID of the player-textdraw to set the selectability of + * Set the player-textdraw selectable (1) or non-selectable (0). By default this is 0 + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * PlayerTextDrawSetSelectable MUST be used BEFORE the textdraw is shown to the player. + * Use PlayerTextDrawTextSize to define the clickable area. + */ native PlayerTextDrawSetSelectable(playerid, PlayerText:text, bool:set); -/// Show a player-textdraw to the player it was created for. -/// The ID of the player to show the textdraw for -/// The ID of the textdraw to show -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! +/** + * Show a player-textdraw to the player it was created for. + * The ID of the player to show the textdraw for + * The ID of the textdraw to show + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + */ native PlayerTextDrawShow(playerid, PlayerText:text); -/// Hide a player-textdraw from the player it was created for. -/// The ID of the player to hide the textdraw for -/// The ID of the textdraw to hide -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! +/** + * Hide a player-textdraw from the player it was created for. + * The ID of the player to hide the textdraw for + * The ID of the textdraw to hide + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + */ native PlayerTextDrawHide(playerid, PlayerText:text); -/// Change the text of a player-textdraw. -/// The ID of the player who's textdraw string to set -/// The ID of the textdraw to change -/// The new string for the TextDraw -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! -/// There are limits to the length of textdraw strings! See Limits for more info. -/// You don't have to show the TextDraw again in order to apply the changes. +/** + * Change the text of a player-textdraw. + * The ID of the player who's textdraw string to set + * The ID of the textdraw to change + * The new string for the TextDraw + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * There are limits to the length of textdraw strings! See Limits for more info. + * You don't have to show the TextDraw again in order to apply the changes. + */ native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); -/// Sets a player textdraw 2D preview sprite of a specified model ID. -/// The PlayerTextDraw player ID -/// The textdraw ID that will display the 3D preview -/// The GTA SA or SA:MP model ID to display -/// -/// -/// -/// -/// This function was added in SA-MP 0.3x and will not work in earlier versions! -/// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. -/// -/// 1: The function executed successfully. If an invalid model is passed 'success' is reported, but the model will appear as a yellow/black question mark.
    -/// 0: The function failed to execute. Player and/or textdraw do not exist. -///
    +/** + * Sets a player textdraw 2D preview sprite of a specified model ID. + * The PlayerTextDraw player ID + * The textdraw ID that will display the 3D preview + * The GTA SA or SA:MP model ID to display + * + * + * + * + * This function was added in SA-MP 0.3x and will not work in earlier versions! + * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. + * + * 1: The function executed successfully. If an invalid model is passed 'success' is reported, but the model will appear as a yellow/black question mark.
    + * 0: The function failed to execute. Player and/or textdraw do not exist. + *
    + */ native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelIndex); -/// Sets the rotation and zoom of a 3D model preview player-textdraw. -/// The ID of the player whose player-textdraw to change -/// The ID of the player-textdraw to change -/// The x rotation value -/// The y rotation value -/// The z rotation value -/// The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3x and will not work in earlier versions! -/// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW and already have a model set in order for this function to have effect. +/** + * Sets the rotation and zoom of a 3D model preview player-textdraw. + * The ID of the player whose player-textdraw to change + * The ID of the player-textdraw to change + * The x rotation value + * The y rotation value + * The z rotation value + * The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) + * + * + * + * + * + * This function was added in SA-MP 0.3x and will not work in earlier versions! + * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW and already have a model set in order for this function to have effect. + */ native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); -/// Set the colour of a vehicle in a player-textdraw model preview (if a vehicle is shown). -/// The ID of the player whose player-textdraw to change -/// The ID of the player's player-textdraw to change -/// The colour to set the vehicle's primary colour to -/// The colour to set the vehicle's secondary colour to -/// -/// -/// -/// -/// This function was added in SA-MP 0.3x and will not work in earlier versions! -/// The textdraw MUST use the font TEXT_DRAW_FONT_MODEL_PREVIEW and be showing a vehicle in order for this function to have effect. +/** + * Set the colour of a vehicle in a player-textdraw model preview (if a vehicle is shown). + * The ID of the player whose player-textdraw to change + * The ID of the player's player-textdraw to change + * The colour to set the vehicle's primary colour to + * The colour to set the vehicle's secondary colour to + * + * + * + * + * This function was added in SA-MP 0.3x and will not work in earlier versions! + * The textdraw MUST use the font TEXT_DRAW_FONT_MODEL_PREVIEW and be showing a vehicle in order for this function to have effect. + */ native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, colour1, colour2); // Per-player variable system (PVars) -/// Set an integer player variable. -/// The ID of the player whose player variable will be set -/// The name of the player variable -/// The integer to be set -/// -/// -/// -/// -/// -/// -/// Variables aren't reset until after OnPlayerDisconnect is called, so the values are still accessible in OnPlayerDisconnect. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. -///
    +/** + * Set an integer player variable. + * The ID of the player whose player variable will be set + * The name of the player variable + * The integer to be set + * + * + * + * + * + * + * Variables aren't reset until after OnPlayerDisconnect is called, so the values are still accessible in OnPlayerDisconnect. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. + *
    + */ native SetPVarInt(playerid, const pvar[], value); -/// Gets an integer player variable's value. -/// The ID of the player whose player variable to get -/// The name of the player variable (case-insensitive). Assigned in SetPVarInt -/// -/// -/// -/// -/// -/// -/// The integer value of the specified player variable. It will still return 0 if the variable is not set, or the player does not exist. +/** + * Gets an integer player variable's value. + * The ID of the player whose player variable to get + * The name of the player variable (case-insensitive). Assigned in SetPVarInt + * + * + * + * + * + * + * The integer value of the specified player variable. It will still return 0 if the variable is not set, or the player does not exist. + */ native GetPVarInt(playerid, const pvar[]); -/// Saves a string into a player variable. -/// The ID of the player whose player variable will be set -/// The name of the player variable -/// The string you want to save in the player variable -/// -/// -/// -/// -/// -/// +/** + * Saves a string into a player variable. + * The ID of the player whose player variable will be set + * The name of the player variable + * The string you want to save in the player variable + * + * + * + * + * + * + */ native SetPVarString(playerid, const pvar[], const value[]); -/// Gets a player variable as a string. -/// The ID of the player whose player variable to get -/// The name of the player variable, set by SetPVarString -/// The array in which to store the string value in, passed by reference -/// The maximum length of the returned string -/// -/// -/// -/// -/// -/// -/// If length of string is zero (value not set), output text will not be updated or set to anything and will remain with old data, neccesying that you clear the variable to blank value if GetPVarString returns 0 if that behavior is undesired -/// The length of the string. +/** + * Gets a player variable as a string. + * The ID of the player whose player variable to get + * The name of the player variable, set by SetPVarString + * The array in which to store the string value in, passed by reference + * The maximum length of the returned string + * + * + * + * + * + * + * If length of string is zero (value not set), output text will not be updated or set to anything and will remain with old data, neccesying that you clear the variable to blank value if GetPVarString returns 0 if that behavior is undesired + * The length of the string. + */ native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); -/// Set a float player variable's value. -/// The ID of the player whose player variable will be set -/// The name of the player variable -/// The float you want to save in the player variable -/// -/// -/// -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. -///
    +/** + * Set a float player variable's value. + * The ID of the player whose player variable will be set + * The name of the player variable + * The float you want to save in the player variable + * + * + * + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. + *
    + */ native SetPVarFloat(playerid, const pvar[], Float:value); -/// Gets a player variable as a float. -/// The ID of the player whose player variable you want to get -/// The name of the player variable -/// -/// -/// -/// -/// -/// -/// The float from the specified player variable. +/** + * Gets a player variable as a float. + * The ID of the player whose player variable you want to get + * The name of the player variable + * + * + * + * + * + * + * The float from the specified player variable. + */ native Float:GetPVarFloat(playerid, const pvar[]); -/// Deletes a previously set player variable. -/// The ID of the player whose player variable to delete -/// The name of the player variable to delete -/// -/// -/// -/// -/// -/// -/// Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings). -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. Either the player specified isn't connected or there is no variable set with the given name. -///
    +/** + * Deletes a previously set player variable. + * The ID of the player whose player variable to delete + * The name of the player variable to delete + * + * + * + * + * + * + * Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings). + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. Either the player specified isn't connected or there is no variable set with the given name. + *
    + */ native DeletePVar(playerid, const pvar[]); -/// Each PVar (player-variable) has its own unique identification number for lookup, this function returns the highest ID set for a player. -/// The ID of the player to get the upper PVar index of -/// -/// -/// The highest set PVar ID. +/** + * Each PVar (player-variable) has its own unique identification number for lookup, this function returns the highest ID set for a player. + * The ID of the player to get the upper PVar index of + * + * + * The highest set PVar ID. + */ native GetPVarsUpperIndex(playerid); -/// Retrieve the name of a player's pVar via the index. -/// The ID of the player whose player variable to get the name of -/// The index of the player's pVar -/// A string to store the pVar's name in, passed by reference -/// The max length of the returned string -/// -/// -/// -/// +/** + * Retrieve the name of a player's pVar via the index. + * The ID of the player whose player variable to get the name of + * The index of the player's pVar + * A string to store the pVar's name in, passed by reference + * The max length of the returned string + * + * + * + * + */ native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); -/// Gets the type (integer, float or string) of a player variable. -/// The ID of the player whose player variable to get the type of -/// The name of the player variable to get the type of -/// -/// -/// -/// -/// -/// -/// -/// -/// Variable types:
    -///
      -///
    • PLAYER_VARTYPE_NONE (pVar with name given does not exist)
    • -///
    • PLAYER_VARTYPE_INT
    • -///
    • PLAYER_VARTYPE_STRING
    • -///
    • PLAYER_VARTYPE_FLOAT
    • -///
    -///
    -/// Returns the type of the PVar. See table below. +/** + * Gets the type (integer, float or string) of a player variable. + * The ID of the player whose player variable to get the type of + * The name of the player variable to get the type of + * + * + * + * + * + * + * + * + * Variable types:
    + *
      + *
    • PLAYER_VARTYPE_NONE (pVar with name given does not exist)
    • + *
    • PLAYER_VARTYPE_INT
    • + *
    • PLAYER_VARTYPE_STRING
    • + *
    • PLAYER_VARTYPE_FLOAT
    • + *
    + *
    + * Returns the type of the PVar. See table below. + */ native PLAYER_VARTYPE:GetPVarType(playerid, const pvar[]); #if MAX_CHATBUBBLE_LENGTH < 1 || MAX_CHATBUBBLE_LENGTH > 144 #error MAX_CHATBUBBLE_LENGTH must be >= 1 and <= 144 #endif -/// Creates a chat bubble above a player's name tag. -/// The player which should have the chat bubble -/// The text to display -/// The text colour -/// The distance from where players are able to see the chat bubble -/// The time in miliseconds the bubble should be displayed for -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// You can't see your own chatbubbles. The same applies to attached 3D text labels. -/// You can use colour embedding for multiple colours in the message. +/** + * Creates a chat bubble above a player's name tag. + * The player which should have the chat bubble + * The text to display + * The text colour + * The distance from where players are able to see the chat bubble + * The time in miliseconds the bubble should be displayed for + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * You can't see your own chatbubbles. The same applies to attached 3D text labels. + * You can use colour embedding for multiple colours in the message. + */ native SetPlayerChatBubble(playerid, const text[], colour, Float:drawDistance, expireTime); // Player control -/// Puts a player in a vehicle. -/// The ID of the player to put in a vehicle -/// The ID of the vehicle to put the player in -/// The ID of the seat to put the player in -/// -/// -/// -/// -/// If this function is used on a player that is already in a vehicle, other players will still see them in their previous vehicle. To fix this, first remove the player from the vehicle. -/// If the seat is invalid or is taken, will cause a crash when they EXIT the vehicle. -/// You can use GetPlayerVehicleSeat in a loop to check if a seat is occupied by any players. -/// -/// Seats:
    -///
      -///
    • 0 - driver.
    • -///
    • 1 - front passenger.
    • -///
    • 2 - back-left passenger.
    • -///
    • 3 - back-right passenger.
    • -///
    • 4+ - passenger seats (coach etc.).
    • -///
    -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player or vehicle don't exist. -///
    +/** + * Puts a player in a vehicle. + * The ID of the player to put in a vehicle + * The ID of the vehicle to put the player in + * The ID of the seat to put the player in + * + * + * + * + * If this function is used on a player that is already in a vehicle, other players will still see them in their previous vehicle. To fix this, first remove the player from the vehicle. + * If the seat is invalid or is taken, will cause a crash when they EXIT the vehicle. + * You can use GetPlayerVehicleSeat in a loop to check if a seat is occupied by any players. + * + * Seats:
    + *
      + *
    • 0 - driver.
    • + *
    • 1 - front passenger.
    • + *
    • 2 - back-left passenger.
    • + *
    • 3 - back-right passenger.
    • + *
    • 4+ - passenger seats (coach etc.).
    • + *
    + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player or vehicle don't exist. + *
    + */ native PutPlayerInVehicle(playerid, vehicleid, seatid); -/// This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. -/// The ID of the player in the vehicle that you want to get the ID of -/// -/// -/// -/// -/// ID of the vehicle or 0 if not in a vehicle. +/** + * This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. + * The ID of the player in the vehicle that you want to get the ID of + * + * + * + * + * ID of the vehicle or 0 if not in a vehicle. + */ native GetPlayerVehicleID(playerid); -/// Find out which seat a player is in. -/// The ID of the player you want to get the seat of -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// Sometimes the result can be 128 which is an invalid seat ID. Circumstances of this are not yet known, but it is best to discard information when returned seat number is 128. -/// The ID of the seat the player is in. -1 is not in vehicle, 0 is the driver, 1 is the front passenger, and 2 & 3 are the rear passengers. +/** + * Find out which seat a player is in. + * The ID of the player you want to get the seat of + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * Sometimes the result can be 128 which is an invalid seat ID. Circumstances of this are not yet known, but it is best to discard information when returned seat number is 128. + * The ID of the seat the player is in. -1 is not in vehicle, 0 is the driver, 1 is the front passenger, and 2 & 3 are the rear passengers. + */ native GetPlayerVehicleSeat(playerid); -/// Removes/ejects a player from their vehicle. -/// The ID of the player to remove from their vehicle -/// -/// -/// The exiting animation is not synced for other players.
    -/// This function will not work when used in OnPlayerEnterVehicle, because the player isn't in the vehicle when the callback is called. Use OnPlayerStateChange instead.
    -/// The player isn't removed if he is in a RC Vehicle. -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected. -///
    +/** + * Removes/ejects a player from their vehicle. + * The ID of the player to remove from their vehicle + * + * + * The exiting animation is not synced for other players.
    + * This function will not work when used in OnPlayerEnterVehicle, because the player isn't in the vehicle when the callback is called. Use OnPlayerStateChange instead.
    + * The player isn't removed if he is in a RC Vehicle. + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected. + *
    + */ native RemovePlayerFromVehicle(playerid); -/// Toggles whether a player can control their character or not. The player will also be unable to move their camera. -/// The ID of the player to toggle the controllability of -/// 0 to make them uncontrollable, 1 to make them controllable -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player specified does not exist. -///
    +/** + * Toggles whether a player can control their character or not. The player will also be unable to move their camera. + * The ID of the player to toggle the controllability of + * 0 to make them uncontrollable, 1 to make them controllable + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player specified does not exist. + *
    + */ native TogglePlayerControllable(playerid, bool:toggle); -/// Plays the specified sound for a player. -/// The ID of the player for whom to play the sound -/// The sound to play -/// x coordinate for the sound to play at. (0 for no position) -/// y coordinate for the sound to play at. (0 for no position) -/// z coordinate for the sound to play at. (0 for no position) -/// -/// -/// -/// Only use the coordinates if you want the sound to be played at a certain position. Set coordinates all to 0 to just play the sound. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected. -///
    +/** + * Plays the specified sound for a player. + * The ID of the player for whom to play the sound + * The sound to play + * x coordinate for the sound to play at. (0 for no position) + * y coordinate for the sound to play at. (0 for no position) + * z coordinate for the sound to play at. (0 for no position) + * + * + * + * Only use the coordinates if you want the sound to be played at a certain position. Set coordinates all to 0 to just play the sound. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected. + *
    + */ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); -/// Apply an animation to a player. -/// The ID of the player to apply the animation to -/// The animation library from which to apply an animation -/// The name of the animation to apply, within the specified library -/// The speed to play the animation (use 4.1) -/// If set to 1, the animation will loop. If set to 0, the animation will play once -/// If set to 0, the player is returned to their old x coordinate once the animation is complete (for animations that move the player such as walking). 1 will not return them to their old position -/// Same as above but for the y axis. Should be kept the same as the previous parameter -/// Setting this to 1 will freeze the player at the end of the animation. 0 will not -/// Timer in milliseconds. For a never-ending loop it should be 0 -/// Set to 1 to make server sync the animation with all other players in streaming radius. 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) (optional=0) -/// -/// -/// The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. -/// An invalid animation library will crash the player's game. -/// This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). +/** + * Apply an animation to a player. + * The ID of the player to apply the animation to + * The animation library from which to apply an animation + * The name of the animation to apply, within the specified library + * The speed to play the animation (use 4.1) + * If set to 1, the animation will loop. If set to 0, the animation will play once + * If set to 0, the player is returned to their old x coordinate once the animation is complete (for animations that move the player such as walking). 1 will not return them to their old position + * Same as above but for the y axis. Should be kept the same as the previous parameter + * Setting this to 1 will freeze the player at the end of the animation. 0 will not + * Timer in milliseconds. For a never-ending loop it should be 0 + * Set to 1 to make server sync the animation with all other players in streaming radius. 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) (optional=0) + * + * + * The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. + * An invalid animation library will crash the player's game. + * This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). + */ native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, FORCE_SYNC:forceSync = SYNC_NONE); -/// Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). -/// The ID of the player to clear the animations of -/// Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) -/// -/// ClearAnimations doesn't do anything when the animation ends if we pass 1 for the freeze parameter in ApplyAnimation. -/// Unlike some other ways to remove player from a vehicle, this will also reset the vehicle's velocity to zero, instantly stopping the car. Player will appear on top of the vehicle with the same location as he was in his car seat. -/// This function always returns 1, even when the player specified is not connected. +/** + * Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). + * The ID of the player to clear the animations of + * Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) + * + * ClearAnimations doesn't do anything when the animation ends if we pass 1 for the freeze parameter in ApplyAnimation. + * Unlike some other ways to remove player from a vehicle, this will also reset the vehicle's velocity to zero, instantly stopping the car. Player will appear on top of the vehicle with the same location as he was in his car seat. + * This function always returns 1, even when the player specified is not connected. + */ native ClearAnimations(playerid, FORCE_SYNC:forceSync = SYNC_NONE); -/// Returns the index of any running applied animations. -/// ID of the player of whom you want to get the animation index of -/// -/// This function was added in SA-MP 0.3b and will not work in earlier versions! -/// 0 if there is no animation applied. +/** + * Returns the index of any running applied animations. + * ID of the player of whom you want to get the animation index of + * + * This function was added in SA-MP 0.3b and will not work in earlier versions! + * 0 if there is no animation applied. + */ native GetPlayerAnimationIndex(playerid); // return the index of any running applied animations (0 if none are running) -/// Get the animation library/name for the index. -/// The animation index, returned by GetPlayerAnimationIndex -/// String variable that stores the animation library -/// Size of the string that stores the animation library -/// String variable that stores the animation name -/// Size of the string that stores the animation name -/// -/// This function was added in SA-MP 0.3b and will not work in earlier versions! -/// 1 on success, 0 on failure. +/** + * Get the animation library/name for the index. + * The animation index, returned by GetPlayerAnimationIndex + * String variable that stores the animation library + * Size of the string that stores the animation library + * String variable that stores the animation name + * Size of the string that stores the animation name + * + * This function was added in SA-MP 0.3b and will not work in earlier versions! + * 1 on success, 0 on failure. + */ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibrary), animationName[], len2 = sizeof (animationName)); // get the animation lib/name for the index -/// Retrieves a player's current special action. -/// The ID of the player to get the special action of -/// -/// -/// -/// Special actions: (marked with * cannot be set)
    -///
      -///
    • 0 - SPECIAL_ACTION_NONE
    • -///
    • 2 - SPECIAL_ACTION_USEJETPACK
    • -///
    • 5 - SPECIAL_ACTION_DANCE1
    • -///
    • 6 - SPECIAL_ACTION_DANCE2
    • -///
    • 7 - SPECIAL_ACTION_DANCE3
    • -///
    • 8 - SPECIAL_ACTION_DANCE4
    • -///
    • 10 - SPECIAL_ACTION_HANDSUP
    • -///
    • 11 - SPECIAL_ACTION_USECELLPHONE
    • -///
    • 12 - SPECIAL_ACTION_SITTING *
    • -///
    • 13 - SPECIAL_ACTION_STOPUSECELLPHONE
    • -///
    -/// added in SA-MP 0.3:
    -///
      -///
    • 1 - SPECIAL_ACTION_DUCK * - Detect if the player is crouching.
    • -///
    • 3 - SPECIAL_ACTION_ENTER_VEHICLE * - Detect if the player is entering a vehicle via an animation.
    • -///
    • 4 - SPECIAL_ACTION_EXIT_VEHICLE * - Detect if the player is exiting a vehicle via an animation.
    • -///
    • 20 - SPECIAL_ACTION_DRINK_BEER - Will increase the player's drunk level when used
    • -///
    • 21 - SPECIAL_ACTION_SMOKE_CIGGY - Will give the player a cigar
    • -///
    • 22 - SPECIAL_ACTION_DRINK_WINE - Will give the player a wine bottle to get drunk from
    • -///
    • 23 - SPECIAL_ACTION_DRINK_SPRUNK - Will give the player a sprunk bottle to drink from
    • -///
    • 68 - SPECIAL_ACTION_PISSING - Will make make the player perform the pissing animation with visible pee.
    • -///
    -/// added in SA-MP 0.3e:
    -///
      -///
    • 24 - SPECIAL_ACTION_CUFFED - Will force the player in to cuffs (hands are behind their back) (does not work on CJ skin)
    • -///
    -/// added in SA-MP 0.3x:
    -///
      -///
    • 25 - SPECIAL_ACTION_CARRY - Will apply a 'carrying' animation to the player and make them unable to sprint, jump or punch (does not work on CJ skin)
    • -///
    -///
    -/// The special action of the player. +/** + * Retrieves a player's current special action. + * The ID of the player to get the special action of + * + * + * + * Special actions: (marked with * cannot be set)
    + *
      + *
    • 0 - SPECIAL_ACTION_NONE
    • + *
    • 2 - SPECIAL_ACTION_USEJETPACK
    • + *
    • 5 - SPECIAL_ACTION_DANCE1
    • + *
    • 6 - SPECIAL_ACTION_DANCE2
    • + *
    • 7 - SPECIAL_ACTION_DANCE3
    • + *
    • 8 - SPECIAL_ACTION_DANCE4
    • + *
    • 10 - SPECIAL_ACTION_HANDSUP
    • + *
    • 11 - SPECIAL_ACTION_USECELLPHONE
    • + *
    • 12 - SPECIAL_ACTION_SITTING *
    • + *
    • 13 - SPECIAL_ACTION_STOPUSECELLPHONE
    • + *
    + * added in SA-MP 0.3:
    + *
      + *
    • 1 - SPECIAL_ACTION_DUCK * - Detect if the player is crouching.
    • + *
    • 3 - SPECIAL_ACTION_ENTER_VEHICLE * - Detect if the player is entering a vehicle via an animation.
    • + *
    • 4 - SPECIAL_ACTION_EXIT_VEHICLE * - Detect if the player is exiting a vehicle via an animation.
    • + *
    • 20 - SPECIAL_ACTION_DRINK_BEER - Will increase the player's drunk level when used
    • + *
    • 21 - SPECIAL_ACTION_SMOKE_CIGGY - Will give the player a cigar
    • + *
    • 22 - SPECIAL_ACTION_DRINK_WINE - Will give the player a wine bottle to get drunk from
    • + *
    • 23 - SPECIAL_ACTION_DRINK_SPRUNK - Will give the player a sprunk bottle to drink from
    • + *
    • 68 - SPECIAL_ACTION_PISSING - Will make make the player perform the pissing animation with visible pee.
    • + *
    + * added in SA-MP 0.3e:
    + *
      + *
    • 24 - SPECIAL_ACTION_CUFFED - Will force the player in to cuffs (hands are behind their back) (does not work on CJ skin)
    • + *
    + * added in SA-MP 0.3x:
    + *
      + *
    • 25 - SPECIAL_ACTION_CARRY - Will apply a 'carrying' animation to the player and make them unable to sprint, jump or punch (does not work on CJ skin)
    • + *
    + *
    + * The special action of the player. + */ native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); -/// This function allows to set players special action. -/// The player that should perform the action -/// The action that should be performed -/// -/// -/// Removing jetpacks from players by setting their special action to 0 causes the sound to stay until death. -/// -/// Special actions: (marked with * cannot be set)
    -///
      -///
    • 0 - SPECIAL_ACTION_NONE
    • -///
    • 2 - SPECIAL_ACTION_USEJETPACK
    • -///
    • 5 - SPECIAL_ACTION_DANCE1
    • -///
    • 6 - SPECIAL_ACTION_DANCE2
    • -///
    • 7 - SPECIAL_ACTION_DANCE3
    • -///
    • 8 - SPECIAL_ACTION_DANCE4
    • -///
    • 10 - SPECIAL_ACTION_HANDSUP
    • -///
    • 11 - SPECIAL_ACTION_USECELLPHONE
    • -///
    • 12 - SPECIAL_ACTION_SITTING *
    • -///
    • 13 - SPECIAL_ACTION_STOPUSECELLPHONE
    • -///
    -/// added in SA-MP 0.3:
    -///
      -///
    • 1 - SPECIAL_ACTION_DUCK * - Detect if the player is crouching.
    • -///
    • 3 - SPECIAL_ACTION_ENTER_VEHICLE * - Detect if the player is entering a vehicle via an animation.
    • -///
    • 4 - SPECIAL_ACTION_EXIT_VEHICLE * - Detect if the player is exiting a vehicle via an animation.
    • -///
    • 20 - SPECIAL_ACTION_DRINK_BEER - Will increase the player's drunk level when used
    • -///
    • 21 - SPECIAL_ACTION_SMOKE_CIGGY - Will give the player a cigar
    • -///
    • 22 - SPECIAL_ACTION_DRINK_WINE - Will give the player a wine bottle to get drunk from
    • -///
    • 23 - SPECIAL_ACTION_DRINK_SPRUNK - Will give the player a sprunk bottle to drink from
    • -///
    • 68 - SPECIAL_ACTION_PISSING - Will make make the player perform the pissing animation with visible pee.
    • -///
    -/// added in SA-MP 0.3e:
    -///
      -///
    • 24 - SPECIAL_ACTION_CUFFED - Will force the player in to cuffs (hands are behind their back) (does not work on CJ skin)
    • -///
    -/// added in SA-MP 0.3x:
    -///
      -///
    • 25 - SPECIAL_ACTION_CARRY - Will apply a 'carrying' animation to the player and make them unable to sprint, jump or punch (does not work on CJ skin)
    • -///
    -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected. -///
    +/** + * This function allows to set players special action. + * The player that should perform the action + * The action that should be performed + * + * + * Removing jetpacks from players by setting their special action to 0 causes the sound to stay until death. + * + * Special actions: (marked with * cannot be set)
    + *
      + *
    • 0 - SPECIAL_ACTION_NONE
    • + *
    • 2 - SPECIAL_ACTION_USEJETPACK
    • + *
    • 5 - SPECIAL_ACTION_DANCE1
    • + *
    • 6 - SPECIAL_ACTION_DANCE2
    • + *
    • 7 - SPECIAL_ACTION_DANCE3
    • + *
    • 8 - SPECIAL_ACTION_DANCE4
    • + *
    • 10 - SPECIAL_ACTION_HANDSUP
    • + *
    • 11 - SPECIAL_ACTION_USECELLPHONE
    • + *
    • 12 - SPECIAL_ACTION_SITTING *
    • + *
    • 13 - SPECIAL_ACTION_STOPUSECELLPHONE
    • + *
    + * added in SA-MP 0.3:
    + *
      + *
    • 1 - SPECIAL_ACTION_DUCK * - Detect if the player is crouching.
    • + *
    • 3 - SPECIAL_ACTION_ENTER_VEHICLE * - Detect if the player is entering a vehicle via an animation.
    • + *
    • 4 - SPECIAL_ACTION_EXIT_VEHICLE * - Detect if the player is exiting a vehicle via an animation.
    • + *
    • 20 - SPECIAL_ACTION_DRINK_BEER - Will increase the player's drunk level when used
    • + *
    • 21 - SPECIAL_ACTION_SMOKE_CIGGY - Will give the player a cigar
    • + *
    • 22 - SPECIAL_ACTION_DRINK_WINE - Will give the player a wine bottle to get drunk from
    • + *
    • 23 - SPECIAL_ACTION_DRINK_SPRUNK - Will give the player a sprunk bottle to drink from
    • + *
    • 68 - SPECIAL_ACTION_PISSING - Will make make the player perform the pissing animation with visible pee.
    • + *
    + * added in SA-MP 0.3e:
    + *
      + *
    • 24 - SPECIAL_ACTION_CUFFED - Will force the player in to cuffs (hands are behind their back) (does not work on CJ skin)
    • + *
    + * added in SA-MP 0.3x:
    + *
      + *
    • 25 - SPECIAL_ACTION_CARRY - Will apply a 'carrying' animation to the player and make them unable to sprint, jump or punch (does not work on CJ skin)
    • + *
    + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected. + *
    + */ native SetPlayerSpecialAction(playerid, SPECIAL_ACTION:actionid); -/// Disables collisions between occupied vehicles for a player. -/// The ID of the player for whom you want to disable collisions -/// 1 to disable collisions, 0 to enable collisions -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player specified does not exist. -///
    +/** + * Disables collisions between occupied vehicles for a player. + * The ID of the player for whom you want to disable collisions + * 1 to disable collisions, 0 to enable collisions + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player specified does not exist. + *
    + */ native DisableRemoteVehicleCollisions(playerid, bool:disable); // Player world/map related -/// Sets a checkpoint (red cylinder) for a player. Also shows a red blip on the radar. When players enter a checkpoint, OnPlayerEnterCheckpoint is called and actions can be performed. -/// The ID of the player for whom to set a checkpoint -/// The x coordinate to set the checkpoint at -/// The y coordinate to set the checkpoint at -/// The z coordinate to set the checkpoint at -/// The size of the checkpoint -/// -/// If a checkpoint is already set it will use the size of that checkpoint instead of the new one.
    -/// Checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly. A pickup can be used instead. -///
    -/// Checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' checkpoints (only show them when players are close enough), use a checkpoint streamer. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player specified does not exist. -///
    +/** + * Sets a checkpoint (red cylinder) for a player. Also shows a red blip on the radar. When players enter a checkpoint, OnPlayerEnterCheckpoint is called and actions can be performed. + * The ID of the player for whom to set a checkpoint + * The x coordinate to set the checkpoint at + * The y coordinate to set the checkpoint at + * The z coordinate to set the checkpoint at + * The size of the checkpoint + * + * If a checkpoint is already set it will use the size of that checkpoint instead of the new one.
    + * Checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly. A pickup can be used instead. + *
    + * Checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' checkpoints (only show them when players are close enough), use a checkpoint streamer. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player specified does not exist. + *
    + */ native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); -/// Disables (hides/destroys) a player's set checkpoint. Players can only have a single checkpoint set at a time. Checkpoints don't need to be disabled before setting another one. -/// The ID of the player whose checkpoint to disable -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// 1: The function executed successfully. Success is also returned if the player doesn't have a checkpoint shown already.
    -/// 0: The function failed to execute. This means the player is not connected. -///
    +/** + * Disables (hides/destroys) a player's set checkpoint. Players can only have a single checkpoint set at a time. Checkpoints don't need to be disabled before setting another one. + * The ID of the player whose checkpoint to disable + * + * + * + * + * + * + * + * + * + * + * 1: The function executed successfully. Success is also returned if the player doesn't have a checkpoint shown already.
    + * 0: The function failed to execute. This means the player is not connected. + *
    + */ native DisablePlayerCheckpoint(playerid); -/// Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint callback is called. -/// The ID of the player to set the checkpoint for -/// Type of checkpoint. 0-Normal, 1-Finish, 2-Nothing(Only the checkpoint without anything on it), 3-Air normal, 4-Air finish, 5-Air (rotates and stops), 6-Air (increases, decreases and disappears), 7-Air (swings down and up), 8-Air (swings up and down) -/// x-Coordinate -/// y-Coordinate -/// z-Coordinate -/// x-Coordinate of the next point, for the arrow facing direction -/// y-Coordinate of the next point, for the arrow facing direction -/// z-Coordinate of the next point, for the arrow facing direction -/// Size (diameter) of the checkpoint -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// If a race checkpoint is already set it will use the size of that checkpoint instead of the new one. -/// -/// Race checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly.
    -/// Race checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' race checkpoints (only show them when players are close enough), use a race checkpoint streamer. -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player specified does not exist. -///
    +/** + * Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint callback is called. + * The ID of the player to set the checkpoint for + * Type of checkpoint. 0-Normal, 1-Finish, 2-Nothing(Only the checkpoint without anything on it), 3-Air normal, 4-Air finish, 5-Air (rotates and stops), 6-Air (increases, decreases and disappears), 7-Air (swings down and up), 8-Air (swings up and down) + * x-Coordinate + * y-Coordinate + * z-Coordinate + * x-Coordinate of the next point, for the arrow facing direction + * y-Coordinate of the next point, for the arrow facing direction + * z-Coordinate of the next point, for the arrow facing direction + * Size (diameter) of the checkpoint + * + * + * + * + * + * + * + * + * + * If a race checkpoint is already set it will use the size of that checkpoint instead of the new one. + * + * Race checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly.
    + * Race checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' race checkpoints (only show them when players are close enough), use a race checkpoint streamer. + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player specified does not exist. + *
    + */ native SetPlayerRaceCheckpoint(playerid, type, Float:centerX, Float:centerY, Float:centerZ, Float:nextX, Float:nextY, Float:nextZ, Float:size); -/// Disable any initialized race checkpoints for a specific player, since you can only have one at any given time. -/// The player to disable the current checkpoint for -/// -/// -/// -/// -/// -/// -/// -/// -/// +/** + * Disable any initialized race checkpoints for a specific player, since you can only have one at any given time. + * The player to disable the current checkpoint for + * + * + * + * + * + * + * + * + * + */ native DisablePlayerRaceCheckpoint(playerid); -/// Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in). -/// The ID of the player to set the world boundaries of -/// The maximum x coordinate the player can go to -/// The minimum x coordinate the player can go to -/// The maximum y coordinate the player can go to -/// The minimum y coordinate the player can go to -/// -/// This function does not work if used in OnPlayerConnect -/// A player's world boundaries can be reset by setting them to 20000.0, -20000.0, 20000.0, -20000.0. These are the default values. -/// This function doesn't work in interiors! +/** + * Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in). + * The ID of the player to set the world boundaries of + * The maximum x coordinate the player can go to + * The minimum x coordinate the player can go to + * The maximum y coordinate the player can go to + * The minimum y coordinate the player can go to + * + * This function does not work if used in OnPlayerConnect + * A player's world boundaries can be reset by setting them to 20000.0, -20000.0, 20000.0, -20000.0. These are the default values. + * This function doesn't work in interiors! + */ native SetPlayerWorldBounds(playerid, Float:maxX, Float:minX, Float:maxY, Float:minY); -/// Change the colour of a player's nametag and radar blip for another player. -/// The player that will see the player's changed blip/nametag colour -/// The player whose colour will be changed -/// New colour. (RGBA) -/// -/// -/// -/// +/** + * Change the colour of a player's nametag and radar blip for another player. + * The player that will see the player's changed blip/nametag colour + * The player whose colour will be changed + * New colour. (RGBA) + * + * + * + * + */ native SetPlayerMarkerForPlayer(playerid, targetid, colour); -/// This functions allows you to toggle the drawing of player nametags, healthbars and armor bars which display above their head. For use of a similar function like this on a global level, ShowNameTags function. -/// Player who will see the results of this function -/// Player whose name tag will be shown or hidden -/// 1-show name tag, 0-hide name tag -/// -/// -/// -/// ShowNameTags must be set to 1 to be able to show name tags with ShowPlayerNameTagForPlayer, that means that in order to be effective you need to ShowPlayerNameTagForPlayer(forplayerid, playerid, 0) ahead of time(OnPlayerStreamIn is a good spot). +/** + * This functions allows you to toggle the drawing of player nametags, healthbars and armor bars which display above their head. For use of a similar function like this on a global level, ShowNameTags function. + * Player who will see the results of this function + * Player whose name tag will be shown or hidden + * 1-show name tag, 0-hide name tag + * + * + * + * ShowNameTags must be set to 1 to be able to show name tags with ShowPlayerNameTagForPlayer, that means that in order to be effective you need to ShowPlayerNameTagForPlayer(forplayerid, playerid, 0) ahead of time(OnPlayerStreamIn is a good spot). + */ native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); -/// Place an icon/marker on a player's map. Can be used to mark locations such as banks and hospitals to players. -/// The ID of the player to set the map icon for -/// The player's icon ID, ranging from 0 to 99. This means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon -/// The x coordinate to place the map icon at -/// The y coordinate to place the map icon at -/// The z coordinate to place the map icon at -/// The icon to set -/// The colour of the icon (RGBA). This should only be used with the square icon (ID: 0) -/// The style of icon (optional=MAPICON_LOCAL) -/// -/// -/// If you use an invalid marker type, it will create ID 1 (White Square). -/// If you use an icon ID that is already in use, it will replace the current map icon using that ID. -/// Marker type 1 (square), 2 (player blip), 4 (north), and 56 (single airstrip blip) will cause your game to crash if you have map legends enabled while viewing the map. -/// -/// Map icon styles:
    -///
      -///
    • 0 MAPICON_LOCAL - close proximity only
    • -///
    • 1 MAPICON_GLOBAL - show on radar edge as long as in range
    • -///
    • 2 MAPICON_LOCAL_CHECKPOINT - Close proximity only (with checkpoint)
    • -///
    • 3 MAPICON_GLOBAL_CHECKPOINT - Show on radar edge as long as in range (with checkpoint)
    • -///
    -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. Player is not connected. -///
    +/** + * Place an icon/marker on a player's map. Can be used to mark locations such as banks and hospitals to players. + * The ID of the player to set the map icon for + * The player's icon ID, ranging from 0 to 99. This means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon + * The x coordinate to place the map icon at + * The y coordinate to place the map icon at + * The z coordinate to place the map icon at + * The icon to set + * The colour of the icon (RGBA). This should only be used with the square icon (ID: 0) + * The style of icon (optional=MAPICON_LOCAL) + * + * + * If you use an invalid marker type, it will create ID 1 (White Square). + * If you use an icon ID that is already in use, it will replace the current map icon using that ID. + * Marker type 1 (square), 2 (player blip), 4 (north), and 56 (single airstrip blip) will cause your game to crash if you have map legends enabled while viewing the map. + * + * Map icon styles:
    + *
      + *
    • 0 MAPICON_LOCAL - close proximity only
    • + *
    • 1 MAPICON_GLOBAL - show on radar edge as long as in range
    • + *
    • 2 MAPICON_LOCAL_CHECKPOINT - Close proximity only (with checkpoint)
    • + *
    • 3 MAPICON_GLOBAL_CHECKPOINT - Show on radar edge as long as in range (with checkpoint)
    • + *
    + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. Player is not connected. + *
    + */ native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, colour, MAPICON:style = MAPICON_LOCAL); -/// Removes a map icon that was set earlier for a player using SetPlayerMapIcon. -/// The ID of the player whose icon to remove -/// The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. -///
    +/** + * Removes a map icon that was set earlier for a player using SetPlayerMapIcon. + * The ID of the player whose icon to remove + * The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. + *
    + */ native RemovePlayerMapIcon(playerid, iconid); -/// Enable/Disable the teleporting ability for a player by right-clicking on the map. -/// The ID of the player to allow teleport -/// 1 to allow, 0 to disallow -/// This function, as of 0.3d, is deprecated. Check OnPlayerClickMap. -/// This function will work only if AllowAdminTeleport is enabled, and you have to be an admin. -/// +/** + * Enable/Disable the teleporting ability for a player by right-clicking on the map. + * The ID of the player to allow teleport + * 1 to allow, 0 to disallow + * This function, as of 0.3d, is deprecated. Check OnPlayerClickMap. + * This function will work only if AllowAdminTeleport is enabled, and you have to be an admin. + * #pragma deprecated Use `OnPlayerClickMap`. native AllowPlayerTeleport(playerid, bool:allow); // Player camera -/// Sets the camera to a specific position for a player. -/// ID of the player -/// The x coordinate to place the camera at -/// The y coordinate to place the camera at -/// The z coordinate to place the camera at -/// -/// -/// You may also have to use SetPlayerCameraLookAt with this function in order to work properly. -/// Use SetCameraBehindPlayer to reset the camera to behind the player. -/// Using the camera functions directly after enabling spectator mode doesn't work. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player specified doesn't exist. -///
    +/** + * Sets the camera to a specific position for a player. + * ID of the player + * The x coordinate to place the camera at + * The y coordinate to place the camera at + * The z coordinate to place the camera at + * + * + * You may also have to use SetPlayerCameraLookAt with this function in order to work properly. + * Use SetCameraBehindPlayer to reset the camera to behind the player. + * Using the camera functions directly after enabling spectator mode doesn't work. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player specified doesn't exist. + *
    + */ native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); -/// Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos. -/// The ID of the player whose camera to set -/// The x coordinate for the player's camera to look at -/// The y coordinate for the player's camera to look at -/// The z coordinate for the player's camera to look at -/// The style of the change. Can be used to interpolate (change slowly) from old pos to new pos using CAMERA_MOVE. Added in 0.3e. Leave out for older versions (optional=CAMERA_CUT) -/// -/// -/// -/// -/// Using the camera functions directly after enabling spectator mode doesn't work. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player specified does not exist. -///
    +/** + * Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos. + * The ID of the player whose camera to set + * The x coordinate for the player's camera to look at + * The y coordinate for the player's camera to look at + * The z coordinate for the player's camera to look at + * The style of the change. Can be used to interpolate (change slowly) from old pos to new pos using CAMERA_MOVE. Added in 0.3e. Leave out for older versions (optional=CAMERA_CUT) + * + * + * + * + * Using the camera functions directly after enabling spectator mode doesn't work. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player specified does not exist. + *
    + */ native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, CAM_MOVE:cut = CAMERA_CUT); -/// Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos. -/// The player you want to restore the camera for -/// -/// +/** + * Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos. + * The player you want to restore the camera for + * + * + */ native SetCameraBehindPlayer(playerid); -/// Get the position of the player's camera. -/// The ID of the player to get the camera position of -/// A float variable to store the x coordinate in, passed by reference -/// A float variable to store the y coordinate in, passed by reference -/// A float variable to store the z coordinate in, passed by reference -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// Player's camera positions are only updated once a second, unless aiming. -/// It is recommended to set a 1 second timer if you wish to take action that relies on a player's camera position. +/** + * Get the position of the player's camera. + * The ID of the player to get the camera position of + * A float variable to store the x coordinate in, passed by reference + * A float variable to store the y coordinate in, passed by reference + * A float variable to store the z coordinate in, passed by reference + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * Player's camera positions are only updated once a second, unless aiming. + * It is recommended to set a 1 second timer if you wish to take action that relies on a player's camera position. + */ native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z); -/// This function will return the current direction of player's aiming in 3-D space, the coords are relative to the camera position, see GetPlayerCameraPos. -/// The ID of the player you want to obtain the camera front vector of -/// A float to store the x coordinate, passed by reference -/// A float to store the y coordinate, passed by reference -/// A float to store the z coordinate, passed by reference -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// In 0.3a the camera front vector is only obtainable when player is inside a rhino, S.W.A.T tank, fire truck, or on foot. -/// Since 0.3b the camera data can be obtained when the player is in any vehicle or on foot. -/// The position is stored in the specified variables. +/** + * This function will return the current direction of player's aiming in 3-D space, the coords are relative to the camera position, see GetPlayerCameraPos. + * The ID of the player you want to obtain the camera front vector of + * A float to store the x coordinate, passed by reference + * A float to store the y coordinate, passed by reference + * A float to store the z coordinate, passed by reference + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * In 0.3a the camera front vector is only obtainable when player is inside a rhino, S.W.A.T tank, fire truck, or on foot. + * Since 0.3b the camera data can be obtained when the player is in any vehicle or on foot. + * The position is stored in the specified variables. + */ native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z); -/// Returns the current GTA camera mode for the requested player. The camera modes are useful in determining whether a player is aiming, doing a passenger driveby etc. -/// The ID of the player whose camera mode to retrieve -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! -/// The camera mode as an integer (or -1 if player is not connected). +/** + * Returns the current GTA camera mode for the requested player. The camera modes are useful in determining whether a player is aiming, doing a passenger driveby etc. + * The ID of the player whose camera mode to retrieve + * + * + * + * + * + * This function was added in SA-MP 0.3c R3 and will not work in earlier versions! + * The camera mode as an integer (or -1 if player is not connected). + */ native CAM_MODE:GetPlayerCameraMode(playerid); -/// Toggle camera targeting functions for a player. Disabled by default to save bandwidth. -/// The ID of the player to toggle camera targeting functions for -/// 1 to enable camera targeting functions and 0 to disable them -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player is not connected. -///
    +/** + * Toggle camera targeting functions for a player. Disabled by default to save bandwidth. + * The ID of the player to toggle camera targeting functions for + * 1 to enable camera targeting functions and 0 to disable them + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player is not connected. + *
    + */ native EnablePlayerCameraTarget(playerid, bool:enable); -/// Allows you to retrieve the ID of the object the player is looking at. -/// The ID of the player to check -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. -/// The ID of the object playerid is looking at. If INVALID_OBJECT_ID (65535) is returned, playerid isn't looking at any object. +/** + * Allows you to retrieve the ID of the object the player is looking at. + * The ID of the player to check + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. + * The ID of the object playerid is looking at. If INVALID_OBJECT_ID (65535) is returned, playerid isn't looking at any object. + */ native GetPlayerCameraTargetObject(playerid); -/// Get the ID of the vehicle the player is looking at. -/// The ID of the player to check -/// -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. -/// This function can (obviously) only return one vehicle ID at a time, while the player may be looking at multiple. It generally seems to detect the closest vehicle first. -/// The vehicle ID of the vehicle the player is looking at. INVALID_VEHICLE_ID if none. +/** + * Get the ID of the vehicle the player is looking at. + * The ID of the player to check + * + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. + * This function can (obviously) only return one vehicle ID at a time, while the player may be looking at multiple. It generally seems to detect the closest vehicle first. + * The vehicle ID of the vehicle the player is looking at. INVALID_VEHICLE_ID if none. + */ native GetPlayerCameraTargetVehicle(playerid); -/// Allows you to retrieve the ID of the player the playerid is looking at. -/// The ID of the player to check -/// -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. -/// Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerid is aming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerid is looking at (reference point is the center of the screen). -/// The ID of the player the playerid is looking at. +/** + * Allows you to retrieve the ID of the player the playerid is looking at. + * The ID of the player to check + * + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. + * Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerid is aming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerid is looking at (reference point is the center of the screen). + * The ID of the player the playerid is looking at. + */ native GetPlayerCameraTargetPlayer(playerid); -/// Allows you to retrieve the ID of the actor the player is looking at (if any). -/// The ID of the player to get the target actor of -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. -/// This function only tells you which actor (if any) the player is looking at. To find out if they are aiming at them, you need to use GetPlayerTargetActor. -/// The ID of the actor the player is looking at. +/** + * Allows you to retrieve the ID of the actor the player is looking at (if any). + * The ID of the player to get the target actor of + * + * + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. + * This function only tells you which actor (if any) the player is looking at. To find out if they are aiming at them, you need to use GetPlayerTargetActor. + * The ID of the actor the player is looking at. + */ native GetPlayerCameraTargetActor(playerid); -/// Retrieves the aspect ratio of a player's camera. -/// The ID of the player to get the camera aspect ratio of -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// The return value of this function represents the value of the "widescreen" option in the game's display settings, not the actual aspect ratio of the player's display. -/// The aspect ratio of the player's camera, as a float. The aspect ratio can be one of three values: 4:3 (1.3333334, Float:0x3FAAAAAB) when widescreen is turned off, 5:4 (1.2470589, Float:0x3F9F9FA0) when letterbox mode is turned on, and 16:9 (1.7764707, Float:0x3FE36364) when widescreen is turned on regardless of the letterbox mode. +/** + * Retrieves the aspect ratio of a player's camera. + * The ID of the player to get the camera aspect ratio of + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * The return value of this function represents the value of the "widescreen" option in the game's display settings, not the actual aspect ratio of the player's display. + * The aspect ratio of the player's camera, as a float. The aspect ratio can be one of three values: 4:3 (1.3333334, Float:0x3FAAAAAB) when widescreen is turned off, 5:4 (1.2470589, Float:0x3F9F9FA0) when letterbox mode is turned on, and 16:9 (1.7764707, Float:0x3FE36364) when widescreen is turned on regardless of the letterbox mode. + */ native Float:GetPlayerCameraAspectRatio(playerid); -/// Retrieves the game camera zoom level for a given player. -/// The ID of the player to get the camera zoom level of -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// This retrieves the zoom level of the GAME camera, not the camera WEAPON. -/// The player's camera zoom level (camera, sniper etc.), a float. +/** + * Retrieves the game camera zoom level for a given player. + * The ID of the player to get the camera zoom level of + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * This retrieves the zoom level of the GAME camera, not the camera WEAPON. + * The player's camera zoom level (camera, sniper etc.), a float. + */ native Float:GetPlayerCameraZoom(playerid); -/// You can use this function to attach the player camera to objects. -/// The ID of the player which will have your camera attached on object -/// The object ID which you want to attach the player camera -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// You need to create the object first, before attempting to attach a player camera for that. +/** + * You can use this function to attach the player camera to objects. + * The ID of the player which will have your camera attached on object + * The object ID which you want to attach the player camera + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * You need to create the object first, before attempting to attach a player camera for that. + */ native AttachCameraToObject(playerid, objectid); -/// Attaches a player's camera to a player-object. The player is able to move their camera while it is attached to an object. Can be used with MovePlayerObject and AttachPlayerObjectToVehicle. -/// The ID of the player which will have their camera attached to a player-object -/// The ID of the player-object to which the player's camera will be attached -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// The player-object must be created before attempting to attach the player's camera to it. +/** + * Attaches a player's camera to a player-object. The player is able to move their camera while it is attached to an object. Can be used with MovePlayerObject and AttachPlayerObjectToVehicle. + * The ID of the player which will have their camera attached to a player-object + * The ID of the player-object to which the player's camera will be attached + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * The player-object must be created before attempting to attach the player's camera to it. + */ native AttachCameraToPlayerObject(playerid, objectid); -/// Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes. -/// The ID of the player the camera should be moved for -/// The x position the camera should start to move from -/// The y position the camera should start to move from -/// The z position the camera should start to move from -/// The x position the camera should move to -/// The y position the camera should move to -/// The z position the camera should move to -/// Time in milliseconds -/// The jumpcut to use. Set to CAMERA_MOVE for a smooth movement (optional=CAMERA_CUT) -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. +/** + * Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes. + * The ID of the player the camera should be moved for + * The x position the camera should start to move from + * The y position the camera should start to move from + * The z position the camera should start to move from + * The x position the camera should move to + * The y position the camera should move to + * The z position the camera should move to + * Time in milliseconds + * The jumpcut to use. Set to CAMERA_MOVE for a smooth movement (optional=CAMERA_CUT) + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. + */ native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAM_MOVE:cut = CAMERA_CUT); -/// Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. -/// The ID of the player the camera should be moved for -/// The x position the camera should start to move from -/// The y position the camera should start to move from -/// The z position the camera should start to move from -/// The x position the camera should move to -/// The y position the camera should move to -/// The z position the camera should move to -/// Time in milliseconds to complete interpolation -/// The 'jumpcut' to use. Set to CAMERA_MOVE for interpolation (optional=CAMERA_CUT) -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. +/** + * Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. + * The ID of the player the camera should be moved for + * The x position the camera should start to move from + * The y position the camera should start to move from + * The z position the camera should start to move from + * The x position the camera should move to + * The y position the camera should move to + * The z position the camera should move to + * Time in milliseconds to complete interpolation + * The 'jumpcut' to use. Set to CAMERA_MOVE for interpolation (optional=CAMERA_CUT) + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. + */ native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAM_MOVE:cut = CAMERA_CUT); // Player conditionals -/// Checks if a player is connected (if an ID is taken by a connected player). -/// The ID of the player to check -/// -/// -/// -/// This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. -/// 1 if the player is connected, 0 if not. +/** + * Checks if a player is connected (if an ID is taken by a connected player). + * The ID of the player to check + * + * + * + * This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. + * 1 if the player is connected, 0 if not. + */ native bool:IsPlayerConnected(playerid); -/// Checks if a player is in a specific vehicle. -/// ID of the player -/// ID of the vehicle -/// -/// -/// 1 if the player is in the vehicle, 0 if not. +/** + * Checks if a player is in a specific vehicle. + * ID of the player + * ID of the vehicle + * + * + * 1 if the player is in the vehicle, 0 if not. + */ native bool:IsPlayerInVehicle(playerid, vehicleid); -/// Check if a player is inside any vehicle (as a driver or passenger). -/// The ID of the player to check -/// -/// -/// 1 if the player is in a vehicle, 0 if not. +/** + * Check if a player is inside any vehicle (as a driver or passenger). + * The ID of the player to check + * + * + * 1 if the player is in a vehicle, 0 if not. + */ native bool:IsPlayerInAnyVehicle(playerid); -/// Check if the player is currently inside a checkpoint, this could be used for properties or teleport points for example. -/// The player you want to know the status of -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// 0 if player isn't in his checkpoint else 1. +/** + * Check if the player is currently inside a checkpoint, this could be used for properties or teleport points for example. + * The player you want to know the status of + * + * + * + * + * + * + * + * + * + * 0 if player isn't in his checkpoint else 1. + */ native bool:IsPlayerInCheckpoint(playerid); -/// Check if the player is inside their current set race checkpoint (SetPlayerRaceCheckpoint). -/// The ID of the player to check -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// 1 is the player is in a race checkpoint, 0 if not. +/** + * Check if the player is inside their current set race checkpoint (SetPlayerRaceCheckpoint). + * The ID of the player to check + * + * + * + * + * + * + * + * + * + * 1 is the player is in a race checkpoint, 0 if not. + */ native bool:IsPlayerInRaceCheckpoint(playerid); // Virtual Worlds -/// Set the virtual world of a player. They can only see other players or vehicles that are in that same world. -/// The ID of the player you want to set the virtual world of -/// The virtual world ID to put the player in -/// -/// -/// The default virtual world is 0 -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected. -///
    +/** + * Set the virtual world of a player. They can only see other players or vehicles that are in that same world. + * The ID of the player you want to set the virtual world of + * The virtual world ID to put the player in + * + * + * The default virtual world is 0 + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected. + *
    + */ native SetPlayerVirtualWorld(playerid, virtualWorld); -/// Retrieves the current virtual world the player is in. -/// The ID of the player to get the virtual world of -/// -/// -/// -/// The ID of the virtual world the player is currently in. +/** + * Retrieves the current virtual world the player is in. + * The ID of the player to get the virtual world of + * + * + * + * The ID of the virtual world the player is currently in. + */ native GetPlayerVirtualWorld(playerid); // Insane Stunts -/// Toggle stunt bonuses for a player. Enabled by default. -/// The ID of the player to toggle stunt bonuses for -/// 1 to enable stunt bonuses and 0 to disable them -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player is not connected. -///
    +/** + * Toggle stunt bonuses for a player. Enabled by default. + * The ID of the player to toggle stunt bonuses for + * 1 to enable stunt bonuses and 0 to disable them + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player is not connected. + *
    + */ native EnableStuntBonusForPlayer(playerid, bool:enable); -/// Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie). -/// 1 to enable stunt bonuses or 0 to disable them -/// +/** + * Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie). + * 1 to enable stunt bonuses or 0 to disable them + * + */ native EnableStuntBonusForAll(bool:enable); -/// Toggle whether a player is in spectator mode or not. While in spectator mode a player can spectate (watch) other players and vehicles. After using this function, either PlayerSpectatePlayer or PlayerSpectateVehicle needs to be used. -/// The ID of the player who should spectate -/// 1 to enable spectating and 0 to disable -/// -/// -/// If the player is not loaded in before setting the spectate status to false, the connection can be closed unexpectedly. -/// When spectator mode is disabled, OnPlayerSpawn will automatically be called, if you wish to restore player to state before spectating, you will have to handle that in OnPlayerSpawn. Note also, that player can also go to class selection before if they used F4 during spectate, a player also CAN die in spectate mode due to various glitches. -/// When a player is in spectate mode their HUD is hidden, making it useful for setting a player's camera without the HUD. Also, objects near the player's camera will be streamed in, making this useful for interpolating cameras. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player does not exist. -///
    +/** + * Toggle whether a player is in spectator mode or not. While in spectator mode a player can spectate (watch) other players and vehicles. After using this function, either PlayerSpectatePlayer or PlayerSpectateVehicle needs to be used. + * The ID of the player who should spectate + * 1 to enable spectating and 0 to disable + * + * + * If the player is not loaded in before setting the spectate status to false, the connection can be closed unexpectedly. + * When spectator mode is disabled, OnPlayerSpawn will automatically be called, if you wish to restore player to state before spectating, you will have to handle that in OnPlayerSpawn. Note also, that player can also go to class selection before if they used F4 during spectate, a player also CAN die in spectate mode due to various glitches. + * When a player is in spectate mode their HUD is hidden, making it useful for setting a player's camera without the HUD. Also, objects near the player's camera will be streamed in, making this useful for interpolating cameras. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player does not exist. + *
    + */ native TogglePlayerSpectating(playerid, bool:toggle); -/// Makes a player spectate (watch) another player. -/// The ID of the player that will spectate -/// The ID of the player that should be spectated -/// The mode to spectate with (optional=SPECTATE_MODE_NORMAL) -/// -/// -/// Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. -/// playerid and targetid's virtual world and interior must be the same for this function to work properly. -/// -/// Spectate modes:
    -///
      -///
    • SPECTATE_MODE_NORMAL - normal spectate mode (third person point of view). Camera can not be changed.
    • -///
    • SPECTATE_MODE_FIXED - use SetPlayerCameraPos after this to position the player's camera, and it will track the player/vehicle set with PlayerSpectatePlayer/PlayerSpectateVehicle.
    • -///
    • SPECTATE_MODE_SIDE - the camera will be attached to the side of the player/vehicle (like when you're in first-person camera on a bike and you do a wheelie).
    • -///
    -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. One of the players specified does not exist. -///
    +/** + * Makes a player spectate (watch) another player. + * The ID of the player that will spectate + * The ID of the player that should be spectated + * The mode to spectate with (optional=SPECTATE_MODE_NORMAL) + * + * + * Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. + * playerid and targetid's virtual world and interior must be the same for this function to work properly. + * + * Spectate modes:
    + *
      + *
    • SPECTATE_MODE_NORMAL - normal spectate mode (third person point of view). Camera can not be changed.
    • + *
    • SPECTATE_MODE_FIXED - use SetPlayerCameraPos after this to position the player's camera, and it will track the player/vehicle set with PlayerSpectatePlayer/PlayerSpectateVehicle.
    • + *
    • SPECTATE_MODE_SIDE - the camera will be attached to the side of the player/vehicle (like when you're in first-person camera on a bike and you do a wheelie).
    • + *
    + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. One of the players specified does not exist. + *
    + */ native PlayerSpectatePlayer(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); -/// Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. -/// The ID of the player who should spectate a vehicle -/// The ID of the vehicle the player should spectate -/// The spectate mode. Can generally be left blank as it defaults to 'normal' -/// -/// -/// Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. -/// playerid and targetid have to be in the same interior for this function to work properly. -/// -/// 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.
    -/// 0: The function failed to execute. The player, vehicle, or both don't exist. -///
    +/** + * Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. + * The ID of the player who should spectate a vehicle + * The ID of the vehicle the player should spectate + * The spectate mode. Can generally be left blank as it defaults to 'normal' + * + * + * Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. + * playerid and targetid have to be in the same interior for this function to work properly. + * + * 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.
    + * 0: The function failed to execute. The player, vehicle, or both don't exist. + *
    + */ native PlayerSpectateVehicle(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); -/// Starts recording a player's movements to a file, which can then be reproduced by an NPC. -/// The ID of the player to record -/// The type of recording -/// The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Starts recording a player's movements to a file, which can then be reproduced by an NPC. + * The ID of the player to record + * The type of recording + * The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + */ native StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE:recordType, const recordFile[]); -/// Stops all the recordings that had been started with StartRecordingPlayerData for a specific player. -/// The player you want to stop the recordings of -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Stops all the recordings that had been started with StartRecordingPlayerData for a specific player. + * The player you want to stop the recordings of + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + */ native StopRecordingPlayerData(playerid); -/// Display the cursor and allow the player to select a textdraw. -/// The ID of the player that should be able to select a textdraw -/// The colour of the textdraw when hovering over with mouse (RGBA) -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// TextDrawSetSelectable or PlayerTextDrawSetSelectable MUST be used first, to allow a textdraw to be selectable. -/// It is the TEXT which will be highlighted when hovered over, NOT the box (if one is shown). +/** + * Display the cursor and allow the player to select a textdraw. + * The ID of the player that should be able to select a textdraw + * The colour of the textdraw when hovering over with mouse (RGBA) + * + * + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * TextDrawSetSelectable or PlayerTextDrawSetSelectable MUST be used first, to allow a textdraw to be selectable. + * It is the TEXT which will be highlighted when hovered over, NOT the box (if one is shown). + */ native SelectTextDraw(playerid, hoverColour); // enables the mouse so the player can select a textdraw -/// Cancel textdraw selection with the mouse. -/// The ID of the player that should be the textdraw selection disabled -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// This function calls OnPlayerClickTextDraw with INVALID_TEXT_DRAW (65535). Using this function inside OnPlayerClickTextDraw without catching this case will cause clients to go into an infinite loop. +/** + * Cancel textdraw selection with the mouse. + * The ID of the player that should be the textdraw selection disabled + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * This function calls OnPlayerClickTextDraw with INVALID_TEXT_DRAW (65535). Using this function inside OnPlayerClickTextDraw without catching this case will cause clients to go into an infinite loop. + */ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mouse // Explosion -/// Creates an explosion that is only visible to a single player. This can be used to isolate explosions from other players or to make them only appear in specific virtual worlds. -/// The ID of the player to create the explosion for -/// The x coordinate of the explosion -/// The y coordinate of the explosion -/// The z coordinate of the explosion -/// The explosion type -/// The radius of the explosion -/// -/// This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! -/// There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. -/// This function always returns 1, even if the function failed to excute (player doesn't exist, invalid radius, or invalid explosion type). +/** + * Creates an explosion that is only visible to a single player. This can be used to isolate explosions from other players or to make them only appear in specific virtual worlds. + * The ID of the player to create the explosion for + * The x coordinate of the explosion + * The y coordinate of the explosion + * The z coordinate of the explosion + * The explosion type + * The radius of the explosion + * + * This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! + * There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. + * This function always returns 1, even if the function failed to excute (player doesn't exist, invalid radius, or invalid explosion type). + */ native CreateExplosionForPlayer(playerid, Float:x, Float:y, Float:z, type, Float:radius); -/// Perform a memory check on the client. -/// The ID of the player to check -/// The type of check to perform -/// The base address to check -/// The offset from the base address -/// The number of bytes to check +/** + * Perform a memory check on the client. + * The ID of the player to check + * The type of check to perform + * The base address to check + * The offset from the base address + * The number of bytes to check + */ native SendClientCheck(playerid, type, memoryAddress, memoryOffset, byteCount); diff --git a/a_samp.inc b/a_samp.inc index e93d22d..44a89c1 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -1,6 +1,6 @@ /* SA-MP Functions * - * (c) Copyright 2005-2017, SA-MP Team + * (c) Copyright 2005-2017, SA-MP Team * */ @@ -563,9 +563,11 @@ open.mp releases can use `A` as the first digit. // Util -/// Prints a string to the server console (not in-game chat) and logs (server_log.txt). -/// The string to print -/// +/** + * Prints a string to the server console (not in-game chat) and logs (server_log.txt). + * The string to print + * + */ #if defined _console_included static stock a_samp_unused_print(const string[]) { @@ -577,29 +579,31 @@ open.mp releases can use `A` as the first digit. native print(const string[]); #endif -/// Outputs a formatted string on the console (the server window, not the in-game chat). -/// The format string -/// Indefinite number of arguments of any tag -/// -/// -/// The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. -/// This function doesn't support packed strings. -/// -/// Format Specifiers:
    -///
      -///
    • %i - integer (whole number)
    • -///
    • %d - integer (whole number).
    • -///
    • %s - string
    • -///
    • %f - floating-point number (Float: tag)
    • -///
    • %c - ASCII character
    • -///
    • %x - hexadecimal number
    • -///
    • %b - binary number
    • -///
    • %% - literal %
    • -///
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • -///
    -///
    -/// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. -/// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) +/** + * Outputs a formatted string on the console (the server window, not the in-game chat). + * The format string + * Indefinite number of arguments of any tag + * + * + * The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. + * This function doesn't support packed strings. + * + * Format Specifiers:
    + *
      + *
    • %i - integer (whole number)
    • + *
    • %d - integer (whole number).
    • + *
    • %s - string
    • + *
    • %f - floating-point number (Float: tag)
    • + *
    • %c - ASCII character
    • + *
    • %x - hexadecimal number
    • + *
    • %b - binary number
    • + *
    • %% - literal %
    • + *
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • + *
    + *
    + * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + */ #if defined _console_included static stock a_samp_unused_printf(const format[], {Float, _}:...) { @@ -615,799 +619,928 @@ open.mp releases can use `A` as the first digit. #define _console_included #endif -/// Formats a string to include variables and other strings inside it. -/// The string to output the result to -/// The maximum length output can contain -/// The format string -/// Indefinite number of arguments of any tag -/// -/// -/// This function doesn't support packed strings. -/// -/// Format Specifiers:
    -///
      -///
    • %i - integer (whole number)
    • -///
    • %d - integer (whole number).
    • -///
    • %s - string
    • -///
    • %f - floating-point number (Float: tag)
    • -///
    • %c - ASCII character
    • -///
    • %x - hexadecimal number
    • -///
    • %b - binary number
    • -///
    • %% - literal %
    • -///
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • -///
    -///
    -/// The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. -/// You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) +/** + * Formats a string to include variables and other strings inside it. + * The string to output the result to + * The maximum length output can contain + * The format string + * Indefinite number of arguments of any tag + * + * + * This function doesn't support packed strings. + * + * Format Specifiers:
    + *
      + *
    • %i - integer (whole number)
    • + *
    • %d - integer (whole number).
    • + *
    • %s - string
    • + *
    • %f - floating-point number (Float: tag)
    • + *
    • %c - ASCII character
    • + *
    • %x - hexadecimal number
    • + *
    • %b - binary number
    • + *
    • %% - literal %
    • + *
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • + *
    + *
    + * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + */ native format(output[], len = sizeof (output), const format[], {Float, _}:...); -/// This function sends a message to a specific player with a chosen colour in the chat. The whole line in the chatbox will be in the set colour unless colour embedding is used (since 0.3c). -/// The ID of the player to display the message to -/// The colour of the message (RGBA) -/// The text that will be displayed (max 144 characters) -/// -/// -/// -/// If a message is longer than 144 characters, it will not be sent. Truncation can be used to prevent this. Displaying a message on multiple lines will also solve this issue. -/// Avoid using the percent sign (or format specifiers) in the actual message text without properly escaping it (like %%). It will result in crashes otherwise. -/// You can use colour embedding for multiple colours in the message. -/// -/// 1: The function executed successfully. Success is reported when the string is over 144 characters, but the message won't be sent.
    -/// 0: The function failed to execute. The player is not connected. -///
    +/** + * This function sends a message to a specific player with a chosen colour in the chat. The whole line in the chatbox will be in the set colour unless colour embedding is used (since 0.3c). + * The ID of the player to display the message to + * The colour of the message (RGBA) + * The text that will be displayed (max 144 characters) + * + * + * + * If a message is longer than 144 characters, it will not be sent. Truncation can be used to prevent this. Displaying a message on multiple lines will also solve this issue. + * Avoid using the percent sign (or format specifiers) in the actual message text without properly escaping it (like %%). It will result in crashes otherwise. + * You can use colour embedding for multiple colours in the message. + * + * 1: The function executed successfully. Success is reported when the string is over 144 characters, but the message won't be sent.
    + * 0: The function failed to execute. The player is not connected. + *
    + */ native SendClientMessage(playerid, colour, const message[]); -/// Displays a message in chat to all players. This is a multi-player equivalent of SendClientMessage. -/// The colour of the message (RGBA) -/// The message to show (max 144 characters) -/// -/// -/// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. -/// This function always returns 1. +/** + * Displays a message in chat to all players. This is a multi-player equivalent of SendClientMessage. + * The colour of the message (RGBA) + * The message to show (max 144 characters) + * + * + * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. + * This function always returns 1. + */ native SendClientMessageToAll(colour, const message[]); -/// Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. -/// The ID of the player who will receive the message -/// The sender's ID. If invalid, the message will not be sent -/// The message that will be sent -/// -/// -/// -/// -/// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. +/** + * Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. + * The ID of the player who will receive the message + * The sender's ID. If invalid, the message will not be sent + * The message that will be sent + * + * + * + * + * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. + */ native SendPlayerMessageToPlayer(playerid, senderid, const message[]); -/// Sends a message in the name of a player to all other players on the server. The line will start with the sender's name in their colour, followed by the message in white. -/// The ID of the sender. If invalid, the message will not be sent -/// The message that will be sent -/// -/// -/// -/// Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. +/** + * Sends a message in the name of a player to all other players on the server. The line will start with the sender's name in their colour, followed by the message in white. + * The ID of the sender. If invalid, the message will not be sent + * The message that will be sent + * + * + * + * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. + */ native SendPlayerMessageToAll(senderid, const message[]); -/// Adds a death to the 'killfeed' on the right-hand side of the screen for all players. -/// The ID of the killer (can be INVALID_PLAYER_ID) -/// The ID of the player that died -/// The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) -/// -/// -/// Death messages can be cleared by using a valid player ID for that is not connected. -/// To show a death message for just a single player, use SendDeathMessageToPlayer. -/// You can use NPCs to create your own custom death reasons. -/// This function always returns 1, even if the function fails to execute. The function fails to execute (no death message shown) if is invalid. If is invalid, a generic skull-and-crossbones icon is shown. being invalid (INVALID_PLAYER_ID) is valid. +/** + * Adds a death to the 'killfeed' on the right-hand side of the screen for all players. + * The ID of the killer (can be INVALID_PLAYER_ID) + * The ID of the player that died + * The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) + * + * + * Death messages can be cleared by using a valid player ID for that is not connected. + * To show a death message for just a single player, use SendDeathMessageToPlayer. + * You can use NPCs to create your own custom death reasons. + * This function always returns 1, even if the function fails to execute. The function fails to execute (no death message shown) if is invalid. If is invalid, a generic skull-and-crossbones icon is shown. being invalid (INVALID_PLAYER_ID) is valid. + */ native SendDeathMessage(killer, killee, weapon); -/// Adds a death to the 'killfeed' on the right-hand side of the screen for a single player. -/// The ID of the player to send the death message to -/// The ID of the killer (can be INVALID_PLAYER_ID) -/// The ID of the player that died -/// The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) -/// -/// -/// This Function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. -///
    +/** + * Adds a death to the 'killfeed' on the right-hand side of the screen for a single player. + * The ID of the player to send the death message to + * The ID of the killer (can be INVALID_PLAYER_ID) + * The ID of the player that died + * The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) + * + * + * This Function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. + *
    + */ native SendDeathMessageToPlayer(playerid, killer, killee, weapon); -/// Shows 'game text' (on-screen text) for a certain length of time for all players. -/// The text to be displayed -/// The duration of the text being shown in milliseconds -/// The style of text to be displayed -/// -/// -/// This function always returns 1. +/** + * Shows 'game text' (on-screen text) for a certain length of time for all players. + * The text to be displayed + * The duration of the text being shown in milliseconds + * The style of text to be displayed + * + * + * This function always returns 1. + */ native GameTextForAll(const string[], time, style); -/// Shows 'game text' (on-screen text) for a certain length of time for a specific player. -/// The ID of the player to show the gametext for -/// The text to be displayed -/// The duration of the text being shown in milliseconds -/// The style of text to be displayed -/// -/// -/// -/// 1: The function executed successfully. Success is reported when the style and/or time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.
    -/// 0: The function failed to execute. This means either the string is null or the player is not connected. -///
    +/** + * Shows 'game text' (on-screen text) for a certain length of time for a specific player. + * The ID of the player to show the gametext for + * The text to be displayed + * The duration of the text being shown in milliseconds + * The style of text to be displayed + * + * + * + * 1: The function executed successfully. Success is reported when the style and/or time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.
    + * 0: The function failed to execute. This means either the string is null or the player is not connected. + *
    + */ native GameTextForPlayer(playerid, const string[], time, style); -/// Sets a 'timer' to call a function after some time. Can be set to repeat. -/// Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server -/// Interval in milliseconds -/// Whether the timer should repeat or not -/// -/// -/// Timer intervals are not accurate (roughly 25% off). There's a fix available here. -/// Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. -/// The function that should be called must be public. -/// The use of many timers will result in increased memory/cpu usage. -/// The ID of the timer that was started. Timer IDs start at 1. +/** + * Sets a 'timer' to call a function after some time. Can be set to repeat. + * Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server + * Interval in milliseconds + * Whether the timer should repeat or not + * + * + * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. + * The function that should be called must be public. + * The use of many timers will result in increased memory/cpu usage. + * The ID of the timer that was started. Timer IDs start at 1. + */ native SetTimer(const functionName[], interval, bool:repeating); -/// Sets a timer to call a function after the specified interval. This variant ('Ex') can pass parameters (such as a player ID) to the function. -/// The name of a public function to call when the timer expires -/// Interval in milliseconds -/// Whether the timer should be called repeatedly (can only be stopped with KillTimer) or only once -/// Special format indicating the types of values the timer will pass -/// Indefinite number of arguments to pass (must follow format specified in previous parameter) -/// -/// -/// -/// -/// Timer intervals are not accurate (roughly 25% off). There's a fix available here. -/// Timer IDs are never used twice. You can use KillTimer() on a timer ID and it won't matter if it's running or not. -/// The function that should be called must be public. -/// The use of many timers will result in increased memory/cpu usage. -/// -/// Format syntax:
    -///
      -///
    • i - integer
    • -///
    • d - integer
    • -///
    • a - array The next parameter must be an integer ("i") with the array's size [CURRENTLY UNUSABLE]
    • -///
    • s - string [CURRENTLY UNUSABLE]
    • -///
    • f - float
    • -///
    • b - boolean
    • -///
    -///
    -/// The ID of the timer that was started. Timer IDs start at 1 and are never reused. There are no internal checks to verify that the parameters passed are valid (e.g. duration not a minus value). +/** + * Sets a timer to call a function after the specified interval. This variant ('Ex') can pass parameters (such as a player ID) to the function. + * The name of a public function to call when the timer expires + * Interval in milliseconds + * Whether the timer should be called repeatedly (can only be stopped with KillTimer) or only once + * Special format indicating the types of values the timer will pass + * Indefinite number of arguments to pass (must follow format specified in previous parameter) + * + * + * + * + * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * Timer IDs are never used twice. You can use KillTimer() on a timer ID and it won't matter if it's running or not. + * The function that should be called must be public. + * The use of many timers will result in increased memory/cpu usage. + * + * Format syntax:
    + *
      + *
    • i - integer
    • + *
    • d - integer
    • + *
    • a - array The next parameter must be an integer ("i") with the array's size [CURRENTLY UNUSABLE]
    • + *
    • s - string [CURRENTLY UNUSABLE]
    • + *
    • f - float
    • + *
    • b - boolean
    • + *
    + *
    + * The ID of the timer that was started. Timer IDs start at 1 and are never reused. There are no internal checks to verify that the parameters passed are valid (e.g. duration not a minus value). + */ native SetTimerEx(const functionName[], interval, bool:repeating, const format[] = "", {Float, _}:...); -/// Kills (stops) a running timer. -/// The ID of the timer to kill (returned by SetTimer or SetTimerEx) -/// -/// -/// This function always returns 0. +/** + * Kills (stops) a running timer. + * The ID of the timer to kill (returned by SetTimer or SetTimerEx) + * + * + * This function always returns 0. + */ native KillTimer(timerid); -/// Returns the uptime of the actual server (not the SA-MP server) in milliseconds. -/// -/// GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. -/// One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. -/// Uptime of the actual server (not the SA-MP server). +/** + * Returns the uptime of the actual server (not the SA-MP server) in milliseconds. + * + * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. + * One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. + * Uptime of the actual server (not the SA-MP server). + */ native GetTickCount(); -/// Returns the maximum number of players that can join the server, as set by the server variable 'maxplayers' in server.cfg. -/// -/// -/// This function can not be used in place of MAX_PLAYERS. It can not be used at compile time (e.g. for array sizes). MAX_PLAYERS should always be re-defined to what the 'maxplayers' var will be, or higher. -/// The maximum number of players that can join the server. +/** + * Returns the maximum number of players that can join the server, as set by the server variable 'maxplayers' in server.cfg. + * + * + * This function can not be used in place of MAX_PLAYERS. It can not be used at compile time (e.g. for array sizes). MAX_PLAYERS should always be re-defined to what the 'maxplayers' var will be, or higher. + * The maximum number of players that can join the server. + */ native GetMaxPlayers(); -/// Calls a public function in any script that is loaded. -/// Public function's name -/// Tag/format of each variable -/// 'Indefinite' number of arguments of any tag -/// -/// The value that the last public function returned. -/// CallRemoteFunction crashes the server if it's passing an empty string. -/// -/// Format string placeholders:
    -///
      -///
    • c - a single character
    • -///
    • d - an integer (whole) number
    • -///
    • i - an integer (whole) number
    • -///
    • x - a number in hexadecimal notation
    • -///
    • f - a floating point number
    • -///
    • s - a string
    • -///
    -///
    +/** + * Calls a public function in any script that is loaded. + * Public function's name + * Tag/format of each variable + * 'Indefinite' number of arguments of any tag + * + * The value that the last public function returned. + * CallRemoteFunction crashes the server if it's passing an empty string. + * + * Format string placeholders:
    + *
      + *
    • c - a single character
    • + *
    • d - an integer (whole) number
    • + *
    • i - an integer (whole) number
    • + *
    • x - a number in hexadecimal notation
    • + *
    • f - a floating point number
    • + *
    • s - a string
    • + *
    + *
    + */ native CallRemoteFunction(const function[], const format[] = "", {Float, _}:...); -/// Calls a public function from the script in which it is used. -/// Public function's name -/// Tag/format of each variable -/// 'Indefinite' number of arguments of any tag -/// -/// The value that the only public function returned. -/// CallLocalFunction crashes the server if it's passing an empty string. -/// -/// Format string placeholders:
    -///
      -///
    • c - a single character
    • -///
    • d - an integer (whole) number
    • -///
    • i - an integer (whole) number
    • -///
    • x - a number in hexadecimal notation
    • -///
    • f - a floating point number
    • -///
    • s - a string
    • -///
    -///
    +/** + * Calls a public function from the script in which it is used. + * Public function's name + * Tag/format of each variable + * 'Indefinite' number of arguments of any tag + * + * The value that the only public function returned. + * CallLocalFunction crashes the server if it's passing an empty string. + * + * Format string placeholders:
    + *
      + *
    • c - a single character
    • + *
    • d - an integer (whole) number
    • + *
    • i - an integer (whole) number
    • + *
    • x - a number in hexadecimal notation
    • + *
    • f - a floating point number
    • + *
    • s - a string
    • + *
    + *
    + */ native CallLocalFunction(const function[], const format[] = "", {Float, _}:...); -/// Returns the norm (length) of the provided vector. -/// The vector's magnitude on the x axis -/// The vector's magnitude on the y axis -/// The vector's magnitude on the z axis -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// The norm (length) of the provided vector as a float. +/** + * Returns the norm (length) of the provided vector. + * The vector's magnitude on the x axis + * The vector's magnitude on the y axis + * The vector's magnitude on the z axis + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * The norm (length) of the provided vector as a float. + */ native Float:VectorSize(Float:x, Float:y, Float:z); -/// Get the inversed value of a sine in degrees. -/// The sine for which to find the angle for -/// -/// The angle in degrees. +/** + * Get the inversed value of a sine in degrees. + * The sine for which to find the angle for + * + * The angle in degrees. + */ native Float:asin(Float:value); -/// Get the inversed value of a cosine in degrees. -/// The cosine for which to find the angle for -/// -/// The angle in degrees. +/** + * Get the inversed value of a cosine in degrees. + * The cosine for which to find the angle for + * + * The angle in degrees. + */ native Float:acos(Float:value); -/// Get the inversed value of a tangent in degrees. -/// The tangent for which to find the angle for -/// -/// -/// The angle in degrees. +/** + * Get the inversed value of a tangent in degrees. + * The tangent for which to find the angle for + * + * + * The angle in degrees. + */ native Float:atan(Float:value); -/// Get the multi-valued inversed value of a tangent in degrees. -/// y size -/// x size -/// -/// -/// The angle in degrees. +/** + * Get the multi-valued inversed value of a tangent in degrees. + * y size + * x size + * + * + * The angle in degrees. + */ native Float:atan2(Float:y, Float:x); -/// Gets the highest playerid currently in use on the server. -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The highest playerid currently in use on the server or 0 if there are no connected players. +/** + * Gets the highest playerid currently in use on the server. + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * The highest playerid currently in use on the server or 0 if there are no connected players. + */ native GetPlayerPoolSize(); -/// Gets the highest vehicleid currently in use on the server. -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The highest vehicleid currently in use on the server or 0 if there are no created vehicles. +/** + * Gets the highest vehicleid currently in use on the server. + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * The highest vehicleid currently in use on the server or 0 if there are no created vehicles. + */ native GetVehiclePoolSize(); -/// Gets the highest actorid created on the server. -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The highest actorid created on the server or 0 if there are no created actors. +/** + * Gets the highest actorid created on the server. + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * The highest actorid created on the server or 0 if there are no created actors. + */ native GetActorPoolSize(); // Hash -/// Hashes a password using the SHA-256 hashing algorithm. Includes a salt. The output is always 256 bytes in length, or the equivalent of 64 Pawn cells. -/// The password to hash -/// The salt to use in the hash -/// The returned hash -/// The returned hash maximum length -/// This function was added in SA-MP 0.3.7-R1 and will not work in earlier versions! -/// The salt is appended to the end of the password, meaning password 'foo' and salt 'bar' would form 'foobar'. -/// The salt should be random, unique for each player and at least as long as the hashed password. It is to be stored alongside the actual hash in the player's account. +/** + * Hashes a password using the SHA-256 hashing algorithm. Includes a salt. The output is always 256 bytes in length, or the equivalent of 64 Pawn cells. + * The password to hash + * The salt to use in the hash + * The returned hash + * The returned hash maximum length + * This function was added in SA-MP 0.3.7-R1 and will not work in earlier versions! + * The salt is appended to the end of the password, meaning password 'foo' and salt 'bar' would form 'foobar'. + * The salt should be random, unique for each player and at least as long as the hashed password. It is to be stored alongside the actual hash in the player's account. #pragma deprecated Use BCrypt for hashing passwords. native SHA256_PassHash(const password[], const salt[], output[], size = sizeof (output)); // SHA256 for password hashing // Server wide persistent variable system (SVars) -/// Set an integer server variable. -/// The name of the server variable -/// The integer to be set -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The variable name is null or over 40 characters. -///
    +/** + * Set an integer server variable. + * The name of the server variable + * The integer to be set + * + * + * + * + * + * + * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The variable name is null or over 40 characters. + *
    + */ native SetSVarInt(const svar[], value); -/// Gets an integer server variable's value. -/// The name of the server variable (case-insensitive). Assigned in SetSVarInt -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! -/// The integer value of the specified server variable. It will still return 0 if the variable is not set. +/** + * Gets an integer server variable's value. + * The name of the server variable (case-insensitive). Assigned in SetSVarInt + * + * + * + * + * + * + * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! + * The integer value of the specified server variable. It will still return 0 if the variable is not set. + */ native GetSVarInt(const svar[]); -/// Set a string server variable. -/// The name of the server variable -/// The string to be set -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The variable name is null or over 40 characters. -///
    +/** + * Set a string server variable. + * The name of the server variable + * The string to be set + * + * + * + * + * + * + * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The variable name is null or over 40 characters. + *
    + */ native SetSVarString(const svar[], const value[]); -/// Gets a string server variable's value. -/// The name of the server variable (case-insensitive). Assigned in SetSVarString -/// The array in which to store the string value in, passed by reference -/// The maximum length of the returned string -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! -/// The length of the string. +/** + * Gets a string server variable's value. + * The name of the server variable (case-insensitive). Assigned in SetSVarString + * The array in which to store the string value in, passed by reference + * The maximum length of the returned string + * + * + * + * + * + * + * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! + * The length of the string. + */ native GetSVarString(const svar[], output[], len = sizeof (output)); -/// Set a float server variable. -/// The name of the server variable -/// The float to be set -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The variable name is null or over 40 characters. -///
    +/** + * Set a float server variable. + * The name of the server variable + * The float to be set + * + * + * + * + * + * + * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The variable name is null or over 40 characters. + *
    + */ native SetSVarFloat(const svar[], Float:value); -/// Gets a float server variable's value. -/// The name of the server variable (case-insensitive). Assigned in SetSVarFloat -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! -/// The float value of the specified server variable. It will still return 0 if the variable is not set. +/** + * Gets a float server variable's value. + * The name of the server variable (case-insensitive). Assigned in SetSVarFloat + * + * + * + * + * + * + * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! + * The float value of the specified server variable. It will still return 0 if the variable is not set. + */ native Float:GetSVarFloat(const svar[]); -/// Deletes a previously set server variable. -/// The name of the server variable to delete -/// -/// -/// -/// -/// -/// -/// Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. There is no variable set with the given name. -///
    +/** + * Deletes a previously set server variable. + * The name of the server variable to delete + * + * + * + * + * + * + * Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. There is no variable set with the given name. + *
    + */ native DeleteSVar(const svar[]); -/// Each SVar (server-variable) has its own unique identification number for lookup, this function returns the highest ID. -/// -/// -/// The highest set SVar ID. +/** + * Each SVar (server-variable) has its own unique identification number for lookup, this function returns the highest ID. + * + * + * The highest set SVar ID. + */ native GetSVarsUpperIndex(); -/// Retrieve the name of a sVar via the index. -/// The index of the sVar -/// A string to store the sVar's name in, passed by reference -/// The max length of the returned string -/// -/// -/// -/// +/** + * Retrieve the name of a sVar via the index. + * The index of the sVar + * A string to store the sVar's name in, passed by reference + * The max length of the returned string + * + * + * + * + */ native GetSVarNameAtIndex(index, output[], size = sizeof (output)); -/// Gets the type (integer, float or string) of a server variable. -/// The name of the server variable to get the type of -/// -/// -/// -/// -/// -/// -/// -/// -/// Variable types:
    -///
      -///
    • SERVER_VARTYPE_NONE (sVar with name given does not exist)
    • -///
    • SERVER_VARTYPE_INT
    • -///
    • SERVER_VARTYPE_STRING
    • -///
    • SERVER_VARTYPE_FLOAT
    • -///
    -///
    -/// Returns the type of the SVar. See table below. +/** + * Gets the type (integer, float or string) of a server variable. + * The name of the server variable to get the type of + * + * + * + * + * + * + * + * + * Variable types:
    + *
      + *
    • SERVER_VARTYPE_NONE (sVar with name given does not exist)
    • + *
    • SERVER_VARTYPE_INT
    • + *
    • SERVER_VARTYPE_STRING
    • + *
    • SERVER_VARTYPE_FLOAT
    • + *
    + *
    + * Returns the type of the SVar. See table below. + */ native SERVER_VARTYPE:GetSVarType(const svar[]); // Game -/// Set the name of the game mode, which appears in the server browser. -/// The gamemode name to display +/** + * Set the name of the game mode, which appears in the server browser. + * The gamemode name to display + */ native SetGameModeText(const string[]); -/// This function is used to change the amount of teams used in the gamemode. It has no obvious way of being used, but can help to indicate the number of teams used for better (more effective) internal handling. This function should only be used in the OnGameModeInit callback. Important: You can pass 2 billion here if you like, this function has no effect at all. -/// Number of teams the gamemode knows -/// -/// +/** + * This function is used to change the amount of teams used in the gamemode. It has no obvious way of being used, but can help to indicate the number of teams used for better (more effective) internal handling. This function should only be used in the OnGameModeInit callback. Important: You can pass 2 billion here if you like, this function has no effect at all. + * Number of teams the gamemode knows + * + * + */ native SetTeamCount(count); -/// Adds a class to class selection. Classes are used so players may spawn with a skin of their choice. -/// The skin which the player will spawn with -/// The x coordinate of the spawnpoint of this class -/// The y coordinate of the spawnpoint of this class -/// The z coordinate of the spawnpoint of this class -/// The direction in which the player should face after spawning -/// The first spawn-weapon for the player -/// The amount of ammunition for the primary spawn weapon -/// The second spawn-weapon for the player -/// The amount of ammunition for the second spawn weapon -/// The third spawn-weapon for the player -/// The amount of ammunition for the third spawn weapon -/// -///
      -///
    • The ID of the class which was just added.
    • -///
    • 319 if the class limit (320) was reached. The highest possible class ID is 319.
    • -///
    -///
    -/// -/// The maximum class ID is 319 (starting from 0, so a total of 320 classes). -/// When this limit is reached, any more classes that are added will replace ID 319. -/// -/// -/// -/// +/** + * Adds a class to class selection. Classes are used so players may spawn with a skin of their choice. + * The skin which the player will spawn with + * The x coordinate of the spawnpoint of this class + * The y coordinate of the spawnpoint of this class + * The z coordinate of the spawnpoint of this class + * The direction in which the player should face after spawning + * The first spawn-weapon for the player + * The amount of ammunition for the primary spawn weapon + * The second spawn-weapon for the player + * The amount of ammunition for the second spawn weapon + * The third spawn-weapon for the player + * The amount of ammunition for the third spawn weapon + * + *
      + *
    • The ID of the class which was just added.
    • + *
    • 319 if the class limit (320) was reached. The highest possible class ID is 319.
    • + *
    + *
    + * + * The maximum class ID is 319 (starting from 0, so a total of 320 classes). + * When this limit is reached, any more classes that are added will replace ID 319. + * + * + * + * + */ native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); -/// This function is exactly the same as the AddPlayerClass function, with the addition of a team parameter. -/// The team you want the player to spawn in -/// The skin which the player will spawn with -/// The x coordinate of the spawnpoint of this class -/// The y coordinate of the spawnpoint of this class -/// The z coordinate of the spawnpoint of this class -/// The direction in which the player should face after spawning -/// The first spawn-weapon for the player -/// The amount of ammunition for the primary spawn weapon -/// The second spawn-weapon for the player -/// The amount of ammunition for the second spawn weapon -/// The third spawn-weapon for the player -/// The amount of ammunition for the third spawn weapon -/// -///
      -///
    • The ID of the class which was just added.
    • -///
    • 319 if the class limit (320) was reached. The highest possible class ID is 319.
    • -///
    -///
    -/// The maximum class ID is 319 (starting from 0, so a total of 320 classes). When this limit is reached, any more classes that are added will replace ID 319. -/// -/// -/// -/// +/** + * This function is exactly the same as the AddPlayerClass function, with the addition of a team parameter. + * The team you want the player to spawn in + * The skin which the player will spawn with + * The x coordinate of the spawnpoint of this class + * The y coordinate of the spawnpoint of this class + * The z coordinate of the spawnpoint of this class + * The direction in which the player should face after spawning + * The first spawn-weapon for the player + * The amount of ammunition for the primary spawn weapon + * The second spawn-weapon for the player + * The amount of ammunition for the second spawn weapon + * The third spawn-weapon for the player + * The amount of ammunition for the third spawn weapon + * + *
      + *
    • The ID of the class which was just added.
    • + *
    • 319 if the class limit (320) was reached. The highest possible class ID is 319.
    • + *
    + *
    + * The maximum class ID is 319 (starting from 0, so a total of 320 classes). When this limit is reached, any more classes that are added will replace ID 319. + * + * + * + * + */ native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); -/// Adds a 'static' vehicle (models are pre-loaded for players) to the gamemode. -/// The Model ID for the vehicle -/// The x coordinate of the spawnpoint of this vehicle -/// The y coordinate of the spawnpoint of this vehicle -/// The z coordinate of the spawnpoint of this vehicle -/// Direction of vehicle - angle -/// The primary colour ID. -1 for random (random colour chosen by client) -/// The secondary colour ID. -1 for random (random colour chosen by client) -/// -///
      -///
    • The vehicle ID of the vehicle created (between 1 and MAX_VEHICLES).
    • -///
    • INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed).
    • -///
    -///
    -/// Can only be used when the server first starts (under OnGameModeInit). -/// -/// -/// +/** + * Adds a 'static' vehicle (models are pre-loaded for players) to the gamemode. + * The Model ID for the vehicle + * The x coordinate of the spawnpoint of this vehicle + * The y coordinate of the spawnpoint of this vehicle + * The z coordinate of the spawnpoint of this vehicle + * Direction of vehicle - angle + * The primary colour ID. -1 for random (random colour chosen by client) + * The secondary colour ID. -1 for random (random colour chosen by client) + * + *
      + *
    • The vehicle ID of the vehicle created (between 1 and MAX_VEHICLES).
    • + *
    • INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed).
    • + *
    + *
    + * Can only be used when the server first starts (under OnGameModeInit). + * + * + * + */ native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2); -/// Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from AddStaticVehicle in only one way: allows a respawn time to be set for when the vehicle is left unoccupied by the driver. -/// The Model ID for the vehicle -/// The x coordinate of the spawnpoint of this vehicle -/// The y coordinate of the spawnpoint of this vehicle -/// The z coordinate of the spawnpoint of this vehicle -/// Direction of vehicle - angle -/// The primary colour ID. -1 for random (random colour chosen by client) -/// The secondary colour ID. -1 for random (random colour chosen by client) -/// The delay until the car is respawned without a driver, in seconds -/// Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=0) -/// -///
      -///
    • The vehicle ID of the vehicle created (between 1 and MAX_VEHICLES).
    • -///
    • INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed).
    • -///
    -///
    -/// Can only be used when the server first starts (under OnGameModeInit). -/// -/// -/// +/** + * Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from AddStaticVehicle in only one way: allows a respawn time to be set for when the vehicle is left unoccupied by the driver. + * The Model ID for the vehicle + * The x coordinate of the spawnpoint of this vehicle + * The y coordinate of the spawnpoint of this vehicle + * The z coordinate of the spawnpoint of this vehicle + * Direction of vehicle - angle + * The primary colour ID. -1 for random (random colour chosen by client) + * The secondary colour ID. -1 for random (random colour chosen by client) + * The delay until the car is respawned without a driver, in seconds + * Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=0) + * + *
      + *
    • The vehicle ID of the vehicle created (between 1 and MAX_VEHICLES).
    • + *
    • INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed).
    • + *
    + *
    + * Can only be used when the server first starts (under OnGameModeInit). + * + * + * + */ native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2, respawnDelay, bool:addSiren = false); -/// This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically). -/// The model of the pickup -/// The pickup type. Determines how the pickup responds when picked up -/// The x coordinate to create the pickup at -/// The y coordinate to create the pickup at -/// The z coordinate to create the pickup at -/// The virtual world ID to put the pickup in. Use -1 to show the pickup in all worlds -/// -/// 1 if the pickup is successfully created. -///
    -/// 0 if failed to create. -///
    -/// This function doesn't return a pickup ID that you can use in, for example, OnPlayerPickUpPickup. Use CreatePickup if you'd like to assign IDs. -/// -/// -/// +/** + * This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically). + * The model of the pickup + * The pickup type. Determines how the pickup responds when picked up + * The x coordinate to create the pickup at + * The y coordinate to create the pickup at + * The z coordinate to create the pickup at + * The virtual world ID to put the pickup in. Use -1 to show the pickup in all worlds + * + * 1 if the pickup is successfully created. + *
    + * 0 if failed to create. + *
    + * This function doesn't return a pickup ID that you can use in, for example, OnPlayerPickUpPickup. Use CreatePickup if you'd like to assign IDs. + * + * + * + */ native AddStaticPickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0); -/// This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. -/// The model of the pickup -/// The pickup spawn type (see table under remarks) -/// The x coordinate to create the pickup at -/// The y coordinate to create the pickup at -/// The z coordinate to create the pickup at -/// The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds (optional=0) -/// -/// -/// -/// -/// Known Bugs:
    -/// Pickups that have a x or y lower than -4096.0 or bigger than 4096.0 won't show up and won't trigger OnPlayerPickUpPickup either. -///
    -/// -/// The only type of pickup that can be picked up from inside a vehicle is 14 (except for special pickups such as bribes).
    -/// Pickups are shown to, and can be picked up by all players.
    -/// It is possible that if DestroyPickup is used when a pickup is picked up, more than one player can pick up the pickup, due to lag. This can be circumvented through the use of variables.
    -/// Certain pickup types come with 'automatic responses', for example using an M4 model in the pickup will automatically give the player the weapon and some ammo. For fully scripted pickups, type 1 should be used.
    -///
    -/// -/// Available Pickup Types
    -/// Most other IDs are either undocumented or are similar to type 1 (but do not use them just because they seem similar to ID 1, they might have side-effects like ID 18 and 20). -///
      -///
    • 0 - The pickup does not always display. If displayed, it can't be picked up and does not trigger OnPlayerPickUpPickup and it will stay after server shutdown.
    • -///
    • 1 - Exists always. Disables pickup scripts such as horseshoes and oysters to allow for scripted actions ONLY. Will trigger OnPlayerPickUpPickup every few seconds.
    • -///
    • 2 - Disappears after pickup, respawns after 30 seconds if the player is at a distance of at least 15 meters.
    • -///
    • 3 - Disappears after pickup, respawns after death.
    • -///
    • 4 - Disappears after 15 to 20 seconds. Respawns after death.
    • -///
    • 8 - Disappears after pickup, but has no effect.
    • -///
    • 11 - Blows up a few seconds after being created (bombs?)
    • -///
    • 12 - Blows up a few seconds after being created.
    • -///
    • 13 - Invisible. Triggers checkpoint sound when picked up with a vehicle, but doesn't trigger OnPlayerPickUpPickup.
    • -///
    • 14 - Disappears after pickup, can only be picked up with a vehicle. Triggers checkpoint sound.
    • -///
    • 15 - Same as type 2.
    • -///
    • 18 - Similar to type 1. Pressing Tab (KEY_ACTION) makes it disappear but the key press doesn't trigger OnPlayerPickUpPickup.
    • -///
    • 19 - Disappears after pickup, but doesn't respawn. Makes "cash pickup" sound if picked up.
    • -///
    • 20 - Similar to type 1. Disappears when you take a picture of it with the Camera weapon, which triggers "Snapshot # out of 0" message. Taking a picture doesn't trigger OnPlayerPickUpPickup.
    • -///
    • 22 - Same as type 3.
    • -///
    -///
    -/// The ID of the created pickup, -1 on failure (pickup max limit). +/** + * This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. + * The model of the pickup + * The pickup spawn type (see table under remarks) + * The x coordinate to create the pickup at + * The y coordinate to create the pickup at + * The z coordinate to create the pickup at + * The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds (optional=0) + * + * + * + * + * Known Bugs:
    + * Pickups that have a x or y lower than -4096.0 or bigger than 4096.0 won't show up and won't trigger OnPlayerPickUpPickup either. + *
    + * + * The only type of pickup that can be picked up from inside a vehicle is 14 (except for special pickups such as bribes).
    + * Pickups are shown to, and can be picked up by all players.
    + * It is possible that if DestroyPickup is used when a pickup is picked up, more than one player can pick up the pickup, due to lag. This can be circumvented through the use of variables.
    + * Certain pickup types come with 'automatic responses', for example using an M4 model in the pickup will automatically give the player the weapon and some ammo. For fully scripted pickups, type 1 should be used.
    + *
    + * + * Available Pickup Types
    + * Most other IDs are either undocumented or are similar to type 1 (but do not use them just because they seem similar to ID 1, they might have side-effects like ID 18 and 20). + *
      + *
    • 0 - The pickup does not always display. If displayed, it can't be picked up and does not trigger OnPlayerPickUpPickup and it will stay after server shutdown.
    • + *
    • 1 - Exists always. Disables pickup scripts such as horseshoes and oysters to allow for scripted actions ONLY. Will trigger OnPlayerPickUpPickup every few seconds.
    • + *
    • 2 - Disappears after pickup, respawns after 30 seconds if the player is at a distance of at least 15 meters.
    • + *
    • 3 - Disappears after pickup, respawns after death.
    • + *
    • 4 - Disappears after 15 to 20 seconds. Respawns after death.
    • + *
    • 8 - Disappears after pickup, but has no effect.
    • + *
    • 11 - Blows up a few seconds after being created (bombs?)
    • + *
    • 12 - Blows up a few seconds after being created.
    • + *
    • 13 - Invisible. Triggers checkpoint sound when picked up with a vehicle, but doesn't trigger OnPlayerPickUpPickup.
    • + *
    • 14 - Disappears after pickup, can only be picked up with a vehicle. Triggers checkpoint sound.
    • + *
    • 15 - Same as type 2.
    • + *
    • 18 - Similar to type 1. Pressing Tab (KEY_ACTION) makes it disappear but the key press doesn't trigger OnPlayerPickUpPickup.
    • + *
    • 19 - Disappears after pickup, but doesn't respawn. Makes "cash pickup" sound if picked up.
    • + *
    • 20 - Similar to type 1. Disappears when you take a picture of it with the Camera weapon, which triggers "Snapshot # out of 0" message. Taking a picture doesn't trigger OnPlayerPickUpPickup.
    • + *
    • 22 - Same as type 3.
    • + *
    + *
    + * The ID of the created pickup, -1 on failure (pickup max limit). + */ native CreatePickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0); -/// Destroys a pickup created with CreatePickup. -/// The ID of the pickup to destroy (returned by CreatePickup) -/// -/// +/** + * Destroys a pickup created with CreatePickup. + * The ID of the pickup to destroy (returned by CreatePickup) + * + * + */ native DestroyPickup(pickup); -/// Toggle the drawing of nametags, health bars and armor bars above players. -/// 0 to disable, 1 to enable (enabled by default) -/// -/// -/// -/// This function can only be used in OnGameModeInit. For other times, see ShowPlayerNameTagForPlayer. +/** + * Toggle the drawing of nametags, health bars and armor bars above players. + * 0 to disable, 1 to enable (enabled by default) + * + * + * + * This function can only be used in OnGameModeInit. For other times, see ShowPlayerNameTagForPlayer. + */ native ShowNameTags(bool:show); -/// Toggles player markers (blips on the radar). Must be used when the server starts (OnGameModeInit). For other times, see SetPlayerMarkerForPlayer. -/// The mode to use for markers. They can be streamed, meaning they are only visible to nearby players. See table below -/// -/// -/// -/// -/// -/// Marker modes:
    -///
      -///
    • PLAYER_MARKERS_MODE_OFF 0
    • -///
    • PLAYER_MARKERS_MODE_GLOBAL 1
    • -///
    • PLAYER_MARKERS_MODE_STREAMED 2
    • -///
    -///
    -/// It is also possible to set a player's colour to a colour that has full transparency (no alpha value). This makes it possible to show markers on a per-player basis. +/** + * Toggles player markers (blips on the radar). Must be used when the server starts (OnGameModeInit). For other times, see SetPlayerMarkerForPlayer. + * The mode to use for markers. They can be streamed, meaning they are only visible to nearby players. See table below + * + * + * + * + * + * Marker modes:
    + *
      + *
    • PLAYER_MARKERS_MODE_OFF 0
    • + *
    • PLAYER_MARKERS_MODE_GLOBAL 1
    • + *
    • PLAYER_MARKERS_MODE_STREAMED 2
    • + *
    + *
    + * It is also possible to set a player's colour to a colour that has full transparency (no alpha value). This makes it possible to show markers on a per-player basis. + */ native ShowPlayerMarkers(PLAYER_MARKERS_MODE:mode); -/// Ends the current gamemode. -/// +/** + * Ends the current gamemode. + * + */ native GameModeExit(); -/// Sets the world time (for all players) to a specific hour. -/// The hour to set (0-23) -/// -/// -/// -/// To set the minutes and/or to set the time for individual players, see SetPlayerTime. -/// This function is only relevant for players that do not use a passing clock - see TogglePlayerClock. +/** + * Sets the world time (for all players) to a specific hour. + * The hour to set (0-23) + * + * + * + * To set the minutes and/or to set the time for individual players, see SetPlayerTime. + * This function is only relevant for players that do not use a passing clock - see TogglePlayerClock. + */ native SetWorldTime(hour); -/// Get the name of a weapon. -/// The ID of the weapon to get the name of -/// An array to store the weapon's name in, passed by reference -/// The maximum length of the weapon name to store. -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The weapon specified does not exist. -///
    +/** + * Get the name of a weapon. + * The ID of the weapon to get the name of + * An array to store the weapon's name in, passed by reference + * The maximum length of the weapon name to store. + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The weapon specified does not exist. + *
    + */ native GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); -/// 1 to enable, 0 to disable tire popping -/// This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. +/** + * 1 to enable, 0 to disable tire popping + * This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. #pragma deprecated Use `OnVehicleDamageStatusUpdate`. native EnableTirePopping(bool:enable); // deprecated function -/// Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles (SetPlayerTeam must be used!). -/// -/// This function was added in SA-MP 0.3x and will not work in earlier versions! +/** + * Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles (SetPlayerTeam must be used!). + * + * This function was added in SA-MP 0.3x and will not work in earlier versions! + */ native EnableVehicleFriendlyFire(); -/// Toggle whether the usage of weapons in interiors is allowed or not. -/// 1 to enable weapons in interiors (enabled by default), 0 to disable weapons in interiors -/// This function does not work in the current SA:MP version! -/// -/// -/// +/** + * Toggle whether the usage of weapons in interiors is allowed or not. + * 1 to enable weapons in interiors (enabled by default), 0 to disable weapons in interiors + * This function does not work in the current SA:MP version! + * + * + * #pragma deprecated Use `OnPlayerInteriorChange`. native AllowInteriorWeapons(bool:allow); -/// Set the world weather for all players. -/// The weather to set -/// -/// -/// If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. +/** + * Set the world weather for all players. + * The weather to set + * + * + * If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. + */ native SetWeather(weatherid); -/// Get the currently set gravity. -/// -/// The current set gravity (as a float). +/** + * Get the currently set gravity. + * + * The current set gravity (as a float). + */ native Float:GetGravity(); -/// Set the gravity for all players. -/// The value that the gravity should be set to (between -50 and 50) -/// -/// -/// -/// Default gravity is 0.008. -/// This function always returns 1, even when it fails to execute if the gravity is out of the limits (lower than -50.0 or higher than +50.0). +/** + * Set the gravity for all players. + * The value that the gravity should be set to (between -50 and 50) + * + * + * + * Default gravity is 0.008. + * This function always returns 1, even when it fails to execute if the gravity is out of the limits (lower than -50.0 or higher than +50.0). + */ native SetGravity(Float:gravity); -/// This function will determine whether RCON admins will be teleported to their waypoint when they set one. -/// 0 to disable and 1 to enable -/// This function, as of 0.3d, is deprecated. Please see OnPlayerClickMap. -/// -/// +/** + * This function will determine whether RCON admins will be teleported to their waypoint when they set one. + * 0 to disable and 1 to enable + * This function, as of 0.3d, is deprecated. Please see OnPlayerClickMap. + * + * #pragma deprecated Use `OnPlayerClickMap`. native AllowAdminTeleport(bool:allow); -/// This function does not work in the current SA:MP version! -/// -/// -/// +/** + * This function does not work in the current SA:MP version! + * + * + * #pragma deprecated Use `CreatePickup`. native SetDeathDropAmount(amount); -/// Create an explosion at the specified coordinates. -/// The x coordinate of the explosion -/// The y coordinate of the explosion -/// The z coordinate of the explosion -/// The type of explosion -/// The explosion radius -/// -/// There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. -/// This function always returns 1, even when the explosion type and/or radius values are invalid. +/** + * Create an explosion at the specified coordinates. + * The x coordinate of the explosion + * The y coordinate of the explosion + * The z coordinate of the explosion + * The type of explosion + * The explosion radius + * + * There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. + * This function always returns 1, even when the explosion type and/or radius values are invalid. + */ native CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); -/// This function allows to turn on zone / area names such as the "Vinewood" or "Doherty" text at the bottom-right of the screen as they enter the area. This is a gamemode option and should be set in the callback OnGameModeInit. -/// A toggle option for whether or not you'd like zone names on or off -/// This function was removed in SA-MP 0.3. This was due to crashes it caused. +/** + * This function allows to turn on zone / area names such as the "Vinewood" or "Doherty" text at the bottom-right of the screen as they enter the area. This is a gamemode option and should be set in the callback OnGameModeInit. + * A toggle option for whether or not you'd like zone names on or off + * This function was removed in SA-MP 0.3. This was due to crashes it caused. + */ native EnableZoneNames(bool:enable); -/// Uses standard player walking animation (animation of the CJ skin) instead of custom animations for every skin (e.g. skating for skater skins). -/// -/// -/// Only works when placed under OnGameModeInit. -/// Not using this function causes two-handed weapons (not dual-handed - a single weapon that is held by both hands) to be held in only one hand. +/** + * Uses standard player walking animation (animation of the CJ skin) instead of custom animations for every skin (e.g. skating for skater skins). + * + * + * Only works when placed under OnGameModeInit. + * Not using this function causes two-handed weapons (not dual-handed - a single weapon that is held by both hands) to be held in only one hand. + */ native UsePlayerPedAnims(); // Will cause the players to use CJ running/walking animations -/// Disable all the interior entrances and exits in the game (the yellow arrows at doors). -/// -/// If the gamemode is changed after this function has been used, and the new gamemode doesn't disable markers, the markers will NOT reappear for already-connected players (but will for newly connected players). -/// This function will only work if it has been used BEFORE a player connects (it is recommended to use it in OnGameModeInit). It will not remove a connected player's markers. -/// This function always returns 1. +/** + * Disable all the interior entrances and exits in the game (the yellow arrows at doors). + * + * If the gamemode is changed after this function has been used, and the new gamemode doesn't disable markers, the markers will NOT reappear for already-connected players (but will for newly connected players). + * This function will only work if it has been used BEFORE a player connects (it is recommended to use it in OnGameModeInit). It will not remove a connected player's markers. + * This function always returns 1. + */ native DisableInteriorEnterExits(); // will disable all interior enter/exits in the game. -/// Set the maximum distance to display the names of players. -/// The distance to set -/// -/// -/// -/// Default distance is 70 SA units +/** + * Set the maximum distance to display the names of players. + * The distance to set + * + * + * + * Default distance is 70 SA units + */ native SetNameTagDrawDistance(Float:distance); // Distance at which nametags will start rendering on the client. -/// Disables the nametag Line-Of-Sight checking so that players can see nametags through objects. -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// This can not be reversed until the server restarts. +/** + * Disables the nametag Line-Of-Sight checking so that players can see nametags through objects. + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * This can not be reversed until the server restarts. + */ native DisableNameTagLOS(); // Disables the nametag Line-Of-Sight checking -/// Set a radius limitation for the chat. Only players at a certain distance from the player will see their message in the chat. Also changes the distance at which a player can see other players on the map at the same distance. -/// The range in which players will be able to see chat -/// -/// -/// -/// +/** + * Set a radius limitation for the chat. Only players at a certain distance from the player will see their message in the chat. Also changes the distance at which a player can see other players on the map at the same distance. + * The range in which players will be able to see chat + * + * + * + * + */ native LimitGlobalChatRadius(Float:chatRadius); -/// Set the player marker radius. -/// The radius that markers will show at -/// -/// -/// -/// This Function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Set the player marker radius. + * The radius that markers will show at + * + * + * + * This Function was added in SA-MP 0.3a and will not work in earlier versions! + */ native LimitPlayerMarkerRadius(Float:markerRadius); // Npc -/// Connect an NPC to the server. -/// The name the NPC should connect as. Must follow the same rules as normal player names -/// The NPC script name that is located in the npcmodes folder (without the .amx extension) -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// NPCs do not have nametags. These can be scripted with Attach3DTextLabelToPlayer. -/// This function always return 1. +/** + * Connect an NPC to the server. + * The name the NPC should connect as. Must follow the same rules as normal player names + * The NPC script name that is located in the npcmodes folder (without the .amx extension) + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * NPCs do not have nametags. These can be scripted with Attach3DTextLabelToPlayer. + * This function always return 1. + */ native ConnectNPC(const name[], const script[]); -/// Check if a player is an actual player or an NPC. -/// The ID of the player to check -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// 1 if the player is an NPC, 0 if not. +/** + * Check if a player is an actual player or an NPC. + * The ID of the player to check + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * 1 if the player is an NPC, 0 if not. + */ native bool:IsPlayerNPC(playerid); native AddCharModel(baseid, newid, const dff[], const textureLibrary[]); @@ -1419,2046 +1552,2316 @@ native RedirectDownload(playerid, const url[]); // Admin -/// Check if a player is logged in as an RCON admin. -/// The ID of the player to check -/// -/// -/// 1 if the player is an RCON admin, 0 if not. +/** + * Check if a player is logged in as an RCON admin. + * The ID of the player to check + * + * + * 1 if the player is an RCON admin, 0 if not. + */ native bool:IsPlayerAdmin(playerid); -/// Kicks a player from the server. They will have to quit the game and re-connect if they wish to continue playing. -/// The ID of the player to kick -/// -/// -/// As of SA-MP 0.3x, any action taken directly before Kick() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the kick. -/// This function always returns 1, even if the function failed to execute (player specified doesn't exist). +/** + * Kicks a player from the server. They will have to quit the game and re-connect if they wish to continue playing. + * The ID of the player to kick + * + * + * As of SA-MP 0.3x, any action taken directly before Kick() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the kick. + * This function always returns 1, even if the function failed to execute (player specified doesn't exist). + */ native Kick(playerid); -/// Ban a player who is currently in the server. They will be unable to join the server ever again. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. BanEx can be used to give a reason for the ban. IP bans can be added/removed using the RCON banip and unbanip commands (SendRconCommand). -/// The ID of the player to ban -/// -/// -/// As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. -/// +/** + * Ban a player who is currently in the server. They will be unable to join the server ever again. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. BanEx can be used to give a reason for the ban. IP bans can be added/removed using the RCON banip and unbanip commands (SendRconCommand). + * The ID of the player to ban + * + * + * As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. + * + */ native Ban(playerid); -/// Ban a player with a reason. -/// The ID of the player to ban -/// The reason for the ban -/// -/// -/// As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. +/** + * Ban a player with a reason. + * The ID of the player to ban + * The reason for the ban + * + * + * As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. + */ native BanEx(playerid, const reason[]); -/// Sends an RCON (Remote Console) command. -/// The RCON command to be executed -/// -/// -/// -/// Does not support login, due to the lack of a 'playerid' parameter. -/// 'password 0' will remove the server's password if one is set. -/// This function always returns 1. -/// This function will result in OnRconCommand being called. +/** + * Sends an RCON (Remote Console) command. + * The RCON command to be executed + * + * + * + * Does not support login, due to the lack of a 'playerid' parameter. + * 'password 0' will remove the server's password if one is set. + * This function always returns 1. + * This function will result in OnRconCommand being called. + */ native SendRconCommand(const command[]); -/// Gets a player's network stats and saves them into a string. -/// The ID of the player you want to get the networkstats of -/// The string to store the networkstats in, passed by reference -/// The length of the string that should be stored -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3c R4 and will not work in earlier versions! -/// This function may not return accurate data when used under OnPlayerDisconnect if the player has quit normally. It usually returns accurate data if the player has been kicked or has timed out. +/** + * Gets a player's network stats and saves them into a string. + * The ID of the player you want to get the networkstats of + * The string to store the networkstats in, passed by reference + * The length of the string that should be stored + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3c R4 and will not work in earlier versions! + * This function may not return accurate data when used under OnPlayerDisconnect if the player has quit normally. It usually returns accurate data if the player has been kicked or has timed out. + */ native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); -/// Gets the server's network stats and stores them in a string. -/// The string to store the network stats in, passed by reference -/// The length of the string to be stored -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3c R4 and will not work in earlier versions! -/// -/// Example output:
    -/// -/// Server Ticks: 200
    -/// Messages in Send buffer: 0
    -/// Messages sent: 142
    -/// Bytes sent: 8203
    -/// Acks sent: 11
    -/// Acks in send buffer: 0
    -/// Messages waiting for ack: 0
    -/// Messages resent: 0
    -/// Bytes resent: 0
    -/// Packetloss: 0.0%
    -/// Messages received: 54
    -/// Bytes received: 2204
    -/// Acks received: 0
    -/// Duplicate acks received: 0
    -/// Inst. KBits per second: 28.8
    -/// KBits per second sent: 10.0
    -/// KBits per second received: 2.7
    -///
    -///
    -/// This function always returns 1. +/** + * Gets the server's network stats and stores them in a string. + * The string to store the network stats in, passed by reference + * The length of the string to be stored + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3c R4 and will not work in earlier versions! + * + * Example output:
    + * + * Server Ticks: 200
    + * Messages in Send buffer: 0
    + * Messages sent: 142
    + * Bytes sent: 8203
    + * Acks sent: 11
    + * Acks in send buffer: 0
    + * Messages waiting for ack: 0
    + * Messages resent: 0
    + * Bytes resent: 0
    + * Packetloss: 0.0%
    + * Messages received: 54
    + * Bytes received: 2204
    + * Acks received: 0
    + * Duplicate acks received: 0
    + * Inst. KBits per second: 28.8
    + * KBits per second sent: 10.0
    + * KBits per second received: 2.7
    + *
    + *
    + * This function always returns 1. + */ native GetNetworkStats(output[], size = sizeof (output)); -/// Returns the SA-MP client version, as reported by the player. -/// The ID of the player to get the client version of -/// The string to store the player's version in, passed by reference -/// The maximum length of the version -/// -/// -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// The string the version gets stored in will be empty if playerid is an NPC. -/// 1 on success and 0 on failure (if player specified doesn't exist). +/** + * Returns the SA-MP client version, as reported by the player. + * The ID of the player to get the client version of + * The string to store the player's version in, passed by reference + * The maximum length of the version + * + * + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * The string the version gets stored in will be empty if playerid is an NPC. + * 1 on success and 0 on failure (if player specified doesn't exist). + */ native GetPlayerVersion(playerid, version[], len = sizeof (version)); // Returns the SA-MP client revision as reported by the player -/// Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. -/// The IP to block -/// The time (in milliseconds) that the connection will be blocked for. 0 can be used for an indefinite block -/// -/// -/// This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! -/// Wildcards can be used with this function, for example blocking the IP 6.9.*.* will block all IPs where the first two octets are 6 and 9 respectively. Any number can be in place of an asterisk. +/** + * Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. + * The IP to block + * The time (in milliseconds) that the connection will be blocked for. 0 can be used for an indefinite block + * + * + * This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! + * Wildcards can be used with this function, for example blocking the IP 6.9.*.* will block all IPs where the first two octets are 6 and 9 respectively. Any number can be in place of an asterisk. + */ native BlockIpAddress(const ipAddress[], timeMS); -/// Unblock an IP address that was previously blocked using BlockIpAddress. -/// The IP address to unblock -/// -/// -/// This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! +/** + * Unblock an IP address that was previously blocked using BlockIpAddress. + * The IP address to unblock + * + * + * This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! + */ native UnBlockIpAddress(const ipAddress[]); // Deprecated: -/// Get the string value of a server variable. -/// The name of the string variable to get the value of -/// An array into which to store the value, passed by reference -/// The length of the string that should be stored -/// -/// -/// This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsString -/// Using this function on anything other than a string (int, bool or float) or a nonexistent server variable, will crash your server! This is a bug. -/// Type 'varlist' in the server console to display a list of available server variables and their types. -/// When filterscripts or plugins is specified as the cvar, this function only returns the name of the first specified filterscript or plugin. This is a bug. -/// The length of the returned string. 0 if the specified server variable is not a string or doesn't exist. +/** + * Get the string value of a server variable. + * The name of the string variable to get the value of + * An array into which to store the value, passed by reference + * The length of the string that should be stored + * + * + * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsString + * Using this function on anything other than a string (int, bool or float) or a nonexistent server variable, will crash your server! This is a bug. + * Type 'varlist' in the server console to display a list of available server variables and their types. + * When filterscripts or plugins is specified as the cvar, this function only returns the name of the first specified filterscript or plugin. This is a bug. + * The length of the returned string. 0 if the specified server variable is not a string or doesn't exist. #pragma deprecated Use `GetConsoleVarAsString`. native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); -/// Get the integer value of a server variable. -/// The name of the integer variable to get the value of -/// -/// -/// This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsInt -/// Type 'varlist' in the server console to display a list of available server variables and their types. -/// The value of the specified server variable. 0 if the specified server variable is not an integer or doesn't exist. +/** + * Get the integer value of a server variable. + * The name of the integer variable to get the value of + * + * + * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsInt + * Type 'varlist' in the server console to display a list of available server variables and their types. + * The value of the specified server variable. 0 if the specified server variable is not an integer or doesn't exist. #pragma deprecated Use `GetConsoleVarAsInt`. native GetServerVarAsInt(const cvar[]); -/// Get the boolean value of a server variable. -/// The name of the boolean variable to get the value of -/// -/// -/// This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsBool -/// Type 'varlist' in the server console to display a list of available server variables and their types. -/// The value of the specified server variable. 0 if the specified server variable is not a boolean or doesn't exist. +/** + * Get the boolean value of a server variable. + * The name of the boolean variable to get the value of + * + * + * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsBool + * Type 'varlist' in the server console to display a list of available server variables and their types. + * The value of the specified server variable. 0 if the specified server variable is not a boolean or doesn't exist. #pragma deprecated Use `GetConsoleVarAsBool`. native bool:GetServerVarAsBool(const cvar[]); // These are the same 3 functions as above although they avoid the name ambiguity/conflict with the SVar system. -/// Get the string value of a console variable. -/// The name of the string variable to get the value of -/// An array into which to store the value, passed by reference -/// The length of the string that should be stored -/// -/// -/// Type varlist in the server console to display a list of available console variables and their types. -/// When filterscripts or plugins are specified as the cvar, this function only returns the name of the first specified filterscript or plugin. -/// Using this function with anything other than a string (integer, boolean or float) will cause your server to crash. Using it with a nonexistent console variable will also cause your server to crash. -/// The length of the returned string. 0 if the specified console variable is not a string or doesn't exist. +/** + * Get the string value of a console variable. + * The name of the string variable to get the value of + * An array into which to store the value, passed by reference + * The length of the string that should be stored + * + * + * Type varlist in the server console to display a list of available console variables and their types. + * When filterscripts or plugins are specified as the cvar, this function only returns the name of the first specified filterscript or plugin. + * Using this function with anything other than a string (integer, boolean or float) will cause your server to crash. Using it with a nonexistent console variable will also cause your server to crash. + * The length of the returned string. 0 if the specified console variable is not a string or doesn't exist. + */ native GetConsoleVarAsString(const cvar[], buffer[], len = sizeof (buffer)); -/// Get the integer value of a console variable. -/// The name of the integer variable to get the value of -/// -/// -/// Type varlist in the server console to display a list of available console variables and their types. -/// The value of the specified console variable. 0 if the specified console variable is not an integer or doesn't exist. +/** + * Get the integer value of a console variable. + * The name of the integer variable to get the value of + * + * + * Type varlist in the server console to display a list of available console variables and their types. + * The value of the specified console variable. 0 if the specified console variable is not an integer or doesn't exist. + */ native GetConsoleVarAsInt(const cvar[]); -/// Get the boolean value of a console variable. -/// The name of the boolean variable to get the value of -/// -/// -/// Type varlist in the server console to display a list of available console variables and their types. -/// The value of the specified console variable. 0 if the specified console variable is not a boolean or doesn't exist. +/** + * Get the boolean value of a console variable. + * The name of the boolean variable to get the value of + * + * + * Type varlist in the server console to display a list of available console variables and their types. + * The value of the specified console variable. 0 if the specified console variable is not a boolean or doesn't exist. + */ native bool:GetConsoleVarAsBool(const cvar[]); // Extended admin network stats -/// Gets the tick rate (like FPS) of the server. -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// The server tick rate (per second). Returns 0 when the server is just started. +/** + * Gets the tick rate (like FPS) of the server. + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * The server tick rate (per second). Returns 0 when the server is just started. + */ native GetServerTickRate(); -/// Gets the amount of time (in milliseconds) that a player has been connected to the server for. -/// The ID of the player to get the connected time of -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// The return value is not reset to zero after changing the game mode (using the RCON command "gmx"). -/// This function returns the amount of time (in milliseconds) that a player has been connected to the server for. 0 is returned if the player is not connected. +/** + * Gets the amount of time (in milliseconds) that a player has been connected to the server for. + * The ID of the player to get the connected time of + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * The return value is not reset to zero after changing the game mode (using the RCON command "gmx"). + * This function returns the amount of time (in milliseconds) that a player has been connected to the server for. 0 is returned if the player is not connected. + */ native NetStats_GetConnectedTime(playerid); -/// Gets the number of messages the server has received from the player. -/// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// This function returns the number of messages the server has received from the player. 0 is returned if the player is not connected. +/** + * Gets the number of messages the server has received from the player. + * The ID of the player to get the data from + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * This function returns the number of messages the server has received from the player. 0 is returned if the player is not connected. + */ native NetStats_MessagesReceived(playerid); -/// Gets the amount of data (in bytes) that the server has received from the player. -/// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// This function returns the number of bytes the server has received from the player. 0 is returned if the player is not connected. +/** + * Gets the amount of data (in bytes) that the server has received from the player. + * The ID of the player to get the data from + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * This function returns the number of bytes the server has received from the player. 0 is returned if the player is not connected. + */ native NetStats_BytesReceived(playerid); -/// Gets the number of messages the server has sent to the player. -/// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// The number of messages the server has sent to the player. +/** + * Gets the number of messages the server has sent to the player. + * The ID of the player to get the data from + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * The number of messages the server has sent to the player. + */ native NetStats_MessagesSent(playerid); -/// Gets the amount of data (in bytes) that the server has sent to the player. -/// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// This function returns the number of bytes the server has sent to the player. 0 is returned if the player is not connected. +/** + * Gets the amount of data (in bytes) that the server has sent to the player. + * The ID of the player to get the data from + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * This function returns the number of bytes the server has sent to the player. 0 is returned if the player is not connected. + */ native NetStats_BytesSent(playerid); -/// Gets the number of messages the player has received in the last second. -/// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// the number of messages the player has received in the last second. +/** + * Gets the number of messages the player has received in the last second. + * The ID of the player to get the data from + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * the number of messages the player has received in the last second. + */ native NetStats_MessagesRecvPerSecond(playerid); -/// Gets the packet loss percentage of a player. Packet loss means data the player is sending to the server is being lost (or vice-versa). -/// The ID of the player to get the data from -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// Anything greater than 0.0% should already be a cause of concern. Anything greater than 1.0% is outright bad. -/// This function has been found to be currently unreliable the output is not as expected when compared to the client. Therefore this function should not be used as a packet loss kicker. -/// A more accurate packetloss function can be found here: http://forum.sa-mp.com/showpost.php?p=2488911&postcount=984 -/// The percentage packet loss as a float. 0.0 if player not connected. +/** + * Gets the packet loss percentage of a player. Packet loss means data the player is sending to the server is being lost (or vice-versa). + * The ID of the player to get the data from + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * Anything greater than 0.0% should already be a cause of concern. Anything greater than 1.0% is outright bad. + * This function has been found to be currently unreliable the output is not as expected when compared to the client. Therefore this function should not be used as a packet loss kicker. + * A more accurate packetloss function can be found here: http://forum.sa-mp.com/showpost.php?p=2488911&postcount=984 + * The percentage packet loss as a float. 0.0 if player not connected. + */ native Float:NetStats_PacketLossPercent(playerid); -/// Gets the player's current connection status. -/// The ID of the player to get the connection status of -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! -/// -/// Status:
    -///
      -///
    • 0 - NO_ACTION
    • -///
    • 1 - DISCONNECT_ASAP
    • -///
    • 2 - DISCONNECT_ASAP_SILENTLY
    • -///
    • 3 - DISCONNECT_ON_NO_ACK
    • -///
    • 4 - REQUESTED_CONNECTION
    • -///
    • 5 - HANDLING_CONNECTION_REQUEST
    • -///
    • 6 - UNVERIFIED_SENDER
    • -///
    • 7 - SET_ENCRYPTION_ON_MULTIPLE_16_BYTE_PACKET
    • -///
    • 8 - CONNECTED
    • -///
    -///
    -/// The player's connection status, as an integer value. +/** + * Gets the player's current connection status. + * The ID of the player to get the connection status of + * + * + * + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + * + * Status:
    + *
      + *
    • 0 - NO_ACTION
    • + *
    • 1 - DISCONNECT_ASAP
    • + *
    • 2 - DISCONNECT_ASAP_SILENTLY
    • + *
    • 3 - DISCONNECT_ON_NO_ACK
    • + *
    • 4 - REQUESTED_CONNECTION
    • + *
    • 5 - HANDLING_CONNECTION_REQUEST
    • + *
    • 6 - UNVERIFIED_SENDER
    • + *
    • 7 - SET_ENCRYPTION_ON_MULTIPLE_16_BYTE_PACKET
    • + *
    • 8 - CONNECTED
    • + *
    + *
    + * The player's connection status, as an integer value. + */ native NetStats_ConnectionStatus(playerid); -/// Get a player's IP and port. -/// The ID of the player to get the IP and port of -/// A string array to store the IP and port in, passed by reference -/// The maximum length of the IP/port. 22 is recommended -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3z and will not work in earlier versions! +/** + * Get a player's IP and port. + * The ID of the player to get the IP and port of + * A string array to store the IP and port in, passed by reference + * The maximum length of the IP/port. 22 is recommended + * + * + * + * + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3z and will not work in earlier versions! + */ native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); // Menu -/// Creates a menu. -/// The title for the new menu -/// How many colums shall the new menu have -/// The x position of the menu (640x460 canvas - 0 would put the menu at the far left) -/// The y position of the menu (640x460 canvas - 0 would put the menu at the far top) -/// The width for the first column -/// The width for the second column (optional=0.0) -/// -/// -/// -/// -/// -/// -/// -/// -/// This function merely CREATES the menu - ShowMenuForPlayer must be used to show it.
    -/// You can only create and access 2 columns (0 and 1).
    -/// If the title's length is equal to or greater than 32 chars the title is truncated to 30 characters. -///
    -/// There is a limit of 12 items per menu, and a limit of 128 menus in total. -/// The ID of the new menu or -1 on failure. +/** + * Creates a menu. + * The title for the new menu + * How many colums shall the new menu have + * The x position of the menu (640x460 canvas - 0 would put the menu at the far left) + * The y position of the menu (640x460 canvas - 0 would put the menu at the far top) + * The width for the first column + * The width for the second column (optional=0.0) + * + * + * + * + * + * + * + * + * This function merely CREATES the menu - ShowMenuForPlayer must be used to show it.
    + * You can only create and access 2 columns (0 and 1).
    + * If the title's length is equal to or greater than 32 chars the title is truncated to 30 characters. + *
    + * There is a limit of 12 items per menu, and a limit of 128 menus in total. + * The ID of the new menu or -1 on failure. + */ native Menu:CreateMenu(const title[], columns, Float:x, Float:y, Float:col1width, Float:col2width = 0.0); -/// Destroys the specified menu. -/// The menu ID to destroy -/// -/// -/// -/// -/// -/// 1 if the destroying was successful, otherwise 0. +/** + * Destroys the specified menu. + * The menu ID to destroy + * + * + * + * + * + * 1 if the destroying was successful, otherwise 0. + */ native DestroyMenu(Menu:menuid); -/// Adds an item to a specified menu. -/// The menu ID to add an item to -/// The column to add the item to -/// The text for the new menu item -/// -///
      -///
    • Crashes when passed an invalid menu ID.
    • -///
    • You can only have 12 items per menu (13th goes to the right side of the header of column name (coloured), 14th and higher not display at all).
    • -///
    • You can only use 2 columns (0 and 1).
    • -///
    • You can only add 8 colour codes per one item (~r~, ~g~ etc.).
    • -///
    • Maximum length of menu item is 31 symbols.
    • -///
    -///
    -/// The index of the row this item was added to. -/// -/// -/// -/// -/// +/** + * Adds an item to a specified menu. + * The menu ID to add an item to + * The column to add the item to + * The text for the new menu item + * + *
      + *
    • Crashes when passed an invalid menu ID.
    • + *
    • You can only have 12 items per menu (13th goes to the right side of the header of column name (coloured), 14th and higher not display at all).
    • + *
    • You can only use 2 columns (0 and 1).
    • + *
    • You can only add 8 colour codes per one item (~r~, ~g~ etc.).
    • + *
    • Maximum length of menu item is 31 symbols.
    • + *
    + *
    + * The index of the row this item was added to. + * + * + * + * + * + */ native AddMenuItem(Menu:menuid, column, const text[]); -/// Sets the caption of a column in a menu. -/// ID of the menu to change -/// The column (0 or 1) to set the header of -/// The caption text for the column -/// -/// -/// -/// Crashes when passed an invalid menu ID. -/// Note that you can add only 12 items with AddMenuItem. The 13th object of a menu would replace the header of the column which is correctly set with this function. +/** + * Sets the caption of a column in a menu. + * ID of the menu to change + * The column (0 or 1) to set the header of + * The caption text for the column + * + * + * + * Crashes when passed an invalid menu ID. + * Note that you can add only 12 items with AddMenuItem. The 13th object of a menu would replace the header of the column which is correctly set with this function. + */ native SetMenuColumnHeader(Menu:menuid, column, const heading[]); -/// Shows a previously created menu for a player. -/// The ID of the menu to show. Returned by CreateMenu -/// The ID of the player to whom the menu will be shown -/// -/// -/// -/// -/// -/// -/// Crashes the both server and player if an invalid menu ID given. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. Menu and/or player doesn't exist. -///
    +/** + * Shows a previously created menu for a player. + * The ID of the menu to show. Returned by CreateMenu + * The ID of the player to whom the menu will be shown + * + * + * + * + * + * + * Crashes the both server and player if an invalid menu ID given. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. Menu and/or player doesn't exist. + *
    + */ native ShowMenuForPlayer(Menu:menuid, playerid); -/// Hides a menu for a player. -/// The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow -/// The ID of the player that the menu will be hidden for -/// -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. -///
    +/** + * Hides a menu for a player. + * The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow + * The ID of the player that the menu will be hidden for + * + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. + *
    + */ native HideMenuForPlayer(Menu:menuid, playerid); -/// Check if a menu ID is vliad. -/// The menu to check for existance -/// -/// -/// 1 if the menu is valid, otherwise 0. +/** + * Check if a menu ID is vliad. + * The menu to check for existance + * + * + * 1 if the menu is valid, otherwise 0. + */ native bool:IsValidMenu(Menu:menuid); -/// Disable a menu. -/// The ID of the menu to disable -/// -/// -/// -/// Crashes when passed an invalid menu ID. +/** + * Disable a menu. + * The ID of the menu to disable + * + * + * + * Crashes when passed an invalid menu ID. + */ native DisableMenu(Menu:menuid); -/// Disable a specific row in a menu for all players. It will be greyed-out and can't be selected by players. -/// The ID of the menu to disable a row of. Ensure this is valid, as an invalid menu ID will crash the entire server -/// The ID of the row to disable (rows start at 0) -/// -/// -/// -/// -/// Crashes when passed an invalid menu ID.
    -/// This function disabled the specified menu row for all players. There is no function to disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, and one without. Or one per player. -///
    -/// This function always returns 1, even if the function fails. If an invalid row is specified, nothing will happen. If an invalid menu ID is specified, the server will crash. +/** + * Disable a specific row in a menu for all players. It will be greyed-out and can't be selected by players. + * The ID of the menu to disable a row of. Ensure this is valid, as an invalid menu ID will crash the entire server + * The ID of the row to disable (rows start at 0) + * + * + * + * + * Crashes when passed an invalid menu ID.
    + * This function disabled the specified menu row for all players. There is no function to disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, and one without. Or one per player. + *
    + * This function always returns 1, even if the function fails. If an invalid row is specified, nothing will happen. If an invalid menu ID is specified, the server will crash. + */ native DisableMenuRow(Menu:menuid, row); -/// Gets the ID of the menu the player is currently viewing (shown by ShowMenuForPlayer). -/// The ID of the player to get the current menu of -/// -/// -/// -/// -/// -/// -/// -/// Returns previous menu when none is displayed. -/// The ID of the player's currently shown menu, or INVALID_MENU (255) if no menu shown. +/** + * Gets the ID of the menu the player is currently viewing (shown by ShowMenuForPlayer). + * The ID of the player to get the current menu of + * + * + * + * + * + * + * + * Returns previous menu when none is displayed. + * The ID of the player's currently shown menu, or INVALID_MENU (255) if no menu shown. + */ native Menu:GetPlayerMenu(playerid); -/// Creates a textdraw. Textdraws are, as the name implies, text (mainly - there can be boxes, sprites and model previews (skins/vehicles/weapons/objects too) that is drawn on a player's screens. -/// The x (left/right) coordinate to create the textdraw at -/// The y (up/down) coordinate to create the textdraw at -/// The text that will appear in the textdraw -/// -/// If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.
    -/// text[] must not be empty or the server will crash! If you need a textdraw that shows nothing, use a space underscore. Now it's fixed.
    -/// If the last character in the text is a space, the text will all be blank.
    -/// If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will. -///
    -/// -/// This applies ONLY to sa-mp versions before 0.3z:
    -/// Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
    -/// If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw. -///
    -/// -/// The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using TextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
    -/// This function merely CREATES the textdraw, you must use TextDrawShowForPlayer or TextDrawShowForAll to show it.
    -/// It is recommended to use WHOLE numbers instead of decimal positions when creating textdraws to ensure resolution friendly design. -///
    -/// Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ don't work beyond 255th character. -/// The ID of the created textdraw. Textdraw IDs start at 0. +/** + * Creates a textdraw. Textdraws are, as the name implies, text (mainly - there can be boxes, sprites and model previews (skins/vehicles/weapons/objects too) that is drawn on a player's screens. + * The x (left/right) coordinate to create the textdraw at + * The y (up/down) coordinate to create the textdraw at + * The text that will appear in the textdraw + * + * If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.
    + * text[] must not be empty or the server will crash! If you need a textdraw that shows nothing, use a space underscore. Now it's fixed.
    + * If the last character in the text is a space, the text will all be blank.
    + * If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will. + *
    + * + * This applies ONLY to sa-mp versions before 0.3z:
    + * Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
    + * If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw. + *
    + * + * The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using TextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
    + * This function merely CREATES the textdraw, you must use TextDrawShowForPlayer or TextDrawShowForAll to show it.
    + * It is recommended to use WHOLE numbers instead of decimal positions when creating textdraws to ensure resolution friendly design. + *
    + * Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ don't work beyond 255th character. + * The ID of the created textdraw. Textdraw IDs start at 0. + */ native Text:TextDrawCreate(Float:x, Float:y, const text[]); -/// Destroys a previously-created textdraw. -/// The ID of the textdraw to destroy. Returned by TextDrawCreate +/** + * Destroys a previously-created textdraw. + * The ID of the textdraw to destroy. Returned by TextDrawCreate + */ native TextDrawDestroy(Text:text); -/// Sets the width and height of the letters. -/// The TextDraw to change -/// Width of a char -/// Height of a char -/// When using this function purely for the benefit of affecting the TextDraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements. Hint: it is easier and extremely precise to use LD_SPAC:white sprite for box-only textdraws, TextDrawTextSize will have regular offsets. -/// If you want to change the letter size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. -/// Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). +/** + * Sets the width and height of the letters. + * The TextDraw to change + * Width of a char + * Height of a char + * When using this function purely for the benefit of affecting the TextDraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements. Hint: it is easier and extremely precise to use LD_SPAC:white sprite for box-only textdraws, TextDrawTextSize will have regular offsets. + * If you want to change the letter size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). + */ native TextDrawLetterSize(Text:text, Float:width, Float:height); -/// Change the size of a textdraw (box if TextDrawUseBox is enabled and/or clickable area for use with TextDrawSetSelectable). -/// The TextDraw to set the size of -/// The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate -/// The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate -/// -/// The x and y have different meanings with different TextDrawAlignment values:
    -///
      -///
    • 1 (left): they are the right-most corner of the box, absolute coordinates.
    • -///
    • 2 (center): they need to inverted (switch the two) and the x value is the overall width of the box.
    • -///
    • 3 (right): the x and y are the coordinates of the left-most corner of the box
    • -///
    -///
    -/// -/// Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).
    -/// The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).
    -/// This function defines the clickable area for use with TextDrawSetSelectable, whether a box is shown or not. -///
    -/// If you want to change the text size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. +/** + * Change the size of a textdraw (box if TextDrawUseBox is enabled and/or clickable area for use with TextDrawSetSelectable). + * The TextDraw to set the size of + * The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate + * The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate + * + * The x and y have different meanings with different TextDrawAlignment values:
    + *
      + *
    • 1 (left): they are the right-most corner of the box, absolute coordinates.
    • + *
    • 2 (center): they need to inverted (switch the two) and the x value is the overall width of the box.
    • + *
    • 3 (right): the x and y are the coordinates of the left-most corner of the box
    • + *
    + *
    + * + * Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).
    + * The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).
    + * This function defines the clickable area for use with TextDrawSetSelectable, whether a box is shown or not. + *
    + * If you want to change the text size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + */ native TextDrawTextSize(Text:text, Float:width, Float:height); -/// Set the alignment of text in a text draw. -/// The ID of the textdraw to set the alignment of -/// 1-left 2-centered 3-right -/// For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at TextDrawTextSize, also position coordinate become position of center of textdraw and not left/top edges. +/** + * Set the alignment of text in a text draw. + * The ID of the textdraw to set the alignment of + * 1-left 2-centered 3-right + * For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at TextDrawTextSize, also position coordinate become position of center of textdraw and not left/top edges. + */ native TextDrawAlignment(Text:text, TEXT_DRAW_ALIGN:alignment); -/// Sets the text colour of a textdraw. -/// The ID of the textdraw to change the colour of. -/// The colour to set the textdraw to -/// You can also use GameText Colors in TextDraws. -/// If the TextDraw is already shown, it must be re-shown (TextDrawShowForAll/TextDrawShowForPlayer) for the changes of this function to take effect. +/** + * Sets the text colour of a textdraw. + * The ID of the textdraw to change the colour of. + * The colour to set the textdraw to + * You can also use GameText Colors in TextDraws. + * If the TextDraw is already shown, it must be re-shown (TextDrawShowForAll/TextDrawShowForPlayer) for the changes of this function to take effect. + */ native TextDrawColor(Text:text, colour); -/// Toggle whether a textdraw uses a box or not. -/// The ID of the text textdraw to toggle the box of -/// 1 to show a box or 0 to not show a box -/// If the textdraw is already shown, it must be re-shown (TextDrawShowForAll/TextDrawShowForPlayer) to show the changes of this function. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the textdraw specified does not exist. -///
    +/** + * Toggle whether a textdraw uses a box or not. + * The ID of the text textdraw to toggle the box of + * 1 to show a box or 0 to not show a box + * If the textdraw is already shown, it must be re-shown (TextDrawShowForAll/TextDrawShowForPlayer) to show the changes of this function. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the textdraw specified does not exist. + *
    + */ native TextDrawUseBox(Text:text, bool:use); -/// Adjusts the text box colour (only used if TextDrawUseBox 'use' parameter is 1). -/// The TextDraw to change -/// The colour (RGBA) -/// If you want to change the boxcolour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. +/** + * Adjusts the text box colour (only used if TextDrawUseBox 'use' parameter is 1). + * The TextDraw to change + * The colour (RGBA) + * If you want to change the boxcolour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + */ native TextDrawBoxColor(Text:text, colour); -/// Sets the size of a textdraw's text's shadow. -/// The ID of the textdraw to set the shadow size of -/// The size of the shadow. 1 is generally used for a normal shadow size. 0 disables the shadow completely -/// The shadow can be cut by the box area if the size is set too big for the area. -/// If you want to change the shadow of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The textdraw does not exist. -///
    +/** + * Sets the size of a textdraw's text's shadow. + * The ID of the textdraw to set the shadow size of + * The size of the shadow. 1 is generally used for a normal shadow size. 0 disables the shadow completely + * The shadow can be cut by the box area if the size is set too big for the area. + * If you want to change the shadow of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The textdraw does not exist. + *
    + */ native TextDrawSetShadow(Text:text, size); -/// Sets the thickness of a textdraw's text's outline. TextDrawBackgroundColor can be used to change the colour. -/// The ID of the text draw to set the outline thickness of -/// The thickness of the outline, as an integer. 0 for no outline -/// If you want to change the outline of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. +/** + * Sets the thickness of a textdraw's text's outline. TextDrawBackgroundColor can be used to change the colour. + * The ID of the text draw to set the outline thickness of + * The thickness of the outline, as an integer. 0 for no outline + * If you want to change the outline of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + */ native TextDrawSetOutline(Text:text, size); -/// Adjusts the text draw area background colour (the outline/shadow - NOT the box. For box colour, see TextDrawBoxColor). -/// The ID of the textdraw to set the background colour of -/// The colour that the textdraw should be set to -/// If TextDrawSetOutline is used with size > 0, the outline colour will match the colour used in TextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in TextDrawColor -/// If you want to change the background colour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. +/** + * Adjusts the text draw area background colour (the outline/shadow - NOT the box. For box colour, see TextDrawBoxColor). + * The ID of the textdraw to set the background colour of + * The colour that the textdraw should be set to + * If TextDrawSetOutline is used with size > 0, the outline colour will match the colour used in TextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in TextDrawColor + * If you want to change the background colour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + */ native TextDrawBackgroundColor(Text:text, colour); -/// Changes the text font. -/// The TextDraw to change -/// There are four font styles, see http://wiki.sa-mp.com/wiki/PlayerTextDrawFont. Font value 4 specifies that this is a txd sprite; 5 specifies that this textdraw can display preview models. A font value greater than 5 does not display, and anything greater than 16 crashes the client -/// If you want to change the font of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. +/** + * Changes the text font. + * The TextDraw to change + * There are four font styles, see http://wiki.sa-mp.com/wiki/PlayerTextDrawFont. Font value 4 specifies that this is a txd sprite; 5 specifies that this textdraw can display preview models. A font value greater than 5 does not display, and anything greater than 16 crashes the client + * If you want to change the font of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + */ native TextDrawFont(Text:text, TEXT_DRAW_FONT:font); -/// Appears to scale text spacing to a proportional ratio. Useful when using TextDrawLetterSize to ensure the text has even character spacing. -/// The ID of the textdraw to set the proportionality of -/// 1 to enable proportionality, 0 to disable -/// Proportionality is set to 1 by default, you might skip this function if you don't want to disable it. -/// If you want to change the proportionality of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. +/** + * Appears to scale text spacing to a proportional ratio. Useful when using TextDrawLetterSize to ensure the text has even character spacing. + * The ID of the textdraw to set the proportionality of + * 1 to enable proportionality, 0 to disable + * Proportionality is set to 1 by default, you might skip this function if you don't want to disable it. + * If you want to change the proportionality of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + */ native TextDrawSetProportional(Text:text, bool:set); -/// Sets whether a textdraw can be selected (clicked on) or not. -/// The ID of the textdraw to make selectable -/// 1 to make it selectable, or 0 to make it not selectable -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// TextDrawSetSelectable must be used BEFORE the textdraw is shown to players for it to be selectable. -/// Use TextDrawTextSize to define the clickable area. +/** + * Sets whether a textdraw can be selected (clicked on) or not. + * The ID of the textdraw to make selectable + * 1 to make it selectable, or 0 to make it not selectable + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * TextDrawSetSelectable must be used BEFORE the textdraw is shown to players for it to be selectable. + * Use TextDrawTextSize to define the clickable area. + */ native TextDrawSetSelectable(Text:text, bool:set); -/// Shows a textdraw for a specific player. -/// The ID of the player to show the textdraw for -/// The ID of the textdraw to show. Returned by TextDrawCreate -/// If only a single player will see a textdraw, it might be wise to use player-textdraws instead. This is also useful for textdraws that need to show information specific for an individual player. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means either the player and/or textdraw specified does not exist. -///
    +/** + * Shows a textdraw for a specific player. + * The ID of the player to show the textdraw for + * The ID of the textdraw to show. Returned by TextDrawCreate + * If only a single player will see a textdraw, it might be wise to use player-textdraws instead. This is also useful for textdraws that need to show information specific for an individual player. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means either the player and/or textdraw specified does not exist. + *
    + */ native TextDrawShowForPlayer(playerid, Text:text); -/// Hides a textdraw for a specific player. -/// The ID of the player that the textdraw should be hidden for -/// The ID of the textdraw to hide -/// -/// -/// +/** + * Hides a textdraw for a specific player. + * The ID of the player that the textdraw should be hidden for + * The ID of the textdraw to hide + * + * + * + */ native TextDrawHideForPlayer(playerid, Text:text); -/// Shows a textdraw for all players. -/// The ID of the textdraw to show. Returned by TextDrawCreate -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the textdraw specified does not exist. -///
    +/** + * Shows a textdraw for all players. + * The ID of the textdraw to show. Returned by TextDrawCreate + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the textdraw specified does not exist. + *
    + */ native TextDrawShowForAll(Text:text); -/// Hides a text draw for all players. -/// The ID of the textdraw to hide (returned by TextDrawCreate) -/// -/// -/// +/** + * Hides a text draw for all players. + * The ID of the textdraw to hide (returned by TextDrawCreate) + * + * + * + */ native TextDrawHideForAll(Text:text); -/// Changes the text on a textdraw. -/// The TextDraw to change -/// The new string for the TextDraw -/// There are limits to the length of textdraw strings - see here for more info. +/** + * Changes the text on a textdraw. + * The TextDraw to change + * The new string for the TextDraw + * There are limits to the length of textdraw strings - see here for more info. + */ native TextDrawSetString(Text:text, const string[]); -/// Set the model for a textdraw model preview. Click here to see this function's effect. -/// The textdraw ID that will display the 3D preview -/// The GTA SA or SA:MP model ID to display -/// This function was added in SA-MP 0.3x and will not work in earlier versions! -/// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. -/// Use TextDrawBackgroundColor to set the background colour behind the model. +/** + * Set the model for a textdraw model preview. Click here to see this function's effect. + * The textdraw ID that will display the 3D preview + * The GTA SA or SA:MP model ID to display + * This function was added in SA-MP 0.3x and will not work in earlier versions! + * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. + * Use TextDrawBackgroundColor to set the background colour behind the model. + */ native TextDrawSetPreviewModel(Text:text, modelIndex); -/// Sets the rotation and zoom of a 3D model preview textdraw. -/// The x rotation value -/// The y rotation value -/// The z rotation value -/// The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) -/// This function was added in SA-MP 0.3x and will not work in earlier versions! -/// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. +/** + * Sets the rotation and zoom of a 3D model preview textdraw. + * The x rotation value + * The y rotation value + * The z rotation value + * The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) + * This function was added in SA-MP 0.3x and will not work in earlier versions! + * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. + */ native TextDrawSetPreviewRot(Text:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); -/// If a vehicle model is used in a 3D preview textdraw, this sets the two colour values for that vehicle. -/// The textdraw ID that is set to display a 3D vehicle model preview -/// The primary Color ID to set the vehicle to -/// The secondary Color ID to set the vehicle to -/// This function was added in SA-MP 0.3x and will not work in earlier versions! -/// The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. +/** + * If a vehicle model is used in a 3D preview textdraw, this sets the two colour values for that vehicle. + * The textdraw ID that is set to display a 3D vehicle model preview + * The primary Color ID to set the vehicle to + * The secondary Color ID to set the vehicle to + * This function was added in SA-MP 0.3x and will not work in earlier versions! + * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. + */ native TextDrawSetPreviewVehCol(Text:text, colour1, colour2); // Gang Zones -/// Create a gangzone (coloured radar area). -/// The x coordinate for the west side of the gangzone -/// The y coordinate for the south side of the gangzone -/// The x coordinate for the east side of the gangzone -/// The y coordinate for the north side of the gangzone -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// There is a limit of 1024 gangzones.
    -/// Putting the parameters in the wrong order results in glitchy behavior. -///
    -/// This function merely CREATES the gangzone, you must use GangZoneShowForPlayer or GangZoneShowForAll to show it. -/// The ID of the created zone, returns -1 if not created. +/** + * Create a gangzone (coloured radar area). + * The x coordinate for the west side of the gangzone + * The y coordinate for the south side of the gangzone + * The x coordinate for the east side of the gangzone + * The y coordinate for the north side of the gangzone + * + * + * + * + * + * + * + * + * + * + * There is a limit of 1024 gangzones.
    + * Putting the parameters in the wrong order results in glitchy behavior. + *
    + * This function merely CREATES the gangzone, you must use GangZoneShowForPlayer or GangZoneShowForAll to show it. + * The ID of the created zone, returns -1 if not created. + */ native GangZoneCreate(Float:minX, Float:minY, Float:maxX, Float:maxY); -/// Destroy a gangzone. -/// The ID of the zone to destroy -/// -/// -/// -/// -/// -/// -/// -/// -/// +/** + * Destroy a gangzone. + * The ID of the zone to destroy + * + * + * + * + * + * + * + * + * + */ native GangZoneDestroy(zone); -/// Show a gangzone for a player. Must be created with GangZoneCreate first. -/// The ID of the player you would like to show the gangzone for. -/// The ID of the gang zone to show for the player. Returned by GangZoneCreate -/// The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// 1 if the gangzone was shown, otherwise 0 (non-existant). +/** + * Show a gangzone for a player. Must be created with GangZoneCreate first. + * The ID of the player you would like to show the gangzone for. + * The ID of the gang zone to show for the player. Returned by GangZoneCreate + * The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * + * + * + * + * + * + * + * + * + * 1 if the gangzone was shown, otherwise 0 (non-existant). + */ native GangZoneShowForPlayer(playerid, zone, colour); -/// Shows a gangzone with the desired colour to all players. -/// The ID of the gangzone to show (returned by GangZoneCreate) -/// The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// 1: The function executed successfully. The gang zone was shown for all players.
    -/// 0: The function failed to execute. The gangzone does not exist. -///
    +/** + * Shows a gangzone with the desired colour to all players. + * The ID of the gangzone to show (returned by GangZoneCreate) + * The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * + * + * + * + * + * + * + * + * + * + * 1: The function executed successfully. The gang zone was shown for all players.
    + * 0: The function failed to execute. The gangzone does not exist. + *
    + */ native GangZoneShowForAll(zone, colour); -/// Hides a gangzone for a player. -/// The ID of the player to hide the gangzone for -/// The ID of the zone to hide -/// -/// -/// -/// -/// -/// -/// -/// -/// +/** + * Hides a gangzone for a player. + * The ID of the player to hide the gangzone for + * The ID of the zone to hide + * + * + * + * + * + * + * + * + * + */ native GangZoneHideForPlayer(playerid, zone); -/// GangZoneHideForAll hides a gangzone from all players. -/// The zone to hide -/// -/// -/// -/// -/// -/// -/// -/// -/// +/** + * GangZoneHideForAll hides a gangzone from all players. + * The zone to hide + * + * + * + * + * + * + * + * + * + */ native GangZoneHideForAll(zone); -/// Makes a gangzone flash for a player. -/// The ID of the player to flash the gangzone for -/// The ID of the zone to flash -/// The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported -/// -/// -/// -/// -/// -/// -/// -/// -/// +/** + * Makes a gangzone flash for a player. + * The ID of the player to flash the gangzone for + * The ID of the zone to flash + * The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * + * + * + * + * + * + * + * + * + */ native GangZoneFlashForPlayer(playerid, zone, flashColour); -/// GangZoneFlashForAll flashes a gangzone for all players. -/// The zone to flash -/// The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported -/// -/// -/// -/// -/// -/// -/// -/// -/// +/** + * GangZoneFlashForAll flashes a gangzone for all players. + * The zone to flash + * The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * + * + * + * + * + * + * + * + * + */ native GangZoneFlashForAll(zone, flashColour); -/// Stops a gangzone flashing for a player. -/// The ID of the player to stop the gangzone flashing for -/// The ID of the gangzonezone to stop flashing -/// -/// -/// -/// -/// -/// -/// -/// -/// +/** + * Stops a gangzone flashing for a player. + * The ID of the player to stop the gangzone flashing for + * The ID of the gangzonezone to stop flashing + * + * + * + * + * + * + * + * + * + */ native GangZoneStopFlashForPlayer(playerid, zone); -/// Stops a gangzone flashing for all players. -/// The ID of the zone to stop flashing. Returned by GangZoneCreate -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// 1: The function executed successfully. Success is reported even if the gang zone wasn't flashing to begin with.
    -/// 0: The function failed to execute. The gangzone specified does not exist. -///
    +/** + * Stops a gangzone flashing for all players. + * The ID of the zone to stop flashing. Returned by GangZoneCreate + * + * + * + * + * + * + * + * + * + * + * 1: The function executed successfully. Success is reported even if the gang zone wasn't flashing to begin with.
    + * 0: The function failed to execute. The gangzone specified does not exist. + *
    + */ native GangZoneStopFlashForAll(zone); // Global 3D Text Labels -/// Creates a 3D Text Label at a specific location in the world. -/// The initial text string -/// The text Color, as an integer or hex in RGBA colour format -/// x-Coordinate -/// y-Coordinate -/// z-Coordinate -/// The distance from where you are able to see the 3D Text Label -/// The virtual world in which you are able to see the 3D Text -/// Test the line-of-sight so this text can't be seen through objects (optional=0) -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// If is empty, the server/clients next to the text might crash!
    -/// If the virtualWorld is set as -1 the text will not appear. -///
    -/// drawdistance seems to be a lot smaller when spectating. -/// Use colour embedding for multiple colours in the text. -/// The ID of the newly created 3D Text Label, or INVALID_3DTEXT_ID if the 3D Text Label limit (MAX_3DTEXT_GLOBAL) was reached. +/** + * Creates a 3D Text Label at a specific location in the world. + * The initial text string + * The text Color, as an integer or hex in RGBA colour format + * x-Coordinate + * y-Coordinate + * z-Coordinate + * The distance from where you are able to see the 3D Text Label + * The virtual world in which you are able to see the 3D Text + * Test the line-of-sight so this text can't be seen through objects (optional=0) + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * If is empty, the server/clients next to the text might crash!
    + * If the virtualWorld is set as -1 the text will not appear. + *
    + * drawdistance seems to be a lot smaller when spectating. + * Use colour embedding for multiple colours in the text. + * The ID of the newly created 3D Text Label, or INVALID_3DTEXT_ID if the 3D Text Label limit (MAX_3DTEXT_GLOBAL) was reached. + */ native Text3D:Create3DTextLabel(const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, virtualWorld, bool:testLOS = false); -/// Delete a 3D text label (created with Create3DTextLabel). -/// The ID of the 3D text label to delete -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// 1 if the 3D text label was deleted, otherwise 0. +/** + * Delete a 3D text label (created with Create3DTextLabel). + * The ID of the 3D text label to delete + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * 1 if the 3D text label was deleted, otherwise 0. + */ native Delete3DTextLabel(Text3D:textid); -/// Attach a 3D text label to a player. -/// The ID of the 3D text label to attach. Returned by Create3DTextLabel -/// The ID of the player to attach the label to -/// The x offset from the player -/// The y offset from the player -/// The z offset from the player -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player and/or label do not exist. -///
    +/** + * Attach a 3D text label to a player. + * The ID of the 3D text label to attach. Returned by Create3DTextLabel + * The ID of the player to attach the label to + * The x offset from the player + * The y offset from the player + * The z offset from the player + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player and/or label do not exist. + *
    + */ native Attach3DTextLabelToPlayer(Text3D:textid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ); -/// Attaches a 3D Text Label to a specific vehicle. -/// The ID of the 3D text label to attach. Returned by Create3DTextLabel -/// The vehicle you want to attach the 3D Text Label to -/// The offset-x coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). -/// The offset-y coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). -/// The offset-z coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). -/// -/// -/// -/// -/// -/// -/// -/// Attach3DTextLabelToPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions! +/** + * Attaches a 3D Text Label to a specific vehicle. + * The ID of the 3D text label to attach. Returned by Create3DTextLabel + * The vehicle you want to attach the 3D Text Label to + * The offset-x coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). + * The offset-y coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). + * The offset-z coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). + * + * + * + * + * + * + * + * Attach3DTextLabelToPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions! + */ native Attach3DTextLabelToVehicle(Text3D:textid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ); -/// Updates a 3D Text Label text and colour. -/// The 3D Text Label you want to update -/// The colour the 3D Text Label should have from now on -/// The new text which the 3D Text Label should have from now on -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// If is empty, the server/clients next to the text might crash! +/** + * Updates a 3D Text Label text and colour. + * The 3D Text Label you want to update + * The colour the 3D Text Label should have from now on + * The new text which the 3D Text Label should have from now on + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * If is empty, the server/clients next to the text might crash! + */ native Update3DTextLabelText(Text3D:textid, colour, const text[]); // Per-player 3D Text Labels -/// Creates a 3D Text Label only for a specific player. -/// The player which should see the newly created 3DText Label -/// The text to display -/// The text colour -/// x Coordinate (or offset if attached) -/// y Coordinate (or offset if attached) -/// z Coordinate (or offset if attached) -/// The distance where you are able to see the 3D Text Label -/// The player you want to attach the 3D Text Label to. (optional=INVALID_PLAYER_ID) -/// The vehicle you want to attach the 3D Text Label to. (optional=INVALID_VEHICLE_ID) -/// Test the line-of-sight so this text can't be seen through walls (optional=0) -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// If is empty, the server/clients next to the text might crash! -/// drawdistance seems to be a lot smaller when spectating. -/// The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. +/** + * Creates a 3D Text Label only for a specific player. + * The player which should see the newly created 3DText Label + * The text to display + * The text colour + * x Coordinate (or offset if attached) + * y Coordinate (or offset if attached) + * z Coordinate (or offset if attached) + * The distance where you are able to see the 3D Text Label + * The player you want to attach the 3D Text Label to. (optional=INVALID_PLAYER_ID) + * The vehicle you want to attach the 3D Text Label to. (optional=INVALID_VEHICLE_ID) + * Test the line-of-sight so this text can't be seen through walls (optional=0) + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * If is empty, the server/clients next to the text might crash! + * drawdistance seems to be a lot smaller when spectating. + * The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. + */ native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayerid = INVALID_PLAYER_ID, parentVehicleid = INVALID_VEHICLE_ID, bool:testLOS = false); -/// Destroy a 3D text label that was created using CreatePlayer3DTextLabel. -/// The ID of the player whose 3D text label to delete -/// The ID of the player's 3D text label to delete -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the label specified doesn't exist. -///
    +/** + * Destroy a 3D text label that was created using CreatePlayer3DTextLabel. + * The ID of the player whose 3D text label to delete + * The ID of the player's 3D text label to delete + * + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the label specified doesn't exist. + *
    + */ native DeletePlayer3DTextLabel(playerid, PlayerText3D:textid); -/// Updates a player 3D Text Label's text and colour. -/// The ID of the player for which the 3D Text Label was created -/// The 3D Text Label you want to update -/// The colour the 3D Text Label should have from now on -/// The new text which the 3D Text Label should have from now on -/// -/// -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// If is empty, the server/clients next to the text might crash! +/** + * Updates a player 3D Text Label's text and colour. + * The ID of the player for which the 3D Text Label was created + * The 3D Text Label you want to update + * The colour the 3D Text Label should have from now on + * The new text which the 3D Text Label should have from now on + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * If is empty, the server/clients next to the text might crash! + */ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const text[]); -/// Shows the player a synchronous (only one at a time) dialog box. -/// The ID of the player to show the dialog to -/// An ID to assign this dialog to, so responses can be processed. Max dialogid is 32767. Using negative values will close any open dialog -/// The style of the dialog -/// The title at the top of the dialog. The length of the caption can not exceed more than 64 characters before it starts to cut off -/// The text to display in the main dialog. Use \n to start a new line and \t to tabulate -/// The text on the left button -/// The text on the right button. Leave it blank ( "" ) to hide it -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// Use colour embedding for multiple colours in the text. -/// Using -1 as dialogid closes all dialogs currently shown on the client's screen. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the player is not connected.
    -///
    +/** + * Shows the player a synchronous (only one at a time) dialog box. + * The ID of the player to show the dialog to + * An ID to assign this dialog to, so responses can be processed. Max dialogid is 32767. Using negative values will close any open dialog + * The style of the dialog + * The title at the top of the dialog. The length of the caption can not exceed more than 64 characters before it starts to cut off + * The text to display in the main dialog. Use \n to start a new line and \t to tabulate + * The text on the left button + * The text on the right button. Leave it blank ( "" ) to hide it + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * Use colour embedding for multiple colours in the text. + * Using -1 as dialogid closes all dialogs currently shown on the client's screen. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the player is not connected.
    + *
    + */ native ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE:style, const caption[], const info[], const button1[], const button2[]); -/// Get a players unique ID. -/// The player to get the unique ID of -/// Where to save the unique ID -/// The size of "output" (the serial) +/** + * Get a players unique ID. + * The player to get the unique ID of + * Where to save the unique ID + * The size of "output" (the serial) #pragma deprecated Use `GPCI`. native gpci(playerid, serial[], len = sizeof (serial)); -/// Get a players unique ID. -/// The player to get the unique ID of -/// Where to save the unique ID -/// The size of "serial" (the serial) +/** + * Get a players unique ID. + * The player to get the unique ID of + * Where to save the unique ID + * The size of "serial" (the serial) + */ native GPCI(playerid, serial[], len = sizeof (serial)) = gpci; // -------------------------------------------------- // Forwards (Callback declarations) // -------------------------------------------------- -/// This callback is triggered when the gamemode starts. -/// -/// -/// -/// This function can also be used in a filterscript to detect if the gamemode changes with RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. -/// -/// 0 - Will prevent other filterscripts from receiving this callback.
    -/// 1 - Indicates that this callback will be passed to the next filterscript.
    -/// It is always called first in gamemode. -///
    +/** + * This callback is triggered when the gamemode starts. + * + * + * + * This function can also be used in a filterscript to detect if the gamemode changes with RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. + * + * 0 - Will prevent other filterscripts from receiving this callback.
    + * 1 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in gamemode. + *
    + */ forward OnGameModeInit(); -/// This callback is called when a gamemode ends, either through 'gmx', the server being shut down, or GameModeExit. -/// -/// -/// -/// -/// This function can also be used in a filterscript to detect if the gamemode changes with RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. -/// When using OnGameModeExit in conjunction with the 'rcon gmx' console command keep in mind there is a potential for client bugs to occur an example of this is excessive RemoveBuildingForPlayer calls during OnGameModeInit which could result in a client crash. -/// This callback will NOT be called if the server crashes or the process is killed by other means, such as using the Linux kill command or pressing the close-button on the Windows console. -/// -/// 0 - Will prevent other filterscripts from receiving this callback.
    -/// 1 - Indicates that this callback will be passed to the next filterscript.
    -/// It is always called first in gamemode. -///
    +/** + * This callback is called when a gamemode ends, either through 'gmx', the server being shut down, or GameModeExit. + * + * + * + * + * This function can also be used in a filterscript to detect if the gamemode changes with RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. + * When using OnGameModeExit in conjunction with the 'rcon gmx' console command keep in mind there is a potential for client bugs to occur an example of this is excessive RemoveBuildingForPlayer calls during OnGameModeInit which could result in a client crash. + * This callback will NOT be called if the server crashes or the process is killed by other means, such as using the Linux kill command or pressing the close-button on the Windows console. + * + * 0 - Will prevent other filterscripts from receiving this callback.
    + * 1 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in gamemode. + *
    + */ forward OnGameModeExit(); -/// This callback is called when a filterscript is initialized (loaded). It is only called inside the filterscript which is starting. -/// -/// -/// -/// This callback does not handle returns. +/** + * This callback is called when a filterscript is initialized (loaded). It is only called inside the filterscript which is starting. + * + * + * + * This callback does not handle returns. + */ forward OnFilterScriptInit(); -/// This callback is called when a filterscript is unloaded. It is only called inside the filterscript which is unloaded. -/// -/// -/// -/// This callback does not handle returns. +/** + * This callback is called when a filterscript is unloaded. It is only called inside the filterscript which is unloaded. + * + * + * + * This callback does not handle returns. + */ forward OnFilterScriptExit(); -/// This callback is called when a player connects to the server. -/// The ID of the player that connected -/// -/// -/// -/// This callback can also be called by NPC. -/// -/// 0 - Will prevent other filterscripts from receiving this callback.
    -/// 1 - Indicates that this callback will be passed to the next filterscript.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player connects to the server. + * The ID of the player that connected + * + * + * + * This callback can also be called by NPC. + * + * 0 - Will prevent other filterscripts from receiving this callback.
    + * 1 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerConnect(playerid); -/// This callback is called when a player disconnects from the server. -/// The ID of the player that disconnected -/// The reason for the disconnection. See table below -/// -/// -/// -/// This callback can also be called by NPC. -/// Some functions might not work correctly when used in this callback because the player is already disconnected when the callback is called. This means that you can't get unambiguous information from functions like GetPlayerIp and GetPlayerPos. -/// -/// Reasons:
    -///
      -///
    • 0 - timeout/Crash - the player's connection was lost. Either their game crashed or their network had a fault.
    • -///
    • 1 - quit - the player purposefully quit, either using the /quit (/q) command or via the pause menu.
    • -///
    • 2 - kick/ban - the player was kicked or banned by the server.
    • -///
    -///
    -/// -/// 0 - Will prevent other filterscripts from receiving this callback.
    -/// 1 - Indicates that this callback will be passed to the next filterscript.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player disconnects from the server. + * The ID of the player that disconnected + * The reason for the disconnection. See table below + * + * + * + * This callback can also be called by NPC. + * Some functions might not work correctly when used in this callback because the player is already disconnected when the callback is called. This means that you can't get unambiguous information from functions like GetPlayerIp and GetPlayerPos. + * + * Reasons:
    + *
      + *
    • 0 - timeout/Crash - the player's connection was lost. Either their game crashed or their network had a fault.
    • + *
    • 1 - quit - the player purposefully quit, either using the /quit (/q) command or via the pause menu.
    • + *
    • 2 - kick/ban - the player was kicked or banned by the server.
    • + *
    + *
    + * + * 0 - Will prevent other filterscripts from receiving this callback.
    + * 1 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerDisconnect(playerid, reason); -/// This callback is called when a player spawns.(i.e. after caling SpawnPlayer function). -/// The ID of the player that spawned -/// -/// -/// -/// -/// -/// This callback can also be called by NPC. -/// The game sometimes deducts $100 from players after spawn. -/// -/// 0 - Will prevent other filterscripts from receiving this callback.
    -/// 1 - Indicates that this callback will be passed to the next filterscript.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player spawns.(i.e. after caling SpawnPlayer function). + * The ID of the player that spawned + * + * + * + * + * + * This callback can also be called by NPC. + * The game sometimes deducts $100 from players after spawn. + * + * 0 - Will prevent other filterscripts from receiving this callback.
    + * 1 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerSpawn(playerid); -/// This callback is called when a player dies, either by suicide or by being killed by another player. -/// The ID of the player that died -/// The ID of the player that killed the player who died, or INVALID_PLAYER_ID if there was none -/// The ID of the reason for the player's death -/// -/// -/// -/// -/// The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    -/// The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    -/// You do not need to check whether killerid is valid before using it in SendDeathMessage. INVALID_PLAYER_ID is a valid killerid ID parameter in that function.
    -/// playerid is the only one who can call the callback. (good to know for anti fake death) -///
    -/// -/// 0 - Will prevent other filterscripts from receiving this callback.
    -/// 1 - Indicates that this callback will be passed to the next filterscript.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player dies, either by suicide or by being killed by another player. + * The ID of the player that died + * The ID of the player that killed the player who died, or INVALID_PLAYER_ID if there was none + * The ID of the reason for the player's death + * + * + * + * + * The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    + * The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    + * You do not need to check whether killerid is valid before using it in SendDeathMessage. INVALID_PLAYER_ID is a valid killerid ID parameter in that function.
    + * playerid is the only one who can call the callback. (good to know for anti fake death) + *
    + * + * 0 - Will prevent other filterscripts from receiving this callback.
    + * 1 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerDeath(playerid, killerid, reason); -/// This callback is called when a vehicle respawns. -/// The ID of the vehicle that spawned -/// -/// -/// -/// -/// -/// 0 - Will prevent other filterscripts from receiving this callback.
    -/// 1 - Indicates that this callback will be passed to the next filterscript.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a vehicle respawns. + * The ID of the vehicle that spawned + * + * + * + * + * + * 0 - Will prevent other filterscripts from receiving this callback.
    + * 1 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts. + *
    + */ forward OnVehicleSpawn(vehicleid); -/// This callback is called when a vehicle is destroyed - either by exploding or becoming submerged in water. -/// The ID of the vehicle that was destroyed -/// The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player -/// -/// -/// This callback can also be called by NPC. -/// This callback will also be called when a vehicle enters water, but the vehicle can be saved from destruction by teleportation or driving out (if only partially submerged). The callback won't be called a second time, and the vehicle may disappear when the driver exits, or after a short time. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a vehicle is destroyed - either by exploding or becoming submerged in water. + * The ID of the vehicle that was destroyed + * The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player + * + * + * This callback can also be called by NPC. + * This callback will also be called when a vehicle enters water, but the vehicle can be saved from destruction by teleportation or driving out (if only partially submerged). The callback won't be called a second time, and the vehicle may disappear when the driver exits, or after a short time. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnVehicleDeath(vehicleid, killerid); -/// Called when a player sends a chat message. -/// The ID of the player who typed the text -/// The text the player typed -/// -/// -/// -/// This callback can also be called by NPC. -/// -/// Returning 0 in this callback will stop the text from being sent to all players.
    -/// It is always called first in filterscripts so returning 0 there blocks other scripts from seeing it. -///
    +/** + * Called when a player sends a chat message. + * The ID of the player who typed the text + * The text the player typed + * + * + * + * This callback can also be called by NPC. + * + * Returning 0 in this callback will stop the text from being sent to all players.
    + * It is always called first in filterscripts so returning 0 there blocks other scripts from seeing it. + *
    + */ forward OnPlayerText(playerid, text[]); -/// This callback is called when a player enters a command into the client chat window. Commands are anything that start with a forward slash, e.g. /help. -/// The ID of the player that entered a command -/// The command that was entered (including the forward slash) -/// -/// -/// -/// This callback can also be called by NPC. -/// -/// Return 1 if the command was processed, otherwise 0; If the command was not found both in filterscripts and in gamemode, the player will be received a message: SERVER: Unknown command.
    -/// It is always called first in filterscripts so returning 1 there blocks other scripts from seeing it. -///
    +/** + * This callback is called when a player enters a command into the client chat window. Commands are anything that start with a forward slash, e.g. /help. + * The ID of the player that entered a command + * The command that was entered (including the forward slash) + * + * + * + * This callback can also be called by NPC. + * + * Return 1 if the command was processed, otherwise 0; If the command was not found both in filterscripts and in gamemode, the player will be received a message: SERVER: Unknown command.
    + * It is always called first in filterscripts so returning 1 there blocks other scripts from seeing it. + *
    + */ forward OnPlayerCommandText(playerid, cmdtext[]); -/// Called when a player changes class at class selection (and when class selection first appears). -/// The ID of the player that changed class -/// The ID of the current class being viewed (returned by AddPlayerClass) -/// -/// -/// This callback can also be called by NPC. -/// This callback is also called when a player presses F4. -/// -/// Returning 0 in this callback will prevent the player from spawning. The player can be forced to spawn when SpawnPlayer is used.
    -/// It is always called first in filterscripts. -///
    +/** + * Called when a player changes class at class selection (and when class selection first appears). + * The ID of the player that changed class + * The ID of the current class being viewed (returned by AddPlayerClass) + * + * + * This callback can also be called by NPC. + * This callback is also called when a player presses F4. + * + * Returning 0 in this callback will prevent the player from spawning. The player can be forced to spawn when SpawnPlayer is used.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerRequestClass(playerid, classid); -/// This callback is called when a player starts to enter a vehicle, meaning the player is not in vehicle yet at the time this callback is called. -/// ID of the player who attempts to enter a vehicle -/// ID of the vehicle the player is attempting to enter -/// 0 if entering as driver. 1 if entering as passenger -/// -/// -/// -/// -/// This callback is called when a player BEGINS to enter a vehicle, not when they HAVE entered it. See OnPlayerStateChange. -/// This callback is still called if the player is denied entry to the vehicle (e.g. it is locked or full). -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player starts to enter a vehicle, meaning the player is not in vehicle yet at the time this callback is called. + * ID of the player who attempts to enter a vehicle + * ID of the vehicle the player is attempting to enter + * 0 if entering as driver. 1 if entering as passenger + * + * + * + * + * This callback is called when a player BEGINS to enter a vehicle, not when they HAVE entered it. See OnPlayerStateChange. + * This callback is still called if the player is denied entry to the vehicle (e.g. it is locked or full). + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); -/// This callback is called when a player starts to exit a vehicle. -/// The ID of the player that is exiting a vehicle -/// The ID of the vehicle the player is exiting -/// -/// -/// -/// -/// Not called if the player falls off a bike or is removed from a vehicle by other means such as using SetPlayerPos. -/// You must use OnPlayerStateChange and check if their old state is PLAYER_STATE_DRIVER or PLAYER_STATE_PASSENGER and their new state is PLAYER_STATE_ONFOOT. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player starts to exit a vehicle. + * The ID of the player that is exiting a vehicle + * The ID of the vehicle the player is exiting + * + * + * + * + * Not called if the player falls off a bike or is removed from a vehicle by other means such as using SetPlayerPos. + * You must use OnPlayerStateChange and check if their old state is PLAYER_STATE_DRIVER or PLAYER_STATE_PASSENGER and their new state is PLAYER_STATE_ONFOOT. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerExitVehicle(playerid, vehicleid); -/// This callback is called when a player changes state. For example, when a player changes from being the driver of a vehicle to being on-foot. -/// The ID of the player that changed state -/// The player's new state -/// The player's previous state -/// -/// -/// -/// -/// This callback can also be called by NPC. -/// -/// States:
    -///
      -///
    • PLAYER_STATE_NONE - empty (while initializing)
    • -///
    • PLAYER_STATE_ONFOOT - player is on foot
    • -///
    • PLAYER_STATE_DRIVER - player is the driver of a vehicle
    • -///
    • PLAYER_STATE_PASSENGER - player is passenger of a vehicle
    • -///
    • PLAYER_STATE_WASTED - player is dead or on class selection
    • -///
    • PLAYER_STATE_SPAWNED - player is spawned
    • -///
    • PLAYER_STATE_SPECTATING - player is spectating
    • -///
    • PLAYER_STATE_EXIT_VEHICLE - player exits a vehicle
    • -///
    • PLAYER_STATE_ENTER_VEHICLE_DRIVER - player enters a vehicle as driver
    • -///
    • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger
    • -///
    -///
    -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player changes state. For example, when a player changes from being the driver of a vehicle to being on-foot. + * The ID of the player that changed state + * The player's new state + * The player's previous state + * + * + * + * + * This callback can also be called by NPC. + * + * States:
    + *
      + *
    • PLAYER_STATE_NONE - empty (while initializing)
    • + *
    • PLAYER_STATE_ONFOOT - player is on foot
    • + *
    • PLAYER_STATE_DRIVER - player is the driver of a vehicle
    • + *
    • PLAYER_STATE_PASSENGER - player is passenger of a vehicle
    • + *
    • PLAYER_STATE_WASTED - player is dead or on class selection
    • + *
    • PLAYER_STATE_SPAWNED - player is spawned
    • + *
    • PLAYER_STATE_SPECTATING - player is spectating
    • + *
    • PLAYER_STATE_EXIT_VEHICLE - player exits a vehicle
    • + *
    • PLAYER_STATE_ENTER_VEHICLE_DRIVER - player enters a vehicle as driver
    • + *
    • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger
    • + *
    + *
    + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    #if !defined PLAYER_STATE #define PLAYER_STATE: _: #endif forward OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate); -/// This callback is called when a player enters the checkpoint set for that player. -/// The player who entered the checkpoint -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This callback can also be called by NPC. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player enters the checkpoint set for that player. + * The player who entered the checkpoint + * + * + * + * + * + * + * + * + * + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerEnterCheckpoint(playerid); -/// This callback is called when a player leaves the checkpoint set for them by SetPlayerCheckpoint. Only one checkpoint can be set at a time. -/// The ID of the player that left their checkpoint -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This callback can also be called by NPC. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player leaves the checkpoint set for them by SetPlayerCheckpoint. Only one checkpoint can be set at a time. + * The ID of the player that left their checkpoint + * + * + * + * + * + * + * + * + * + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerLeaveCheckpoint(playerid); -/// This callback is called when a player enters a race checkpoint. -/// The ID of the player who entered the race checkpoint -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This callback can also be called by NPC. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player enters a race checkpoint. + * The ID of the player who entered the race checkpoint + * + * + * + * + * + * + * + * + * + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerEnterRaceCheckpoint(playerid); -/// This callback is called when a player leaves the race checkpoint. -/// The ID of the player that left the race checkpoint -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// This callback can also be called by NPC. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player leaves the race checkpoint. + * The ID of the player that left the race checkpoint + * + * + * + * + * + * + * + * + * + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerLeaveRaceCheckpoint(playerid); -/// This callback is called when a command is sent through the server console, remote RCON, or via the in-game "/rcon command". -/// A string containing the command that was typed, as well as any passed parameters -/// -/// -/// You will need to include this callback in a loaded filterscript for it to work in the gamemode! -/// "/rcon" is not included in "cmd" when a player types a command. -/// If you use the print function here, it will send a message to the player who typed the command in-game as well as the log. -/// This callback is not called when the player is not logged in as RCON admin. -/// When the player is not logged in as RCON admin and uses /rcon login, this callback will not be called and OnRconLoginAttempt is called instead. However, when the player is logged in as RCON admin, the use of this command will call this callback. -/// -/// 0 if the command was not processed, it will be passed to another script or 1 if the command was processed, will not be passed to other scripts.
    -/// It is always called first in filterscripts so returning 1 there blocks gamemode from seeing it. -///
    +/** + * This callback is called when a command is sent through the server console, remote RCON, or via the in-game "/rcon command". + * A string containing the command that was typed, as well as any passed parameters + * + * + * You will need to include this callback in a loaded filterscript for it to work in the gamemode! + * "/rcon" is not included in "cmd" when a player types a command. + * If you use the print function here, it will send a message to the player who typed the command in-game as well as the log. + * This callback is not called when the player is not logged in as RCON admin. + * When the player is not logged in as RCON admin and uses /rcon login, this callback will not be called and OnRconLoginAttempt is called instead. However, when the player is logged in as RCON admin, the use of this command will call this callback. + * + * 0 if the command was not processed, it will be passed to another script or 1 if the command was processed, will not be passed to other scripts.
    + * It is always called first in filterscripts so returning 1 there blocks gamemode from seeing it. + *
    + */ forward OnRconCommand(cmd[]); -/// Called when a player attempts to spawn via class selection either by pressing SHIFT or clicking the 'Spawn' button. -/// The ID of the player that requested to spawn -/// -/// -/// This callback can also be called by NPC. -/// To prevent players from spawning with certain classes, the last viewed class must be saved in a variable in OnPlayerRequestClass. -/// -/// Returning 0 in this callback will prevent the player from spawning.
    -/// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. -///
    +/** + * Called when a player attempts to spawn via class selection either by pressing SHIFT or clicking the 'Spawn' button. + * The ID of the player that requested to spawn + * + * + * This callback can also be called by NPC. + * To prevent players from spawning with certain classes, the last viewed class must be saved in a variable in OnPlayerRequestClass. + * + * Returning 0 in this callback will prevent the player from spawning.
    + * It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. + *
    + */ forward OnPlayerRequestSpawn(playerid); -/// This callback is called when an object is moved after MoveObject (when it stops moving). -/// The ID of the object that was moved -/// -/// -/// -/// -/// SetObjectPos does not work when used in this callback. To fix it, recreate the object. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when an object is moved after MoveObject (when it stops moving). + * The ID of the object that was moved + * + * + * + * + * SetObjectPos does not work when used in this callback. To fix it, recreate the object. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnObjectMoved(objectid); -/// This callback is called when a player object is moved after MovePlayerObject (when it stops moving). -/// The playerid the object is assigned to -/// The ID of the player object that was moved -/// -/// -/// -/// -/// This callback can also be called for NPC. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player object is moved after MovePlayerObject (when it stops moving). + * The playerid the object is assigned to + * The ID of the player object that was moved + * + * + * + * + * This callback can also be called for NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerObjectMoved(playerid, objectid); -/// Called when a player picks up a pickup created with CreatePickup. -/// The ID of the player that picked up the pickup -/// The ID of the pickup, returned by CreatePickup -/// -/// -/// -/// This callback does not handle returns.
    -/// It is always called first in gamemode. -///
    +/** + * Called when a player picks up a pickup created with CreatePickup. + * The ID of the player that picked up the pickup + * The ID of the pickup, returned by CreatePickup + * + * + * + * This callback does not handle returns.
    + * It is always called first in gamemode. + *
    + */ forward OnPlayerPickUpPickup(playerid, pickupid); -/// This callback is called when a vehicle is modded. -/// The ID of the driver of the vehicle -/// The ID of the vehicle which is modded -/// The ID of the component which was added to the vehicle -/// -/// -/// -/// -/// This callback is NOT called by AddVehicleComponent. -/// -/// Return 0 to desync the mod (or an invalid mod) from propagating and / or crashing players.
    -/// It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. -///
    +/** + * This callback is called when a vehicle is modded. + * The ID of the driver of the vehicle + * The ID of the vehicle which is modded + * The ID of the component which was added to the vehicle + * + * + * + * + * This callback is NOT called by AddVehicleComponent. + * + * Return 0 to desync the mod (or an invalid mod) from propagating and / or crashing players.
    + * It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. + *
    + */ forward OnVehicleMod(playerid, vehicleid, componentid); -/// This callback is called when a player enters or exits a mod shop. -/// The ID of the player that entered or exited the modshop -/// 1 if the player entered or 0 if they exited -/// The interior ID of the modshop that the player is entering (or 0 if exiting) -/// -/// -/// -/// -/// This callback was added in SA-MP 0.3a and will not work in earlier versions! -/// Players collide when they get into the same mod shop. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player enters or exits a mod shop. + * The ID of the player that entered or exited the modshop + * 1 if the player entered or 0 if they exited + * The interior ID of the modshop that the player is entering (or 0 if exiting) + * + * + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * Players collide when they get into the same mod shop. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnEnterExitModShop(playerid, enterexit, interiorid); -/// Called when a player previews a vehicle paintjob inside a mod shop. Watch out, this callback is not called when the player buys the paintjob. -/// The ID of the player that changed the paintjob of their vehicle -/// The ID of the vehicle that had its paintjob changed -/// The ID of the new paintjob -/// -/// -/// -/// -/// This callback is not called by ChangeVehiclePaintjob. -/// -/// This callback does not handle returns. Returning 0 won't deny the paintjob change.
    -/// It is always called first in gamemode so returning 0 there blocks other filterscripts from seeing it. -///
    +/** + * Called when a player previews a vehicle paintjob inside a mod shop. Watch out, this callback is not called when the player buys the paintjob. + * The ID of the player that changed the paintjob of their vehicle + * The ID of the vehicle that had its paintjob changed + * The ID of the new paintjob + * + * + * + * + * This callback is not called by ChangeVehiclePaintjob. + * + * This callback does not handle returns. Returning 0 won't deny the paintjob change.
    + * It is always called first in gamemode so returning 0 there blocks other filterscripts from seeing it. + *
    + */ forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); -/// This callback is called when a player exits a mod shop, even if the colors weren't changed. Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. -/// The ID of the player that is driving the vehicle -/// The ID of the vehicle that was resprayed -/// The color that the vehicle's primary color was changed to -/// The color that the vehicle's secondary color was changed to -/// -/// -/// -/// -/// -/// Previewing a component inside a mod shop might call this callback. -/// This callback is not called by ChangeVehicleColor. -/// -/// Returning 0 in this callback will deny the colour change. Returning 1 will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.
    -/// It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. -///
    +/** + * This callback is called when a player exits a mod shop, even if the colors weren't changed. Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. + * The ID of the player that is driving the vehicle + * The ID of the vehicle that was resprayed + * The color that the vehicle's primary color was changed to + * The color that the vehicle's secondary color was changed to + * + * + * + * + * + * Previewing a component inside a mod shop might call this callback. + * This callback is not called by ChangeVehicleColor. + * + * Returning 0 in this callback will deny the colour change. Returning 1 will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.
    + * It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. + *
    + */ forward OnVehicleRespray(playerid, vehicleid, color1, color2); -/// This callback is called when a vehicle element such as doors, tires, panels, or lights change their damage status. -/// The ID of the vehicle that was changed its damage status -/// The ID of the player who synced the change in the damage status (who had the car damaged or repaired) -/// -/// -/// This callback was added in SA-MP 0.3a and will not work in earlier versions! -/// This does not include vehicle health changes -/// -/// 1 - Will prevent other filterscripts from receiving this callback.
    -/// 0 - Indicates that this callback will be passed to the next filterscript.
    -/// It is always called first in filterscripts.
    -///
    +/** + * This callback is called when a vehicle element such as doors, tires, panels, or lights change their damage status. + * The ID of the vehicle that was changed its damage status + * The ID of the player who synced the change in the damage status (who had the car damaged or repaired) + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * This does not include vehicle health changes + * + * 1 - Will prevent other filterscripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts.
    + *
    + */ forward OnVehicleDamageStatusUpdate(vehicleid, playerid); -/// This callback is called when a player's client updates/syncs the position of a vehicle they're not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle that has no driver. -/// The ID of the vehicle that's position was updated -/// The ID of the player that sent a vehicle position sync update -/// The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats -/// The new X coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new Y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new Z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version -/// The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version -/// -/// This callback was added in SA-MP 0.3c R3 and will not work in earlier versions! -/// This callback is called very frequently per second per unoccupied vehicle. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. -/// GetVehiclePos will return the old coordinates of the vehicle before this update. -/// -/// Returning 0 in this callback will stop the vehicle's position being synced to other players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.
    -/// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. -///
    +/** + * This callback is called when a player's client updates/syncs the position of a vehicle they're not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle that has no driver. + * The ID of the vehicle that's position was updated + * The ID of the player that sent a vehicle position sync update + * The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats + * The new X coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version + * The new Y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version + * The new Z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version + * The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version + * The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version + * The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version + * + * This callback was added in SA-MP 0.3c R3 and will not work in earlier versions! + * This callback is called very frequently per second per unoccupied vehicle. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. + * GetVehiclePos will return the old coordinates of the vehicle before this update. + * + * Returning 0 in this callback will stop the vehicle's position being synced to other players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.
    + * It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. + *
    + */ forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); -/// This callback is called when a player selects an item from a menu (ShowMenuForPlayer). -/// The ID of the player that selected a menu item -/// The ID of the row that was selected. The first row is ID 0 -/// -/// -/// -/// -/// -/// -/// -/// The menu ID is not passed to this callback. GetPlayerMenu must be used to determine which menu the player selected an item on. -/// -/// This callback does not handle returns.
    -/// It is always called first in gamemode. -///
    +/** + * This callback is called when a player selects an item from a menu (ShowMenuForPlayer). + * The ID of the player that selected a menu item + * The ID of the row that was selected. The first row is ID 0 + * + * + * + * + * + * + * + * The menu ID is not passed to this callback. GetPlayerMenu must be used to determine which menu the player selected an item on. + * + * This callback does not handle returns.
    + * It is always called first in gamemode. + *
    + */ forward OnPlayerSelectedMenuRow(playerid, row); -/// Called when a player exits a menu. -/// The ID of the player that exited the menu -/// -/// -/// -/// -/// This callback does not handle returns.
    -/// It is always called first in gamemode. -///
    +/** + * Called when a player exits a menu. + * The ID of the player that exited the menu + * + * + * + * + * This callback does not handle returns.
    + * It is always called first in gamemode. + *
    + */ forward OnPlayerExitedMenu(playerid); -/// Called when a player changes interior. Can be triggered by SetPlayerInterior or when a player enter/exits a building. -/// The playerid who changed interior -/// The interior the player is now in -/// The interior the player was in before -/// -/// -/// -/// -/// -/// This callback does not handle returns.
    -/// It is always called first in gamemode. -///
    +/** + * Called when a player changes interior. Can be triggered by SetPlayerInterior or when a player enter/exits a building. + * The playerid who changed interior + * The interior the player is now in + * The interior the player was in before + * + * + * + * + * + * This callback does not handle returns.
    + * It is always called first in gamemode. + *
    + */ forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); -/// This callback is called when the state of any supported key is changed (pressed/released). Directional keys do not trigger OnPlayerKeyStateChange (up/down/left/right). -/// The ID of the player that pressed or released a key -/// A map (bitmask) of the keys currently held - see here -/// A map (bitmask) of the keys held prior to the current change - see here -/// -/// This callback can also be called by NPC. -/// -/// Useful macros:
    -/// -/// // HOLDING(keys)
    -/// #define HOLDING(%0) ((newkeys & (%0)) == (%0))
    -///
    -/// // PRESSED(keys)
    -/// #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
    -///
    -/// // PRESSING(keyVariable, keys)
    -/// #define PRESSING(%0,%1) (%0 & (%1))
    -///
    -/// // RELEASED(keys)
    -/// #define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
    -///
    -///
    -/// -/// This callback does not handle returns.
    -/// It is always called first in gamemode. -///
    +/** + * This callback is called when the state of any supported key is changed (pressed/released). Directional keys do not trigger OnPlayerKeyStateChange (up/down/left/right). + * The ID of the player that pressed or released a key + * A map (bitmask) of the keys currently held - see here + * A map (bitmask) of the keys held prior to the current change - see here + * + * This callback can also be called by NPC. + * + * Useful macros:
    + * + * // HOLDING(keys)
    + * #define HOLDING(%0) ((newkeys & (%0)) == (%0))
    + *
    + * // PRESSED(keys)
    + * #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
    + *
    + * // PRESSING(keyVariable, keys)
    + * #define PRESSING(%0,%1) (%0 & (%1))
    + *
    + * // RELEASED(keys)
    + * #define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
    + *
    + *
    + * + * This callback does not handle returns.
    + * It is always called first in gamemode. + *
    + */ forward OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys); -/// This callback is called when someone attempts to log in to RCON in-game; successful or not. -/// The IP of the player that tried to log in to RCON -/// The password used to login with -/// 0 if the password was incorrect or 1 if it was correct -/// -/// -/// -/// This callback was added in SA-MP 0.3a and will not work in earlier versions! -/// This callback is only called when /rcon login is used in-game. -/// This callback is only called when the player is not yet logged in. When the player is logged in, OnRconCommand is called instead. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when someone attempts to log in to RCON in-game; successful or not. + * The IP of the player that tried to log in to RCON + * The password used to login with + * 0 if the password was incorrect or 1 if it was correct + * + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * This callback is only called when /rcon login is used in-game. + * This callback is only called when the player is not yet logged in. When the player is logged in, OnRconCommand is called instead. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnRconLoginAttempt(ip[], password[], success); -/// This callback is called every time a client/player updates the server with their status. It is often used to create custom callbacks for client updates that aren't actively tracked by the server, such as health or armor updates or players switching weapons. -/// ID of the player sending an update packet -/// This callback can also be called by NPC. -/// This callback is called, on average, 30 times per second, per player; only use it when you know what it's meant for (or more importantly what it's NOT meant for). -/// The frequency with which this callback is called for each player varies, depending on what the player is doing. Driving or shooting will trigger a lot more updates than idling. -/// -/// 0 - Update from this player will not be replicated to other clients.
    -/// 1 - Indicates that this update can be processed normally and sent to other players.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called every time a client/player updates the server with their status. It is often used to create custom callbacks for client updates that aren't actively tracked by the server, such as health or armor updates or players switching weapons. + * ID of the player sending an update packet + * This callback can also be called by NPC. + * This callback is called, on average, 30 times per second, per player; only use it when you know what it's meant for (or more importantly what it's NOT meant for). + * The frequency with which this callback is called for each player varies, depending on what the player is doing. Driving or shooting will trigger a lot more updates than idling. + * + * 0 - Update from this player will not be replicated to other clients.
    + * 1 - Indicates that this update can be processed normally and sent to other players.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerUpdate(playerid); -/// This callback is called when a player is streamed by some other player's client. -/// The ID of the player who has been streamed -/// The ID of the player that streamed the other player in -/// -/// -/// -/// This callback was added in SA-MP 0.3a and will not work in earlier versions! -/// This callback can also be called by NPC. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player is streamed by some other player's client. + * The ID of the player who has been streamed + * The ID of the player that streamed the other player in + * + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerStreamIn(playerid, forplayerid); -/// This callback is called when a player is streamed out from some other player's client. -/// The player who has been destreamed -/// The player who has destreamed the other player -/// -/// -/// -/// This callback was added in SA-MP 0.3a and will not work in earlier versions! -/// This callback can also be called by NPC. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player is streamed out from some other player's client. + * The player who has been destreamed + * The player who has destreamed the other player + * + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnPlayerStreamOut(playerid, forplayerid); -/// Called when a vehicle is streamed to a player's client. -/// The ID of the vehicle that streamed in for the player -/// The ID of the player who the vehicle streamed in for -/// -/// -/// -/// This callback was added in SA-MP 0.3a and will not work in earlier versions! -/// This callback can also be called by NPC. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * Called when a vehicle is streamed to a player's client. + * The ID of the vehicle that streamed in for the player + * The ID of the player who the vehicle streamed in for + * + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnVehicleStreamIn(vehicleid, forplayerid); -/// This callback is called when a vehicle is streamed out for a player's client (it's so far away that they can't see it). -/// The ID of the vehicle that streamed out -/// The ID of the player who is no longer streaming the vehicle -/// -/// -/// -/// This callback was added in SA-MP 0.3a and will not work in earlier versions! -/// This callback can also be called by NPC. -/// -/// This callback does not handle returns.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a vehicle is streamed out for a player's client (it's so far away that they can't see it). + * The ID of the vehicle that streamed out + * The ID of the player who is no longer streaming the vehicle + * + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ forward OnVehicleStreamOut(vehicleid, forplayerid); -/// This callback is called when an actor is streamed in by a player's client. -/// The ID of the actor that has been streamed in for the player -/// The ID of the player that streamed the actor in -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// This callback can also be called by NPC. -/// It is always called first in filterscripts. -/// This callback does not handle returns. +/** + * This callback is called when an actor is streamed in by a player's client. + * The ID of the actor that has been streamed in for the player + * The ID of the player that streamed the actor in + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * This callback can also be called by NPC. + * It is always called first in filterscripts. + * This callback does not handle returns. + */ forward OnActorStreamIn(actorid, forplayerid); -/// This callback is called when an actor is streamed out by a player's client. -/// The ID of the actor that has been streamed out for the player -/// The ID of the player that streamed the actor out -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// This callback can also be called by NPC. -/// It is always called first in filterscripts. -/// This callback does not handle returns. +/** + * This callback is called when an actor is streamed out by a player's client. + * The ID of the actor that has been streamed out for the player + * The ID of the player that streamed the actor out + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * This callback can also be called by NPC. + * It is always called first in filterscripts. + * This callback does not handle returns. + */ forward OnActorStreamOut(actorid, forplayerid); -/// This callback is called when a player responds to a dialog shown using ShowPlayerDialog by either clicking a button, pressing ENTER/ESC or double-clicking a list item (if using a list style dialog). -/// The ID of the player that responded to the dialog -/// The ID of the dialog the player responded to, assigned in ShowPlayerDialog -/// 1 for left button and 0 for right button (if only one button shown, always 1) -/// The ID of the list item selected by the player (starts at 0) (only if using a list style dialog) -/// The text entered into the input box by the player or the selected list item text -/// -/// This callback was added in SA-MP 0.3a and will not work in earlier versions! -/// A player's dialog doesn't hide when the gamemode restarts, causing the server to print "Warning: PlayerDialogResponse PlayerId: 0 dialog ID doesn't match last sent dialog ID" if a player responded to this dialog after restart. -/// Parameters can contain different values, based on dialog's style. -/// -/// Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.
    -/// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. -///
    +/** + * This callback is called when a player responds to a dialog shown using ShowPlayerDialog by either clicking a button, pressing ENTER/ESC or double-clicking a list item (if using a list style dialog). + * The ID of the player that responded to the dialog + * The ID of the dialog the player responded to, assigned in ShowPlayerDialog + * 1 for left button and 0 for right button (if only one button shown, always 1) + * The ID of the list item selected by the player (starts at 0) (only if using a list style dialog) + * The text entered into the input box by the player or the selected list item text + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * A player's dialog doesn't hide when the gamemode restarts, causing the server to print "Warning: PlayerDialogResponse PlayerId: 0 dialog ID doesn't match last sent dialog ID" if a player responded to this dialog after restart. + * Parameters can contain different values, based on dialog's style. + * + * Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.
    + * It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. + *
    + */ forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]); -/// This callback is called when a player takes damage. -/// The ID of the player that took damage -/// The ID of the player that caused the damage. INVALID_PLAYER_ID if self-inflicted -/// The amount of damage the player took (health and armour combined) -/// The ID of the weapon/reason for the damage -/// The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) -/// -/// -/// This callback was added in SA-MP 0.3d and will not work in earlier versions! -/// GetPlayerHealth and GetPlayerArmour will return the old amounts of the player before this callback. -/// -/// The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18).
    -/// The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    -/// playerid is the only one who can call the callback.
    -/// The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. -///
    -/// -/// 1 - Callback will not be called in other filterscripts.
    -/// 0 - Allows this callback to be called in other filterscripts.
    -/// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. -///
    +/** + * This callback is called when a player takes damage. + * The ID of the player that took damage + * The ID of the player that caused the damage. INVALID_PLAYER_ID if self-inflicted + * The amount of damage the player took (health and armour combined) + * The ID of the weapon/reason for the damage + * The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) + * + * + * This callback was added in SA-MP 0.3d and will not work in earlier versions! + * GetPlayerHealth and GetPlayerArmour will return the old amounts of the player before this callback. + * + * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18).
    + * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    + * playerid is the only one who can call the callback.
    + * The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. + *
    + * + * 1 - Callback will not be called in other filterscripts.
    + * 0 - Allows this callback to be called in other filterscripts.
    + * It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. + *
    + */ forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart); -/// This callback is called when a player gives damage to another player. -/// The ID of the player that gave damage -/// The ID of the player that received damage -/// The amount of health/armour damagedid has lost (combined) -/// The reason that caused the damage -/// The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) -/// -/// This callback was added in SA-MP 0.3d and will not work in earlier versions! -/// -/// Keep in mind this function can be inaccurate in some cases.
    -/// If you want to prevent certain players from damaging eachother, use SetPlayerTeam.
    -/// The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    -/// The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    -/// playerid is the only one who can call the callback.
    -/// The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. -///
    -/// -/// 1 - Callback will not be called in other filterscripts.
    -/// 0 - Allows this callback to be called in other filterscripts.
    -/// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. -///
    +/** + * This callback is called when a player gives damage to another player. + * The ID of the player that gave damage + * The ID of the player that received damage + * The amount of health/armour damagedid has lost (combined) + * The reason that caused the damage + * The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) + * + * This callback was added in SA-MP 0.3d and will not work in earlier versions! + * + * Keep in mind this function can be inaccurate in some cases.
    + * If you want to prevent certain players from damaging eachother, use SetPlayerTeam.
    + * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    + * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    + * playerid is the only one who can call the callback.
    + * The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. + *
    + * + * 1 - Callback will not be called in other filterscripts.
    + * 0 - Allows this callback to be called in other filterscripts.
    + * It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. + *
    + */ forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart); -/// This callback is called when a player gives damage to an actor. -/// The ID of the player that gave damage -/// The ID of the actor that received damage -/// The amount of health/armour damaged_actorid has lost -/// The reason that caused the damage -/// The body part that was hit -/// -/// -/// -/// -/// -/// -/// -/// -/// This callback was added in SA-MP 0.3.7 and will not work in earlier versions! -/// This function does not get called if the actor is set invulnerable (WHICH IS BY DEFAULT). See SetActorInvulnerable. -/// -/// 1 - Callback will not be called in other filterscripts.
    -/// 0 - Allows this callback to be called in other filterscripts.
    -/// It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. -///
    +/** + * This callback is called when a player gives damage to an actor. + * The ID of the player that gave damage + * The ID of the actor that received damage + * The amount of health/armour damaged_actorid has lost + * The reason that caused the damage + * The body part that was hit + * + * + * + * + * + * + * + * + * This callback was added in SA-MP 0.3.7 and will not work in earlier versions! + * This function does not get called if the actor is set invulnerable (WHICH IS BY DEFAULT). See SetActorInvulnerable. + * + * 1 - Callback will not be called in other filterscripts.
    + * 0 - Allows this callback to be called in other filterscripts.
    + * It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. + *
    + */ forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart); -/// OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map (by right-clicking). -/// The ID of the player that placed a target/waypoint -/// The X float coordinate where the player clicked -/// The Y float coordinate where the player clicked -/// The Z float coordinate where the player clicked (inaccurate - see note below) -/// -/// -/// -/// This callback was added in SA-MP 0.3d and will not work in earlier versions! -/// The Z value returned will be 0 (invalid) if it is far away from the player; use the MapAndreas plugin to get a more accurate Z coordinate. -/// -/// 1 - Will prevent other filterscripts from receiving this callback.
    -/// 0 - Indicates that this callback will be passed to the next filterscript.
    -/// It is always called first in gamemode. -///
    +/** + * OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map (by right-clicking). + * The ID of the player that placed a target/waypoint + * The X float coordinate where the player clicked + * The Y float coordinate where the player clicked + * The Z float coordinate where the player clicked (inaccurate - see note below) + * + * + * + * This callback was added in SA-MP 0.3d and will not work in earlier versions! + * The Z value returned will be 0 (invalid) if it is far away from the player; use the MapAndreas plugin to get a more accurate Z coordinate. + * + * 1 - Will prevent other filterscripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in gamemode. + *
    + */ forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); -/// This callback is called when a player clicks on a textdraw or cancels the select mode with the Escape key. -/// The ID of the player that clicked on the textdraw -/// The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection was cancelled -/// -/// -/// This callback was added in SA-MP 0.3e and will not work in earlier versions! -/// The clickable area is defined by TextDrawTextSize. The x and y parameters passed to that function must not be zero or negative. -/// Do not use CancelSelectTextDraw unconditionally within this callback. This results in an infinite loop. -/// -/// Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
    -/// It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. -///
    +/** + * This callback is called when a player clicks on a textdraw or cancels the select mode with the Escape key. + * The ID of the player that clicked on the textdraw + * The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection was cancelled + * + * + * This callback was added in SA-MP 0.3e and will not work in earlier versions! + * The clickable area is defined by TextDrawTextSize. The x and y parameters passed to that function must not be zero or negative. + * Do not use CancelSelectTextDraw unconditionally within this callback. This results in an infinite loop. + * + * Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
    + * It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. + *
    + */ forward OnPlayerClickTextDraw(playerid, Text:clickedid); -/// This callback is called when a player clicks on a player-textdraw. It is not called when player cancels the select mode (ESC) - however, OnPlayerClickTextDraw is. -/// The ID of the player that selected a textdraw -/// The ID of the player-textdraw that the player selected -/// -/// -/// -/// This callback was added in SA-MP 0.3e and will not work in earlier versions! -/// When a player presses ESC to cancel selecting a textdraw, OnPlayerClickTextDraw is called with a textdraw ID of INVALID_TEXT_DRAW. OnPlayerClickPlayerTextDraw won't be called also. -/// -/// Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
    -/// It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. -///
    +/** + * This callback is called when a player clicks on a player-textdraw. It is not called when player cancels the select mode (ESC) - however, OnPlayerClickTextDraw is. + * The ID of the player that selected a textdraw + * The ID of the player-textdraw that the player selected + * + * + * + * This callback was added in SA-MP 0.3e and will not work in earlier versions! + * When a player presses ESC to cancel selecting a textdraw, OnPlayerClickTextDraw is called with a textdraw ID of INVALID_TEXT_DRAW. OnPlayerClickPlayerTextDraw won't be called also. + * + * Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
    + * It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. + *
    + */ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); -/// This callback is called when an IP address attempts a connection to the server. To block incoming connections, use BlockIpAddress. -/// The ID of the player attempting to connect -/// The IP address of the player attempting to connect -/// The port of the attempted connection -/// -/// -/// -/// -/// -/// This callback was added in SA-MP 0.3z R2-2 and will not work in earlier versions! -/// -/// 1 - Will prevent other filterscripts from receiving this callback.
    -/// 0 - Indicates that this callback will be passed to the next filterscript.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when an IP address attempts a connection to the server. To block incoming connections, use BlockIpAddress. + * The ID of the player attempting to connect + * The IP address of the player attempting to connect + * The port of the attempted connection + * + * + * + * + * + * This callback was added in SA-MP 0.3z R2-2 and will not work in earlier versions! + * + * 1 - Will prevent other filterscripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts. + *
    + */ forward OnIncomingConnection(playerid, ip_address[], port); -/// This callback is called when a player sent a trailer update. -/// The ID of the player who sent a trailer update -/// The Trailer being updated -/// -/// -/// -/// -/// -/// This callback was added in SA-MP 0.3z R4 and will not work in earlier versions! -/// This callback is called very frequently per second per trailer. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. -/// -/// 0 - Cancels any trailer updates from being sent to other players. Update is still sent to the updating player.
    -/// 1 - Processes the trailer update as normal and synchronizes it between all players.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player sent a trailer update. + * The ID of the player who sent a trailer update + * The Trailer being updated + * + * + * + * + * + * This callback was added in SA-MP 0.3z R4 and will not work in earlier versions! + * This callback is called very frequently per second per trailer. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. + * + * 0 - Cancels any trailer updates from being sent to other players. Update is still sent to the updating player.
    + * 1 - Processes the trailer update as normal and synchronizes it between all players.
    + * It is always called first in filterscripts. + *
    + */ forward OnTrailerUpdate(playerid, vehicleid); -/// This callback is called when a vehicle's siren is toggled. -/// The ID of the player that toggled the siren (driver) -/// The ID of the vehicle of which the siren was toggled for -/// 0 if siren was turned off, 1 if siren was turned on -/// -/// This callback was added in SA-MP 0.3.7 and will not work in earlier versions! -/// This callback can also be called by NPC. -/// This callback is only called when a vehicle's siren is toggled on or off, NOT when the alternate siren is in use (holding horn). -/// -/// 1 - Will prevent gamemode from receiving this callback.
    -/// 0 - Indicates that this callback will be passed to the gamemode.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a vehicle's siren is toggled. + * The ID of the player that toggled the siren (driver) + * The ID of the vehicle of which the siren was toggled for + * 0 if siren was turned off, 1 if siren was turned on + * + * This callback was added in SA-MP 0.3.7 and will not work in earlier versions! + * This callback can also be called by NPC. + * This callback is only called when a vehicle's siren is toggled on or off, NOT when the alternate siren is in use (holding horn). + * + * 1 - Will prevent gamemode from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the gamemode.
    + * It is always called first in filterscripts. + *
    + */ forward OnVehicleSirenStateChange(playerid, vehicleid, newstate); -/// This callback is called when a player finishes downloading custom models. For more information on how to add custom models to your server, see the release thread and this tutorial. -/// The ID of the player that finished downloading custom models -/// The ID of the virtual world the player finished downloading custom models for -/// -/// -/// -/// This callback was added in SA-MP 0.3DL and will not work in earlier versions! -/// This callback is called every time a player changes virtual worlds, even if there are no custom models present in that world. -/// This callback does not handle returns. +/** + * This callback is called when a player finishes downloading custom models. For more information on how to add custom models to your server, see the release thread and this tutorial. + * The ID of the player that finished downloading custom models + * The ID of the virtual world the player finished downloading custom models for + * + * + * + * This callback was added in SA-MP 0.3DL and will not work in earlier versions! + * This callback is called every time a player changes virtual worlds, even if there are no custom models present in that world. + * This callback does not handle returns. + */ forward OnPlayerFinishedDownloading(playerid, virtualworld); forward OnPlayerRequestDownload(playerid, type, crc); -/// Called when a player double-clicks on a player on the scoreboard. -/// The ID of the player that clicked on a player on the scoreboard -/// The ID of the player that was clicked on -/// The source of the player's click -/// -/// This callback was added in SA-MP 0.3a and will not work in earlier versions! -/// There is currently only one (0 - CLICK_SOURCE_SCOREBOARD). The existence of this argument suggests that more sources may be supported in the future. -/// -/// 1 - Will prevent other filterscripts from receiving this callback.
    -/// 0 - Indicates that this callback will be passed to the next filterscript.
    -/// It is always called first in filterscripts. -///
    +/** + * Called when a player double-clicks on a player on the scoreboard. + * The ID of the player that clicked on a player on the scoreboard + * The ID of the player that was clicked on + * The source of the player's click + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * There is currently only one (0 - CLICK_SOURCE_SCOREBOARD). The existence of this argument suggests that more sources may be supported in the future. + * + * 1 - Will prevent other filterscripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts. + *
    #if !defined CLICK_SOURCE #define CLICK_SOURCE: _: #endif forward OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source); -/// This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). -/// The ID of the player that edited an object -/// 0 if it is a global object or 1 if it is a playerobject -/// The ID of the edited object -/// The type of response -/// The X offset for the object that was edited -/// The Y offset for the object that was edited -/// The Z offset for the object that was edited -/// The X rotation for the object that was edited -/// The Y rotation for the object that was edited -/// The Z rotation for the object that was edited -/// -/// -/// -/// -/// This callback was added in SA-MP 0.3e and will not work in earlier versions! -/// When using EDIT_RESPONSE_UPDATE be aware that this callback will not be called when releasing an edit in progress resulting in the last update of EDIT_RESPONSE_UPDATE being out of sync of the objects current position. -/// -/// 1 - Will prevent other scripts from receiving this callback.
    -/// 0 - Indicates that this callback will be passed to the next script.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). + * The ID of the player that edited an object + * 0 if it is a global object or 1 if it is a playerobject + * The ID of the edited object + * The type of response + * The X offset for the object that was edited + * The Y offset for the object that was edited + * The Z offset for the object that was edited + * The X rotation for the object that was edited + * The Y rotation for the object that was edited + * The Z rotation for the object that was edited + * + * + * + * + * This callback was added in SA-MP 0.3e and will not work in earlier versions! + * When using EDIT_RESPONSE_UPDATE be aware that this callback will not be called when releasing an edit in progress resulting in the last update of EDIT_RESPONSE_UPDATE being out of sync of the objects current position. + * + * 1 - Will prevent other scripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next script.
    + * It is always called first in filterscripts. + *
    #if !defined EDIT_RESPONSE #define EDIT_RESPONSE: _: #endif forward OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); -/// This callback is called when a player ends attached object edition mode. -/// The ID of the player that ended edition mode -/// 0 if they cancelled (ESC) or 1 if they clicked the save icon -/// The index of the attached object -/// The model of the attached object that was edited -/// The bone of the attached object that was edited -/// The X offset for the attached object that was edited -/// The Y offset for the attached object that was edited -/// The Z offset for the attached object that was edited -/// The X rotation for the attached object that was edited -/// The Y rotation for the attached object that was edited -/// The Z rotation for the attached object that was edited -/// The X scale for the attached object that was edited -/// The Y scale for the attached object that was edited -/// The Z scale for the attached object that was edited -/// -/// -/// This callback was added in SA-MP 0.3e and will not work in earlier versions! -/// Editions should be discarded if response was 0 (cancelled). This must be done by storing the offsets etc. in an array BEFORE using EditAttachedObject. -/// -/// 1 - Will prevent other scripts from receiving this callback.
    -/// 0 - Indicates that this callback will be passed to the next script.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player ends attached object edition mode. + * The ID of the player that ended edition mode + * 0 if they cancelled (ESC) or 1 if they clicked the save icon + * The index of the attached object + * The model of the attached object that was edited + * The bone of the attached object that was edited + * The X offset for the attached object that was edited + * The Y offset for the attached object that was edited + * The Z offset for the attached object that was edited + * The X rotation for the attached object that was edited + * The Y rotation for the attached object that was edited + * The Z rotation for the attached object that was edited + * The X scale for the attached object that was edited + * The Y scale for the attached object that was edited + * The Z scale for the attached object that was edited + * + * + * This callback was added in SA-MP 0.3e and will not work in earlier versions! + * Editions should be discarded if response was 0 (cancelled). This must be done by storing the offsets etc. in an array BEFORE using EditAttachedObject. + * + * 1 - Will prevent other scripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next script.
    + * It is always called first in filterscripts. + *
    #if !defined EDIT_RESPONSE #define EDIT_RESPONSE: _: #endif forward OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); -/// This callback is called when a player selects an object after SelectObject has been used. -/// The ID of the player that selected an object -/// The type of selection -/// The ID of the selected object -/// The model ID of the selected object -/// The X position of the selected object -/// The Y position of the selected object -/// The Z position of the selected object -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// -/// 1 - Will prevent other scripts from receiving this callback.
    -/// 0 - Indicates that this callback will be passed to the next script.
    -/// It is always called first in filterscripts. -///
    +/** + * This callback is called when a player selects an object after SelectObject has been used. + * The ID of the player that selected an object + * The type of selection + * The ID of the selected object + * The model ID of the selected object + * The X position of the selected object + * The Y position of the selected object + * The Z position of the selected object + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * + * 1 - Will prevent other scripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next script.
    + * It is always called first in filterscripts. + *
    #if !defined SELECT_OBJECT #define SELECT_OBJECT: _: #endif forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Float:fX, Float:fY, Float:fZ); -/// This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). -/// The ID of the player that shot a weapon -/// The ID of the weapon shot by the player -/// The type of thing the shot hit (none, player, vehicle, or (player)object) -/// The ID of the player, vehicle or object that was hit -/// The X coordinate that the shot hit -/// The Y coordinate that the shot hit -/// The Z coordinate that the shot hit -/// -/// -/// This callback was added in SA-MP 0.3z and will not work in earlier versions! -/// -///
  • BULLET_HIT_TYPE_NONE(0)
  • -///
  • BULLET_HIT_TYPE_PLAYER(1)
  • -///
  • BULLET_HIT_TYPE_VEHICLE(2)
  • -///
  • BULLET_HIT_TYPE_OBJECT(3)
  • -///
  • BULLET_HIT_TYPE_PLAYER_OBJECT(4)
  • -///
    -/// BULLET_HIT_TYPE_PLAYER is also called for NPCs. Actors are ignored by this callback and detects as BULLET_HIT_TYPE_NONE. -/// This callback is only called when lag compensation is enabled. -/// -/// If hittype is:
    -///
      -///
    • - BULLET_HIT_TYPE_NONE: the fX, fY and fZ parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
    • -///
    • - Others: the fX, fY and fZ are offsets relative to the hitid.
    • -///
    -///
    -/// -/// Isn't called if you fired in vehicle as driver or if you are looking behind with the aim enabled (shooting in air).
    -/// It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitid (the hit player's vehicleid) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER at all.
    -/// Partially fixed in SA-MP 0.3.7: If fake weapon data is sent by a malicious user, other player clients may freeze or crash. To combat this, check if the reported weaponid can actually fire bullets. -///
    -/// -/// -/// GetPlayerLastShotVectors can be used in this callback for more detailed bullet vector information. -/// -/// 0 - Prevent the bullet from causing damage.
    -/// 1 - Allow the bullet to cause damage.
    -/// It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. -///
    +/** + * This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). + * The ID of the player that shot a weapon + * The ID of the weapon shot by the player + * The type of thing the shot hit (none, player, vehicle, or (player)object) + * The ID of the player, vehicle or object that was hit + * The X coordinate that the shot hit + * The Y coordinate that the shot hit + * The Z coordinate that the shot hit + * + * + * This callback was added in SA-MP 0.3z and will not work in earlier versions! + * + *
  • BULLET_HIT_TYPE_NONE(0)
  • + *
  • BULLET_HIT_TYPE_PLAYER(1)
  • + *
  • BULLET_HIT_TYPE_VEHICLE(2)
  • + *
  • BULLET_HIT_TYPE_OBJECT(3)
  • + *
  • BULLET_HIT_TYPE_PLAYER_OBJECT(4)
  • + *
    + * BULLET_HIT_TYPE_PLAYER is also called for NPCs. Actors are ignored by this callback and detects as BULLET_HIT_TYPE_NONE. + * This callback is only called when lag compensation is enabled. + * + * If hittype is:
    + *
      + *
    • - BULLET_HIT_TYPE_NONE: the fX, fY and fZ parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
    • + *
    • - Others: the fX, fY and fZ are offsets relative to the hitid.
    • + *
    + *
    + * + * Isn't called if you fired in vehicle as driver or if you are looking behind with the aim enabled (shooting in air).
    + * It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitid (the hit player's vehicleid) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER at all.
    + * Partially fixed in SA-MP 0.3.7: If fake weapon data is sent by a malicious user, other player clients may freeze or crash. To combat this, check if the reported weaponid can actually fire bullets. + *
    + * + * + * GetPlayerLastShotVectors can be used in this callback for more detailed bullet vector information. + * + * 0 - Prevent the bullet from causing damage.
    + * 1 - Allow the bullet to cause damage.
    + * It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. + *
    #if !defined BULLET_HIT_TYPE #define BULLET_HIT_TYPE: _: #endif forward OnPlayerWeaponShot(playerid, weaponid, BULLET_HIT_TYPE:hittype, hitid, Float:fX, Float:fY, Float:fZ); -/// This callback is called when a SendClientCheck request comletes -/// The ID of the player checked -/// The type of check performed -/// The address requested -/// The result of the check -/// +/** + * This callback is called when a SendClientCheck request comletes + * The ID of the player checked + * The type of check performed + * The address requested + * The result of the check + * + */ forward OnClientCheckResponse(playerid, actionid, memaddr, retndata); -/// This callback is called when a SendClientCheck request comletes -/// The ID of the player who got cash from the game -/// The amount of cash given -/// Where the money came from -/// Doesn't work +/** + * This callback is called when a SendClientCheck request comletes + * The ID of the player who got cash from the game + * The amount of cash given + * Where the money came from + * Doesn't work + */ forward OnScriptCash(playerid, amount, source); diff --git a/a_sampdb.inc b/a_sampdb.inc index 0db5fe7..313748e 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -13,166 +13,198 @@ #pragma tabsize 4 -/// This function is used to open a connection to a SQLite database, which is inside the /scriptfiles folder. -/// File name of the database -/// Return type for this function has changed since version 0.3.7 R2. -/// -/// It will create a new SQLite database, if there is no SQLite database with the same file name available.
    -/// Close your database connection with db_close! -///
    -/// Returns index (starting at 1) of the database connection . +/** + * This function is used to open a connection to a SQLite database, which is inside the /scriptfiles folder. + * File name of the database + * Return type for this function has changed since version 0.3.7 R2. + * + * It will create a new SQLite database, if there is no SQLite database with the same file name available.
    + * Close your database connection with db_close! + *
    + * Returns index (starting at 1) of the database connection . + */ native DB:DB_Open(const name[]) = db_open; #pragma deprecated Use `DB_Open`. native DB:db_open(const name[]); -/// Closes an SQLite database that was opened with db_open. -/// The handle of the database connection to close (returned by db_open) -/// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. May mean that the database handle specified is not open. -///
    +/** + * Closes an SQLite database that was opened with db_open. + * The handle of the database connection to close (returned by db_open) + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. May mean that the database handle specified is not open. + *
    + */ native bool:DB_Close(DB:db) = db_close; #pragma deprecated Use `DB_Close`. native bool:db_close(DB:db); -/// This function is used to execute an SQL query on an opened SQLite database. -/// The database handle to query -/// The query to execute -/// Return type for this function has changed since version 0.3.7 R2. -/// Always free the result by using db_free_result! -/// The query result index (starting at 1). +/** + * This function is used to execute an SQL query on an opened SQLite database. + * The database handle to query + * The query to execute + * Return type for this function has changed since version 0.3.7 R2. + * Always free the result by using db_free_result! + * The query result index (starting at 1). + */ native DBResult:DB_Query(DB:db, const query[]) = db_query; #pragma deprecated Use `DB_Query`. native DBResult:db_query(DB:db, const query[]); -/// Frees result memory allocated from db_query. -/// The result to free -/// If DBResult:dbhandle is a valid handle, it returns 1, otherwise 0 if DBResult:dbhandle is a NULL reference. +/** + * Frees result memory allocated from db_query. + * The result to free + * If DBResult:dbhandle is a valid handle, it returns 1, otherwise 0 if DBResult:dbhandle is a NULL reference. + */ native bool:DB_FreeResult(DBResult:result) = db_free_result; #pragma deprecated Use `DB_FreeResult`. native bool:db_free_result(DBResult:result); -/// Returns the number of rows from a db_query. -/// The result of db_query -/// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// The number of rows in the result. +/** + * Returns the number of rows from a db_query. + * The result of db_query + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * The number of rows in the result. + */ native DB_NumRows(DBResult:result) = db_num_rows; #pragma deprecated Use `DB_NumRows`. native db_num_rows(DBResult:result); -/// Moves to the next row of the result allocated from db_query. -/// The result of db_query -/// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Returns 1 on success, otherwise 0 if DBResult:result is a NULL reference or the last row is reached. +/** + * Moves to the next row of the result allocated from db_query. + * The result of db_query + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Returns 1 on success, otherwise 0 if DBResult:result is a NULL reference or the last row is reached. + */ native bool:DB_NextRow(DBResult:result) = db_next_row; #pragma deprecated Use `DB_NextRow`. native bool:db_next_row(DBResult:result); -/// Get the number of fields in a result. -/// The result of db_query -/// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// The number of fields in the result. +/** + * Get the number of fields in a result. + * The result of db_query + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * The number of fields in the result. + */ native DB_NumFields(DBResult:result) = db_num_fields; #pragma deprecated Use `DB_NumFields`. native db_num_fields(DBResult:result); -/// Returns the name of a field at a particular index. -/// The result to get the data from; returned by db_query -/// The index of the field to get the name of -/// The returned value -/// The max length of the field -/// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Returns 1, if the function was successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. +/** + * Returns the name of a field at a particular index. + * The result to get the data from; returned by db_query + * The index of the field to get the name of + * The returned value + * The max length of the field + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Returns 1, if the function was successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. + */ native bool:DB_FieldName(DBResult:result, field, output[], size = sizeof (output)) = db_field_name; #pragma deprecated Use `DB_FieldName`. native bool:db_field_name(DBResult:result, field, output[], size = sizeof (output)); -/// Get the content of a field from db_query. -/// The result to get the data from -/// The field to get the data from -/// The returned value -/// The max length of the field -/// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. +/** + * Get the content of a field from db_query. + * The result to get the data from + * The field to get the data from + * The returned value + * The max length of the field + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. + */ native bool:DB_GetField(DBResult:result, field, output[], size = sizeof (output)) = db_get_field; #pragma deprecated Use `DB_GetField`. native bool:db_get_field(DBResult:result, field, output[], size = sizeof (output)); -/// Get the content of a field as an integer from db_query. -/// The result to get the data from -/// The field to get the data from (optional=0) -/// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Retrieved value as integer (number). +/** + * Get the content of a field as an integer from db_query. + * The result to get the data from + * The field to get the data from (optional=0) + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Retrieved value as integer (number). + */ native DB_GetFieldInt(DBResult:result, field = 0) = db_get_field_int; #pragma deprecated Use `DB_GetFieldInt`. native db_get_field_int(DBResult:result, field = 0); -/// Get the content of a field as a float from db_query. -/// The result to get the data from -/// The field to get the data from (optional=0) -/// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Retrieved value as floating point number. +/** + * Get the content of a field as a float from db_query. + * The result to get the data from + * The field to get the data from (optional=0) + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Retrieved value as floating point number. + */ native Float:DB_GetFieldFloat(DBResult:result, field = 0) = db_get_field_float; #pragma deprecated Use `DB_GetFieldFloat`. native Float:db_get_field_float(DBResult:result, field = 0); -/// Get the contents of field with specified name. -/// The result to get the data from -/// The fieldname to get the data from -/// The returned value -/// The max length of the field -/// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. +/** + * Get the contents of field with specified name. + * The result to get the data from + * The fieldname to get the data from + * The returned value + * The max length of the field + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. + */ native bool:DB_GetFieldAssoc(DBResult:result, const field[], output[], size = sizeof (output)) = db_get_field_assoc; #pragma deprecated Use `DB_GetFieldAssoc`. native bool:db_get_field_assoc(DBResult:result, const field[], output[], size = sizeof (output)); -/// Get the contents of field as an integer with specified name. -/// The result to get the data from -/// The fieldname to get the data from -/// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Retrieved value as integer (number). +/** + * Get the contents of field as an integer with specified name. + * The result to get the data from + * The fieldname to get the data from + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Retrieved value as integer (number). + */ native DB_GetFieldAssocInt(DBResult:result, const field[]) = db_get_field_assoc_int; #pragma deprecated Use `DB_GetFieldAssocInt`. native db_get_field_assoc_int(DBResult:result, const field[]); -/// Get the contents of field as a float with specified name. -/// The result to get the data from -/// The fieldname to get the data from -/// Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references -/// Retrieved value as floating point number. +/** + * Get the contents of field as a float with specified name. + * The result to get the data from + * The fieldname to get the data from + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Retrieved value as floating point number. + */ native Float:DB_GetFieldAssocFloat(DBResult:result, const field[]) = db_get_field_assoc_float; #pragma deprecated Use `DB_GetFieldAssocFloat`. native Float:db_get_field_assoc_float(DBResult:result, const field[]); -/// Get memory handle for an SQLite database that was opened with db_open. -/// The index of the database connection (returned by db_open) -/// This function was added in SA-MP 0.3.7 R1 and will not work in earlier versions! -/// Returns the memory handle for a specified database. +/** + * Get memory handle for an SQLite database that was opened with db_open. + * The index of the database connection (returned by db_open) + * This function was added in SA-MP 0.3.7 R1 and will not work in earlier versions! + * Returns the memory handle for a specified database. + */ native DB_GetMemHandle(DB:db) = db_get_mem_handle; #pragma deprecated Use `DB_GetMemHandle`. native db_get_mem_handle(DB:db); -/// Get memory handle for an SQLite query that was executed with db_query. -/// The index of the query (returned by db_query) -/// This function was added in SA-MP 0.3.7 R1 and will not work in earlier versions! -/// Returns the memory handle for a specified query. +/** + * Get memory handle for an SQLite query that was executed with db_query. + * The index of the query (returned by db_query) + * This function was added in SA-MP 0.3.7 R1 and will not work in earlier versions! + * Returns the memory handle for a specified query. + */ native DB_GetResultMemHandle(DBResult:result) = db_get_result_mem_handle; #pragma deprecated Use `DB_GetResultMemHandle`. diff --git a/a_vehicles.inc b/a_vehicles.inc index 688459e..7fa261a 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -1,6 +1,6 @@ /* SA-MP Vehicle Functions * - * (c) Copyright 2005-2012, SA-MP Team + * (c) Copyright 2005-2012, SA-MP Team * */ @@ -65,699 +65,787 @@ enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO // Vehicle -/// Creates a vehicle in the world. Can be used in place of AddStaticVehicleEx at any time in the script. -/// The model for the vehicle -/// The x coordinate for the vehicle -/// The y coordinate for the vehicle -/// The z coordinate for the vehicle -/// The facing angle for the vehicle -/// The primary colour ID -/// The secondary colour ID -/// The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning -/// Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=false) -/// -/// -/// -/// -/// -/// -/// Trains can only be added with AddStaticVehicle and AddStaticVehicleEx. -/// -/// The vehicle ID of the vehicle created (1 to MAX_VEHICLES).
    -/// INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed). -///
    +/** + * Creates a vehicle in the world. Can be used in place of AddStaticVehicleEx at any time in the script. + * The model for the vehicle + * The x coordinate for the vehicle + * The y coordinate for the vehicle + * The z coordinate for the vehicle + * The facing angle for the vehicle + * The primary colour ID + * The secondary colour ID + * The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning + * Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=false) + * + * + * + * + * + * + * Trains can only be added with AddStaticVehicle and AddStaticVehicleEx. + * + * The vehicle ID of the vehicle created (1 to MAX_VEHICLES).
    + * INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed). + *
    + */ native CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:rotation, colour1, colour2, respawnDelay, bool:addSiren = false); -/// Destroy a vehicle. It will disappear instantly. -/// The ID of the vehicle to destroy -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The vehicle does not exist. -///
    +/** + * Destroy a vehicle. It will disappear instantly. + * The ID of the vehicle to destroy + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The vehicle does not exist. + *
    + */ native DestroyVehicle(vehicleid); -/// Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) for a player. -/// The ID of the vehicle to check -/// The ID of the player to check -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// 0: Vehicle is not streamed in for the player, or the function failed to execute (player and/or vehicle do not exist).
    -/// 1: Vehicle is streamed in for the player. -///
    +/** + * Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) for a player. + * The ID of the vehicle to check + * The ID of the player to check + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * 0: Vehicle is not streamed in for the player, or the function failed to execute (player and/or vehicle do not exist).
    + * 1: Vehicle is streamed in for the player. + *
    + */ native bool:IsVehicleStreamedIn(vehicleid, playerid); -/// Gets the position of a vehicle. -/// The ID of the vehicle to get the position of -/// A float variable in which to store the x coordinate, passed by reference -/// A float variable in which to store the y coordinate, passed by reference -/// A float variable in which to store the z coordinate, passed by reference -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The vehicle specified does not exist. -///
    +/** + * Gets the position of a vehicle. + * The ID of the vehicle to get the position of + * A float variable in which to store the x coordinate, passed by reference + * A float variable in which to store the y coordinate, passed by reference + * A float variable in which to store the z coordinate, passed by reference + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The vehicle specified does not exist. + *
    + */ native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); -/// Set a vehicle's position. -/// Vehicle ID that you want set new position -/// The x coordinate to position the vehicle at -/// The y coordinate to position the vehicle at -/// The z coordinate to position the vehicle at -/// -/// -/// -/// An empty vehicle will not fall after being teleported into the air. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The vehicle specified does not exist. -///
    +/** + * Set a vehicle's position. + * Vehicle ID that you want set new position + * The x coordinate to position the vehicle at + * The y coordinate to position the vehicle at + * The z coordinate to position the vehicle at + * + * + * + * An empty vehicle will not fall after being teleported into the air. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The vehicle specified does not exist. + *
    + */ native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); -/// Get the rotation of a vehicle on the z axis (yaw). -/// The ID of the vehicle to get the z angle of -/// A float variable in which to store the z rotation, passed by reference -/// -/// -/// -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the vehicle does not exist. -///
    +/** + * Get the rotation of a vehicle on the z axis (yaw). + * The ID of the vehicle to get the z angle of + * A float variable in which to store the z rotation, passed by reference + * + * + * + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the vehicle does not exist. + *
    + */ native GetVehicleZAngle(vehicleid, &Float:angle); -/// Returns a vehicle's rotation on all axes as a quaternion. -/// The ID of the vehicle to get the rotation of -/// A float variable in which to store the first quaternion angle, passed by reference -/// A float variable in which to store the second quaternion angle, passed by reference -/// A float variable in which to store the third quaternion angle, passed by reference -/// A float variable in which to store the fourth quaternion angle, passed by reference -/// -/// This function was added in SA-MP 0.3b and will not work in earlier versions! -/// -/// To euler:
    -/// -/// // GetVehicleRotation Created by IllidanS4
    -/// stock GetVehicleRotation(vehicleid, &Float:rx, &Float:ry, &Float:rz)
    -/// {
    -/// new Float:qw, Float:qx, Float:qy, Float:qz;
    -/// GetVehicleRotationQuat(vehicleid, qw, qx, qy, qz);
    -/// rx = asin((2 * qy * qz) - (2 * qx * qw));
    -/// ry = -atan2((qx * qz) + (qy * qw), 0.5 - (qx * qx) - (qy * qy));
    -/// rz = -atan2((qx * qy) + (qz * qw), 0.5 - (qx * qx) - (qz * qz));
    -/// } -///
    -///
    -/// There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart from the z angle) -/// This function may return incorrect values for unoccupied vehicles. The reason is that the third row of the vehicle's internal rotation matrix gets corrupted if it gets updated while unoccupied. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the vehicle specified does not exist. -///
    +/** + * Returns a vehicle's rotation on all axes as a quaternion. + * The ID of the vehicle to get the rotation of + * A float variable in which to store the first quaternion angle, passed by reference + * A float variable in which to store the second quaternion angle, passed by reference + * A float variable in which to store the third quaternion angle, passed by reference + * A float variable in which to store the fourth quaternion angle, passed by reference + * + * This function was added in SA-MP 0.3b and will not work in earlier versions! + * + * To euler:
    + * + * // GetVehicleRotation Created by IllidanS4
    + * stock GetVehicleRotation(vehicleid, &Float:rx, &Float:ry, &Float:rz)
    + * {
    + * new Float:qw, Float:qx, Float:qy, Float:qz;
    + * GetVehicleRotationQuat(vehicleid, qw, qx, qy, qz);
    + * rx = asin((2 * qy * qz) - (2 * qx * qw));
    + * ry = -atan2((qx * qz) + (qy * qw), 0.5 - (qx * qx) - (qy * qy));
    + * rz = -atan2((qx * qy) + (qz * qw), 0.5 - (qx * qx) - (qz * qz));
    + * } + *
    + *
    + * There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart from the z angle) + * This function may return incorrect values for unoccupied vehicles. The reason is that the third row of the vehicle's internal rotation matrix gets corrupted if it gets updated while unoccupied. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the vehicle specified does not exist. + *
    + */ native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z); -/// This function can be used to calculate the distance (as a float) between a vehicle and another map coordinate. This can be useful to detect how far a vehicle away is from a location. -/// The ID of the vehicle to calculate the distance for -/// The x map coordinate -/// The y map coordinate -/// The z map coordinate -/// -/// -/// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! -/// A float containing the distance from the point specified in the coordinates. +/** + * This function can be used to calculate the distance (as a float) between a vehicle and another map coordinate. This can be useful to detect how far a vehicle away is from a location. + * The ID of the vehicle to calculate the distance for + * The x map coordinate + * The y map coordinate + * The z map coordinate + * + * + * This function was added in SA-MP 0.3c R3 and will not work in earlier versions! + * A float containing the distance from the point specified in the coordinates. + */ native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); -/// Set the z rotation (yaw) of a vehicle. -/// The ID of the vehicle to set the rotation of -/// The z angle to set -/// -/// -/// A vehicle's x and y (pitch and roll) rotation will be reset when this function is used. The x and y rotations can not be set. -/// This function does not work on unoccupied vehicles. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The vehicle specified does not exist. -///
    +/** + * Set the z rotation (yaw) of a vehicle. + * The ID of the vehicle to set the rotation of + * The z angle to set + * + * + * A vehicle's x and y (pitch and roll) rotation will be reset when this function is used. The x and y rotations can not be set. + * This function does not work on unoccupied vehicles. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The vehicle specified does not exist. + *
    + */ native SetVehicleZAngle(vehicleid, Float:angle); -/// Set the parameters of a vehicle for a player. -/// The ID of the vehicle to set the parameters of -/// The ID of the player to set the vehicle's parameters for -/// 0 to disable the objective or 1 to show it. This is a bobbing yellow arrow above the vehicle -/// 0 to unlock the doors or 1 to lock them -/// -/// Vehicles must be respawned for the 'objective' to be removed. This can be circumvented somewhat using Get/SetVehicleParamsEx which do not require the vehicle to be respawned. It is worth noting however that the object will be disabled on a global scale, and this is only useful if only one player has the vehicle as an objective. -/// Since 0.3a you will have to reapply this function when OnVehicleStreamIn is called. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The player and/or vehicle specified do not exist. -///
    +/** + * Set the parameters of a vehicle for a player. + * The ID of the vehicle to set the parameters of + * The ID of the player to set the vehicle's parameters for + * 0 to disable the objective or 1 to show it. This is a bobbing yellow arrow above the vehicle + * 0 to unlock the doors or 1 to lock them + * + * Vehicles must be respawned for the 'objective' to be removed. This can be circumvented somewhat using Get/SetVehicleParamsEx which do not require the vehicle to be respawned. It is worth noting however that the object will be disabled on a global scale, and this is only useful if only one player has the vehicle as an objective. + * Since 0.3a you will have to reapply this function when OnVehicleStreamIn is called. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The player and/or vehicle specified do not exist. + *
    + */ native SetVehicleParamsForPlayer(vehicleid, playerid, objective, doors); -/// Use this function before any player connects (OnGameModeInit) to tell all clients that the script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when players enter/exit vehicles and headlights automatically coming on when it is dark. -/// -/// -/// -/// This Function was added in SA-MP 0.3c and will not work in earlier versions! -/// Is it not possible to reverse this function after it has been used. You must either use it or not use it. -/// This function always returns 1. It cannot fail to execute. +/** + * Use this function before any player connects (OnGameModeInit) to tell all clients that the script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when players enter/exit vehicles and headlights automatically coming on when it is dark. + * + * + * + * This Function was added in SA-MP 0.3c and will not work in earlier versions! + * Is it not possible to reverse this function after it has been used. You must either use it or not use it. + * This function always returns 1. It cannot fail to execute. + */ native ManualVehicleEngineAndLights(); -/// Sets a vehicle's parameters for all players. -/// The ID of the vehicle to set the parameters of -/// Engine status. 0 - Off, 1 - On -/// Light status. 0 - Off, 1 - On -/// Vehicle alarm status. If on, the alarm starts. 0 - Off, 1 - On -/// Door lock status. 0 - Unlocked, 1 - Locked -/// Bonnet (hood) status. 0 - Closed, 1 - Open -/// Boot/trunk status. 0 - Closed, 1 - Open -/// Toggle the objective arrow above the vehicle. 0 - Off, 1 - On -/// -/// -/// -/// This function was added in SA-MP 0.3c and will not work in earlier versions! -/// The alarm will not reset when finished, you'll need to reset it by yourself with this function. -/// Lights also operate during the day (Only when ManualVehicleEngineAndLights is enabled). -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the vehicle does not exist. -///
    +/** + * Sets a vehicle's parameters for all players. + * The ID of the vehicle to set the parameters of + * Engine status. 0 - Off, 1 - On + * Light status. 0 - Off, 1 - On + * Vehicle alarm status. If on, the alarm starts. 0 - Off, 1 - On + * Door lock status. 0 - Unlocked, 1 - Locked + * Bonnet (hood) status. 0 - Closed, 1 - Open + * Boot/trunk status. 0 - Closed, 1 - Open + * Toggle the objective arrow above the vehicle. 0 - Off, 1 - On + * + * + * + * This function was added in SA-MP 0.3c and will not work in earlier versions! + * The alarm will not reset when finished, you'll need to reset it by yourself with this function. + * Lights also operate during the day (Only when ManualVehicleEngineAndLights is enabled). + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the vehicle does not exist. + *
    + */ native SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS:engine, VEHICLE_PARAMS:lights, VEHICLE_PARAMS:alarm, VEHICLE_PARAMS:doors, VEHICLE_PARAMS:bonnet, VEHICLE_PARAMS:boot, VEHICLE_PARAMS:objective); -/// Gets a vehicle's parameters. -/// The ID of the vehicle to get the parameters from -/// Get the engine status. If 1, the engine is running. -/// Get the vehicle's lights' state. If 1 the lights are on -/// Get the vehicle's alarm state. If 1 the alarm is (or was) sounding -/// Get the lock status of the doors. If 1 the doors are locked -/// Get the bonnet/hood status. If 1, it's open -/// Get the boot/trunk status. 1 means it is open -/// Get the objective status. 1 means the objective is on -/// -/// This function was added in SA-MP 0.3c and will not work in earlier versions! -/// If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset'). +/** + * Gets a vehicle's parameters. + * The ID of the vehicle to get the parameters from + * Get the engine status. If 1, the engine is running. + * Get the vehicle's lights' state. If 1 the lights are on + * Get the vehicle's alarm state. If 1 the alarm is (or was) sounding + * Get the lock status of the doors. If 1 the doors are locked + * Get the bonnet/hood status. If 1, it's open + * Get the boot/trunk status. 1 means it is open + * Get the objective status. 1 means the objective is on + * + * This function was added in SA-MP 0.3c and will not work in earlier versions! + * If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset'). + */ native GetVehicleParamsEx(vehicleid, &VEHICLE_PARAMS:engine, &VEHICLE_PARAMS:lights, &VEHICLE_PARAMS:alarm, &VEHICLE_PARAMS:doors, &VEHICLE_PARAMS:bonnet, &VEHICLE_PARAMS:boot, &VEHICLE_PARAMS:objective); -/// Returns a vehicle's siren state (on/off). -/// The ID of the vehicle to get the siren state of -/// -/// This function was added in SA-MP 0.3c R3 and will not work in earlier versions! -/// -1 if unset (off), 0 if off, 1 if on +/** + * Returns a vehicle's siren state (on/off). + * The ID of the vehicle to get the siren state of + * + * This function was added in SA-MP 0.3c R3 and will not work in earlier versions! + * -1 if unset (off), 0 if off, 1 if on + */ native GetVehicleParamsSirenState(vehicleid); -/// Allows you to open and close the doors of a vehicle. -/// The ID of the vehicle to set the door state of -/// The state of the driver's door. 1 to open, 0 to close -/// The state of the passenger door. 1 to open, 0 to close -/// The state of the rear left door (if available). 1 to open, 0 to close -/// The state of the rear right door (if available). 1 to open, 0 to close -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// 1 is open, 0 is closed +/** + * Allows you to open and close the doors of a vehicle. + * The ID of the vehicle to set the door state of + * The state of the driver's door. 1 to open, 0 to close + * The state of the passenger door. 1 to open, 0 to close + * The state of the rear left door (if available). 1 to open, 0 to close + * The state of the rear right door (if available). 1 to open, 0 to close + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * 1 is open, 0 is closed + */ native SetVehicleParamsCarDoors(vehicleid, frontLeft, frontRight, rearLeft, rearRight); -/// Allows you to retrieve the current state of a vehicle's doors. -/// The ID of the vehicle -/// The integer to save the state of the driver's door to -/// The integer to save the state of the passenger's door to -/// The integer to save the state of the rear left door to (if available) -/// The integer to save the state of the rear right door to (if available) -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. +/** + * Allows you to retrieve the current state of a vehicle's doors. + * The ID of the vehicle + * The integer to save the state of the driver's door to + * The integer to save the state of the passenger's door to + * The integer to save the state of the rear left door to (if available) + * The integer to save the state of the rear right door to (if available) + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. + */ native GetVehicleParamsCarDoors(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); -/// Allows you to open and close the windows of a vehicle. -/// The ID of the vehicle to set the window state of -/// The state of the driver's window. 0 to open, 1 to close -/// The state of the passenger window. 0 to open, 1 to close -/// The state of the rear left window (if available). 0 to open, 1 to close -/// The state of the rear right window (if available). 0 to open, 1 to close -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! +/** + * Allows you to open and close the windows of a vehicle. + * The ID of the vehicle to set the window state of + * The state of the driver's window. 0 to open, 1 to close + * The state of the passenger window. 0 to open, 1 to close + * The state of the rear left window (if available). 0 to open, 1 to close + * The state of the rear right window (if available). 0 to open, 1 to close + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + */ native SetVehicleParamsCarWindows(vehicleid, frontLeft, frontRight, rearLeft, rearRight); -/// Allows you to retrieve the current state of a vehicle's windows. -/// The ID of the vehicle -/// The integer to save the state of the drivers window to -/// The integer to save the state of the passengers window to -/// The integer to save the state of the rear left window to (if available) -/// The integer to save the state of the rear right window to (if available) -/// -/// -/// -/// This function was added in SA-MP 0.3.7 and will not work in earlier versions! -/// The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. -/// The vehicle's windows state is stored in the specified variables. +/** + * Allows you to retrieve the current state of a vehicle's windows. + * The ID of the vehicle + * The integer to save the state of the drivers window to + * The integer to save the state of the passengers window to + * The integer to save the state of the rear left window to (if available) + * The integer to save the state of the rear right window to (if available) + * + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. + * The vehicle's windows state is stored in the specified variables. + */ native GetVehicleParamsCarWindows(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); -/// Sets a vehicle back to the position at where it was created. -/// The ID of the vehicle to respawn -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The vehicle does not exist. -///
    +/** + * Sets a vehicle back to the position at where it was created. + * The ID of the vehicle to respawn + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The vehicle does not exist. + *
    + */ native SetVehicleToRespawn(vehicleid); -/// Links a vehicle to an interior. Vehicles can only be seen by players in the same interior (SetPlayerInterior). -/// The ID of the vehicle to link to an interior -/// The Interior ID to link it to -/// -/// -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the vehicle does not exist.
    -///
    +/** + * Links a vehicle to an interior. Vehicles can only be seen by players in the same interior (SetPlayerInterior). + * The ID of the vehicle to link to an interior + * The Interior ID to link it to + * + * + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the vehicle does not exist.
    + *
    + */ native LinkVehicleToInterior(vehicleid, interiorid); -/// Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components can be found here. -/// The ID of the vehicle to add the component to. Not to be confused with modelid -/// The ID of the component to add to the vehicle -/// -///
      -///
    • 0 - The component was not added because the vehicle does not exist.
    • -///
    • 1 - The component was successfully added to the vehicle.
    • -///
    -///
    -/// Using an invalid component ID crashes the player's game. There are no internal checks for this. -/// -/// -/// -/// -/// +/** + * Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components can be found here. + * The ID of the vehicle to add the component to. Not to be confused with modelid + * The ID of the component to add to the vehicle + * + *
      + *
    • 0 - The component was not added because the vehicle does not exist.
    • + *
    • 1 - The component was successfully added to the vehicle.
    • + *
    + *
    + * Using an invalid component ID crashes the player's game. There are no internal checks for this. + * + * + * + * + * + */ native AddVehicleComponent(vehicleid, componentid); -/// Remove a component from a vehicle. -/// ID of the vehicle -/// ID of the component to remove -/// -/// -/// -/// -/// +/** + * Remove a component from a vehicle. + * ID of the vehicle + * ID of the component to remove + * + * + * + * + * + */ native RemoveVehicleComponent(vehicleid, componentid); -/// Change a vehicle's primary and secondary colours. -/// The ID of the vehicle to change the colours of -/// The new vehicle's primary Color ID -/// The new vehicle's secondary Color ID -/// -/// -/// Some vehicles have only a primary colour and some can not have the colour changed at all. A few (cement, squallo) have 4 colours, of which 2 can not be changed in SA:MP -/// -/// 1: The function executed successfully. The vehicle's colour was successfully changed.
    -/// 0: The function failed to execute. The vehicle does not exist. -///
    +/** + * Change a vehicle's primary and secondary colours. + * The ID of the vehicle to change the colours of + * The new vehicle's primary Color ID + * The new vehicle's secondary Color ID + * + * + * Some vehicles have only a primary colour and some can not have the colour changed at all. A few (cement, squallo) have 4 colours, of which 2 can not be changed in SA:MP + * + * 1: The function executed successfully. The vehicle's colour was successfully changed.
    + * 0: The function failed to execute. The vehicle does not exist. + *
    + */ native ChangeVehicleColor(vehicleid, colour1, colour2); -/// Change a vehicle's paintjob (for plain colours see ChangeVehicleColor). -/// The ID of the vehicle to change the paintjob of -/// The ID of the Paintjob to apply. Use 3 to remove a paintjob -/// -/// -/// -/// Known Bugs:
    -/// This function calls OnVehicleRespray.
    -/// Vehicles change their colour to white anymore when a paintjob is removed. -///
    -/// This function always returns 1 (success), even if the vehicle passed is not created. +/** + * Change a vehicle's paintjob (for plain colours see ChangeVehicleColor). + * The ID of the vehicle to change the paintjob of + * The ID of the Paintjob to apply. Use 3 to remove a paintjob + * + * + * + * Known Bugs:
    + * This function calls OnVehicleRespray.
    + * Vehicles change their colour to white anymore when a paintjob is removed. + *
    + * This function always returns 1 (success), even if the vehicle passed is not created. + */ native ChangeVehiclePaintjob(vehicleid, paintjobid); -/// Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%). -/// The ID of the vehicle to set the health of -/// The health, given as a float value -/// -/// -/// -/// -/// Full vehicle health is 1000, however higher values are possible and increase the health of the vehicle. -/// -/// Health:
    -///
      -///
    • > 650 - undamaged
    • -///
    • 650-550 - white Smoke
    • -///
    • 550-390 - grey Smoke
    • -///
    • 390-250 - black Smoke
    • -///
    • < 250 - on fire (will explode seconds later)
    • -///
    -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the vehicle does not exist. -///
    +/** + * Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%). + * The ID of the vehicle to set the health of + * The health, given as a float value + * + * + * + * + * Full vehicle health is 1000, however higher values are possible and increase the health of the vehicle. + * + * Health:
    + *
      + *
    • > 650 - undamaged
    • + *
    • 650-550 - white Smoke
    • + *
    • 550-390 - grey Smoke
    • + *
    • 390-250 - black Smoke
    • + *
    • < 250 - on fire (will explode seconds later)
    • + *
    + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the vehicle does not exist. + *
    + */ native SetVehicleHealth(vehicleid, Float:health); -/// Get the health of a vehicle. -/// The ID of the vehicle to get the health of -/// A float variable in which to store the vehicle's health, passed by reference -/// -/// -/// -/// Full vehicle health is 1000, however higher values are possible and increase the health of the vehicle. -/// -/// Health:
    -///
      -///
    • > 650 - undamaged
    • -///
    • 650-550 - white Smoke
    • -///
    • 550-390 - grey Smoke
    • -///
    • 390-250 - black Smoke
    • -///
    • < 250 - on fire (will explode seconds later)
    • -///
    -///
    -/// -/// 1 - success.
    -/// 0 - failure (invalid vehicle ID).
    -///
    +/** + * Get the health of a vehicle. + * The ID of the vehicle to get the health of + * A float variable in which to store the vehicle's health, passed by reference + * + * + * + * Full vehicle health is 1000, however higher values are possible and increase the health of the vehicle. + * + * Health:
    + *
      + *
    • > 650 - undamaged
    • + *
    • 650-550 - white Smoke
    • + *
    • 550-390 - grey Smoke
    • + *
    • 390-250 - black Smoke
    • + *
    • < 250 - on fire (will explode seconds later)
    • + *
    + *
    + * + * 1 - success.
    + * 0 - failure (invalid vehicle ID).
    + *
    + */ native GetVehicleHealth(vehicleid, &Float:health); -/// Attach a vehicle to another vehicle as a trailer. -/// The ID of the vehicle that will be pulled -/// The ID of the vehicle that will pull the trailer -/// -/// -/// -/// This will only work if both vehicles are streamed in for a player (check IsVehicleStreamedIn). -/// This function always returns 1, even if neither of the vehicle IDs passed are valid. +/** + * Attach a vehicle to another vehicle as a trailer. + * The ID of the vehicle that will be pulled + * The ID of the vehicle that will pull the trailer + * + * + * + * This will only work if both vehicles are streamed in for a player (check IsVehicleStreamedIn). + * This function always returns 1, even if neither of the vehicle IDs passed are valid. + */ native AttachTrailerToVehicle(trailerid, vehicleid); -/// Detach the connection between a vehicle and its trailer, if any. -/// ID of the pulling vehicle -/// -/// -/// +/** + * Detach the connection between a vehicle and its trailer, if any. + * ID of the pulling vehicle + * + * + * + */ native DetachTrailerFromVehicle(vehicleid); -/// Checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer to get the vehicle ID of the trailer (if any). -/// The ID of the vehicle to check for trailers -/// -/// -/// -/// 1 if the vehicle has a trailer attached, 0 if not. +/** + * Checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer to get the vehicle ID of the trailer (if any). + * The ID of the vehicle to check for trailers + * + * + * + * 1 if the vehicle has a trailer attached, 0 if not. + */ native bool:IsTrailerAttachedToVehicle(vehicleid); -/// Get the ID of the trailer attached to a vehicle. -/// The ID of the vehicle to get the trailer of -/// -/// -/// -/// The vehicle ID of the trailer or 0 if no trailer is attached. +/** + * Get the ID of the trailer attached to a vehicle. + * The ID of the vehicle to get the trailer of + * + * + * + * The vehicle ID of the trailer or 0 if no trailer is attached. + */ native GetVehicleTrailer(vehicleid); -/// Set a vehicle numberPlate. -/// The ID of the vehicle to set the number plate of -/// The text that should be displayed on the number plate -/// -/// -/// -/// This function was added in SA-MP 0.3c and will not work in earlier versions! -/// You can use colour embedding on the number plate text. -/// -/// This function has no internal error checking. Do not assign custom number plates to vehicles without plates (boats, planes, etc) as this will result in some unneeded processing time on the client.
    -/// The vehicle must be re-spawned or re-streamed for the changes to take effect.
    -/// There's a limit of 32 characters on each number plate (including embedded colours).
    -/// The text length that can be seen on the number plate is around 9 to 10 characters, more characters will cause the text to split.
    -/// Some vehicle models has a backward number plate, e.g. Boxville (498) (as an alternative to this vehicle you can use vehicle model ID 609, which is a duplicated Boxville (aka Boxburg), but with a regular number plate).
    -/// This function only works in versions 0.2.1, 0.2.2, 0.2x and 0.3c (and beyond). -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The vehicle does not exist.
    -///
    +/** + * Set a vehicle numberPlate. + * The ID of the vehicle to set the number plate of + * The text that should be displayed on the number plate + * + * + * + * This function was added in SA-MP 0.3c and will not work in earlier versions! + * You can use colour embedding on the number plate text. + * + * This function has no internal error checking. Do not assign custom number plates to vehicles without plates (boats, planes, etc) as this will result in some unneeded processing time on the client.
    + * The vehicle must be re-spawned or re-streamed for the changes to take effect.
    + * There's a limit of 32 characters on each number plate (including embedded colours).
    + * The text length that can be seen on the number plate is around 9 to 10 characters, more characters will cause the text to split.
    + * Some vehicle models has a backward number plate, e.g. Boxville (498) (as an alternative to this vehicle you can use vehicle model ID 609, which is a duplicated Boxville (aka Boxburg), but with a regular number plate).
    + * This function only works in versions 0.2.1, 0.2.2, 0.2x and 0.3c (and beyond). + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The vehicle does not exist.
    + *
    + */ native SetVehicleNumberPlate(vehicleid, const numberPlate[]); -/// Gets the model ID of a vehicle. -/// The ID of the vehicle to get the model of -/// -/// -/// -/// -/// The vehicle's model ID, or 0 if the vehicle doesn't exist. +/** + * Gets the model ID of a vehicle. + * The ID of the vehicle to get the model of + * + * + * + * + * The vehicle's model ID, or 0 if the vehicle doesn't exist. + */ native GetVehicleModel(vehicleid); -/// Retrieves the installed component ID (modshop mod(ification)) on a vehicle in a specific slot. -/// The ID of the vehicle to check for the component -/// The component slot to check for components (see below) -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// Slots:
    -/// -/// CARMODTYPE_SPOILER -/// CARMODTYPE_HOOD -/// CARMODTYPE_ROOF -/// CARMODTYPE_SIDESKIRT -/// CARMODTYPE_LAMPS -/// CARMODTYPE_NITRO -/// CARMODTYPE_EXHAUST -/// CARMODTYPE_WHEELS -/// CARMODTYPE_STEREO -/// CARMODTYPE_HYDRAULICS -/// CARMODTYPE_FRONT_BUMPER -/// CARMODTYPE_REAR_BUMPER -/// CARMODTYPE_VENT_RIGHT -/// CARMODTYPE_VENT_LEFT -/// -///
    -/// -/// Known Bugs:
    -///
      -///
    • Doesn't work for CARMODTYPE_STEREO.
    • -///
    • Both front bull bars and front bumper components are saved in the CARMODTYPE_FRONT_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • -///
    • Both rear bull bars and rear bumper components are saved in the CARMODTYPE_REAR_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • -///
    • Both left side skirt and right side skirt are saved in the CARMODTYPE_SIDESKIRT slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • -///
    -///
    -/// The ID of the component installed in the specified slot. Returns 0 if no component in specified vehicle's specified slot, or if vehicle doesn't exist. +/** + * Retrieves the installed component ID (modshop mod(ification)) on a vehicle in a specific slot. + * The ID of the vehicle to check for the component + * The component slot to check for components (see below) + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * Slots:
    + * + * CARMODTYPE_SPOILER + * CARMODTYPE_HOOD + * CARMODTYPE_ROOF + * CARMODTYPE_SIDESKIRT + * CARMODTYPE_LAMPS + * CARMODTYPE_NITRO + * CARMODTYPE_EXHAUST + * CARMODTYPE_WHEELS + * CARMODTYPE_STEREO + * CARMODTYPE_HYDRAULICS + * CARMODTYPE_FRONT_BUMPER + * CARMODTYPE_REAR_BUMPER + * CARMODTYPE_VENT_RIGHT + * CARMODTYPE_VENT_LEFT + * + *
    + * + * Known Bugs:
    + *
      + *
    • Doesn't work for CARMODTYPE_STEREO.
    • + *
    • Both front bull bars and front bumper components are saved in the CARMODTYPE_FRONT_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • + *
    • Both rear bull bars and rear bumper components are saved in the CARMODTYPE_REAR_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • + *
    • Both left side skirt and right side skirt are saved in the CARMODTYPE_SIDESKIRT slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • + *
    + *
    + * The ID of the component installed in the specified slot. Returns 0 if no component in specified vehicle's specified slot, or if vehicle doesn't exist. + */ native GetVehicleComponentInSlot(vehicleid, CARMODTYPE:slot); // There is 1 slot for each CARMODTYPE_* -/// Find out what type of component a certain ID is. -/// The component ID to check -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// The component slot ID of the specified component or -1 if the component is invalid. +/** + * Find out what type of component a certain ID is. + * The component ID to check + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * The component slot ID of the specified component or -1 if the component is invalid. + */ native CARMODTYPE:GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID -/// Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.). -/// The ID of the vehicle to repair -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the vehicle specified does not exist. -///
    +/** + * Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.). + * The ID of the vehicle to repair + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the vehicle specified does not exist. + *
    + */ native RepairVehicle(vehicleid); // Repairs the damage model and resets the health -/// Get the velocity of a vehicle on the x, y and z axes. -/// The ID of the vehicle to get the velocity of -/// A float variable in to which to store the vehicle's x velocity, passed by reference -/// A float variable in to which to store the vehicle's y velocity, passed by reference -/// A float variable in to which to store the vehicle's z velocity, passed by reference -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// Multiply vector with 250.66667 for kmph or 199.416667 for mph or something... -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the vehicle specified does not exist.
    -///
    +/** + * Get the velocity of a vehicle on the x, y and z axes. + * The ID of the vehicle to get the velocity of + * A float variable in to which to store the vehicle's x velocity, passed by reference + * A float variable in to which to store the vehicle's y velocity, passed by reference + * A float variable in to which to store the vehicle's z velocity, passed by reference + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * Multiply vector with 250.66667 for kmph or 199.416667 for mph or something... + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the vehicle specified does not exist.
    + *
    + */ native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); -/// Sets the x, y and z velocity of a vehicle. -/// The ID of the vehicle to set the velocity of -/// The velocity in the x direction -/// The velocity in the y direction -/// The velocity in the z direction -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// This function has no affect on un-occupied vehicles and does not affect trains. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The vehicle does not exist. -///
    +/** + * Sets the x, y and z velocity of a vehicle. + * The ID of the vehicle to set the velocity of + * The velocity in the x direction + * The velocity in the y direction + * The velocity in the z direction + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * This function has no affect on un-occupied vehicles and does not affect trains. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The vehicle does not exist. + *
    + */ native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); -/// Sets the angular x, y and z velocity of a vehicle. -/// The ID of the vehicle to set the velocity of -/// The amount of velocity in the angular x direction -/// The amount of velocity in the angular y direction -/// The amount of velocity in the angular z direction -/// -/// -/// This function was added in SA-MP 0.3b and will not work in earlier versions! -/// This function has no effect on un-occupied vehicles and does not effect trains. -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. The vehicle does not exist. -///
    +/** + * Sets the angular x, y and z velocity of a vehicle. + * The ID of the vehicle to set the velocity of + * The amount of velocity in the angular x direction + * The amount of velocity in the angular y direction + * The amount of velocity in the angular z direction + * + * + * This function was added in SA-MP 0.3b and will not work in earlier versions! + * This function has no effect on un-occupied vehicles and does not effect trains. + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. The vehicle does not exist. + *
    + */ native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); -/// Retrieve the damage statuses of a vehicle. -/// The ID of the vehicle to get the damage statuses of -/// A variable to store the panel damage data in, passed by reference -/// A variable to store the door damage data in, passed by reference -/// A variable to store the light damage data in, passed by reference -/// A variable to store the tire damage data in, passed by reference -/// -/// -/// -/// -/// -/// This Callback was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// Door states:
    -///
      -///
    • 0x000000FF - hood
    • -///
    • 0x0000FF00 - trunk
    • -///
    • 0x00FF0000 - drivers door
    • -///
    • 0xFF000000 - co-drivers door
    • -///
    • byte meaning:
    • -///
    • 0x1 - is opened
    • -///
    • 0x2 - is damaged
    • -///
    • 0x4 - is removed
    • -///
    • other bytes are unused
    • -///
    -///
    -/// -/// Light states:
    -///
      -///
    • 0x01 - front left broken
    • -///
    • 0x04 - front right broken
    • -///
    • 0x40 - back both broken
    • -///
    -///
    -/// -/// Tire states:
    -///
      -///
    • 0x1 - back right popped
    • -///
    • 0x2 - front right popped
    • -///
    • 0x4 - back left popped
    • -///
    • 0x8 - front left popped
    • -///
    • only check the right states for bikes
    • -///
    -///
    -/// -/// 1: The function executed successfully.
    -/// 0: The function failed to execute. This means the vehicle specified does not exist. -///
    +/** + * Retrieve the damage statuses of a vehicle. + * The ID of the vehicle to get the damage statuses of + * A variable to store the panel damage data in, passed by reference + * A variable to store the door damage data in, passed by reference + * A variable to store the light damage data in, passed by reference + * A variable to store the tire damage data in, passed by reference + * + * + * + * + * + * This Callback was added in SA-MP 0.3a and will not work in earlier versions! + * + * Door states:
    + *
      + *
    • 0x000000FF - hood
    • + *
    • 0x0000FF00 - trunk
    • + *
    • 0x00FF0000 - drivers door
    • + *
    • 0xFF000000 - co-drivers door
    • + *
    • byte meaning:
    • + *
    • 0x1 - is opened
    • + *
    • 0x2 - is damaged
    • + *
    • 0x4 - is removed
    • + *
    • other bytes are unused
    • + *
    + *
    + * + * Light states:
    + *
      + *
    • 0x01 - front left broken
    • + *
    • 0x04 - front right broken
    • + *
    • 0x40 - back both broken
    • + *
    + *
    + * + * Tire states:
    + *
      + *
    • 0x1 - back right popped
    • + *
    • 0x2 - front right popped
    • + *
    • 0x4 - back left popped
    • + *
    • 0x8 - front left popped
    • + *
    • only check the right states for bikes
    • + *
    + *
    + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the vehicle specified does not exist. + *
    + */ native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); -/// Sets the various visual damage statuses of a vehicle, such as popped tires, broken lights and damaged panels. -/// The ID of the vehicle to set the damage of -/// A set of bits containing the panel damage status -/// A set of bits containing the door damage status -/// A set of bits containing the light damage status -/// A set of bits containing the tire damage status -/// -/// -/// -/// -/// -/// This function was added in SA-MP 0.3a and will not work in earlier versions! -/// -/// Door states:
    -///
      -///
    • 0x000000FF - hood
    • -///
    • 0x0000FF00 - trunk
    • -///
    • 0x00FF0000 - drivers door
    • -///
    • 0xFF000000 - co-drivers door
    • -///
    • byte meaning:
    • -///
    • 0x1 - is opened
    • -///
    • 0x2 - is damaged
    • -///
    • 0x4 - is removed
    • -///
    • other bytes are unused
    • -///
    -///
    -/// -/// Light states:
    -///
      -///
    • 0x01 - front left broken
    • -///
    • 0x04 - front right broken
    • -///
    • 0x40 - back both broken
    • -///
    -///
    -/// -/// Tire states:
    -///
      -///
    • 0x1 - back right popped
    • -///
    • 0x2 - front right popped
    • -///
    • 0x4 - back left popped
    • -///
    • 0x8 - front left popped
    • -///
    • only check the right states for bikes
    • -///
    -///
    +/** + * Sets the various visual damage statuses of a vehicle, such as popped tires, broken lights and damaged panels. + * The ID of the vehicle to set the damage of + * A set of bits containing the panel damage status + * A set of bits containing the door damage status + * A set of bits containing the light damage status + * A set of bits containing the tire damage status + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * Door states:
    + *
      + *
    • 0x000000FF - hood
    • + *
    • 0x0000FF00 - trunk
    • + *
    • 0x00FF0000 - drivers door
    • + *
    • 0xFF000000 - co-drivers door
    • + *
    • byte meaning:
    • + *
    • 0x1 - is opened
    • + *
    • 0x2 - is damaged
    • + *
    • 0x4 - is removed
    • + *
    • other bytes are unused
    • + *
    + *
    + * + * Light states:
    + *
      + *
    • 0x01 - front left broken
    • + *
    • 0x04 - front right broken
    • + *
    • 0x40 - back both broken
    • + *
    + *
    + * + * Tire states:
    + *
      + *
    • 0x1 - back right popped
    • + *
    • 0x2 - front right popped
    • + *
    • 0x4 - back left popped
    • + *
    • 0x8 - front left popped
    • + *
    • only check the right states for bikes
    • + *
    + *
    + */ native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); -/// Retrieve information about a specific vehicle model such as the size or position of seats. -/// The vehicle model to get info of -/// The type of information to retrieve -/// A float to store the x value -/// A float to store the y value -/// A float to store the z value -/// -/// This function was added in SA-MP 0.3e and will not work in earlier versions! -/// -/// Information types:
    -///
      -///
    • VEHICLE_MODEL_INFO_SIZE - vehicle size
    • -///
    • VEHICLE_MODEL_INFO_FRONTSEAT - position of the front seat
    • -///
    • VEHICLE_MODEL_INFO_REARSEAT - position of the rear seat
    • -///
    • VEHICLE_MODEL_INFO_PETROLCAP - position of the fuel cap
    • -///
    • VEHICLE_MODEL_INFO_WHEELSFRONT - position of the front wheels
    • -///
    • VEHICLE_MODEL_INFO_WHEELSREAR - position of the rear wheels
    • -///
    • VEHICLE_MODEL_INFO_WHEELSMID - position of the middle wheels (applies to vehicles with 3 axes)
    • -///
    • VEHICLE_MODEL_INFO_FRONT_BUMPER_Z - height of the front bumper
    • -///
    • VEHICLE_MODEL_INFO_REAR_BUMPER_Z - height of the rear bumper
    • -///
    -///
    +/** + * Retrieve information about a specific vehicle model such as the size or position of seats. + * The vehicle model to get info of + * The type of information to retrieve + * A float to store the x value + * A float to store the y value + * A float to store the z value + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * + * Information types:
    + *
      + *
    • VEHICLE_MODEL_INFO_SIZE - vehicle size
    • + *
    • VEHICLE_MODEL_INFO_FRONTSEAT - position of the front seat
    • + *
    • VEHICLE_MODEL_INFO_REARSEAT - position of the rear seat
    • + *
    • VEHICLE_MODEL_INFO_PETROLCAP - position of the fuel cap
    • + *
    • VEHICLE_MODEL_INFO_WHEELSFRONT - position of the front wheels
    • + *
    • VEHICLE_MODEL_INFO_WHEELSREAR - position of the rear wheels
    • + *
    • VEHICLE_MODEL_INFO_WHEELSMID - position of the middle wheels (applies to vehicles with 3 axes)
    • + *
    • VEHICLE_MODEL_INFO_FRONT_BUMPER_Z - height of the front bumper
    • + *
    • VEHICLE_MODEL_INFO_REAR_BUMPER_Z - height of the rear bumper
    • + *
    + *
    + */ native GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO:infotype, &Float:x, &Float:y, &Float:z); // Virtual Worlds -/// Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their own virtual world. -/// The ID of vehicle to set the virtual world of -/// The ID of the virtual world to put the vehicle in -/// -/// +/** + * Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their own virtual world. + * The ID of vehicle to set the virtual world of + * The ID of the virtual world to put the vehicle in + * + * + */ native SetVehicleVirtualWorld(vehicleid, virtualWorld); -/// Get the virtual world of a vehicle. -/// The ID of the vehicle to get the virtual world of -/// -/// -/// The virtual world that the vehicle is in. +/** + * Get the virtual world of a vehicle. + * The ID of the vehicle to get the virtual world of + * + * + * The virtual world that the vehicle is in. + */ native GetVehicleVirtualWorld(vehicleid); -/// Check if a vehicle ID is valid. -/// The ID of the vehicle to check -/// -/// -/// true or false. +/** + * Check if a vehicle ID is valid. + * The ID of the vehicle to check + * + * + * true or false. + */ native bool:IsValidVehicle(vehicleid); From 10fe06744db6086719fa9d1d3c92140a4d35e063 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 16:33:06 +0000 Subject: [PATCH 048/104] `` header. --- a_actor.inc | 10 ++++++---- a_http.inc | 10 ++++++---- a_npc.inc | 10 ++++++---- a_objects.inc | 10 ++++++---- a_players.inc | 10 ++++++---- a_samp.inc | 10 ++++++---- a_sampdb.inc | 11 +++++++---- a_vehicles.inc | 10 ++++++---- 8 files changed, 49 insertions(+), 32 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 3b2d1f6..20aeb62 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -1,7 +1,9 @@ -/* SA-MP Actor Functions - * - * (c) Copyright 2015, SA-MP Team - * +/** + * + * + * (c) Copyright 2015, SA-MP Team + * + * */ #if defined _INC_a_actor diff --git a/a_http.inc b/a_http.inc index de80b59..edf0ca8 100644 --- a/a_http.inc +++ b/a_http.inc @@ -1,7 +1,9 @@ - /* SA-MP threaded HTTP/1.0 client for pawn - * - * (c) Copyright 2010, SA-MP Team - * +/** + * + * + * (c) Copyright 2010, SA-MP Team + * + * */ #if defined _INC_a_http diff --git a/a_npc.inc b/a_npc.inc index eeb4f8a..108d0f1 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -1,7 +1,9 @@ -/* SA-MP NPC Functions - * - * (c) Copyright 2009, SA-MP Team - * +/** + * + * + * (c) Copyright 2009, SA-MP Team + * + * */ #if defined _INC_a_npc diff --git a/a_objects.inc b/a_objects.inc index a54216e..2068741 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -1,7 +1,9 @@ -/* SA-MP Object Functions - * - * (c) Copyright 2005-2015, SA-MP Team - * +/** + * + * + * (c) Copyright 2005-2015, SA-MP Team + * + * */ #if defined _INC_a_objects diff --git a/a_players.inc b/a_players.inc index bbc9c33..712726e 100644 --- a/a_players.inc +++ b/a_players.inc @@ -1,7 +1,9 @@ -/* SA-MP Player Functions - * - * (c) Copyright 2005-2017, SA-MP Team - * +/** + * + * + * (c) Copyright 2005-2017, SA-MP Team + * + * */ #if defined _INC_a_players diff --git a/a_samp.inc b/a_samp.inc index 44a89c1..2a9e06e 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -1,7 +1,9 @@ -/* SA-MP Functions - * - * (c) Copyright 2005-2017, SA-MP Team - * +/** + * + * + * (c) Copyright 2005-2017, SA-MP Team + * + * */ #if defined _INC_a_samp diff --git a/a_sampdb.inc b/a_sampdb.inc index 313748e..0ab052f 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -1,7 +1,10 @@ -// SA-MP Native SQLite Database Functions -// -// (c) Copyright 2015, SA-MP Team -// +/** + * + * + * (c) Copyright 2015, SA-MP Team + * + * + */ #if defined _INC_a_sampdb #endinput diff --git a/a_vehicles.inc b/a_vehicles.inc index 7fa261a..6080763 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -1,7 +1,9 @@ -/* SA-MP Vehicle Functions - * - * (c) Copyright 2005-2012, SA-MP Team - * +/** + * + * + * (c) Copyright 2005-2012, SA-MP Team + * + * */ #if defined _INC_a_vehicles From f95bc673b89338ac8d2f736a52991424853f9aa5 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 16:35:50 +0000 Subject: [PATCH 049/104] Fix some comment closes. --- a_players.inc | 1 + a_samp.inc | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/a_players.inc b/a_players.inc index 712726e..a1dd139 100644 --- a/a_players.inc +++ b/a_players.inc @@ -2340,6 +2340,7 @@ native RemovePlayerMapIcon(playerid, iconid); * This function, as of 0.3d, is deprecated. Check OnPlayerClickMap. * This function will work only if AllowAdminTeleport is enabled, and you have to be an admin. * + */ #pragma deprecated Use `OnPlayerClickMap`. native AllowPlayerTeleport(playerid, bool:allow); diff --git a/a_samp.inc b/a_samp.inc index 2a9e06e..732e47f 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -960,6 +960,7 @@ native GetActorPoolSize(); * This function was added in SA-MP 0.3.7-R1 and will not work in earlier versions! * The salt is appended to the end of the password, meaning password 'foo' and salt 'bar' would form 'foobar'. * The salt should be random, unique for each player and at least as long as the hashed password. It is to be stored alongside the actual hash in the player's account. + */ #pragma deprecated Use BCrypt for hashing passwords. native SHA256_PassHash(const password[], const salt[], output[], size = sizeof (output)); // SHA256 for password hashing @@ -1380,6 +1381,7 @@ native GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); /** * 1 to enable, 0 to disable tire popping * This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. + */ #pragma deprecated Use `OnVehicleDamageStatusUpdate`. native EnableTirePopping(bool:enable); // deprecated function @@ -1397,6 +1399,7 @@ native EnableVehicleFriendlyFire(); * * * + */ #pragma deprecated Use `OnPlayerInteriorChange`. native AllowInteriorWeapons(bool:allow); @@ -1433,6 +1436,7 @@ native SetGravity(Float:gravity); * This function, as of 0.3d, is deprecated. Please see OnPlayerClickMap. * * + */ #pragma deprecated Use `OnPlayerClickMap`. native AllowAdminTeleport(bool:allow); @@ -1441,6 +1445,7 @@ native AllowAdminTeleport(bool:allow); * * * + */ #pragma deprecated Use `CreatePickup`. native SetDeathDropAmount(amount); @@ -1715,6 +1720,7 @@ native UnBlockIpAddress(const ipAddress[]); * Type 'varlist' in the server console to display a list of available server variables and their types. * When filterscripts or plugins is specified as the cvar, this function only returns the name of the first specified filterscript or plugin. This is a bug. * The length of the returned string. 0 if the specified server variable is not a string or doesn't exist. + */ #pragma deprecated Use `GetConsoleVarAsString`. native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); @@ -1726,6 +1732,7 @@ native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsInt * Type 'varlist' in the server console to display a list of available server variables and their types. * The value of the specified server variable. 0 if the specified server variable is not an integer or doesn't exist. + */ #pragma deprecated Use `GetConsoleVarAsInt`. native GetServerVarAsInt(const cvar[]); @@ -1737,6 +1744,7 @@ native GetServerVarAsInt(const cvar[]); * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsBool * Type 'varlist' in the server console to display a list of available server variables and their types. * The value of the specified server variable. 0 if the specified server variable is not a boolean or doesn't exist. + */ #pragma deprecated Use `GetConsoleVarAsBool`. native bool:GetServerVarAsBool(const cvar[]); // These are the same 3 functions as above although they avoid the name ambiguity/conflict with the SVar system. @@ -2739,6 +2747,7 @@ native ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE:style, const caption[], * The player to get the unique ID of * Where to save the unique ID * The size of "output" (the serial) + */ #pragma deprecated Use `GPCI`. native gpci(playerid, serial[], len = sizeof (serial)); From 994f48c4515f7f0e418d808470c82e033d1fe853 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 16:38:58 +0000 Subject: [PATCH 050/104] Fix some comment closes. --- a_samp.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/a_samp.inc b/a_samp.inc index 732e47f..4fe2827 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -3031,6 +3031,7 @@ forward OnPlayerExitVehicle(playerid, vehicleid); * This callback does not handle returns.
    * It is always called first in filterscripts. *
    + */ #if !defined PLAYER_STATE #define PLAYER_STATE: _: #endif @@ -3377,6 +3378,9 @@ forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); * It is always called first in gamemode. * */ +#if !defined KEY + #define KEY: _: +#endif forward OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys); /** @@ -3727,6 +3731,7 @@ forward OnPlayerRequestDownload(playerid, type, crc); * 0 - Indicates that this callback will be passed to the next filterscript.
    * It is always called first in filterscripts. * + */ #if !defined CLICK_SOURCE #define CLICK_SOURCE: _: #endif @@ -3755,6 +3760,7 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source); * 0 - Indicates that this callback will be passed to the next script.
    * It is always called first in filterscripts. * + */ #if !defined EDIT_RESPONSE #define EDIT_RESPONSE: _: #endif @@ -3785,6 +3791,7 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:respo * 0 - Indicates that this callback will be passed to the next script.
    * It is always called first in filterscripts. * + */ #if !defined EDIT_RESPONSE #define EDIT_RESPONSE: _: #endif @@ -3806,6 +3813,7 @@ forward OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, mode * 0 - Indicates that this callback will be passed to the next script.
    * It is always called first in filterscripts. * + */ #if !defined SELECT_OBJECT #define SELECT_OBJECT: _: #endif @@ -3852,6 +3860,7 @@ forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Fl * 1 - Allow the bullet to cause damage.
    * It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. * + */ #if !defined BULLET_HIT_TYPE #define BULLET_HIT_TYPE: _: #endif From 048515f54417e28ddf75dfeb5b909731adc1188d Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 16:43:56 +0000 Subject: [PATCH 051/104] Add `` identifier to all natives. --- a_actor.inc | 16 +++++ a_http.inc | 1 + a_npc.inc | 30 ++++++++++ a_objects.inc | 38 ++++++++++++ a_players.inc | 159 +++++++++++++++++++++++++++++++++++++++++++++++++ a_samp.inc | 148 +++++++++++++++++++++++++++++++++++++++++++++ a_sampdb.inc | 16 +++++ a_vehicles.inc | 44 ++++++++++++++ 8 files changed, 452 insertions(+) diff --git a/a_actor.inc b/a_actor.inc index 20aeb62..513d691 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -17,6 +17,7 @@ #pragma tabsize 4 /** + * a_actor * 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. * The model ID (skin ID) the actor should have * The x coordinate to create the actor at @@ -59,6 +60,7 @@ native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); /** + * a_actor * Destroy an actor which was created with CreateActor. * The ID of the actor to destroy. Returned by CreateActor * @@ -71,6 +73,7 @@ native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); native DestroyActor(actorid); /** + * a_actor * Checks if an actor is streamed in for a player. * The ID of the actor * The ID of the player @@ -82,6 +85,7 @@ native DestroyActor(actorid); native bool:IsActorStreamedIn(actorid, playerid); /** + * a_actor * Set the virtual world of an actor. Only players in the same world will see the actor. * The ID of the actor (returned by CreateActor) to set the virtual world of * The virtual world to put the actor ID @@ -96,6 +100,7 @@ native bool:IsActorStreamedIn(actorid, playerid); native SetActorVirtualWorld(actorid, virtualWorld); /** + * a_actor * Get the virtual world of an actor. * The ID of the actor to get the virtual world of * @@ -105,6 +110,7 @@ native SetActorVirtualWorld(actorid, virtualWorld); native GetActorVirtualWorld(actorid); /** + * a_actor * Apply an animation to an actor. * The ID of the actor to apply the animation to * The animation library from which to apply an animation @@ -126,6 +132,7 @@ native GetActorVirtualWorld(actorid); native ApplyActorAnimation(actorid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); /** + * a_actor * Clear any animations applied to an actor. * The ID of the actor (returned by CreateActor) to clear the animations for * @@ -138,6 +145,7 @@ native ApplyActorAnimation(actorid, const animationLibrary[], const animationNam native ClearActorAnimations(actorid); /** + * a_actor * Set the position of an actor. * The ID of the actor to set the position of. Returned by CreateActor * The x coordinate to position the actor at @@ -155,6 +163,7 @@ native ClearActorAnimations(actorid); native SetActorPos(actorid, Float:x, Float:y, Float:z); /** + * a_actor * Get the position of an actor. * The ID of the actor to get the position of. Returned by CreateActor * A float variable, passed by reference, in which to store the x coordinate of the actor @@ -170,6 +179,7 @@ native SetActorPos(actorid, Float:x, Float:y, Float:z); native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); /** + * a_actor * Set the facing angle of an actor. * The ID of the actor to set the facing angle of. Returned by CreateActor * The facing angle to set for the actor @@ -186,6 +196,7 @@ native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); native SetActorFacingAngle(actorid, Float:angle); /** + * a_actor * Get the facing angle of an actor. * The ID of the actor to get the facing angle of. Returned by CreateActor * A float variable, passed by reference, in to which the actor's facing angle will be stored @@ -200,6 +211,7 @@ native SetActorFacingAngle(actorid, Float:angle); native GetActorFacingAngle(actorid, &Float:angle); /** + * a_actor * Set the health of an actor. * The ID of the actor to set the health of * The value to set the actors's health to @@ -212,6 +224,7 @@ native GetActorFacingAngle(actorid, &Float:angle); native SetActorHealth(actorid, Float:health); /** + * a_actor * Get the health of an actor. * The ID of the actor to get the health of * A float variable, passed by reference, in to which to store the actor's health @@ -224,6 +237,7 @@ native SetActorHealth(actorid, Float:health); native GetActorHealth(actorid, &Float:health); /** + * a_actor * Toggle an actor's invulnerability. * The ID of the actor to set invulnerability * false to make them vulnerable, true to make them invulnerable (optional=true) @@ -238,6 +252,7 @@ native GetActorHealth(actorid, &Float:health); native SetActorInvulnerable(actorid, bool:invulnerable = true); /** + * a_actor * Check if an actor is invulnerable. * The ID of the actor to check * @@ -249,6 +264,7 @@ native SetActorInvulnerable(actorid, bool:invulnerable = true); native bool:IsActorInvulnerable(actorid); /** + * a_actor * Checks if an actor ID is valid. * The ID of the actor to check * This function was added in SA-MP 0.3.7 and will not work in earlier versions! diff --git a/a_http.inc b/a_http.inc index edf0ca8..8773ad4 100644 --- a/a_http.inc +++ b/a_http.inc @@ -43,6 +43,7 @@ enum HTTP_ERROR:__HTTP_ERROR } /** + * a_http * Sends a threaded HTTP request. * ID used to differentiate requests that are sent to the same callback (useful for playerids) * The type of request you wish to send diff --git a/a_npc.inc b/a_npc.inc index 108d0f1..fbdd4fc 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -392,6 +392,7 @@ open.mp releases can use `A` as the first digit. #endif /** + * a_npc * Formats a string to include variables and other strings inside it. * The string to output the result to * The maximum length output can contain @@ -420,6 +421,7 @@ open.mp releases can use `A` as the first digit. native format(output[], len = sizeof (output), const format[], {Float, _}:...); /** + * a_npc * Sets a 'timer' to call a function after some time. Can be set to repeat. * Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server * Interval in milliseconds @@ -435,6 +437,7 @@ native format(output[], len = sizeof (output), const format[], {Float, _}:...); native SetTimer(const functionName[], interval, bool:repeating); /** + * a_npc * Kills (stops) a running timer. * The ID of the timer to kill (returned by SetTimer or SetTimerEx) * @@ -444,6 +447,7 @@ native SetTimer(const functionName[], interval, bool:repeating); native KillTimer(timerid); /** + * a_npc * Returns the uptime of the actual server (not the SA-MP server) in milliseconds. * * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. @@ -453,6 +457,7 @@ native KillTimer(timerid); native GetTickCount(); /** + * a_npc * Get the inversed value of a sine in degrees. * The sine for which to find the angle for * @@ -461,6 +466,7 @@ native GetTickCount(); native Float:asin(Float:value); /** + * a_npc * Get the inversed value of a cosine in degrees. * The cosine for which to find the angle for * @@ -469,6 +475,7 @@ native Float:asin(Float:value); native Float:acos(Float:value); /** + * a_npc * Get the inversed value of a tangent in degrees. * The tangent for which to find the angle for * @@ -478,6 +485,7 @@ native Float:acos(Float:value); native Float:atan(Float:value); /** + * a_npc * Get the multi-valued inversed value of a tangent in degrees. * y size * x size @@ -488,6 +496,7 @@ native Float:atan(Float:value); native Float:atan2(Float:y, Float:x); /** + * a_npc * This will send a player text by the bot, just like using SendPlayerMessageToAll, but this function is to be used inside the NPC scripts. * The text to be sent by the NPC * @@ -496,6 +505,7 @@ native Float:atan2(Float:y, Float:x); native SendChat(const message[]); /** + * a_npc * This will force the NPC to write a desired command, and this way, getting the effects it would produce. * The command text to be sent by the NPC * @@ -504,6 +514,7 @@ native SendChat(const message[]); native SendCommand(const command[]); /** + * a_npc * Get a player's current state. * The ID of the player to get the current state of * @@ -529,6 +540,7 @@ native SendCommand(const command[]); native PLAYER_STATE:GetPlayerState(playerid); /** + * a_npc * Get the position of a player, represented by x, y and z coordinates. * The ID of the player to get the position of * A float variable in which to store the x coordinate in, passed by reference @@ -544,6 +556,7 @@ native PLAYER_STATE:GetPlayerState(playerid); native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /** + * a_npc * This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. * The ID of the player in the vehicle that you want to get the ID of * @@ -559,6 +572,7 @@ native GetPlayerHealth(playerid); native GetPlayerArmour(playerid); /** + * a_npc * Retrieves a player's current special action. * The ID of the player to get the special action of * @@ -568,6 +582,7 @@ native GetPlayerArmour(playerid); native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); /** + * a_npc * Checks if a player is streamed in for an NPC. Only nearby players are streamed in. * The ID of the player to check * @@ -577,6 +592,7 @@ native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); native bool:IsPlayerStreamedIn(playerid); /** + * a_npc * Checks if a vehicle is streamed in for an NPC. Only nearby vehicles are streamed in. * The ID of the vehicle to check * @@ -586,6 +602,7 @@ native bool:IsPlayerStreamedIn(playerid); native bool:IsVehicleStreamedIn(vehicleid); /** + * a_npc * Check which keys a player is pressing. * The ID of the player to get the keys of * Bitmask containing the player's key states. List of keys @@ -599,6 +616,7 @@ native bool:IsVehicleStreamedIn(vehicleid); native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); /** + * a_npc * Gets the angle a player is facing. * The player you want to get the angle of * The Float to store the angle in, passed by reference @@ -608,6 +626,7 @@ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); native GetPlayerFacingAngle(playerid, &Float:ang); /** + * a_npc * Get the current location of the NPC. * A float to save the x coordinate, passed by reference * A float to save the y coordinate, passed by reference @@ -619,6 +638,7 @@ native GetPlayerFacingAngle(playerid, &Float:ang); native GetMyPos(&Float:x, &Float:y, &Float:z); /** + * a_npc * Set the position of the NPC. * The x coordinate to put the NPC at * The y coordinate to put the NPC at @@ -630,6 +650,7 @@ native GetMyPos(&Float:x, &Float:y, &Float:z); native SetMyPos(Float:x, Float:y, Float:z); /** + * a_npc * Get the current facing angle of the NPC. * A float to save the angle in, passed by reference * @@ -639,6 +660,7 @@ native SetMyPos(Float:x, Float:y, Float:z); native GetMyFacingAngle(&Float:ang); /** + * a_npc * Set the NPC's facing angle. * The new NPC's facing angle * This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -647,6 +669,7 @@ native GetMyFacingAngle(&Float:ang); native SetMyFacingAngle(Float:ang); /** + * a_npc * Get the distance between the NPC and a point. * The x coordinate of the point * The y coordinate of the point @@ -660,6 +683,7 @@ native SetMyFacingAngle(Float:ang); native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); /** + * a_npc * Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. * The ID of the player * The furthest distance the player can be from the point to be in range @@ -675,6 +699,7 @@ native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); /** + * a_npc * Get a player's name. * The ID of the player to get the name of * An array into which to store the name, passed by reference @@ -690,6 +715,7 @@ native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Floa native GetPlayerName(playerid, name[], len = sizeof (name)); /** + * a_npc * Checks if a player is connected (if an ID is taken by a connected player). * The ID of the player to check * @@ -701,6 +727,7 @@ native GetPlayerName(playerid, name[], len = sizeof (name)); native bool:IsPlayerConnected(playerid); /** + * a_npc * This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. * The type of recording to be loaded * The filename to be loaded, without the .rec extension @@ -710,6 +737,7 @@ native bool:IsPlayerConnected(playerid); native StartRecordingPlayback(PLAYER_RECORDING_TYPE:playbackType, const recordFile[]); /** + * a_npc * This will stop the current .rec file which is being ran by the NPC, making it stay idle until some other order is given. * * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! @@ -717,6 +745,7 @@ native StartRecordingPlayback(PLAYER_RECORDING_TYPE:playbackType, const recordFi native StopRecordingPlayback(); /** + * a_npc * This will pause playing back the recording. * * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! @@ -724,6 +753,7 @@ native StopRecordingPlayback(); native PauseRecordingPlayback(); /** + * a_npc * This will resume the paused recording. * * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! diff --git a/a_objects.inc b/a_objects.inc index 2068741..5fd8923 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -53,6 +53,7 @@ enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN // Objects /** + * a_objects * Creates an object at specified coordinates in the game world. * The model to create * The x coordinate to create the object at @@ -84,6 +85,7 @@ enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, Float:rotZ, Float:drawDistance = 0.0); /** + * a_objects * Attach an object to a vehicle. * The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first * The ID of the vehicle to attach the object to @@ -104,6 +106,7 @@ native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /** + * a_objects * You can use this function to attach objects to other objects. The objects will folow the main object. * The object to attach to another object * The object to attach the object to @@ -132,6 +135,7 @@ native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, F native AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); /** + * a_objects * Attach an object to a player. * The ID of the object to attach to the player * The ID of the player to attach the object to @@ -151,6 +155,7 @@ native AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Fl native AttachObjectToPlayer(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /** + * a_objects * Change the position of an object. * The ID of the object to set the position of. Returned by CreateObject * The x coordinate to position the object at @@ -165,6 +170,7 @@ native AttachObjectToPlayer(objectid, parentid, Float:offsetX, Float:offsetY, Fl native SetObjectPos(objectid, Float:x, Float:y, Float:z); /** + * a_objects * Get the position of an object. * The ID of the object to get the position of. * A variable in which to store the x coordinate, passed by reference @@ -182,6 +188,7 @@ native SetObjectPos(objectid, Float:x, Float:y, Float:z); native GetObjectPos(objectid, &Float:x, &Float:y, &Float:z); /** + * a_objects * Set the rotation of an object on the three axes (x, y and z). * The ID of the object to set the rotation of * The x rotation @@ -196,6 +203,7 @@ native GetObjectPos(objectid, &Float:x, &Float:y, &Float:z); native SetObjectRot(objectid, Float:rotX, Float:rotY, Float:rotZ); /** + * a_objects * Use this function to get the objects current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. * The objectid of the object you want to get the rotation from * The variable to store the x rotation, passed by reference @@ -210,6 +218,7 @@ native SetObjectRot(objectid, Float:rotX, Float:rotY, Float:rotZ); native GetObjectRot(objectid, &Float:rotX, &Float:rotY, &Float:rotZ); /** + * a_objects * Get the model ID of an object. * The ID of the object to get the model of * @@ -220,6 +229,7 @@ native GetObjectRot(objectid, &Float:rotX, &Float:rotY, &Float:rotZ); native GetObjectModel(objectid); /** + * a_objects * Disable collisions between players' cameras and the specified object. * The ID of the object to disable camera collisions on * @@ -234,6 +244,7 @@ native GetObjectModel(objectid); native SetObjectNoCameraCol(objectid); /** + * a_objects * Checks if an object with the ID provided exists. * The ID of the object to check the existence of * @@ -245,6 +256,7 @@ native SetObjectNoCameraCol(objectid); native bool:IsValidObject(objectid); /** + * a_objects * Destroys (removes) an object that was created using CreateObject. * The ID of the object to destroy. Returned by CreateObject * @@ -254,6 +266,7 @@ native bool:IsValidObject(objectid); native DestroyObject(objectid); /** + * a_objects * Move an object to a new position with a set speed. Players/vehicles will 'surf' the object as it moves. * The ID of the object to move * The x coordinate to move the object to @@ -277,6 +290,7 @@ native DestroyObject(objectid); native MoveObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); /** + * a_objects * Stop a moving object after MoveObject has been used. * The ID of the object to stop moving * @@ -287,6 +301,7 @@ native MoveObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = native StopObject(objectid); /** + * a_objects * Checks if the given objectid is moving. * The objectid you want to check if is moving * @@ -299,6 +314,7 @@ native StopObject(objectid); native bool:IsObjectMoving(objectid); /** + * a_objects * Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical User Interface). * The ID of the player that should edit the object * The ID of the object to be edited by the player @@ -316,6 +332,7 @@ native bool:IsObjectMoving(objectid); native EditObject(playerid, objectid); /** + * a_objects * Allows players to edit a player-object (position and rotation) with a GUI and their mouse. * The ID of the player that should edit the object * The object to be edited by the player @@ -333,6 +350,7 @@ native EditObject(playerid, objectid); native EditPlayerObject(playerid, objectid); /** + * a_objects * Display the cursor and allow the player to select an object. OnPlayerSelectObject is called when the player selects an object. * The ID of the player that should be able to select the object * @@ -345,6 +363,7 @@ native EditPlayerObject(playerid, objectid); native SelectObject(playerid); /** + * a_objects * Cancel object edition mode for a player. * The ID of the player to cancel edition for * @@ -356,6 +375,7 @@ native SelectObject(playerid); native CancelEdit(playerid); /** + * a_objects * Creates an object which will be visible to only one player. * The ID of the player to create the object for * The model to create @@ -383,6 +403,7 @@ native CancelEdit(playerid); native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, Float:rotZ, Float:drawDistance = 0.0); /** + * a_objects * Attach a player object to a vehicle. * The ID of the player the object was created for * The ID of the object to attach to the vehicle @@ -402,6 +423,7 @@ native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:ro native AttachPlayerObjectToVehicle(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /** + * a_objects * Sets the position of a player-object to the specified coordinates. * The ID of the player whose player-object to set the position of * The ID of the player-object to set the position of. Returned by CreatePlayerObject @@ -420,6 +442,7 @@ native AttachPlayerObjectToVehicle(playerid, objectid, parentid, Float:offsetX, native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); /** + * a_objects * Get the position of a player object (CreatePlayerObject). * The ID of the player whose player object to get the position of * The object's ID of which you want the current location @@ -440,6 +463,7 @@ native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); native GetPlayerObjectPos(playerid, objectid, &Float:x, &Float:y, &Float:z); /** + * a_objects * Set the rotation of an object on the x, y and z axis. * The ID of the player whose player-object to rotate * The ID of the player-object to rotate @@ -459,6 +483,7 @@ native GetPlayerObjectPos(playerid, objectid, &Float:x, &Float:y, &Float:z); native SetPlayerObjectRot(playerid, objectid, Float:rotX, Float:rotY, Float:rotZ); /** + * a_objects * Use this function to get the object's current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. * The player you associated this object to * The objectid of the object you want to get the rotation from @@ -474,6 +499,7 @@ native SetPlayerObjectRot(playerid, objectid, Float:rotX, Float:rotY, Float:rotZ native GetPlayerObjectRot(playerid, objectid, &Float:rotX, &Float:rotY, &Float:rotZ); /** + * a_objects * Retrieve the model ID of a player-object. * The ID of the player whose player-object to get the model of * The ID of the player-object of which to retrieve the model ID @@ -485,6 +511,7 @@ native GetPlayerObjectRot(playerid, objectid, &Float:rotX, &Float:rotY, &Float:r native GetPlayerObjectModel(playerid, objectid); /** + * a_objects * Toggles a player object camera collision. * The playerid the object belongs to * The ID of the object you want to toggle @@ -497,6 +524,7 @@ native GetPlayerObjectModel(playerid, objectid); native SetPlayerObjectNoCameraCol(playerid, objectid); /** + * a_objects * Checks if the given object ID is valid for the given player. * The ID of the player whose player-object to validate * The ID of the object to validate @@ -508,6 +536,7 @@ native SetPlayerObjectNoCameraCol(playerid, objectid); native bool:IsValidPlayerObject(playerid, objectid); /** + * a_objects * Destroy a player-object created using CreatePlayerObject. * The ID of the player whose player-object to destroy * The ID of the player-object to destroy. Returned by CreatePlayerObject @@ -518,6 +547,7 @@ native bool:IsValidPlayerObject(playerid, objectid); native DestroyPlayerObject(playerid, objectid); /** + * a_objects * Move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects. * The ID of the player whose player-object to move * The ID of the object to move @@ -541,6 +571,7 @@ native DestroyPlayerObject(playerid, objectid); native MovePlayerObject(playerid, objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); /** + * a_objects * Stop a moving player-object after MovePlayerObject has been used. * The ID of the player whose player-object to stop * The ID of the player-object to stop @@ -552,6 +583,7 @@ native MovePlayerObject(playerid, objectid, Float:x, Float:y, Float:z, Float:spe native StopPlayerObject(playerid, objectid); /** + * a_objects * Checks if the given player objectid is moving. * The ID of the player whose player-object is checked * The player objectid you want to check if is moving @@ -565,6 +597,7 @@ native StopPlayerObject(playerid, objectid); native bool:IsPlayerObjectMoving(playerid, objectid); /** + * a_objects * The same as AttachObjectToPlayer but for objects which were created for player. * The ID of the player which is linked with the object * The objectid you want to attach to the player @@ -584,6 +617,7 @@ native bool:IsPlayerObjectMoving(playerid, objectid); native AttachPlayerObjectToPlayer(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /** + * a_objects * Replace the texture of an object with the texture from another model in the game. * The ID of the object to change the texture of * The material index on the object to change (0 to 15) @@ -603,6 +637,7 @@ native AttachPlayerObjectToPlayer(playerid, objectid, parentid, Float:offsetX, F native SetObjectMaterial(objectid, materialIndex, modelid, const textureLibrary[], const textureName[], materialColour = 0); /** + * a_objects * Replace the texture of a player-object with the texture from another model in the game. * The ID of the player the object is associated to * The ID of the object to replace the texture of @@ -619,6 +654,7 @@ native SetObjectMaterial(objectid, materialIndex, modelid, const textureLibrary[ native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const textureLibrary[], const textureName[], materialColour = 0); /** + * a_objects * Replace the texture of an object with text. * The ID of the object to replace the texture of with text * The text to show on the object. (MAX 2048 characters) @@ -669,6 +705,7 @@ native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const native SetObjectMaterialText(objectid, const text[], materialIndex = 0, OBJECT_MATERIAL_SIZE:materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, OBJECT_MATERIAL_TEXT_ALIGN:textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); /** + * a_objects * Replace the texture of a player object with text. * The ID of the player whose player object to set the text of * The ID of the object on which to place the text @@ -716,6 +753,7 @@ native SetObjectMaterialText(objectid, const text[], materialIndex = 0, OBJECT_M native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialIndex = 0, OBJECT_MATERIAL_SIZE:materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, OBJECT_MATERIAL_TEXT_ALIGN:textalignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT); /** + * a_objects * Allows camera collisions with newly created objects to be disabled by default. * 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) * diff --git a/a_players.inc b/a_players.inc index a1dd139..c01fad9 100644 --- a/a_players.inc +++ b/a_players.inc @@ -154,6 +154,7 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE // Player /** + * a_players * This function can be used to change the spawn information of a specific player. It allows you to automatically set someone's spawn weapons, their team, skin and spawn position, normally used in case of minigames or automatic-spawn systems. This function is more crash-safe then using SetPlayerSkin in OnPlayerSpawn and/or OnPlayerRequestClass, even though this has been fixed in 0.2. * The Playerid of who you want to set the spawn information * The Team-ID of the chosen player @@ -175,6 +176,7 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /** + * a_players * (Re)Spawns a player. * The ID of the player to spawn * @@ -191,6 +193,7 @@ native SpawnPlayer(playerid); // Player info /** + * a_players * Set a player's position. * The ID of the player to set the position of * The x coordinate to position the player at @@ -210,6 +213,7 @@ native SpawnPlayer(playerid); native SetPlayerPos(playerid, Float:x, Float:y, Float:z); /** + * a_players * This sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position. * The ID of the player to set the position of * The x coordinate to position the player at @@ -226,6 +230,7 @@ native SetPlayerPos(playerid, Float:x, Float:y, Float:z); native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); /** + * a_players * Get the position of a player, represented by x, y and z coordinates. * The ID of the player to get the position of * A float variable in which to store the x coordinate in, passed by reference @@ -241,6 +246,7 @@ native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /** + * a_players * Set a player's facing angle (z rotation). * The ID of the player to set the facing angle of * The angle the player should face @@ -255,6 +261,7 @@ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); native SetPlayerFacingAngle(playerid, Float:ang); /** + * a_players * Gets the angle a player is facing. * The player you want to get the angle of * The Float to store the angle in, passed by reference @@ -266,6 +273,7 @@ native SetPlayerFacingAngle(playerid, Float:ang); native GetPlayerFacingAngle(playerid, &Float:ang); /** + * a_players * Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. * The ID of the player * The furthest distance the player can be from the point to be in range @@ -281,6 +289,7 @@ native GetPlayerFacingAngle(playerid, &Float:ang); native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); /** + * a_players * Calculate the distance between a player and a map coordinate. * The ID of the player to calculate the distance from * The x map coordinate @@ -295,6 +304,7 @@ native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Floa native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); /** + * a_players * Checks if a player is streamed in another player's client. * The ID of the player to check is streamed in * The ID of the player to check if playerid is streamed in for @@ -312,6 +322,7 @@ native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); native bool:IsPlayerStreamedIn(targetid, playerid); /** + * a_players * Set a player's interior. A list of currently known interiors and their positions can be found here. * The ID of the player to set the interior of * The interior ID to set the player in @@ -326,6 +337,7 @@ native bool:IsPlayerStreamedIn(targetid, playerid); native SetPlayerInterior(playerid, interiorid); /** + * a_players * Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page. * The player to get the interior ID of * @@ -336,6 +348,7 @@ native SetPlayerInterior(playerid, interiorid); native GetPlayerInterior(playerid); /** + * a_players * Set the health of a player. * The ID of the player to set the health of * The value to set the player's health to. Max health that can be displayed in the HUD is 100, though higher values are valid @@ -353,6 +366,7 @@ native GetPlayerInterior(playerid); native SetPlayerHealth(playerid, Float:health); /** + * a_players * The function GetPlayerHealth allows you to retrieve the health of a player. Useful for cheat detection, among other things. * The ID of the player * Float to store health, passed by reference @@ -371,6 +385,7 @@ native SetPlayerHealth(playerid, Float:health); native GetPlayerHealth(playerid, &Float:health); /** + * a_players * Set a player's armor level. * The ID of the player to set the armour of * The amount of armour to set, as a percentage (float). Values larger than 100 are valid, but won't be displayed in the HUD's armour bar @@ -387,6 +402,7 @@ native GetPlayerHealth(playerid, &Float:health); native SetPlayerArmour(playerid, Float:armour); /** + * a_players * This function stores the armour of a player into a variable. * The ID of the player that you want to get the armour of * The float to to store the armour in, passed by reference @@ -404,6 +420,7 @@ native SetPlayerArmour(playerid, Float:armour); native GetPlayerArmour(playerid, &Float:armour); /** + * a_players * Set the ammo of a player's weapon. * The ID of the player to set the weapon ammo of * The ID of the weapon to set the ammo of. @@ -420,6 +437,7 @@ native GetPlayerArmour(playerid, &Float:armour); native SetPlayerAmmo(playerid, WEAPON:weaponid, ammo); /** + * a_players * Gets the amount of ammo in a player's current weapon. * The ID of the player whose ammo to get * @@ -430,6 +448,7 @@ native SetPlayerAmmo(playerid, WEAPON:weaponid, ammo); native GetPlayerAmmo(playerid); /** + * a_players * Check the state of a player's weapon. * The ID of the player to obtain the weapon state of * @@ -449,6 +468,7 @@ native GetPlayerAmmo(playerid); native WEAPONSTATE:GetPlayerWeaponState(playerid); /** + * a_players * Check who a player is aiming at. * The ID of the player to get the target of * @@ -462,6 +482,7 @@ native WEAPONSTATE:GetPlayerWeaponState(playerid); native GetPlayerTargetPlayer(playerid); /** + * a_players * Gets ID of an actor which is aimed by certain player. * The ID of the player to get the target of * @@ -475,6 +496,7 @@ native GetPlayerTargetPlayer(playerid); native GetPlayerTargetActor(playerid); /** + * a_players * Set the team of a player. * The ID of the player you want to set the team of * The team to put the player in. Use NO_TEAM to remove the player from any team @@ -487,6 +509,7 @@ native GetPlayerTargetActor(playerid); native SetPlayerTeam(playerid, teamid); /** + * a_players * Get the ID of the team the player is on. * The ID of the player to get the team of * @@ -500,6 +523,7 @@ native SetPlayerTeam(playerid, teamid); native GetPlayerTeam(playerid); /** + * a_players * Set a player's score. Players' scores are shown in the scoreboard (shown by holding the TAB key). * The ID of the player to set the score of * The value to set the player's score to @@ -512,6 +536,7 @@ native GetPlayerTeam(playerid); native SetPlayerScore(playerid, score); /** + * a_players * This function returns a player's score as it was set using SetPlayerScore. * The player to get the score of * @@ -521,6 +546,7 @@ native SetPlayerScore(playerid, score); native GetPlayerScore(playerid); /** + * a_players *
    * Checks the player's level of drunkenness. If the level is less than 2000, the player is sober. The player's level of drunkness goes down slowly automatically (1 level per frame) but will always reach 2000 at the end (in 0.3b it will stop at 0). * The higher drunkenness levels affect the player's camera, and the car driving handling. The level of drunkenness increases when the player drinks from a bottle (You can use SetPlayerSpecialAction to give them bottles). @@ -533,6 +559,7 @@ native GetPlayerScore(playerid); native GetPlayerDrunkLevel(playerid); /** + * a_players * Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control. * The ID of the player to set the drunkenness of * The level of drunkenness to set @@ -552,6 +579,7 @@ native GetPlayerDrunkLevel(playerid); native SetPlayerDrunkLevel(playerid, level); /** + * a_players * Set the colour of a player's nametag and marker (radar blip). * The ID of the player whose colour to set * The colour to set. Supports alpha values (RGBA) @@ -564,6 +592,7 @@ native SetPlayerDrunkLevel(playerid, level); native SetPlayerColor(playerid, colour); /** + * a_players * Gets the colour of the player's name and radar marker. Only works after SetPlayerColor. * The ID of the player to get the colour of * @@ -574,6 +603,7 @@ native SetPlayerColor(playerid, colour); native GetPlayerColor(playerid); /** + * a_players * Set the skin of a player. A player's skin is their character model. * The ID of the player to set the skin of * The skin the player should use @@ -590,6 +620,7 @@ native GetPlayerColor(playerid); native SetPlayerSkin(playerid, skinid); /** + * a_players * Returns the class of the players skin. * The player you want to get the skin from * @@ -600,6 +631,7 @@ native SetPlayerSkin(playerid, skinid); native GetPlayerSkin(playerid); /** + * a_players * Returns the class of the players skin. * The player you want to get the skin from * @@ -610,6 +642,7 @@ native GetPlayerSkin(playerid); native GetPlayerCustomSkin(playerid); /** + * a_players * Give a player a weapon with a specified amount of ammo. * The ID of the player to give a weapon to * The ID of the weapon to give to the player @@ -624,6 +657,7 @@ native GetPlayerCustomSkin(playerid); native GivePlayerWeapon(playerid, WEAPON:weaponid, ammo); /** + * a_players * Removes all weapons from a player. * The ID of the player whose weapons to remove * @@ -637,6 +671,7 @@ native GivePlayerWeapon(playerid, WEAPON:weaponid, ammo); native ResetPlayerWeapons(playerid); /** + * a_players * Sets which weapon (that a player already has) the player is holding. * The ID of the player to arm with a weapon * The ID of the weapon that the player should be armed with @@ -652,6 +687,7 @@ native ResetPlayerWeapons(playerid); native SetPlayerArmedWeapon(playerid, WEAPON:weaponid); /** + * a_players * Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot). * The ID of the player whose weapon data to retrieve * The weapon slot to get data for (0-12) @@ -668,6 +704,7 @@ native SetPlayerArmedWeapon(playerid, WEAPON:weaponid); native GetPlayerWeaponData(playerid, slot, &WEAPON:weapons, &ammo); /** + * a_players * Give money to or take money from a player. * The ID of the player to give money to or take money from * The amount of money to give the player. Use a minus value to take money @@ -681,6 +718,7 @@ native GetPlayerWeaponData(playerid, slot, &WEAPON:weapons, &ammo); native GivePlayerMoney(playerid, money); /** + * a_players * Reset a player's money to $0. * The ID of the player to reset the money of * @@ -693,6 +731,7 @@ native GivePlayerMoney(playerid, money); native ResetPlayerMoney(playerid); /** + * a_players * Sets the name of a player. * The ID of the player to set the name of * The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-z, [], (), $, @, ., _, =) @@ -710,6 +749,7 @@ native ResetPlayerMoney(playerid); native SetPlayerName(playerid, const name[]); /** + * a_players * Retrieves the amount of money a player has. * The ID of the player to get the money of * @@ -719,6 +759,7 @@ native SetPlayerName(playerid, const name[]); native GetPlayerMoney(playerid); /** + * a_players * Get a player's current state. * The ID of the player to get the current state of * @@ -744,6 +785,7 @@ native GetPlayerMoney(playerid); native PLAYER_STATE:GetPlayerState(playerid); /** + * a_players * Get the specified player's IP address and store it in a string. * The ID of the player to get the IP address of * An array into which to store the player's IP address, passed by reference @@ -761,6 +803,7 @@ native PLAYER_STATE:GetPlayerState(playerid); native GetPlayerIp(playerid, ip[], len = sizeof (ip)); /** + * a_players * Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back. * The ID of the player to get the ping of * @@ -772,6 +815,7 @@ native GetPlayerIp(playerid, ip[], len = sizeof (ip)); native GetPlayerPing(playerid); /** + * a_players * Returns the ID of the weapon a player is currently holding. * The ID of the player to get the currently held weapon of * @@ -783,6 +827,7 @@ native GetPlayerPing(playerid); native WEAPON:GetPlayerWeapon(playerid); /** + * a_players * Check which keys a player is pressing. * The ID of the player to get the keys of * Bitmask containing the player's key states. List of keys @@ -796,6 +841,7 @@ native WEAPON:GetPlayerWeapon(playerid); native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); /** + * a_players * Get a player's name. * The ID of the player to get the name of * An array into which to store the name, passed by reference @@ -811,6 +857,7 @@ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); native GetPlayerName(playerid, name[], len = sizeof (name)); /** + * a_players * Sets the game time for a player. If a player's clock is enabled (TogglePlayerClock) the time displayed by it will update automatically. * The ID of the player to set the game time of * Hour to set (0-23) @@ -827,6 +874,7 @@ native GetPlayerName(playerid, name[], len = sizeof (name)); native SetPlayerTime(playerid, hour, minute); /** + * a_players * Get the player's current game time. Set by SetWorldTime or SetPlayerTime, or by the game automatically if TogglePlayerClock is used. * The ID of the player to get the game time of * A variable in which to store the hour, passed by reference @@ -842,6 +890,7 @@ native SetPlayerTime(playerid, hour, minute); native GetPlayerTime(playerid, &hour, &minute); /** + * a_players * Toggle the in-game clock (top-right corner) for a specific player. When this is enabled, time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) when set using SetWeather/SetPlayerWeather. * The player whose clock you want to enable/disable * 1 to show and 0 to hide. Hidden by default @@ -855,6 +904,7 @@ native GetPlayerTime(playerid, &hour, &minute); native TogglePlayerClock(playerid, bool:toggle); /** + * a_players * Set a player's weather. * The ID of the player whose weather to set * The weather to set @@ -865,6 +915,7 @@ native TogglePlayerClock(playerid, bool:toggle); native SetPlayerWeather(playerid, weather); /** + * a_players * Forces a player to go back to class selection. * The player to send back to class selection * @@ -876,6 +927,7 @@ native SetPlayerWeather(playerid, weather); native ForceClassSelection(playerid); /** + * a_players * Set a player's wanted level (6 brown stars under HUD). * The ID of the player to set the wanted level of * The wanted level to set for the player (0-6) @@ -889,6 +941,7 @@ native ForceClassSelection(playerid); native SetPlayerWantedLevel(playerid, level); /** + * a_players * Gets the wanted level of a player. * The ID of the player that you want to get the wanted level of * @@ -898,6 +951,7 @@ native SetPlayerWantedLevel(playerid, level); native GetPlayerWantedLevel(playerid); /** + * a_players * Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default). * The ID of player to set the fighting style of * The fighting style that should be set @@ -919,6 +973,7 @@ native GetPlayerWantedLevel(playerid); native SetPlayerFightingStyle(playerid, FIGHT_STYLE:style); /** + * a_players * Get the fighting style the player currently using. * The ID of the player to get the fighting style of * @@ -939,6 +994,7 @@ native SetPlayerFightingStyle(playerid, FIGHT_STYLE:style); native FIGHT_STYLE:GetPlayerFightingStyle(playerid); /** + * a_players * Set a player's velocity on the x, y and z axes. * The player to apply the speed to * The velocity (speed) on the x axis @@ -956,6 +1012,7 @@ native FIGHT_STYLE:GetPlayerFightingStyle(playerid); native SetPlayerVelocity(playerid, Float:x, Float:y, Float:z); /** + * a_players * Get the velocity (speed) of a player on the x, y and z axes. * The player to get the speed from * A float variable in which to store the velocity on the x axis, passed by reference @@ -969,6 +1026,7 @@ native SetPlayerVelocity(playerid, Float:x, Float:y, Float:z); native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); /** + * a_players * This function plays a crime report for a player - just like in single-player when CJ commits a crime. * The ID of the player that will hear the crime report * The ID of the suspect player whom will be described in the crime report @@ -1003,6 +1061,7 @@ native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); native PlayCrimeReportForPlayer(playerid, suspectid, crime); /** + * a_players * Play an 'audio stream' for a player. Normal audio files also work (e.g. MP3). * The ID of the player to play the audio for * The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist @@ -1022,6 +1081,7 @@ native PlayCrimeReportForPlayer(playerid, suspectid, crime); native PlayAudioStreamForPlayer(playerid, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, bool:usepos = false); /** + * a_players * Stops the current audio stream for a player. * The player you want to stop the audio stream for * @@ -1031,6 +1091,7 @@ native PlayAudioStreamForPlayer(playerid, const url[], Float:posX = 0.0, Float:p native StopAudioStreamForPlayer(playerid); /** + * a_players * Loads or unloads an interior script for a player (for example the ammunation menu). * The ID of the player to load the interior script for * The shop script to load. Leave blank ("") to unload scripts @@ -1055,6 +1116,7 @@ native StopAudioStreamForPlayer(playerid); native SetPlayerShopName(playerid, const shopName[]); /** + * a_players * Set the skill level of a certain weapon type for a player. * The ID of the player to set the weapon skill of * The weapon to set the skill of @@ -1082,6 +1144,7 @@ native SetPlayerShopName(playerid, const shopName[]); native SetPlayerSkillLevel(playerid, WEAPONSKILL:skill, level); /** + * a_players * Get the ID of the vehicle that the player is surfing (stuck to the roof of). * The ID of the player you want to know the surfing vehicle ID of * @@ -1092,6 +1155,7 @@ native SetPlayerSkillLevel(playerid, WEAPONSKILL:skill, level); native GetPlayerSurfingVehicleID(playerid); /** + * a_players * Returns the ID of the object the player is surfing on. * The ID of the player surfing the object * This function was added in SA-MP 0.3c R3 and will not work in earlier versions! @@ -1100,6 +1164,7 @@ native GetPlayerSurfingVehicleID(playerid); native GetPlayerSurfingObjectID(playerid); /** + * a_players * Removes a standard San Andreas model for a single player within a specified range. * The ID of the player to remove the objects for * The model to remove @@ -1117,6 +1182,7 @@ native GetPlayerSurfingObjectID(playerid); native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, Float:centerZ, Float:radius); /** + * a_players * Retrieves the start and end (hit) position of the last bullet a player fired. * The ID of the player to get the last bullet shot information of * A float variable in which to save the x coordinate of where the bullet originated from @@ -1145,6 +1211,7 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float #endif /** + * a_players * Attach an object to a specific bone on a player. * The ID of the player to attach the object to * The index (slot) to assign the object to (0-9 since 0.3d, 0-4 in previous versions) @@ -1195,6 +1262,7 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float native SetPlayerAttachedObject(playerid, index, modelid, bone, Float:offsetX = 0.0, Float:offsetY = 0.0, Float:offsetZ = 0.0, Float:rotX = 0.0, Float:rotY = 0.0, Float:rotZ = 0.0, Float:scaleX = 1.0, Float:scaleY = 1.0, Float:scaleZ = 1.0, materialColour1 = 0, materialColour2 = 0); /** + * a_players * Remove an attached object from a player. * The ID of the player to remove the object from * The index of the object to remove (set with SetPlayerAttachedObject) @@ -1206,6 +1274,7 @@ native SetPlayerAttachedObject(playerid, index, modelid, bone, Float:offsetX = 0 native RemovePlayerAttachedObject(playerid, index); /** + * a_players * Check if a player has an object attached in the specified index (slot). * The ID of the player to check * The index (slot) to check @@ -1217,6 +1286,7 @@ native RemovePlayerAttachedObject(playerid, index); native bool:IsPlayerAttachedObjectSlotUsed(playerid, index); /** + * a_players * Enter edition mode for an attached object. * The ID of the player to enter in to edition mode * The index (slot) of the attached object to edit @@ -1244,6 +1314,7 @@ native EditAttachedObject(playerid, index); // Per-player TextDraws /** + * a_players * Creates a textdraw for a single player. This can be used as a way around the global text-draw limit. * The ID of the player to create the textdraw for * x-Coordinate @@ -1288,6 +1359,7 @@ native EditAttachedObject(playerid, index); native PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[]); /** + * a_players * Destroy a player-textdraw. * The ID of the player who's player-textdraw to destroy * The ID of the textdraw to destroy @@ -1311,6 +1383,7 @@ native PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[]) native PlayerTextDrawDestroy(playerid, PlayerText:text); /** + * a_players * Sets the width and height of the letters in a player-textdraw. * The ID of the player whose player-textdraw to set the letter size of * The ID of the player-textdraw to change the letter size of @@ -1338,6 +1411,7 @@ native PlayerTextDrawDestroy(playerid, PlayerText:text); native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:width, Float:height); /** + * a_players * Change the size of a player-textdraw (box if PlayerTextDrawUseBox is enabled and/or clickable area for use with PlayerTextDrawSetSelectable). * The ID of the player whose player-textdraw to set the size of * The ID of the player-textdraw to set the size of @@ -1376,6 +1450,7 @@ native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:width, Float:he native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:width, Float:height); /** + * a_players * Set the text alignment of a player-textdraw. * The ID of the player whose player-textdraw to set the alignment of * The ID of the player-textdraw to set the alignment of @@ -1401,6 +1476,7 @@ native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:width, Float:heig native PlayerTextDrawAlignment(playerid, PlayerText:text, TEXT_DRAW_ALIGN:alignment); /** + * a_players * Sets the text colour of a player-textdraw. * The ID of the player who's textdraw to set the colour of * The TextDraw to change @@ -1427,6 +1503,7 @@ native PlayerTextDrawAlignment(playerid, PlayerText:text, TEXT_DRAW_ALIGN:alignm native PlayerTextDrawColor(playerid, PlayerText:text, colour); /** + * a_players * Toggle the box on a player-textdraw. * The ID of the player whose textdraw to toggle the box of * The ID of the player-textdraw to toggle the box of @@ -1451,6 +1528,7 @@ native PlayerTextDrawColor(playerid, PlayerText:text, colour); native PlayerTextDrawUseBox(playerid, PlayerText:text, bool:use); /** + * a_players * Sets the colour of a textdraw's box (PlayerTextDrawUseBox). * The ID of the player whose textdraw to set the box colour of * The ID of the player textdraw to set the box colour of @@ -1475,6 +1553,7 @@ native PlayerTextDrawUseBox(playerid, PlayerText:text, bool:use); native PlayerTextDrawBoxColor(playerid, PlayerText:text, colour); /** + * a_players * Show a player-textdraw to the player it was created for. * The ID of the player to show the textdraw for * The ID of the textdraw to show @@ -1499,6 +1578,7 @@ native PlayerTextDrawBoxColor(playerid, PlayerText:text, colour); native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); /** + * a_players * Set the outline of a player-textdraw. The outline colour cannot be changed unless PlayerTextDrawBackgroundColor is used. * The ID of the player whose player-textdraw to set the outline of * The ID of the player-textdraw to set the outline of @@ -1523,6 +1603,7 @@ native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); native PlayerTextDrawSetOutline(playerid, PlayerText:text, size); /** + * a_players * Adjust the background colour of a player-textdraw. * The ID of the player whose player-textdraw to set the background colour of * The ID of the player-textdraw to set the background colour of @@ -1548,6 +1629,7 @@ native PlayerTextDrawSetOutline(playerid, PlayerText:text, size); native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); /** + * a_players * Change the font of a player-textdraw. * The ID of the player whose player-textdraw to change the font of * The ID of the player-textdraw to change the font of @@ -1572,6 +1654,7 @@ native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); native PlayerTextDrawFont(playerid, PlayerText:text, TEXT_DRAW_FONT:font); /** + * a_players * Appears to scale text spacing to a proportional ratio. Useful when using PlayerTextDrawLetterSize to ensure the text has even character spacing. * The ID of the player whose player-textdraw to set the proportionality of * The ID of the player-textdraw to set the proportionality of @@ -1596,6 +1679,7 @@ native PlayerTextDrawFont(playerid, PlayerText:text, TEXT_DRAW_FONT:font); native PlayerTextDrawSetProportional(playerid, PlayerText:text, bool:set); /** + * a_players * Toggles whether a player-textdraw can be selected or not. * The ID of the player whose player-textdraw to set the selectability of * The ID of the player-textdraw to set the selectability of @@ -1610,6 +1694,7 @@ native PlayerTextDrawSetProportional(playerid, PlayerText:text, bool:set); native PlayerTextDrawSetSelectable(playerid, PlayerText:text, bool:set); /** + * a_players * Show a player-textdraw to the player it was created for. * The ID of the player to show the textdraw for * The ID of the textdraw to show @@ -1633,6 +1718,7 @@ native PlayerTextDrawSetSelectable(playerid, PlayerText:text, bool:set); native PlayerTextDrawShow(playerid, PlayerText:text); /** + * a_players * Hide a player-textdraw from the player it was created for. * The ID of the player to hide the textdraw for * The ID of the textdraw to hide @@ -1656,6 +1742,7 @@ native PlayerTextDrawShow(playerid, PlayerText:text); native PlayerTextDrawHide(playerid, PlayerText:text); /** + * a_players * Change the text of a player-textdraw. * The ID of the player who's textdraw string to set * The ID of the textdraw to change @@ -1682,6 +1769,7 @@ native PlayerTextDrawHide(playerid, PlayerText:text); native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); /** + * a_players * Sets a player textdraw 2D preview sprite of a specified model ID. * The PlayerTextDraw player ID * The textdraw ID that will display the 3D preview @@ -1700,6 +1788,7 @@ native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelIndex); /** + * a_players * Sets the rotation and zoom of a 3D model preview player-textdraw. * The ID of the player whose player-textdraw to change * The ID of the player-textdraw to change @@ -1718,6 +1807,7 @@ native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelIndex); native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); /** + * a_players * Set the colour of a vehicle in a player-textdraw model preview (if a vehicle is shown). * The ID of the player whose player-textdraw to change * The ID of the player's player-textdraw to change @@ -1735,6 +1825,7 @@ native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, colour1, colour // Per-player variable system (PVars) /** + * a_players * Set an integer player variable. * The ID of the player whose player variable will be set * The name of the player variable @@ -1754,6 +1845,7 @@ native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, colour1, colour native SetPVarInt(playerid, const pvar[], value); /** + * a_players * Gets an integer player variable's value. * The ID of the player whose player variable to get * The name of the player variable (case-insensitive). Assigned in SetPVarInt @@ -1768,6 +1860,7 @@ native SetPVarInt(playerid, const pvar[], value); native GetPVarInt(playerid, const pvar[]); /** + * a_players * Saves a string into a player variable. * The ID of the player whose player variable will be set * The name of the player variable @@ -1782,6 +1875,7 @@ native GetPVarInt(playerid, const pvar[]); native SetPVarString(playerid, const pvar[], const value[]); /** + * a_players * Gets a player variable as a string. * The ID of the player whose player variable to get * The name of the player variable, set by SetPVarString @@ -1799,6 +1893,7 @@ native SetPVarString(playerid, const pvar[], const value[]); native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); /** + * a_players * Set a float player variable's value. * The ID of the player whose player variable will be set * The name of the player variable @@ -1817,6 +1912,7 @@ native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); native SetPVarFloat(playerid, const pvar[], Float:value); /** + * a_players * Gets a player variable as a float. * The ID of the player whose player variable you want to get * The name of the player variable @@ -1831,6 +1927,7 @@ native SetPVarFloat(playerid, const pvar[], Float:value); native Float:GetPVarFloat(playerid, const pvar[]); /** + * a_players * Deletes a previously set player variable. * The ID of the player whose player variable to delete * The name of the player variable to delete @@ -1849,6 +1946,7 @@ native Float:GetPVarFloat(playerid, const pvar[]); native DeletePVar(playerid, const pvar[]); /** + * a_players * Each PVar (player-variable) has its own unique identification number for lookup, this function returns the highest ID set for a player. * The ID of the player to get the upper PVar index of * @@ -1858,6 +1956,7 @@ native DeletePVar(playerid, const pvar[]); native GetPVarsUpperIndex(playerid); /** + * a_players * Retrieve the name of a player's pVar via the index. * The ID of the player whose player variable to get the name of * The index of the player's pVar @@ -1871,6 +1970,7 @@ native GetPVarsUpperIndex(playerid); native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); /** + * a_players * Gets the type (integer, float or string) of a player variable. * The ID of the player whose player variable to get the type of * The name of the player variable to get the type of @@ -1899,6 +1999,7 @@ native PLAYER_VARTYPE:GetPVarType(playerid, const pvar[]); #endif /** + * a_players * Creates a chat bubble above a player's name tag. * The player which should have the chat bubble * The text to display @@ -1914,6 +2015,7 @@ native SetPlayerChatBubble(playerid, const text[], colour, Float:drawDistance, e // Player control /** + * a_players * Puts a player in a vehicle. * The ID of the player to put in a vehicle * The ID of the vehicle to put the player in @@ -1943,6 +2045,7 @@ native SetPlayerChatBubble(playerid, const text[], colour, Float:drawDistance, e native PutPlayerInVehicle(playerid, vehicleid, seatid); /** + * a_players * This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. * The ID of the player in the vehicle that you want to get the ID of * @@ -1954,6 +2057,7 @@ native PutPlayerInVehicle(playerid, vehicleid, seatid); native GetPlayerVehicleID(playerid); /** + * a_players * Find out which seat a player is in. * The ID of the player you want to get the seat of * @@ -1965,6 +2069,7 @@ native GetPlayerVehicleID(playerid); native GetPlayerVehicleSeat(playerid); /** + * a_players * Removes/ejects a player from their vehicle. * The ID of the player to remove from their vehicle * @@ -1981,6 +2086,7 @@ native GetPlayerVehicleSeat(playerid); native RemovePlayerFromVehicle(playerid); /** + * a_players * Toggles whether a player can control their character or not. The player will also be unable to move their camera. * The ID of the player to toggle the controllability of * 0 to make them uncontrollable, 1 to make them controllable @@ -1992,6 +2098,7 @@ native RemovePlayerFromVehicle(playerid); native TogglePlayerControllable(playerid, bool:toggle); /** + * a_players * Plays the specified sound for a player. * The ID of the player for whom to play the sound * The sound to play @@ -2010,6 +2117,7 @@ native TogglePlayerControllable(playerid, bool:toggle); native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); /** + * a_players * Apply an animation to a player. * The ID of the player to apply the animation to * The animation library from which to apply an animation @@ -2030,6 +2138,7 @@ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, FORCE_SYNC:forceSync = SYNC_NONE); /** + * a_players * Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). * The ID of the player to clear the animations of * Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) @@ -2041,6 +2150,7 @@ native ApplyAnimation(playerid, const animationLibrary[], const animationName[], native ClearAnimations(playerid, FORCE_SYNC:forceSync = SYNC_NONE); /** + * a_players * Returns the index of any running applied animations. * ID of the player of whom you want to get the animation index of * @@ -2050,6 +2160,7 @@ native ClearAnimations(playerid, FORCE_SYNC:forceSync = SYNC_NONE); native GetPlayerAnimationIndex(playerid); // return the index of any running applied animations (0 if none are running) /** + * a_players * Get the animation library/name for the index. * The animation index, returned by GetPlayerAnimationIndex * String variable that stores the animation library @@ -2063,6 +2174,7 @@ native GetPlayerAnimationIndex(playerid); // return the index of any running app native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibrary), animationName[], len2 = sizeof (animationName)); // get the animation lib/name for the index /** + * a_players * Retrieves a player's current special action. * The ID of the player to get the special action of * @@ -2106,6 +2218,7 @@ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibra native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); /** + * a_players * This function allows to set players special action. * The player that should perform the action * The action that should be performed @@ -2154,6 +2267,7 @@ native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); native SetPlayerSpecialAction(playerid, SPECIAL_ACTION:actionid); /** + * a_players * Disables collisions between occupied vehicles for a player. * The ID of the player for whom you want to disable collisions * 1 to disable collisions, 0 to enable collisions @@ -2168,6 +2282,7 @@ native DisableRemoteVehicleCollisions(playerid, bool:disable); // Player world/map related /** + * a_players * Sets a checkpoint (red cylinder) for a player. Also shows a red blip on the radar. When players enter a checkpoint, OnPlayerEnterCheckpoint is called and actions can be performed. * The ID of the player for whom to set a checkpoint * The x coordinate to set the checkpoint at @@ -2187,6 +2302,7 @@ native DisableRemoteVehicleCollisions(playerid, bool:disable); native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); /** + * a_players * Disables (hides/destroys) a player's set checkpoint. Players can only have a single checkpoint set at a time. Checkpoints don't need to be disabled before setting another one. * The ID of the player whose checkpoint to disable * @@ -2206,6 +2322,7 @@ native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); native DisablePlayerCheckpoint(playerid); /** + * a_players * Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint callback is called. * The ID of the player to set the checkpoint for * Type of checkpoint. 0-Normal, 1-Finish, 2-Nothing(Only the checkpoint without anything on it), 3-Air normal, 4-Air finish, 5-Air (rotates and stops), 6-Air (increases, decreases and disappears), 7-Air (swings down and up), 8-Air (swings up and down) @@ -2238,6 +2355,7 @@ native DisablePlayerCheckpoint(playerid); native SetPlayerRaceCheckpoint(playerid, type, Float:centerX, Float:centerY, Float:centerZ, Float:nextX, Float:nextY, Float:nextZ, Float:size); /** + * a_players * Disable any initialized race checkpoints for a specific player, since you can only have one at any given time. * The player to disable the current checkpoint for * @@ -2253,6 +2371,7 @@ native SetPlayerRaceCheckpoint(playerid, type, Float:centerX, Float:centerY, Flo native DisablePlayerRaceCheckpoint(playerid); /** + * a_players * Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in). * The ID of the player to set the world boundaries of * The maximum x coordinate the player can go to @@ -2267,6 +2386,7 @@ native DisablePlayerRaceCheckpoint(playerid); native SetPlayerWorldBounds(playerid, Float:maxX, Float:minX, Float:maxY, Float:minY); /** + * a_players * Change the colour of a player's nametag and radar blip for another player. * The player that will see the player's changed blip/nametag colour * The player whose colour will be changed @@ -2279,6 +2399,7 @@ native SetPlayerWorldBounds(playerid, Float:maxX, Float:minX, Float:maxY, Float: native SetPlayerMarkerForPlayer(playerid, targetid, colour); /** + * a_players * This functions allows you to toggle the drawing of player nametags, healthbars and armor bars which display above their head. For use of a similar function like this on a global level, ShowNameTags function. * Player who will see the results of this function * Player whose name tag will be shown or hidden @@ -2291,6 +2412,7 @@ native SetPlayerMarkerForPlayer(playerid, targetid, colour); native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); /** + * a_players * Place an icon/marker on a player's map. Can be used to mark locations such as banks and hospitals to players. * The ID of the player to set the map icon for * The player's icon ID, ranging from 0 to 99. This means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon @@ -2322,6 +2444,7 @@ native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, colour, MAPICON:style = MAPICON_LOCAL); /** + * a_players * Removes a map icon that was set earlier for a player using SetPlayerMapIcon. * The ID of the player whose icon to remove * The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon @@ -2334,6 +2457,7 @@ native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, native RemovePlayerMapIcon(playerid, iconid); /** + * a_players * Enable/Disable the teleporting ability for a player by right-clicking on the map. * The ID of the player to allow teleport * 1 to allow, 0 to disallow @@ -2347,6 +2471,7 @@ native AllowPlayerTeleport(playerid, bool:allow); // Player camera /** + * a_players * Sets the camera to a specific position for a player. * ID of the player * The x coordinate to place the camera at @@ -2365,6 +2490,7 @@ native AllowPlayerTeleport(playerid, bool:allow); native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); /** + * a_players * Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos. * The ID of the player whose camera to set * The x coordinate for the player's camera to look at @@ -2384,6 +2510,7 @@ native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, CAM_MOVE:cut = CAMERA_CUT); /** + * a_players * Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos. * The player you want to restore the camera for * @@ -2392,6 +2519,7 @@ native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, CAM_MOVE:cut = native SetCameraBehindPlayer(playerid); /** + * a_players * Get the position of the player's camera. * The ID of the player to get the camera position of * A float variable to store the x coordinate in, passed by reference @@ -2409,6 +2537,7 @@ native SetCameraBehindPlayer(playerid); native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z); /** + * a_players * This function will return the current direction of player's aiming in 3-D space, the coords are relative to the camera position, see GetPlayerCameraPos. * The ID of the player you want to obtain the camera front vector of * A float to store the x coordinate, passed by reference @@ -2423,6 +2552,7 @@ native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z); native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z); /** + * a_players * Returns the current GTA camera mode for the requested player. The camera modes are useful in determining whether a player is aiming, doing a passenger driveby etc. * The ID of the player whose camera mode to retrieve * @@ -2436,6 +2566,7 @@ native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z); native CAM_MODE:GetPlayerCameraMode(playerid); /** + * a_players * Toggle camera targeting functions for a player. Disabled by default to save bandwidth. * The ID of the player to toggle camera targeting functions for * 1 to enable camera targeting functions and 0 to disable them @@ -2451,6 +2582,7 @@ native CAM_MODE:GetPlayerCameraMode(playerid); native EnablePlayerCameraTarget(playerid, bool:enable); /** + * a_players * Allows you to retrieve the ID of the object the player is looking at. * The ID of the player to check * @@ -2463,6 +2595,7 @@ native EnablePlayerCameraTarget(playerid, bool:enable); native GetPlayerCameraTargetObject(playerid); /** + * a_players * Get the ID of the vehicle the player is looking at. * The ID of the player to check * @@ -2477,6 +2610,7 @@ native GetPlayerCameraTargetObject(playerid); native GetPlayerCameraTargetVehicle(playerid); /** + * a_players * Allows you to retrieve the ID of the player the playerid is looking at. * The ID of the player to check * @@ -2491,6 +2625,7 @@ native GetPlayerCameraTargetVehicle(playerid); native GetPlayerCameraTargetPlayer(playerid); /** + * a_players * Allows you to retrieve the ID of the actor the player is looking at (if any). * The ID of the player to get the target actor of * @@ -2506,6 +2641,7 @@ native GetPlayerCameraTargetPlayer(playerid); native GetPlayerCameraTargetActor(playerid); /** + * a_players * Retrieves the aspect ratio of a player's camera. * The ID of the player to get the camera aspect ratio of * @@ -2518,6 +2654,7 @@ native GetPlayerCameraTargetActor(playerid); native Float:GetPlayerCameraAspectRatio(playerid); /** + * a_players * Retrieves the game camera zoom level for a given player. * The ID of the player to get the camera zoom level of * @@ -2530,6 +2667,7 @@ native Float:GetPlayerCameraAspectRatio(playerid); native Float:GetPlayerCameraZoom(playerid); /** + * a_players * You can use this function to attach the player camera to objects. * The ID of the player which will have your camera attached on object * The object ID which you want to attach the player camera @@ -2540,6 +2678,7 @@ native Float:GetPlayerCameraZoom(playerid); native AttachCameraToObject(playerid, objectid); /** + * a_players * Attaches a player's camera to a player-object. The player is able to move their camera while it is attached to an object. Can be used with MovePlayerObject and AttachPlayerObjectToVehicle. * The ID of the player which will have their camera attached to a player-object * The ID of the player-object to which the player's camera will be attached @@ -2552,6 +2691,7 @@ native AttachCameraToObject(playerid, objectid); native AttachCameraToPlayerObject(playerid, objectid); /** + * a_players * Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes. * The ID of the player the camera should be moved for * The x position the camera should start to move from @@ -2571,6 +2711,7 @@ native AttachCameraToPlayerObject(playerid, objectid); native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAM_MOVE:cut = CAMERA_CUT); /** + * a_players * Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. * The ID of the player the camera should be moved for * The x position the camera should start to move from @@ -2592,6 +2733,7 @@ native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, // Player conditionals /** + * a_players * Checks if a player is connected (if an ID is taken by a connected player). * The ID of the player to check * @@ -2603,6 +2745,7 @@ native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, native bool:IsPlayerConnected(playerid); /** + * a_players * Checks if a player is in a specific vehicle. * ID of the player * ID of the vehicle @@ -2613,6 +2756,7 @@ native bool:IsPlayerConnected(playerid); native bool:IsPlayerInVehicle(playerid, vehicleid); /** + * a_players * Check if a player is inside any vehicle (as a driver or passenger). * The ID of the player to check * @@ -2622,6 +2766,7 @@ native bool:IsPlayerInVehicle(playerid, vehicleid); native bool:IsPlayerInAnyVehicle(playerid); /** + * a_players * Check if the player is currently inside a checkpoint, this could be used for properties or teleport points for example. * The player you want to know the status of * @@ -2638,6 +2783,7 @@ native bool:IsPlayerInAnyVehicle(playerid); native bool:IsPlayerInCheckpoint(playerid); /** + * a_players * Check if the player is inside their current set race checkpoint (SetPlayerRaceCheckpoint). * The ID of the player to check * @@ -2656,6 +2802,7 @@ native bool:IsPlayerInRaceCheckpoint(playerid); // Virtual Worlds /** + * a_players * Set the virtual world of a player. They can only see other players or vehicles that are in that same world. * The ID of the player you want to set the virtual world of * The virtual world ID to put the player in @@ -2670,6 +2817,7 @@ native bool:IsPlayerInRaceCheckpoint(playerid); native SetPlayerVirtualWorld(playerid, virtualWorld); /** + * a_players * Retrieves the current virtual world the player is in. * The ID of the player to get the virtual world of * @@ -2682,6 +2830,7 @@ native GetPlayerVirtualWorld(playerid); // Insane Stunts /** + * a_players * Toggle stunt bonuses for a player. Enabled by default. * The ID of the player to toggle stunt bonuses for * 1 to enable stunt bonuses and 0 to disable them @@ -2694,6 +2843,7 @@ native GetPlayerVirtualWorld(playerid); native EnableStuntBonusForPlayer(playerid, bool:enable); /** + * a_players * Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie). * 1 to enable stunt bonuses or 0 to disable them * @@ -2701,6 +2851,7 @@ native EnableStuntBonusForPlayer(playerid, bool:enable); native EnableStuntBonusForAll(bool:enable); /** + * a_players * Toggle whether a player is in spectator mode or not. While in spectator mode a player can spectate (watch) other players and vehicles. After using this function, either PlayerSpectatePlayer or PlayerSpectateVehicle needs to be used. * The ID of the player who should spectate * 1 to enable spectating and 0 to disable @@ -2717,6 +2868,7 @@ native EnableStuntBonusForAll(bool:enable); native TogglePlayerSpectating(playerid, bool:toggle); /** + * a_players * Makes a player spectate (watch) another player. * The ID of the player that will spectate * The ID of the player that should be spectated @@ -2741,6 +2893,7 @@ native TogglePlayerSpectating(playerid, bool:toggle); native PlayerSpectatePlayer(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); /** + * a_players * Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. * The ID of the player who should spectate a vehicle * The ID of the vehicle the player should spectate @@ -2757,6 +2910,7 @@ native PlayerSpectatePlayer(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_MO native PlayerSpectateVehicle(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); /** + * a_players * Starts recording a player's movements to a file, which can then be reproduced by an NPC. * The ID of the player to record * The type of recording @@ -2767,6 +2921,7 @@ native PlayerSpectateVehicle(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_M native StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE:recordType, const recordFile[]); /** + * a_players * Stops all the recordings that had been started with StartRecordingPlayerData for a specific player. * The player you want to stop the recordings of * @@ -2775,6 +2930,7 @@ native StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE:recordType, cons native StopRecordingPlayerData(playerid); /** + * a_players * Display the cursor and allow the player to select a textdraw. * The ID of the player that should be able to select a textdraw * The colour of the textdraw when hovering over with mouse (RGBA) @@ -2790,6 +2946,7 @@ native StopRecordingPlayerData(playerid); native SelectTextDraw(playerid, hoverColour); // enables the mouse so the player can select a textdraw /** + * a_players * Cancel textdraw selection with the mouse. * The ID of the player that should be the textdraw selection disabled * @@ -2803,6 +2960,7 @@ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mou // Explosion /** + * a_players * Creates an explosion that is only visible to a single player. This can be used to isolate explosions from other players or to make them only appear in specific virtual worlds. * The ID of the player to create the explosion for * The x coordinate of the explosion @@ -2818,6 +2976,7 @@ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mou native CreateExplosionForPlayer(playerid, Float:x, Float:y, Float:z, type, Float:radius); /** + * a_players * Perform a memory check on the client. * The ID of the player to check * The type of check to perform diff --git a/a_samp.inc b/a_samp.inc index 4fe2827..7fe7329 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -566,6 +566,7 @@ open.mp releases can use `A` as the first digit. // Util /** + * a_samp * Prints a string to the server console (not in-game chat) and logs (server_log.txt). * The string to print * @@ -582,6 +583,7 @@ open.mp releases can use `A` as the first digit. #endif /** + * a_samp * Outputs a formatted string on the console (the server window, not the in-game chat). * The format string * Indefinite number of arguments of any tag @@ -622,6 +624,7 @@ open.mp releases can use `A` as the first digit. #endif /** + * a_samp * Formats a string to include variables and other strings inside it. * The string to output the result to * The maximum length output can contain @@ -650,6 +653,7 @@ open.mp releases can use `A` as the first digit. native format(output[], len = sizeof (output), const format[], {Float, _}:...); /** + * a_samp * This function sends a message to a specific player with a chosen colour in the chat. The whole line in the chatbox will be in the set colour unless colour embedding is used (since 0.3c). * The ID of the player to display the message to * The colour of the message (RGBA) @@ -668,6 +672,7 @@ native format(output[], len = sizeof (output), const format[], {Float, _}:...); native SendClientMessage(playerid, colour, const message[]); /** + * a_samp * Displays a message in chat to all players. This is a multi-player equivalent of SendClientMessage. * The colour of the message (RGBA) * The message to show (max 144 characters) @@ -679,6 +684,7 @@ native SendClientMessage(playerid, colour, const message[]); native SendClientMessageToAll(colour, const message[]); /** + * a_samp * Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. * The ID of the player who will receive the message * The sender's ID. If invalid, the message will not be sent @@ -692,6 +698,7 @@ native SendClientMessageToAll(colour, const message[]); native SendPlayerMessageToPlayer(playerid, senderid, const message[]); /** + * a_samp * Sends a message in the name of a player to all other players on the server. The line will start with the sender's name in their colour, followed by the message in white. * The ID of the sender. If invalid, the message will not be sent * The message that will be sent @@ -703,6 +710,7 @@ native SendPlayerMessageToPlayer(playerid, senderid, const message[]); native SendPlayerMessageToAll(senderid, const message[]); /** + * a_samp * Adds a death to the 'killfeed' on the right-hand side of the screen for all players. * The ID of the killer (can be INVALID_PLAYER_ID) * The ID of the player that died @@ -717,6 +725,7 @@ native SendPlayerMessageToAll(senderid, const message[]); native SendDeathMessage(killer, killee, weapon); /** + * a_samp * Adds a death to the 'killfeed' on the right-hand side of the screen for a single player. * The ID of the player to send the death message to * The ID of the killer (can be INVALID_PLAYER_ID) @@ -733,6 +742,7 @@ native SendDeathMessage(killer, killee, weapon); native SendDeathMessageToPlayer(playerid, killer, killee, weapon); /** + * a_samp * Shows 'game text' (on-screen text) for a certain length of time for all players. * The text to be displayed * The duration of the text being shown in milliseconds @@ -744,6 +754,7 @@ native SendDeathMessageToPlayer(playerid, killer, killee, weapon); native GameTextForAll(const string[], time, style); /** + * a_samp * Shows 'game text' (on-screen text) for a certain length of time for a specific player. * The ID of the player to show the gametext for * The text to be displayed @@ -759,6 +770,7 @@ native GameTextForAll(const string[], time, style); native GameTextForPlayer(playerid, const string[], time, style); /** + * a_samp * Sets a 'timer' to call a function after some time. Can be set to repeat. * Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server * Interval in milliseconds @@ -774,6 +786,7 @@ native GameTextForPlayer(playerid, const string[], time, style); native SetTimer(const functionName[], interval, bool:repeating); /** + * a_samp * Sets a timer to call a function after the specified interval. This variant ('Ex') can pass parameters (such as a player ID) to the function. * The name of a public function to call when the timer expires * Interval in milliseconds @@ -804,6 +817,7 @@ native SetTimer(const functionName[], interval, bool:repeating); native SetTimerEx(const functionName[], interval, bool:repeating, const format[] = "", {Float, _}:...); /** + * a_samp * Kills (stops) a running timer. * The ID of the timer to kill (returned by SetTimer or SetTimerEx) * @@ -813,6 +827,7 @@ native SetTimerEx(const functionName[], interval, bool:repeating, const format[] native KillTimer(timerid); /** + * a_samp * Returns the uptime of the actual server (not the SA-MP server) in milliseconds. * * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. @@ -822,6 +837,7 @@ native KillTimer(timerid); native GetTickCount(); /** + * a_samp * Returns the maximum number of players that can join the server, as set by the server variable 'maxplayers' in server.cfg. * * @@ -831,6 +847,7 @@ native GetTickCount(); native GetMaxPlayers(); /** + * a_samp * Calls a public function in any script that is loaded. * Public function's name * Tag/format of each variable @@ -853,6 +870,7 @@ native GetMaxPlayers(); native CallRemoteFunction(const function[], const format[] = "", {Float, _}:...); /** + * a_samp * Calls a public function from the script in which it is used. * Public function's name * Tag/format of each variable @@ -875,6 +893,7 @@ native CallRemoteFunction(const function[], const format[] = "", {Float, _}:...) native CallLocalFunction(const function[], const format[] = "", {Float, _}:...); /** + * a_samp * Returns the norm (length) of the provided vector. * The vector's magnitude on the x axis * The vector's magnitude on the y axis @@ -888,6 +907,7 @@ native CallLocalFunction(const function[], const format[] = "", {Float, _}:...); native Float:VectorSize(Float:x, Float:y, Float:z); /** + * a_samp * Get the inversed value of a sine in degrees. * The sine for which to find the angle for * @@ -896,6 +916,7 @@ native Float:VectorSize(Float:x, Float:y, Float:z); native Float:asin(Float:value); /** + * a_samp * Get the inversed value of a cosine in degrees. * The cosine for which to find the angle for * @@ -904,6 +925,7 @@ native Float:asin(Float:value); native Float:acos(Float:value); /** + * a_samp * Get the inversed value of a tangent in degrees. * The tangent for which to find the angle for * @@ -913,6 +935,7 @@ native Float:acos(Float:value); native Float:atan(Float:value); /** + * a_samp * Get the multi-valued inversed value of a tangent in degrees. * y size * x size @@ -923,6 +946,7 @@ native Float:atan(Float:value); native Float:atan2(Float:y, Float:x); /** + * a_samp * Gets the highest playerid currently in use on the server. * * @@ -932,6 +956,7 @@ native Float:atan2(Float:y, Float:x); native GetPlayerPoolSize(); /** + * a_samp * Gets the highest vehicleid currently in use on the server. * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! @@ -940,6 +965,7 @@ native GetPlayerPoolSize(); native GetVehiclePoolSize(); /** + * a_samp * Gets the highest actorid created on the server. * * @@ -952,6 +978,7 @@ native GetActorPoolSize(); // Hash /** + * a_samp * Hashes a password using the SHA-256 hashing algorithm. Includes a salt. The output is always 256 bytes in length, or the equivalent of 64 Pawn cells. * The password to hash * The salt to use in the hash @@ -967,6 +994,7 @@ native SHA256_PassHash(const password[], const salt[], output[], size = sizeof ( // Server wide persistent variable system (SVars) /** + * a_samp * Set an integer server variable. * The name of the server variable * The integer to be set @@ -985,6 +1013,7 @@ native SHA256_PassHash(const password[], const salt[], output[], size = sizeof ( native SetSVarInt(const svar[], value); /** + * a_samp * Gets an integer server variable's value. * The name of the server variable (case-insensitive). Assigned in SetSVarInt * @@ -999,6 +1028,7 @@ native SetSVarInt(const svar[], value); native GetSVarInt(const svar[]); /** + * a_samp * Set a string server variable. * The name of the server variable * The string to be set @@ -1017,6 +1047,7 @@ native GetSVarInt(const svar[]); native SetSVarString(const svar[], const value[]); /** + * a_samp * Gets a string server variable's value. * The name of the server variable (case-insensitive). Assigned in SetSVarString * The array in which to store the string value in, passed by reference @@ -1033,6 +1064,7 @@ native SetSVarString(const svar[], const value[]); native GetSVarString(const svar[], output[], len = sizeof (output)); /** + * a_samp * Set a float server variable. * The name of the server variable * The float to be set @@ -1051,6 +1083,7 @@ native GetSVarString(const svar[], output[], len = sizeof (output)); native SetSVarFloat(const svar[], Float:value); /** + * a_samp * Gets a float server variable's value. * The name of the server variable (case-insensitive). Assigned in SetSVarFloat * @@ -1065,6 +1098,7 @@ native SetSVarFloat(const svar[], Float:value); native Float:GetSVarFloat(const svar[]); /** + * a_samp * Deletes a previously set server variable. * The name of the server variable to delete * @@ -1082,6 +1116,7 @@ native Float:GetSVarFloat(const svar[]); native DeleteSVar(const svar[]); /** + * a_samp * Each SVar (server-variable) has its own unique identification number for lookup, this function returns the highest ID. * * @@ -1090,6 +1125,7 @@ native DeleteSVar(const svar[]); native GetSVarsUpperIndex(); /** + * a_samp * Retrieve the name of a sVar via the index. * The index of the sVar * A string to store the sVar's name in, passed by reference @@ -1102,6 +1138,7 @@ native GetSVarsUpperIndex(); native GetSVarNameAtIndex(index, output[], size = sizeof (output)); /** + * a_samp * Gets the type (integer, float or string) of a server variable. * The name of the server variable to get the type of * @@ -1127,12 +1164,14 @@ native SERVER_VARTYPE:GetSVarType(const svar[]); // Game /** + * a_samp * Set the name of the game mode, which appears in the server browser. * The gamemode name to display */ native SetGameModeText(const string[]); /** + * a_samp * This function is used to change the amount of teams used in the gamemode. It has no obvious way of being used, but can help to indicate the number of teams used for better (more effective) internal handling. This function should only be used in the OnGameModeInit callback. Important: You can pass 2 billion here if you like, this function has no effect at all. * Number of teams the gamemode knows * @@ -1141,6 +1180,7 @@ native SetGameModeText(const string[]); native SetTeamCount(count); /** + * a_samp * Adds a class to class selection. Classes are used so players may spawn with a skin of their choice. * The skin which the player will spawn with * The x coordinate of the spawnpoint of this class @@ -1170,6 +1210,7 @@ native SetTeamCount(count); native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /** + * a_samp * This function is exactly the same as the AddPlayerClass function, with the addition of a team parameter. * The team you want the player to spawn in * The skin which the player will spawn with @@ -1198,6 +1239,7 @@ native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:a native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); /** + * a_samp * Adds a 'static' vehicle (models are pre-loaded for players) to the gamemode. * The Model ID for the vehicle * The x coordinate of the spawnpoint of this vehicle @@ -1220,6 +1262,7 @@ native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawn native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2); /** + * a_samp * Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from AddStaticVehicle in only one way: allows a respawn time to be set for when the vehicle is left unoccupied by the driver. * The Model ID for the vehicle * The x coordinate of the spawnpoint of this vehicle @@ -1244,6 +1287,7 @@ native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2, respawnDelay, bool:addSiren = false); /** + * a_samp * This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically). * The model of the pickup * The pickup type. Determines how the pickup responds when picked up @@ -1264,6 +1308,7 @@ native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Flo native AddStaticPickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0); /** + * a_samp * This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. * The model of the pickup * The pickup spawn type (see table under remarks) @@ -1310,6 +1355,7 @@ native AddStaticPickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0) native CreatePickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0); /** + * a_samp * Destroys a pickup created with CreatePickup. * The ID of the pickup to destroy (returned by CreatePickup) * @@ -1318,6 +1364,7 @@ native CreatePickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0); native DestroyPickup(pickup); /** + * a_samp * Toggle the drawing of nametags, health bars and armor bars above players. * 0 to disable, 1 to enable (enabled by default) * @@ -1328,6 +1375,7 @@ native DestroyPickup(pickup); native ShowNameTags(bool:show); /** + * a_samp * Toggles player markers (blips on the radar). Must be used when the server starts (OnGameModeInit). For other times, see SetPlayerMarkerForPlayer. * The mode to use for markers. They can be streamed, meaning they are only visible to nearby players. See table below * @@ -1347,12 +1395,14 @@ native ShowNameTags(bool:show); native ShowPlayerMarkers(PLAYER_MARKERS_MODE:mode); /** + * a_samp * Ends the current gamemode. * */ native GameModeExit(); /** + * a_samp * Sets the world time (for all players) to a specific hour. * The hour to set (0-23) * @@ -1364,6 +1414,7 @@ native GameModeExit(); native SetWorldTime(hour); /** + * a_samp * Get the name of a weapon. * The ID of the weapon to get the name of * An array to store the weapon's name in, passed by reference @@ -1379,6 +1430,7 @@ native SetWorldTime(hour); native GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); /** + * a_samp * 1 to enable, 0 to disable tire popping * This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. */ @@ -1386,6 +1438,7 @@ native GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); native EnableTirePopping(bool:enable); // deprecated function /** + * a_samp * Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles (SetPlayerTeam must be used!). * * This function was added in SA-MP 0.3x and will not work in earlier versions! @@ -1393,6 +1446,7 @@ native EnableTirePopping(bool:enable); // deprecated function native EnableVehicleFriendlyFire(); /** + * a_samp * Toggle whether the usage of weapons in interiors is allowed or not. * 1 to enable weapons in interiors (enabled by default), 0 to disable weapons in interiors * This function does not work in the current SA:MP version! @@ -1404,6 +1458,7 @@ native EnableVehicleFriendlyFire(); native AllowInteriorWeapons(bool:allow); /** + * a_samp * Set the world weather for all players. * The weather to set * @@ -1413,6 +1468,7 @@ native AllowInteriorWeapons(bool:allow); native SetWeather(weatherid); /** + * a_samp * Get the currently set gravity. * * The current set gravity (as a float). @@ -1420,6 +1476,7 @@ native SetWeather(weatherid); native Float:GetGravity(); /** + * a_samp * Set the gravity for all players. * The value that the gravity should be set to (between -50 and 50) * @@ -1431,6 +1488,7 @@ native Float:GetGravity(); native SetGravity(Float:gravity); /** + * a_samp * This function will determine whether RCON admins will be teleported to their waypoint when they set one. * 0 to disable and 1 to enable * This function, as of 0.3d, is deprecated. Please see OnPlayerClickMap. @@ -1441,6 +1499,7 @@ native SetGravity(Float:gravity); native AllowAdminTeleport(bool:allow); /** + * a_samp * This function does not work in the current SA:MP version! * * @@ -1450,6 +1509,7 @@ native AllowAdminTeleport(bool:allow); native SetDeathDropAmount(amount); /** + * a_samp * Create an explosion at the specified coordinates. * The x coordinate of the explosion * The y coordinate of the explosion @@ -1463,6 +1523,7 @@ native SetDeathDropAmount(amount); native CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); /** + * a_samp * This function allows to turn on zone / area names such as the "Vinewood" or "Doherty" text at the bottom-right of the screen as they enter the area. This is a gamemode option and should be set in the callback OnGameModeInit. * A toggle option for whether or not you'd like zone names on or off * This function was removed in SA-MP 0.3. This was due to crashes it caused. @@ -1470,6 +1531,7 @@ native CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); native EnableZoneNames(bool:enable); /** + * a_samp * Uses standard player walking animation (animation of the CJ skin) instead of custom animations for every skin (e.g. skating for skater skins). * * @@ -1479,6 +1541,7 @@ native EnableZoneNames(bool:enable); native UsePlayerPedAnims(); // Will cause the players to use CJ running/walking animations /** + * a_samp * Disable all the interior entrances and exits in the game (the yellow arrows at doors). * * If the gamemode is changed after this function has been used, and the new gamemode doesn't disable markers, the markers will NOT reappear for already-connected players (but will for newly connected players). @@ -1488,6 +1551,7 @@ native UsePlayerPedAnims(); // Will cause the players to use CJ running/walking native DisableInteriorEnterExits(); // will disable all interior enter/exits in the game. /** + * a_samp * Set the maximum distance to display the names of players. * The distance to set * @@ -1498,6 +1562,7 @@ native DisableInteriorEnterExits(); // will disable all interior enter/exits in native SetNameTagDrawDistance(Float:distance); // Distance at which nametags will start rendering on the client. /** + * a_samp * Disables the nametag Line-Of-Sight checking so that players can see nametags through objects. * * @@ -1507,6 +1572,7 @@ native SetNameTagDrawDistance(Float:distance); // Distance at which nametags wil native DisableNameTagLOS(); // Disables the nametag Line-Of-Sight checking /** + * a_samp * Set a radius limitation for the chat. Only players at a certain distance from the player will see their message in the chat. Also changes the distance at which a player can see other players on the map at the same distance. * The range in which players will be able to see chat * @@ -1517,6 +1583,7 @@ native DisableNameTagLOS(); // Disables the nametag Line-Of-Sight checking native LimitGlobalChatRadius(Float:chatRadius); /** + * a_samp * Set the player marker radius. * The radius that markers will show at * @@ -1529,6 +1596,7 @@ native LimitPlayerMarkerRadius(Float:markerRadius); // Npc /** + * a_samp * Connect an NPC to the server. * The name the NPC should connect as. Must follow the same rules as normal player names * The NPC script name that is located in the npcmodes folder (without the .amx extension) @@ -1541,6 +1609,7 @@ native LimitPlayerMarkerRadius(Float:markerRadius); native ConnectNPC(const name[], const script[]); /** + * a_samp * Check if a player is an actual player or an NPC. * The ID of the player to check * @@ -1560,6 +1629,7 @@ native RedirectDownload(playerid, const url[]); // Admin /** + * a_samp * Check if a player is logged in as an RCON admin. * The ID of the player to check * @@ -1569,6 +1639,7 @@ native RedirectDownload(playerid, const url[]); native bool:IsPlayerAdmin(playerid); /** + * a_samp * Kicks a player from the server. They will have to quit the game and re-connect if they wish to continue playing. * The ID of the player to kick * @@ -1579,6 +1650,7 @@ native bool:IsPlayerAdmin(playerid); native Kick(playerid); /** + * a_samp * Ban a player who is currently in the server. They will be unable to join the server ever again. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. BanEx can be used to give a reason for the ban. IP bans can be added/removed using the RCON banip and unbanip commands (SendRconCommand). * The ID of the player to ban * @@ -1589,6 +1661,7 @@ native Kick(playerid); native Ban(playerid); /** + * a_samp * Ban a player with a reason. * The ID of the player to ban * The reason for the ban @@ -1599,6 +1672,7 @@ native Ban(playerid); native BanEx(playerid, const reason[]); /** + * a_samp * Sends an RCON (Remote Console) command. * The RCON command to be executed * @@ -1612,6 +1686,7 @@ native BanEx(playerid, const reason[]); native SendRconCommand(const command[]); /** + * a_samp * Gets a player's network stats and saves them into a string. * The ID of the player you want to get the networkstats of * The string to store the networkstats in, passed by reference @@ -1632,6 +1707,7 @@ native SendRconCommand(const command[]); native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); /** + * a_samp * Gets the server's network stats and stores them in a string. * The string to store the network stats in, passed by reference * The length of the string to be stored @@ -1673,6 +1749,7 @@ native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); native GetNetworkStats(output[], size = sizeof (output)); /** + * a_samp * Returns the SA-MP client version, as reported by the player. * The ID of the player to get the client version of * The string to store the player's version in, passed by reference @@ -1687,6 +1764,7 @@ native GetNetworkStats(output[], size = sizeof (output)); native GetPlayerVersion(playerid, version[], len = sizeof (version)); // Returns the SA-MP client revision as reported by the player /** + * a_samp * Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. * The IP to block * The time (in milliseconds) that the connection will be blocked for. 0 can be used for an indefinite block @@ -1698,6 +1776,7 @@ native GetPlayerVersion(playerid, version[], len = sizeof (version)); // Returns native BlockIpAddress(const ipAddress[], timeMS); /** + * a_samp * Unblock an IP address that was previously blocked using BlockIpAddress. * The IP address to unblock * @@ -1709,6 +1788,7 @@ native UnBlockIpAddress(const ipAddress[]); // Deprecated: /** + * a_samp * Get the string value of a server variable. * The name of the string variable to get the value of * An array into which to store the value, passed by reference @@ -1725,6 +1805,7 @@ native UnBlockIpAddress(const ipAddress[]); native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); /** + * a_samp * Get the integer value of a server variable. * The name of the integer variable to get the value of * @@ -1737,6 +1818,7 @@ native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); native GetServerVarAsInt(const cvar[]); /** + * a_samp * Get the boolean value of a server variable. * The name of the boolean variable to get the value of * @@ -1750,6 +1832,7 @@ native bool:GetServerVarAsBool(const cvar[]); // These are the same 3 functions as above although they avoid the name ambiguity/conflict with the SVar system. /** + * a_samp * Get the string value of a console variable. * The name of the string variable to get the value of * An array into which to store the value, passed by reference @@ -1764,6 +1847,7 @@ native bool:GetServerVarAsBool(const cvar[]); native GetConsoleVarAsString(const cvar[], buffer[], len = sizeof (buffer)); /** + * a_samp * Get the integer value of a console variable. * The name of the integer variable to get the value of * @@ -1774,6 +1858,7 @@ native GetConsoleVarAsString(const cvar[], buffer[], len = sizeof (buffer)); native GetConsoleVarAsInt(const cvar[]); /** + * a_samp * Get the boolean value of a console variable. * The name of the boolean variable to get the value of * @@ -1786,6 +1871,7 @@ native bool:GetConsoleVarAsBool(const cvar[]); // Extended admin network stats /** + * a_samp * Gets the tick rate (like FPS) of the server. * * This function was added in SA-MP 0.3z and will not work in earlier versions! @@ -1794,6 +1880,7 @@ native bool:GetConsoleVarAsBool(const cvar[]); native GetServerTickRate(); /** + * a_samp * Gets the amount of time (in milliseconds) that a player has been connected to the server for. * The ID of the player to get the connected time of * @@ -1813,6 +1900,7 @@ native GetServerTickRate(); native NetStats_GetConnectedTime(playerid); /** + * a_samp * Gets the number of messages the server has received from the player. * The ID of the player to get the data from * @@ -1831,6 +1919,7 @@ native NetStats_GetConnectedTime(playerid); native NetStats_MessagesReceived(playerid); /** + * a_samp * Gets the amount of data (in bytes) that the server has received from the player. * The ID of the player to get the data from * @@ -1849,6 +1938,7 @@ native NetStats_MessagesReceived(playerid); native NetStats_BytesReceived(playerid); /** + * a_samp * Gets the number of messages the server has sent to the player. * The ID of the player to get the data from * @@ -1867,6 +1957,7 @@ native NetStats_BytesReceived(playerid); native NetStats_MessagesSent(playerid); /** + * a_samp * Gets the amount of data (in bytes) that the server has sent to the player. * The ID of the player to get the data from * @@ -1885,6 +1976,7 @@ native NetStats_MessagesSent(playerid); native NetStats_BytesSent(playerid); /** + * a_samp * Gets the number of messages the player has received in the last second. * The ID of the player to get the data from * @@ -1903,6 +1995,7 @@ native NetStats_BytesSent(playerid); native NetStats_MessagesRecvPerSecond(playerid); /** + * a_samp * Gets the packet loss percentage of a player. Packet loss means data the player is sending to the server is being lost (or vice-versa). * The ID of the player to get the data from * @@ -1924,6 +2017,7 @@ native NetStats_MessagesRecvPerSecond(playerid); native Float:NetStats_PacketLossPercent(playerid); /** + * a_samp * Gets the player's current connection status. * The ID of the player to get the connection status of * @@ -1959,6 +2053,7 @@ native Float:NetStats_PacketLossPercent(playerid); native NetStats_ConnectionStatus(playerid); /** + * a_samp * Get a player's IP and port. * The ID of the player to get the IP and port of * A string array to store the IP and port in, passed by reference @@ -1981,6 +2076,7 @@ native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); // Menu /** + * a_samp * Creates a menu. * The title for the new menu * How many colums shall the new menu have @@ -2006,6 +2102,7 @@ native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); native Menu:CreateMenu(const title[], columns, Float:x, Float:y, Float:col1width, Float:col2width = 0.0); /** + * a_samp * Destroys the specified menu. * The menu ID to destroy * @@ -2018,6 +2115,7 @@ native Menu:CreateMenu(const title[], columns, Float:x, Float:y, Float:col1width native DestroyMenu(Menu:menuid); /** + * a_samp * Adds an item to a specified menu. * The menu ID to add an item to * The column to add the item to @@ -2041,6 +2139,7 @@ native DestroyMenu(Menu:menuid); native AddMenuItem(Menu:menuid, column, const text[]); /** + * a_samp * Sets the caption of a column in a menu. * ID of the menu to change * The column (0 or 1) to set the header of @@ -2054,6 +2153,7 @@ native AddMenuItem(Menu:menuid, column, const text[]); native SetMenuColumnHeader(Menu:menuid, column, const heading[]); /** + * a_samp * Shows a previously created menu for a player. * The ID of the menu to show. Returned by CreateMenu * The ID of the player to whom the menu will be shown @@ -2072,6 +2172,7 @@ native SetMenuColumnHeader(Menu:menuid, column, const heading[]); native ShowMenuForPlayer(Menu:menuid, playerid); /** + * a_samp * Hides a menu for a player. * The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow * The ID of the player that the menu will be hidden for @@ -2087,6 +2188,7 @@ native ShowMenuForPlayer(Menu:menuid, playerid); native HideMenuForPlayer(Menu:menuid, playerid); /** + * a_samp * Check if a menu ID is vliad. * The menu to check for existance * @@ -2096,6 +2198,7 @@ native HideMenuForPlayer(Menu:menuid, playerid); native bool:IsValidMenu(Menu:menuid); /** + * a_samp * Disable a menu. * The ID of the menu to disable * @@ -2106,6 +2209,7 @@ native bool:IsValidMenu(Menu:menuid); native DisableMenu(Menu:menuid); /** + * a_samp * Disable a specific row in a menu for all players. It will be greyed-out and can't be selected by players. * The ID of the menu to disable a row of. Ensure this is valid, as an invalid menu ID will crash the entire server * The ID of the row to disable (rows start at 0) @@ -2121,6 +2225,7 @@ native DisableMenu(Menu:menuid); native DisableMenuRow(Menu:menuid, row); /** + * a_samp * Gets the ID of the menu the player is currently viewing (shown by ShowMenuForPlayer). * The ID of the player to get the current menu of * @@ -2136,6 +2241,7 @@ native DisableMenuRow(Menu:menuid, row); native Menu:GetPlayerMenu(playerid); /** + * a_samp * Creates a textdraw. Textdraws are, as the name implies, text (mainly - there can be boxes, sprites and model previews (skins/vehicles/weapons/objects too) that is drawn on a player's screens. * The x (left/right) coordinate to create the textdraw at * The y (up/down) coordinate to create the textdraw at @@ -2162,12 +2268,14 @@ native Menu:GetPlayerMenu(playerid); native Text:TextDrawCreate(Float:x, Float:y, const text[]); /** + * a_samp * Destroys a previously-created textdraw. * The ID of the textdraw to destroy. Returned by TextDrawCreate */ native TextDrawDestroy(Text:text); /** + * a_samp * Sets the width and height of the letters. * The TextDraw to change * Width of a char @@ -2179,6 +2287,7 @@ native TextDrawDestroy(Text:text); native TextDrawLetterSize(Text:text, Float:width, Float:height); /** + * a_samp * Change the size of a textdraw (box if TextDrawUseBox is enabled and/or clickable area for use with TextDrawSetSelectable). * The TextDraw to set the size of * The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate @@ -2201,6 +2310,7 @@ native TextDrawLetterSize(Text:text, Float:width, Float:height); native TextDrawTextSize(Text:text, Float:width, Float:height); /** + * a_samp * Set the alignment of text in a text draw. * The ID of the textdraw to set the alignment of * 1-left 2-centered 3-right @@ -2209,6 +2319,7 @@ native TextDrawTextSize(Text:text, Float:width, Float:height); native TextDrawAlignment(Text:text, TEXT_DRAW_ALIGN:alignment); /** + * a_samp * Sets the text colour of a textdraw. * The ID of the textdraw to change the colour of. * The colour to set the textdraw to @@ -2218,6 +2329,7 @@ native TextDrawAlignment(Text:text, TEXT_DRAW_ALIGN:alignment); native TextDrawColor(Text:text, colour); /** + * a_samp * Toggle whether a textdraw uses a box or not. * The ID of the text textdraw to toggle the box of * 1 to show a box or 0 to not show a box @@ -2230,6 +2342,7 @@ native TextDrawColor(Text:text, colour); native TextDrawUseBox(Text:text, bool:use); /** + * a_samp * Adjusts the text box colour (only used if TextDrawUseBox 'use' parameter is 1). * The TextDraw to change * The colour (RGBA) @@ -2238,6 +2351,7 @@ native TextDrawUseBox(Text:text, bool:use); native TextDrawBoxColor(Text:text, colour); /** + * a_samp * Sets the size of a textdraw's text's shadow. * The ID of the textdraw to set the shadow size of * The size of the shadow. 1 is generally used for a normal shadow size. 0 disables the shadow completely @@ -2251,6 +2365,7 @@ native TextDrawBoxColor(Text:text, colour); native TextDrawSetShadow(Text:text, size); /** + * a_samp * Sets the thickness of a textdraw's text's outline. TextDrawBackgroundColor can be used to change the colour. * The ID of the text draw to set the outline thickness of * The thickness of the outline, as an integer. 0 for no outline @@ -2259,6 +2374,7 @@ native TextDrawSetShadow(Text:text, size); native TextDrawSetOutline(Text:text, size); /** + * a_samp * Adjusts the text draw area background colour (the outline/shadow - NOT the box. For box colour, see TextDrawBoxColor). * The ID of the textdraw to set the background colour of * The colour that the textdraw should be set to @@ -2268,6 +2384,7 @@ native TextDrawSetOutline(Text:text, size); native TextDrawBackgroundColor(Text:text, colour); /** + * a_samp * Changes the text font. * The TextDraw to change * There are four font styles, see http://wiki.sa-mp.com/wiki/PlayerTextDrawFont. Font value 4 specifies that this is a txd sprite; 5 specifies that this textdraw can display preview models. A font value greater than 5 does not display, and anything greater than 16 crashes the client @@ -2276,6 +2393,7 @@ native TextDrawBackgroundColor(Text:text, colour); native TextDrawFont(Text:text, TEXT_DRAW_FONT:font); /** + * a_samp * Appears to scale text spacing to a proportional ratio. Useful when using TextDrawLetterSize to ensure the text has even character spacing. * The ID of the textdraw to set the proportionality of * 1 to enable proportionality, 0 to disable @@ -2285,6 +2403,7 @@ native TextDrawFont(Text:text, TEXT_DRAW_FONT:font); native TextDrawSetProportional(Text:text, bool:set); /** + * a_samp * Sets whether a textdraw can be selected (clicked on) or not. * The ID of the textdraw to make selectable * 1 to make it selectable, or 0 to make it not selectable @@ -2295,6 +2414,7 @@ native TextDrawSetProportional(Text:text, bool:set); native TextDrawSetSelectable(Text:text, bool:set); /** + * a_samp * Shows a textdraw for a specific player. * The ID of the player to show the textdraw for * The ID of the textdraw to show. Returned by TextDrawCreate @@ -2307,6 +2427,7 @@ native TextDrawSetSelectable(Text:text, bool:set); native TextDrawShowForPlayer(playerid, Text:text); /** + * a_samp * Hides a textdraw for a specific player. * The ID of the player that the textdraw should be hidden for * The ID of the textdraw to hide @@ -2317,6 +2438,7 @@ native TextDrawShowForPlayer(playerid, Text:text); native TextDrawHideForPlayer(playerid, Text:text); /** + * a_samp * Shows a textdraw for all players. * The ID of the textdraw to show. Returned by TextDrawCreate * @@ -2330,6 +2452,7 @@ native TextDrawHideForPlayer(playerid, Text:text); native TextDrawShowForAll(Text:text); /** + * a_samp * Hides a text draw for all players. * The ID of the textdraw to hide (returned by TextDrawCreate) * @@ -2339,6 +2462,7 @@ native TextDrawShowForAll(Text:text); native TextDrawHideForAll(Text:text); /** + * a_samp * Changes the text on a textdraw. * The TextDraw to change * The new string for the TextDraw @@ -2347,6 +2471,7 @@ native TextDrawHideForAll(Text:text); native TextDrawSetString(Text:text, const string[]); /** + * a_samp * Set the model for a textdraw model preview. Click here to see this function's effect. * The textdraw ID that will display the 3D preview * The GTA SA or SA:MP model ID to display @@ -2357,6 +2482,7 @@ native TextDrawSetString(Text:text, const string[]); native TextDrawSetPreviewModel(Text:text, modelIndex); /** + * a_samp * Sets the rotation and zoom of a 3D model preview textdraw. * The x rotation value * The y rotation value @@ -2368,6 +2494,7 @@ native TextDrawSetPreviewModel(Text:text, modelIndex); native TextDrawSetPreviewRot(Text:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); /** + * a_samp * If a vehicle model is used in a 3D preview textdraw, this sets the two colour values for that vehicle. * The textdraw ID that is set to display a 3D vehicle model preview * The primary Color ID to set the vehicle to @@ -2380,6 +2507,7 @@ native TextDrawSetPreviewVehCol(Text:text, colour1, colour2); // Gang Zones /** + * a_samp * Create a gangzone (coloured radar area). * The x coordinate for the west side of the gangzone * The y coordinate for the south side of the gangzone @@ -2404,6 +2532,7 @@ native TextDrawSetPreviewVehCol(Text:text, colour1, colour2); native GangZoneCreate(Float:minX, Float:minY, Float:maxX, Float:maxY); /** + * a_samp * Destroy a gangzone. * The ID of the zone to destroy * @@ -2419,6 +2548,7 @@ native GangZoneCreate(Float:minX, Float:minY, Float:maxX, Float:maxY); native GangZoneDestroy(zone); /** + * a_samp * Show a gangzone for a player. Must be created with GangZoneCreate first. * The ID of the player you would like to show the gangzone for. * The ID of the gang zone to show for the player. Returned by GangZoneCreate @@ -2437,6 +2567,7 @@ native GangZoneDestroy(zone); native GangZoneShowForPlayer(playerid, zone, colour); /** + * a_samp * Shows a gangzone with the desired colour to all players. * The ID of the gangzone to show (returned by GangZoneCreate) * The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported @@ -2457,6 +2588,7 @@ native GangZoneShowForPlayer(playerid, zone, colour); native GangZoneShowForAll(zone, colour); /** + * a_samp * Hides a gangzone for a player. * The ID of the player to hide the gangzone for * The ID of the zone to hide @@ -2473,6 +2605,7 @@ native GangZoneShowForAll(zone, colour); native GangZoneHideForPlayer(playerid, zone); /** + * a_samp * GangZoneHideForAll hides a gangzone from all players. * The zone to hide * @@ -2488,6 +2621,7 @@ native GangZoneHideForPlayer(playerid, zone); native GangZoneHideForAll(zone); /** + * a_samp * Makes a gangzone flash for a player. * The ID of the player to flash the gangzone for * The ID of the zone to flash @@ -2505,6 +2639,7 @@ native GangZoneHideForAll(zone); native GangZoneFlashForPlayer(playerid, zone, flashColour); /** + * a_samp * GangZoneFlashForAll flashes a gangzone for all players. * The zone to flash * The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported @@ -2521,6 +2656,7 @@ native GangZoneFlashForPlayer(playerid, zone, flashColour); native GangZoneFlashForAll(zone, flashColour); /** + * a_samp * Stops a gangzone flashing for a player. * The ID of the player to stop the gangzone flashing for * The ID of the gangzonezone to stop flashing @@ -2537,6 +2673,7 @@ native GangZoneFlashForAll(zone, flashColour); native GangZoneStopFlashForPlayer(playerid, zone); /** + * a_samp * Stops a gangzone flashing for all players. * The ID of the zone to stop flashing. Returned by GangZoneCreate * @@ -2558,6 +2695,7 @@ native GangZoneStopFlashForAll(zone); // Global 3D Text Labels /** + * a_samp * Creates a 3D Text Label at a specific location in the world. * The initial text string * The text Color, as an integer or hex in RGBA colour format @@ -2586,6 +2724,7 @@ native GangZoneStopFlashForAll(zone); native Text3D:Create3DTextLabel(const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, virtualWorld, bool:testLOS = false); /** + * a_samp * Delete a 3D text label (created with Create3DTextLabel). * The ID of the 3D text label to delete * @@ -2601,6 +2740,7 @@ native Text3D:Create3DTextLabel(const text[], colour, Float:x, Float:y, Float:z, native Delete3DTextLabel(Text3D:textid); /** + * a_samp * Attach a 3D text label to a player. * The ID of the 3D text label to attach. Returned by Create3DTextLabel * The ID of the player to attach the label to @@ -2623,6 +2763,7 @@ native Delete3DTextLabel(Text3D:textid); native Attach3DTextLabelToPlayer(Text3D:textid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ); /** + * a_samp * Attaches a 3D Text Label to a specific vehicle. * The ID of the 3D text label to attach. Returned by Create3DTextLabel * The vehicle you want to attach the 3D Text Label to @@ -2641,6 +2782,7 @@ native Attach3DTextLabelToPlayer(Text3D:textid, parentid, Float:offsetX, Float:o native Attach3DTextLabelToVehicle(Text3D:textid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ); /** + * a_samp * Updates a 3D Text Label text and colour. * The 3D Text Label you want to update * The colour the 3D Text Label should have from now on @@ -2660,6 +2802,7 @@ native Update3DTextLabelText(Text3D:textid, colour, const text[]); // Per-player 3D Text Labels /** + * a_samp * Creates a 3D Text Label only for a specific player. * The player which should see the newly created 3DText Label * The text to display @@ -2686,6 +2829,7 @@ native Update3DTextLabelText(Text3D:textid, colour, const text[]); native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayerid = INVALID_PLAYER_ID, parentVehicleid = INVALID_VEHICLE_ID, bool:testLOS = false); /** + * a_samp * Destroy a 3D text label that was created using CreatePlayer3DTextLabel. * The ID of the player whose 3D text label to delete * The ID of the player's 3D text label to delete @@ -2704,6 +2848,7 @@ native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Floa native DeletePlayer3DTextLabel(playerid, PlayerText3D:textid); /** + * a_samp * Updates a player 3D Text Label's text and colour. * The ID of the player for which the 3D Text Label was created * The 3D Text Label you want to update @@ -2722,6 +2867,7 @@ native DeletePlayer3DTextLabel(playerid, PlayerText3D:textid); native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const text[]); /** + * a_samp * Shows the player a synchronous (only one at a time) dialog box. * The ID of the player to show the dialog to * An ID to assign this dialog to, so responses can be processed. Max dialogid is 32767. Using negative values will close any open dialog @@ -2743,6 +2889,7 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const native ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE:style, const caption[], const info[], const button1[], const button2[]); /** + * a_samp * Get a players unique ID. * The player to get the unique ID of * Where to save the unique ID @@ -2752,6 +2899,7 @@ native ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE:style, const caption[], native gpci(playerid, serial[], len = sizeof (serial)); /** + * a_samp * Get a players unique ID. * The player to get the unique ID of * Where to save the unique ID diff --git a/a_sampdb.inc b/a_sampdb.inc index 0ab052f..54bd8be 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -17,6 +17,7 @@ #pragma tabsize 4 /** + * a_sampdb * This function is used to open a connection to a SQLite database, which is inside the /scriptfiles folder. * File name of the database * Return type for this function has changed since version 0.3.7 R2. @@ -32,6 +33,7 @@ native DB:DB_Open(const name[]) = db_open; native DB:db_open(const name[]); /** + * a_sampdb * Closes an SQLite database that was opened with db_open. * The handle of the database connection to close (returned by db_open) * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references @@ -46,6 +48,7 @@ native bool:DB_Close(DB:db) = db_close; native bool:db_close(DB:db); /** + * a_sampdb * This function is used to execute an SQL query on an opened SQLite database. * The database handle to query * The query to execute @@ -59,6 +62,7 @@ native DBResult:DB_Query(DB:db, const query[]) = db_query; native DBResult:db_query(DB:db, const query[]); /** + * a_sampdb * Frees result memory allocated from db_query. * The result to free * If DBResult:dbhandle is a valid handle, it returns 1, otherwise 0 if DBResult:dbhandle is a NULL reference. @@ -69,6 +73,7 @@ native bool:DB_FreeResult(DBResult:result) = db_free_result; native bool:db_free_result(DBResult:result); /** + * a_sampdb * Returns the number of rows from a db_query. * The result of db_query * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references @@ -80,6 +85,7 @@ native DB_NumRows(DBResult:result) = db_num_rows; native db_num_rows(DBResult:result); /** + * a_sampdb * Moves to the next row of the result allocated from db_query. * The result of db_query * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references @@ -91,6 +97,7 @@ native bool:DB_NextRow(DBResult:result) = db_next_row; native bool:db_next_row(DBResult:result); /** + * a_sampdb * Get the number of fields in a result. * The result of db_query * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references @@ -102,6 +109,7 @@ native DB_NumFields(DBResult:result) = db_num_fields; native db_num_fields(DBResult:result); /** + * a_sampdb * Returns the name of a field at a particular index. * The result to get the data from; returned by db_query * The index of the field to get the name of @@ -116,6 +124,7 @@ native bool:DB_FieldName(DBResult:result, field, output[], size = sizeof (output native bool:db_field_name(DBResult:result, field, output[], size = sizeof (output)); /** + * a_sampdb * Get the content of a field from db_query. * The result to get the data from * The field to get the data from @@ -130,6 +139,7 @@ native bool:DB_GetField(DBResult:result, field, output[], size = sizeof (output) native bool:db_get_field(DBResult:result, field, output[], size = sizeof (output)); /** + * a_sampdb * Get the content of a field as an integer from db_query. * The result to get the data from * The field to get the data from (optional=0) @@ -142,6 +152,7 @@ native DB_GetFieldInt(DBResult:result, field = 0) = db_get_field_int; native db_get_field_int(DBResult:result, field = 0); /** + * a_sampdb * Get the content of a field as a float from db_query. * The result to get the data from * The field to get the data from (optional=0) @@ -154,6 +165,7 @@ native Float:DB_GetFieldFloat(DBResult:result, field = 0) = db_get_field_float; native Float:db_get_field_float(DBResult:result, field = 0); /** + * a_sampdb * Get the contents of field with specified name. * The result to get the data from * The fieldname to get the data from @@ -168,6 +180,7 @@ native bool:DB_GetFieldAssoc(DBResult:result, const field[], output[], size = si native bool:db_get_field_assoc(DBResult:result, const field[], output[], size = sizeof (output)); /** + * a_sampdb * Get the contents of field as an integer with specified name. * The result to get the data from * The fieldname to get the data from @@ -180,6 +193,7 @@ native DB_GetFieldAssocInt(DBResult:result, const field[]) = db_get_field_assoc_ native db_get_field_assoc_int(DBResult:result, const field[]); /** + * a_sampdb * Get the contents of field as a float with specified name. * The result to get the data from * The fieldname to get the data from @@ -192,6 +206,7 @@ native Float:DB_GetFieldAssocFloat(DBResult:result, const field[]) = db_get_fiel native Float:db_get_field_assoc_float(DBResult:result, const field[]); /** + * a_sampdb * Get memory handle for an SQLite database that was opened with db_open. * The index of the database connection (returned by db_open) * This function was added in SA-MP 0.3.7 R1 and will not work in earlier versions! @@ -203,6 +218,7 @@ native DB_GetMemHandle(DB:db) = db_get_mem_handle; native db_get_mem_handle(DB:db); /** + * a_sampdb * Get memory handle for an SQLite query that was executed with db_query. * The index of the query (returned by db_query) * This function was added in SA-MP 0.3.7 R1 and will not work in earlier versions! diff --git a/a_vehicles.inc b/a_vehicles.inc index 6080763..25d24c4 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -68,6 +68,7 @@ enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO // Vehicle /** + * a_vehicles * Creates a vehicle in the world. Can be used in place of AddStaticVehicleEx at any time in the script. * The model for the vehicle * The x coordinate for the vehicle @@ -93,6 +94,7 @@ enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO native CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:rotation, colour1, colour2, respawnDelay, bool:addSiren = false); /** + * a_vehicles * Destroy a vehicle. It will disappear instantly. * The ID of the vehicle to destroy * @@ -106,6 +108,7 @@ native CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:rotation, colour1 native DestroyVehicle(vehicleid); /** + * a_vehicles * Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) for a player. * The ID of the vehicle to check * The ID of the player to check @@ -123,6 +126,7 @@ native DestroyVehicle(vehicleid); native bool:IsVehicleStreamedIn(vehicleid, playerid); /** + * a_vehicles * Gets the position of a vehicle. * The ID of the vehicle to get the position of * A float variable in which to store the x coordinate, passed by reference @@ -139,6 +143,7 @@ native bool:IsVehicleStreamedIn(vehicleid, playerid); native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); /** + * a_vehicles * Set a vehicle's position. * Vehicle ID that you want set new position * The x coordinate to position the vehicle at @@ -156,6 +161,7 @@ native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); /** + * a_vehicles * Get the rotation of a vehicle on the z axis (yaw). * The ID of the vehicle to get the z angle of * A float variable in which to store the z rotation, passed by reference @@ -172,6 +178,7 @@ native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); native GetVehicleZAngle(vehicleid, &Float:angle); /** + * a_vehicles * Returns a vehicle's rotation on all axes as a quaternion. * The ID of the vehicle to get the rotation of * A float variable in which to store the first quaternion angle, passed by reference @@ -204,6 +211,7 @@ native GetVehicleZAngle(vehicleid, &Float:angle); native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z); /** + * a_vehicles * This function can be used to calculate the distance (as a float) between a vehicle and another map coordinate. This can be useful to detect how far a vehicle away is from a location. * The ID of the vehicle to calculate the distance for * The x map coordinate @@ -217,6 +225,7 @@ native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z) native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); /** + * a_vehicles * Set the z rotation (yaw) of a vehicle. * The ID of the vehicle to set the rotation of * The z angle to set @@ -232,6 +241,7 @@ native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); native SetVehicleZAngle(vehicleid, Float:angle); /** + * a_vehicles * Set the parameters of a vehicle for a player. * The ID of the vehicle to set the parameters of * The ID of the player to set the vehicle's parameters for @@ -248,6 +258,7 @@ native SetVehicleZAngle(vehicleid, Float:angle); native SetVehicleParamsForPlayer(vehicleid, playerid, objective, doors); /** + * a_vehicles * Use this function before any player connects (OnGameModeInit) to tell all clients that the script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when players enter/exit vehicles and headlights automatically coming on when it is dark. * * @@ -259,6 +270,7 @@ native SetVehicleParamsForPlayer(vehicleid, playerid, objective, doors); native ManualVehicleEngineAndLights(); /** + * a_vehicles * Sets a vehicle's parameters for all players. * The ID of the vehicle to set the parameters of * Engine status. 0 - Off, 1 - On @@ -282,6 +294,7 @@ native ManualVehicleEngineAndLights(); native SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS:engine, VEHICLE_PARAMS:lights, VEHICLE_PARAMS:alarm, VEHICLE_PARAMS:doors, VEHICLE_PARAMS:bonnet, VEHICLE_PARAMS:boot, VEHICLE_PARAMS:objective); /** + * a_vehicles * Gets a vehicle's parameters. * The ID of the vehicle to get the parameters from * Get the engine status. If 1, the engine is running. @@ -298,6 +311,7 @@ native SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS:engine, VEHICLE_PARAMS:light native GetVehicleParamsEx(vehicleid, &VEHICLE_PARAMS:engine, &VEHICLE_PARAMS:lights, &VEHICLE_PARAMS:alarm, &VEHICLE_PARAMS:doors, &VEHICLE_PARAMS:bonnet, &VEHICLE_PARAMS:boot, &VEHICLE_PARAMS:objective); /** + * a_vehicles * Returns a vehicle's siren state (on/off). * The ID of the vehicle to get the siren state of * @@ -307,6 +321,7 @@ native GetVehicleParamsEx(vehicleid, &VEHICLE_PARAMS:engine, &VEHICLE_PARAMS:lig native GetVehicleParamsSirenState(vehicleid); /** + * a_vehicles * Allows you to open and close the doors of a vehicle. * The ID of the vehicle to set the door state of * The state of the driver's door. 1 to open, 0 to close @@ -322,6 +337,7 @@ native GetVehicleParamsSirenState(vehicleid); native SetVehicleParamsCarDoors(vehicleid, frontLeft, frontRight, rearLeft, rearRight); /** + * a_vehicles * Allows you to retrieve the current state of a vehicle's doors. * The ID of the vehicle * The integer to save the state of the driver's door to @@ -337,6 +353,7 @@ native SetVehicleParamsCarDoors(vehicleid, frontLeft, frontRight, rearLeft, rear native GetVehicleParamsCarDoors(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); /** + * a_vehicles * Allows you to open and close the windows of a vehicle. * The ID of the vehicle to set the window state of * The state of the driver's window. 0 to open, 1 to close @@ -351,6 +368,7 @@ native GetVehicleParamsCarDoors(vehicleid, &frontLeft, &frontRight, &rearLeft, & native SetVehicleParamsCarWindows(vehicleid, frontLeft, frontRight, rearLeft, rearRight); /** + * a_vehicles * Allows you to retrieve the current state of a vehicle's windows. * The ID of the vehicle * The integer to save the state of the drivers window to @@ -367,6 +385,7 @@ native SetVehicleParamsCarWindows(vehicleid, frontLeft, frontRight, rearLeft, re native GetVehicleParamsCarWindows(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); /** + * a_vehicles * Sets a vehicle back to the position at where it was created. * The ID of the vehicle to respawn * @@ -379,6 +398,7 @@ native GetVehicleParamsCarWindows(vehicleid, &frontLeft, &frontRight, &rearLeft, native SetVehicleToRespawn(vehicleid); /** + * a_vehicles * Links a vehicle to an interior. Vehicles can only be seen by players in the same interior (SetPlayerInterior). * The ID of the vehicle to link to an interior * The Interior ID to link it to @@ -392,6 +412,7 @@ native SetVehicleToRespawn(vehicleid); native LinkVehicleToInterior(vehicleid, interiorid); /** + * a_vehicles * Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components can be found here. * The ID of the vehicle to add the component to. Not to be confused with modelid * The ID of the component to add to the vehicle @@ -411,6 +432,7 @@ native LinkVehicleToInterior(vehicleid, interiorid); native AddVehicleComponent(vehicleid, componentid); /** + * a_vehicles * Remove a component from a vehicle. * ID of the vehicle * ID of the component to remove @@ -423,6 +445,7 @@ native AddVehicleComponent(vehicleid, componentid); native RemoveVehicleComponent(vehicleid, componentid); /** + * a_vehicles * Change a vehicle's primary and secondary colours. * The ID of the vehicle to change the colours of * The new vehicle's primary Color ID @@ -438,6 +461,7 @@ native RemoveVehicleComponent(vehicleid, componentid); native ChangeVehicleColor(vehicleid, colour1, colour2); /** + * a_vehicles * Change a vehicle's paintjob (for plain colours see ChangeVehicleColor). * The ID of the vehicle to change the paintjob of * The ID of the Paintjob to apply. Use 3 to remove a paintjob @@ -453,6 +477,7 @@ native ChangeVehicleColor(vehicleid, colour1, colour2); native ChangeVehiclePaintjob(vehicleid, paintjobid); /** + * a_vehicles * Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%). * The ID of the vehicle to set the health of * The health, given as a float value @@ -479,6 +504,7 @@ native ChangeVehiclePaintjob(vehicleid, paintjobid); native SetVehicleHealth(vehicleid, Float:health); /** + * a_vehicles * Get the health of a vehicle. * The ID of the vehicle to get the health of * A float variable in which to store the vehicle's health, passed by reference @@ -504,6 +530,7 @@ native SetVehicleHealth(vehicleid, Float:health); native GetVehicleHealth(vehicleid, &Float:health); /** + * a_vehicles * Attach a vehicle to another vehicle as a trailer. * The ID of the vehicle that will be pulled * The ID of the vehicle that will pull the trailer @@ -516,6 +543,7 @@ native GetVehicleHealth(vehicleid, &Float:health); native AttachTrailerToVehicle(trailerid, vehicleid); /** + * a_vehicles * Detach the connection between a vehicle and its trailer, if any. * ID of the pulling vehicle * @@ -525,6 +553,7 @@ native AttachTrailerToVehicle(trailerid, vehicleid); native DetachTrailerFromVehicle(vehicleid); /** + * a_vehicles * Checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer to get the vehicle ID of the trailer (if any). * The ID of the vehicle to check for trailers * @@ -535,6 +564,7 @@ native DetachTrailerFromVehicle(vehicleid); native bool:IsTrailerAttachedToVehicle(vehicleid); /** + * a_vehicles * Get the ID of the trailer attached to a vehicle. * The ID of the vehicle to get the trailer of * @@ -545,6 +575,7 @@ native bool:IsTrailerAttachedToVehicle(vehicleid); native GetVehicleTrailer(vehicleid); /** + * a_vehicles * Set a vehicle numberPlate. * The ID of the vehicle to set the number plate of * The text that should be displayed on the number plate @@ -569,6 +600,7 @@ native GetVehicleTrailer(vehicleid); native SetVehicleNumberPlate(vehicleid, const numberPlate[]); /** + * a_vehicles * Gets the model ID of a vehicle. * The ID of the vehicle to get the model of * @@ -580,6 +612,7 @@ native SetVehicleNumberPlate(vehicleid, const numberPlate[]); native GetVehicleModel(vehicleid); /** + * a_vehicles * Retrieves the installed component ID (modshop mod(ification)) on a vehicle in a specific slot. * The ID of the vehicle to check for the component * The component slot to check for components (see below) @@ -621,6 +654,7 @@ native GetVehicleModel(vehicleid); native GetVehicleComponentInSlot(vehicleid, CARMODTYPE:slot); // There is 1 slot for each CARMODTYPE_* /** + * a_vehicles * Find out what type of component a certain ID is. * The component ID to check * @@ -634,6 +668,7 @@ native GetVehicleComponentInSlot(vehicleid, CARMODTYPE:slot); // There is 1 slot native CARMODTYPE:GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID /** + * a_vehicles * Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.). * The ID of the vehicle to repair * @@ -647,6 +682,7 @@ native CARMODTYPE:GetVehicleComponentType(component); // Find CARMODTYPE_* for c native RepairVehicle(vehicleid); // Repairs the damage model and resets the health /** + * a_vehicles * Get the velocity of a vehicle on the x, y and z axes. * The ID of the vehicle to get the velocity of * A float variable in to which to store the vehicle's x velocity, passed by reference @@ -665,6 +701,7 @@ native RepairVehicle(vehicleid); // Repairs the damage model and resets the heal native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); /** + * a_vehicles * Sets the x, y and z velocity of a vehicle. * The ID of the vehicle to set the velocity of * The velocity in the x direction @@ -680,6 +717,7 @@ native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); /** + * a_vehicles * Sets the angular x, y and z velocity of a vehicle. * The ID of the vehicle to set the velocity of * The amount of velocity in the angular x direction @@ -697,6 +735,7 @@ native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); /** + * a_vehicles * Retrieve the damage statuses of a vehicle. * The ID of the vehicle to get the damage statuses of * A variable to store the panel damage data in, passed by reference @@ -749,6 +788,7 @@ native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); /** + * a_vehicles * Sets the various visual damage statuses of a vehicle, such as popped tires, broken lights and damaged panels. * The ID of the vehicle to set the damage of * A set of bits containing the panel damage status @@ -797,6 +837,7 @@ native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); /** + * a_vehicles * Retrieve information about a specific vehicle model such as the size or position of seats. * The vehicle model to get info of * The type of information to retrieve @@ -825,6 +866,7 @@ native GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO:infotype, &Float:x, // Virtual Worlds /** + * a_vehicles * Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their own virtual world. * The ID of vehicle to set the virtual world of * The ID of the virtual world to put the vehicle in @@ -834,6 +876,7 @@ native GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO:infotype, &Float:x, native SetVehicleVirtualWorld(vehicleid, virtualWorld); /** + * a_vehicles * Get the virtual world of a vehicle. * The ID of the vehicle to get the virtual world of * @@ -843,6 +886,7 @@ native SetVehicleVirtualWorld(vehicleid, virtualWorld); native GetVehicleVirtualWorld(vehicleid); /** + * a_vehicles * Check if a vehicle ID is valid. * The ID of the vehicle to check * From c9a3180d1fd5599a5e1576c7e6b16511002af333 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 16:53:30 +0000 Subject: [PATCH 052/104] Add `` to some functions without other documentation. --- a_npc.inc | 91 +++++++++++++++++++++++++++++++++++----------------- a_samp.inc | 23 +++++++++++++ a_sampdb.inc | 57 ++++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+), 29 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index fbdd4fc..51f5b0b 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -357,40 +357,62 @@ open.mp releases can use `A` as the first digit. // Util -#if !defined _console_included - #define _console_included - - * Prints a string to the server console (not in-game chat) and logs (server_log.txt). - * The string to print - * +/** + * Prints a string to the server console (not in-game chat) and logs (server_log.txt). + * The string to print + * + */ +#if defined _console_included + static stock a_samp_unused_print(const string[]) + { + #pragma unused string + // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still + // put in the output, unattached to any function. So make a function. + } +#else native print(const string[]); +#endif - * Outputs a formatted string on the console (the server window, not the in-game chat). - * The format string - * Indefinite number of arguments of any tag - * - * - * The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. - * This function doesn't support packed strings. - * - * Format Specifiers:
    - *
      - *
    • %i - integer (whole number)
    • - *
    • %d - integer (whole number).
    • - *
    • %s - string
    • - *
    • %f - floating-point number (Float: tag)
    • - *
    • %c - ASCII character
    • - *
    • %x - hexadecimal number
    • - *
    • %b - binary number
    • - *
    • %% - literal %
    • - *
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • - *
    - *
    - * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. - * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) +/** + * Outputs a formatted string on the console (the server window, not the in-game chat). + * The format string + * Indefinite number of arguments of any tag + * + * + * The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. + * This function doesn't support packed strings. + * + * Format Specifiers:
    + *
      + *
    • %i - integer (whole number)
    • + *
    • %d - integer (whole number).
    • + *
    • %s - string
    • + *
    • %f - floating-point number (Float: tag)
    • + *
    • %c - ASCII character
    • + *
    • %x - hexadecimal number
    • + *
    • %b - binary number
    • + *
    • %% - literal %
    • + *
    • %q - escape a text for SQLite. (Added in 0.3.7 R2)
    • + *
    + *
    + * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + */ +#if defined _console_included + static stock a_npc_unused_printf(const format[], {Float, _}:...) + { + #pragma unused format + // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still + // put in the output, unattached to any function. So make a function. + } +#else native printf(const format[], {Float, _}:...); #endif +#if !defined _console_included + #define _console_included +#endif + /** * a_npc * Formats a string to include variables and other strings inside it. @@ -566,9 +588,20 @@ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); * ID of the vehicle or 0 if not in a vehicle. */ native GetPlayerVehicleID(playerid); + +/** + * a_npc + */ native WEAPON:GetPlayerArmedWeapon(playerid); +/** + * a_npc + */ native GetPlayerHealth(playerid); + +/** + * a_npc + */ native GetPlayerArmour(playerid); /** diff --git a/a_samp.inc b/a_samp.inc index 7fe7329..3f12310 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -1619,11 +1619,34 @@ native ConnectNPC(const name[], const script[]); */ native bool:IsPlayerNPC(playerid); +/** + * a_samp + */ native AddCharModel(baseid, newid, const dff[], const textureLibrary[]); + +/** + * a_samp + */ native AddSimpleModel(virtualWorld, baseid, newid, const dff[], const textureLibrary[]); + +/** + * a_samp + */ native AddSimpleModelTimed(virtualWorld, baseid, newid, const dff[], const textureLibrary[], timeOn, timeOff); + +/** + * a_samp + */ native FindModelFileNameFromCRC(crc, output[], size = sizeof (output)); + +/** + * a_samp + */ native FindTextureFileNameFromCRC(crc, output[], size = sizeof (output)); + +/** + * a_samp + */ native RedirectDownload(playerid, const url[]); // Admin diff --git a/a_sampdb.inc b/a_sampdb.inc index 54bd8be..89b5bb2 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -44,6 +44,9 @@ native DB:db_open(const name[]); */ native bool:DB_Close(DB:db) = db_close; +/** + * a_sampdb + */ #pragma deprecated Use `DB_Close`. native bool:db_close(DB:db); @@ -58,6 +61,9 @@ native bool:db_close(DB:db); */ native DBResult:DB_Query(DB:db, const query[]) = db_query; +/** + * a_sampdb + */ #pragma deprecated Use `DB_Query`. native DBResult:db_query(DB:db, const query[]); @@ -69,6 +75,9 @@ native DBResult:db_query(DB:db, const query[]); */ native bool:DB_FreeResult(DBResult:result) = db_free_result; +/** + * a_sampdb + */ #pragma deprecated Use `DB_FreeResult`. native bool:db_free_result(DBResult:result); @@ -81,6 +90,9 @@ native bool:db_free_result(DBResult:result); */ native DB_NumRows(DBResult:result) = db_num_rows; +/** + * a_sampdb + */ #pragma deprecated Use `DB_NumRows`. native db_num_rows(DBResult:result); @@ -93,6 +105,9 @@ native db_num_rows(DBResult:result); */ native bool:DB_NextRow(DBResult:result) = db_next_row; +/** + * a_sampdb + */ #pragma deprecated Use `DB_NextRow`. native bool:db_next_row(DBResult:result); @@ -105,6 +120,9 @@ native bool:db_next_row(DBResult:result); */ native DB_NumFields(DBResult:result) = db_num_fields; +/** + * a_sampdb + */ #pragma deprecated Use `DB_NumFields`. native db_num_fields(DBResult:result); @@ -120,6 +138,9 @@ native db_num_fields(DBResult:result); */ native bool:DB_FieldName(DBResult:result, field, output[], size = sizeof (output)) = db_field_name; +/** + * a_sampdb + */ #pragma deprecated Use `DB_FieldName`. native bool:db_field_name(DBResult:result, field, output[], size = sizeof (output)); @@ -135,6 +156,9 @@ native bool:db_field_name(DBResult:result, field, output[], size = sizeof (outpu */ native bool:DB_GetField(DBResult:result, field, output[], size = sizeof (output)) = db_get_field; +/** + * a_sampdb + */ #pragma deprecated Use `DB_GetField`. native bool:db_get_field(DBResult:result, field, output[], size = sizeof (output)); @@ -148,6 +172,9 @@ native bool:db_get_field(DBResult:result, field, output[], size = sizeof (output */ native DB_GetFieldInt(DBResult:result, field = 0) = db_get_field_int; +/** + * a_sampdb + */ #pragma deprecated Use `DB_GetFieldInt`. native db_get_field_int(DBResult:result, field = 0); @@ -161,6 +188,9 @@ native db_get_field_int(DBResult:result, field = 0); */ native Float:DB_GetFieldFloat(DBResult:result, field = 0) = db_get_field_float; +/** + * a_sampdb + */ #pragma deprecated Use `DB_GetFieldFloat`. native Float:db_get_field_float(DBResult:result, field = 0); @@ -176,6 +206,9 @@ native Float:db_get_field_float(DBResult:result, field = 0); */ native bool:DB_GetFieldAssoc(DBResult:result, const field[], output[], size = sizeof (output)) = db_get_field_assoc; +/** + * a_sampdb + */ #pragma deprecated Use `DB_GetFieldAssoc`. native bool:db_get_field_assoc(DBResult:result, const field[], output[], size = sizeof (output)); @@ -189,6 +222,9 @@ native bool:db_get_field_assoc(DBResult:result, const field[], output[], size = */ native DB_GetFieldAssocInt(DBResult:result, const field[]) = db_get_field_assoc_int; +/** + * a_sampdb + */ #pragma deprecated Use `DB_GetFieldAssocInt`. native db_get_field_assoc_int(DBResult:result, const field[]); @@ -202,6 +238,9 @@ native db_get_field_assoc_int(DBResult:result, const field[]); */ native Float:DB_GetFieldAssocFloat(DBResult:result, const field[]) = db_get_field_assoc_float; +/** + * a_sampdb + */ #pragma deprecated Use `DB_GetFieldAssocFloat`. native Float:db_get_field_assoc_float(DBResult:result, const field[]); @@ -214,6 +253,9 @@ native Float:db_get_field_assoc_float(DBResult:result, const field[]); */ native DB_GetMemHandle(DB:db) = db_get_mem_handle; +/** + * a_sampdb + */ #pragma deprecated Use `DB_GetMemHandle`. native db_get_mem_handle(DB:db); @@ -226,16 +268,31 @@ native db_get_mem_handle(DB:db); */ native DB_GetResultMemHandle(DBResult:result) = db_get_result_mem_handle; +/** + * a_sampdb + */ #pragma deprecated Use `DB_GetResultMemHandle`. native db_get_result_mem_handle(DBResult:result); +/** + * a_sampdb + */ native DB_DebugOpenFiles() = db_debug_openfiles; +/** + * a_sampdb + */ #pragma deprecated Use `DB_DebugOpenFiles`. native db_debug_openfiles(); +/** + * a_sampdb + */ native DB_DebugOpenResults() = db_debug_openresults; +/** + * a_sampdb + */ #pragma deprecated Use `DB_DebugOpenResults`. native db_debug_openresults(); From e9b89556be1888a0477ad790a087995227f7f4d6 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 16:55:00 +0000 Subject: [PATCH 053/104] Fix some inclusions. --- a_samp.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 3f12310..2954898 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -482,7 +482,7 @@ public const SAMP_INCLUDES_VERSION = 0x037030; #error cannot read from file: "a_file" #endif -#if !defined _objects_included // Not `_float_included`. +#if !defined _objects_included #error cannot read from file: "a_objects" #endif @@ -499,12 +499,13 @@ public const SAMP_INCLUDES_VERSION = 0x037030; #endif // Special case. The old version didn't have `_http_included`. - #tryinclude "a_http" #if !defined HTTP #tryinclude #endif -#if !defined HTTP +#if defined HTTP + #define _http_included +#else #error cannot read from file: "a_http" #endif From 2c1593a5f1a133d0ec8b839a5a73ebb8e70d5a20 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 16:55:25 +0000 Subject: [PATCH 054/104] Old-style include guards as well. --- a_samp.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/a_samp.inc b/a_samp.inc index 2954898..d3c4225 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -505,6 +505,7 @@ public const SAMP_INCLUDES_VERSION = 0x037030; #endif #if defined HTTP #define _http_included + #define _inc_a_http #else #error cannot read from file: "a_http" #endif From d2b4ee3783b4b73ba55cd930040c70475aeb1a63 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 17:32:30 +0000 Subject: [PATCH 055/104] You'll prise two space full stops from my cold dead hands! --- a_actor.inc | 52 +++--- a_npc.inc | 60 +++---- a_objects.inc | 64 +++---- a_players.inc | 386 +++++++++++++++++++++--------------------- a_samp.inc | 442 ++++++++++++++++++++++++------------------------- a_sampdb.inc | 24 +-- a_vehicles.inc | 106 ++++++------ 7 files changed, 567 insertions(+), 567 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 513d691..70b87fa 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -18,7 +18,7 @@ /** * a_actor - * 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. + * 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. * The model ID (skin ID) the actor should have * The x coordinate to create the actor at * The y coordinate to create the actor at @@ -47,7 +47,7 @@ * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * - * Actors are completely separate from NPCs. They do NOT use player IDs/slots on the server and CANNOT be handled like NPCs.
    + * Actors are completely separate from NPCs. They do NOT use player IDs/slots on the server and CANNOT be handled like NPCs.
    * Actors are limited to 1000 (MAX_ACTORS).
    * Actors can be pushed by vehicles, use a timer to put them back at their positions.
    * As of 0.3.7 R2 actors default to being invulnerable. @@ -62,12 +62,12 @@ native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); /** * a_actor * Destroy an actor which was created with CreateActor. - * The ID of the actor to destroy. Returned by CreateActor + * The ID of the actor to destroy. Returned by CreateActor * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The actor with the ID specified does not exist. + * 0: The function failed to execute. The actor with the ID specified does not exist. *
    */ native DestroyActor(actorid); @@ -86,7 +86,7 @@ native bool:IsActorStreamedIn(actorid, playerid); /** * a_actor - * Set the virtual world of an actor. Only players in the same world will see the actor. + * Set the virtual world of an actor. Only players in the same world will see the actor. * The ID of the actor (returned by CreateActor) to set the virtual world of * The virtual world to put the actor ID * @@ -94,7 +94,7 @@ native bool:IsActorStreamedIn(actorid, playerid); * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The actor specified does not exist. + * 0: The function failed to execute. The actor specified does not exist. *
    */ native SetActorVirtualWorld(actorid, virtualWorld); @@ -105,7 +105,7 @@ native SetActorVirtualWorld(actorid, virtualWorld); * The ID of the actor to get the virtual world of * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * The virtual world of the actor. By default this is 0. Also returns 0 if actor specified does not exist. + * The virtual world of the actor. By default this is 0. Also returns 0 if actor specified does not exist. */ native GetActorVirtualWorld(actorid); @@ -116,17 +116,17 @@ native GetActorVirtualWorld(actorid); * The animation library from which to apply an animation * The name of the animation to apply, within the specified library * The speed to play the animation (use 4.1) - * If set to 1, the animation will loop. If set to 0, the animation will play once + * If set to 1, the animation will loop. If set to 0, the animation will play once * If set to 0, the actor is returned to their old x coordinate once the animation is complete (for animations that move the actor such as walking). 1 will not return them to their old position - * Same as above but for the y axis. Should be kept the same as the previous parameter + * Same as above but for the y axis. Should be kept the same as the previous parameter * Setting this to 1 will freeze an actor at the end of the animation. 0 will not - * Timer in milliseconds. For a never-ending loop it should be 0 + * Timer in milliseconds. For a never-ending loop it should be 0 * - * You must preload the animation library for the player the actor will be applying the animation for, and not for the actor. Otherwise, the animation won't be applied to the actor until the function is executed again. + * You must preload the animation library for the player the actor will be applying the animation for, and not for the actor. Otherwise, the animation won't be applied to the actor until the function is executed again. * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The actor specified does not exist. + * 0: The function failed to execute. The actor specified does not exist. *
    */ native ApplyActorAnimation(actorid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); @@ -139,7 +139,7 @@ native ApplyActorAnimation(actorid, const animationLibrary[], const animationNam * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The actor specified does not exist. + * 0: The function failed to execute. The actor specified does not exist. *
    */ native ClearActorAnimations(actorid); @@ -147,17 +147,17 @@ native ClearActorAnimations(actorid); /** * a_actor * Set the position of an actor. - * The ID of the actor to set the position of. Returned by CreateActor + * The ID of the actor to set the position of. Returned by CreateActor * The x coordinate to position the actor at * The y coordinate to position the actor at * The z coordinate to position the actor at * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * When creating an actor with CreateActor, you specify it's position. You do not need to use this function unless you want to change its position later. + * When creating an actor with CreateActor, you specify it's position. You do not need to use this function unless you want to change its position later. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The actor specified does not exist. + * 0: The function failed to execute. The actor specified does not exist. *
    */ native SetActorPos(actorid, Float:x, Float:y, Float:z); @@ -165,7 +165,7 @@ native SetActorPos(actorid, Float:x, Float:y, Float:z); /** * a_actor * Get the position of an actor. - * The ID of the actor to get the position of. Returned by CreateActor + * The ID of the actor to get the position of. Returned by CreateActor * A float variable, passed by reference, in which to store the x coordinate of the actor * A float variable, passed by reference, in which to store the y coordinate of the actor * A float variable, passed by reference, in which to store the z coordinate of the actor @@ -173,7 +173,7 @@ native SetActorPos(actorid, Float:x, Float:y, Float:z); * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The actor specified does not exist.
    + * 0: The function failed to execute. The actor specified does not exist.
    *
    */ native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); @@ -181,16 +181,16 @@ native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); /** * a_actor * Set the facing angle of an actor. - * The ID of the actor to set the facing angle of. Returned by CreateActor + * The ID of the actor to set the facing angle of. Returned by CreateActor * The facing angle to set for the actor * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * Players will see actor's facing angle changed only when it is restreamed to them. - * When creating an actor with CreateActor, you specify it's facing angle. You do not need to use this function unless you want to change its facing angle later. + * When creating an actor with CreateActor, you specify it's facing angle. You do not need to use this function unless you want to change its facing angle later. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The actor specified does not exist. + * 0: The function failed to execute. The actor specified does not exist. *
    */ native SetActorFacingAngle(actorid, Float:angle); @@ -198,14 +198,14 @@ native SetActorFacingAngle(actorid, Float:angle); /** * a_actor * Get the facing angle of an actor. - * The ID of the actor to get the facing angle of. Returned by CreateActor + * The ID of the actor to get the facing angle of. Returned by CreateActor * A float variable, passed by reference, in to which the actor's facing angle will be stored * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The actor specified does not exist. + * 0: The function failed to execute. The actor specified does not exist. *
    */ native GetActorFacingAngle(actorid, &Float:angle); @@ -218,7 +218,7 @@ native GetActorFacingAngle(actorid, &Float:angle); * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * * 1 on success.
    - * 0 on failure (i.e. actor is not created). + * 0 on failure (i.e. actor is not created). *
    */ native SetActorHealth(actorid, Float:health); @@ -231,7 +231,7 @@ native SetActorHealth(actorid, Float:health); * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * * 1 - success.
    - * 0 - failure (i.e. actor is not created).
    + * 0 - failure (i.e. actor is not created).
    *
    */ native GetActorHealth(actorid, &Float:health); @@ -246,7 +246,7 @@ native GetActorHealth(actorid, &Float:health); * Players will have actor's invulnerability state changed only when it is restreamed to them. * * 1 - Success.
    - * 0 - Failure (i.e. Actor is not created). + * 0 - Failure (i.e. Actor is not created). *
    */ native SetActorInvulnerable(actorid, bool:invulnerable = true); diff --git a/a_npc.inc b/a_npc.inc index 51f5b0b..a5a3c6a 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -379,7 +379,7 @@ open.mp releases can use `A` as the first digit. * Indefinite number of arguments of any tag * * - * The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. + * The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. * This function doesn't support packed strings. * * Format Specifiers:
    @@ -395,8 +395,8 @@ open.mp releases can use `A` as the first digit. *
  • %q - escape a text for SQLite. (Added in 0.3.7 R2)
  • * *
    - * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. - * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) */ #if defined _console_included static stock a_npc_unused_printf(const format[], {Float, _}:...) @@ -437,24 +437,24 @@ open.mp releases can use `A` as the first digit. *
  • %q - escape a text for SQLite. (Added in 0.3.7 R2)
  • * *
    - * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. - * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) */ native format(output[], len = sizeof (output), const format[], {Float, _}:...); /** * a_npc - * Sets a 'timer' to call a function after some time. Can be set to repeat. - * Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server + * Sets a 'timer' to call a function after some time. Can be set to repeat. + * Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server * Interval in milliseconds * Whether the timer should repeat or not * * - * Timer intervals are not accurate (roughly 25% off). There's a fix available here. - * Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. + * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. * The function that should be called must be public. * The use of many timers will result in increased memory/cpu usage. - * The ID of the timer that was started. Timer IDs start at 1. + * The ID of the timer that was started. Timer IDs start at 1. */ native SetTimer(const functionName[], interval, bool:repeating); @@ -472,8 +472,8 @@ native KillTimer(timerid); * a_npc * Returns the uptime of the actual server (not the SA-MP server) in milliseconds. * - * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. - * One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. + * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. + * One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. * Uptime of the actual server (not the SA-MP server). */ native GetTickCount(); @@ -572,14 +572,14 @@ native PLAYER_STATE:GetPlayerState(playerid); * * * - * This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. - * true on success, false on failure (i.e. player not connected). + * This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. + * true on success, false on failure (i.e. player not connected). */ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /** * a_npc - * This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. + * This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. * The ID of the player in the vehicle that you want to get the ID of * * @@ -616,7 +616,7 @@ native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); /** * a_npc - * Checks if a player is streamed in for an NPC. Only nearby players are streamed in. + * Checks if a player is streamed in for an NPC. Only nearby players are streamed in. * The ID of the player to check * * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! @@ -626,7 +626,7 @@ native bool:IsPlayerStreamedIn(playerid); /** * a_npc - * Checks if a vehicle is streamed in for an NPC. Only nearby vehicles are streamed in. + * Checks if a vehicle is streamed in for an NPC. Only nearby vehicles are streamed in. * The ID of the vehicle to check * * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! @@ -642,8 +642,8 @@ native bool:IsVehicleStreamedIn(vehicleid); * Up/down state * Left/right state * - * Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). - * As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. + * Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). + * As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. * The keys are stored in the specified variables. */ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); @@ -653,8 +653,8 @@ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); * Gets the angle a player is facing. * The player you want to get the angle of * The Float to store the angle in, passed by reference - * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. - * Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. + * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. + * Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. */ native GetPlayerFacingAngle(playerid, &Float:ang); @@ -717,7 +717,7 @@ native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); /** * a_npc - * Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. + * Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. * The ID of the player * The furthest distance the player can be from the point to be in range * The x coordinate of the point to check the range to @@ -736,13 +736,13 @@ native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Floa * Get a player's name. * The ID of the player to get the name of * An array into which to store the name, passed by reference - * The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME + * The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME * * * * * - * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. + * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. * The length of the player's name. 0 if player specified doesn't exist. */ native GetPlayerName(playerid, name[], len = sizeof (name)); @@ -754,14 +754,14 @@ native GetPlayerName(playerid, name[], len = sizeof (name)); * * * - * This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. + * This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. * 1 if the player is connected, 0 if not. */ native bool:IsPlayerConnected(playerid); /** * a_npc - * This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. + * This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. * The type of recording to be loaded * The filename to be loaded, without the .rec extension * @@ -854,7 +854,7 @@ forward OnNPCEnterVehicle(vehicleid, seatid); forward OnNPCExitVehicle(); /** - * This callback gets called whenever the NPC sees a ClientMessage. This will be everytime a SendClientMessageToAll function is used and everytime a SendClientMessage function is sent towards the NPC. This callback won't be called when someone says something. For a version of this with player text, see OnPlayerText. + * This callback gets called whenever the NPC sees a ClientMessage. This will be everytime a SendClientMessageToAll function is used and everytime a SendClientMessage function is sent towards the NPC. This callback won't be called when someone says something. For a version of this with player text, see OnPlayerText. * The colour the ClientMessage is * The actual message * @@ -870,7 +870,7 @@ forward OnClientMessage(colour, text[]); forward OnPlayerDeath(playerid); /** - * Opposed to the player version of this callback, this callback is called everytime anyone says anything in the chat. This includes any player, any other NPC, or the same NPC himself. + * Opposed to the player version of this callback, this callback is called everytime anyone says anything in the chat. This includes any player, any other NPC, or the same NPC himself. * The player who has written something in the chat * The text written by playerid * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! @@ -878,7 +878,7 @@ forward OnPlayerDeath(playerid); forward OnPlayerText(playerid, text[]); /** - * This callback is called when a player is streamed in for an NPC. Only nearby players are streamed in. + * This callback is called when a player is streamed in for an NPC. Only nearby players are streamed in. * The ID of the player that is now streamed in for the NPC * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! */ @@ -892,7 +892,7 @@ forward OnPlayerStreamIn(playerid); forward OnPlayerStreamOut(playerid); /** - * This callback is called when a vehicle is streamed by the NPC. A simpler definition would be when the NPC sees the grey vehicle icon appear on his map. + * This callback is called when a vehicle is streamed by the NPC. A simpler definition would be when the NPC sees the grey vehicle icon appear on his map. * The vehicle that has been streamed * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! */ diff --git a/a_objects.inc b/a_objects.inc index 5fd8923..db28701 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -75,11 +75,11 @@ enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN * * * - * Objects that emit light (lampposts, police lights, bollard lights, neons etc.) that have a greater rotation than 16.26 degrees (or -16.26) on either the x or y axis will stop shining. This effect also applies to light objects attached to other objects, players and vehicles. - * If a light object is attached to a car and the car is rotated over 16.26 degrees (like in a rollover), the object will also stop emitting light. This is a GTA:SA issue and is not caused by a bug in SA-MP. + * Objects that emit light (lampposts, police lights, bollard lights, neons etc.) that have a greater rotation than 16.26 degrees (or -16.26) on either the x or y axis will stop shining. This effect also applies to light objects attached to other objects, players and vehicles. + * If a light object is attached to a car and the car is rotated over 16.26 degrees (like in a rollover), the object will also stop emitting light. This is a GTA:SA issue and is not caused by a bug in SA-MP. * - * In case the light is attached to another object, one fix for this is to set SyncRotation to false in AttachObjectToObject. This will ensure the light stays at 0 rotation. This would only really work for objects that consist ONLY of light, so wouldn't work for the police light for example. - * There is a limit of 1000 objects (MAX_OBJECTS). To circumvent this limit, you can use a streamer + * In case the light is attached to another object, one fix for this is to set SyncRotation to false in AttachObjectToObject. This will ensure the light stays at 0 rotation. This would only really work for objects that consist ONLY of light, so wouldn't work for the police light for example. + * There is a limit of 1000 objects (MAX_OBJECTS). To circumvent this limit, you can use a streamer * The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. */ native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, Float:rotZ, Float:drawDistance = 0.0); @@ -87,7 +87,7 @@ native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, /** * a_objects * Attach an object to a vehicle. - * The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first + * The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first * The ID of the vehicle to attach the object to * The x axis offset from the vehicle to attach the object to * The y axis offset from the vehicle to attach the object to @@ -107,7 +107,7 @@ native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, F /** * a_objects - * You can use this function to attach objects to other objects. The objects will folow the main object. + * You can use this function to attach objects to other objects. The objects will folow the main object. * The object to attach to another object * The object to attach the object to * The distance between the main object and the object in the x direction @@ -129,7 +129,7 @@ native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, F * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. + * 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. *
    */ native AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); @@ -157,7 +157,7 @@ native AttachObjectToPlayer(objectid, parentid, Float:offsetX, Float:offsetY, Fl /** * a_objects * Change the position of an object. - * The ID of the object to set the position of. Returned by CreateObject + * The ID of the object to set the position of. Returned by CreateObject * The x coordinate to position the object at * The y coordinate to position the object at * The z coordinate to position the object at @@ -182,7 +182,7 @@ native SetObjectPos(objectid, Float:x, Float:y, Float:z); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. The specified object does not exist. + * 0: The function failed to execute. The specified object does not exist. *
    */ native GetObjectPos(objectid, &Float:x, &Float:y, &Float:z); @@ -204,7 +204,7 @@ native SetObjectRot(objectid, Float:rotX, Float:rotY, Float:rotZ); /** * a_objects - * Use this function to get the objects current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. + * Use this function to get the objects current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. * The objectid of the object you want to get the rotation from * The variable to store the x rotation, passed by reference * The variable to store the y rotation, passed by reference @@ -238,7 +238,7 @@ native GetObjectModel(objectid); * This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). * * 1: The function executed successfully.
    - * 0: The function failed to execute. The object specified does not exist. + * 0: The function failed to execute. The object specified does not exist. *
    */ native SetObjectNoCameraCol(objectid); @@ -258,7 +258,7 @@ native bool:IsValidObject(objectid); /** * a_objects * Destroys (removes) an object that was created using CreateObject. - * The ID of the object to destroy. Returned by CreateObject + * The ID of the object to destroy. Returned by CreateObject * * * @@ -267,7 +267,7 @@ native DestroyObject(objectid); /** * a_objects - * Move an object to a new position with a set speed. Players/vehicles will 'surf' the object as it moves. + * Move an object to a new position with a set speed. Players/vehicles will 'surf' the object as it moves. * The ID of the object to move * The x coordinate to move the object to * The y coordinate to move the object to @@ -283,7 +283,7 @@ native DestroyObject(objectid); * * * - * This function can be used to make objects rotate smoothly. In order to achieve this however, the object must also be moved. The specified rotation is the rotation the object will have after the movement. Hence the object will not rotate when no movement is applied. For a script example take a look at the ferriswheel.pwn filterscript made by Kye included in the server package (SA-MP 0.3d and above). + * This function can be used to make objects rotate smoothly. In order to achieve this however, the object must also be moved. The specified rotation is the rotation the object will have after the movement. Hence the object will not rotate when no movement is applied. For a script example take a look at the ferriswheel.pwn filterscript made by Kye included in the server package (SA-MP 0.3d and above). * To fully understand the above note, you can (but not limited to) increase the z position by (+0.001) and then (-0.001) after moving it again, as not changing the x, y or z will not rotate the object. * The time it will take for the object to move in milliseconds. */ @@ -325,8 +325,8 @@ native bool:IsObjectMoving(objectid); * This function was added in SA-MP 0.3e and will not work in earlier versions! * You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. * - * 1: The function executed successfully. Success is reported when a non-existent object is specified, but nothing will happen.
    - * 0: The function failed to execute. The player is not connected. + * 1: The function executed successfully. Success is reported when a non-existent object is specified, but nothing will happen.
    + * 0: The function failed to execute. The player is not connected. *
    */ native EditObject(playerid, objectid); @@ -344,7 +344,7 @@ native EditObject(playerid, objectid); * You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. * * 1: The function executed successfully.
    - * 0: The function failed to execute. Player or object not valid. + * 0: The function failed to execute. Player or object not valid. *
    */ native EditPlayerObject(playerid, objectid); @@ -385,7 +385,7 @@ native CancelEdit(playerid); * The x rotation of the object * The y rotation of the object * The z rotation of the object - * The distance from which objects will appear to players. 0.0 will cause an object to render at its default distance. Leaving this parameter out will cause objects to be rendered at their default distance. The maximum usable distance is 300 in versions prior to 0.3x, in which drawdistance can be unlimited (optional=0.0) + * The distance from which objects will appear to players. 0.0 will cause an object to render at its default distance. Leaving this parameter out will cause objects to be rendered at their default distance. The maximum usable distance is 300 in versions prior to 0.3x, in which drawdistance can be unlimited (optional=0.0) * * * @@ -397,7 +397,7 @@ native CancelEdit(playerid); * * * - * The 'DrawDistance' parameter was added in 0.3b. It must be left out in scripts for older versions of SA:MP. + * The 'DrawDistance' parameter was added in 0.3b. It must be left out in scripts for older versions of SA:MP. * The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. */ native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, Float:rotZ, Float:drawDistance = 0.0); @@ -426,7 +426,7 @@ native AttachPlayerObjectToVehicle(playerid, objectid, parentid, Float:offsetX, * a_objects * Sets the position of a player-object to the specified coordinates. * The ID of the player whose player-object to set the position of - * The ID of the player-object to set the position of. Returned by CreatePlayerObject + * The ID of the player-object to set the position of. Returned by CreatePlayerObject * The x coordinate to put the object at * The y coordinate to put the object at * The z coordinate to put the object at @@ -436,7 +436,7 @@ native AttachPlayerObjectToVehicle(playerid, objectid, parentid, Float:offsetX, * * * 1: The function executed successfully.
    - * 0: The function failed to execute. Player and/or object do not exist. + * 0: The function failed to execute. Player and/or object do not exist. *
    */ native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); @@ -456,7 +456,7 @@ native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player and/or the object don't exist.
    + * 0: The function failed to execute. The player and/or the object don't exist.
    * The object's position is stored in the specified variables. *
    */ @@ -484,7 +484,7 @@ native SetPlayerObjectRot(playerid, objectid, Float:rotX, Float:rotY, Float:rotZ /** * a_objects - * Use this function to get the object's current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. + * Use this function to get the object's current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. * The player you associated this object to * The objectid of the object you want to get the rotation from * The variable to store the x rotation, passed by reference @@ -506,7 +506,7 @@ native GetPlayerObjectRot(playerid, objectid, &Float:rotX, &Float:rotY, &Float:r * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * The model ID of the player object. If the player or object don't exist, it will return -1 or 0 if the player or object does not exist. + * The model ID of the player object. If the player or object don't exist, it will return -1 or 0 if the player or object does not exist. */ native GetPlayerObjectModel(playerid, objectid); @@ -539,7 +539,7 @@ native bool:IsValidPlayerObject(playerid, objectid); * a_objects * Destroy a player-object created using CreatePlayerObject. * The ID of the player whose player-object to destroy - * The ID of the player-object to destroy. Returned by CreatePlayerObject + * The ID of the player-object to destroy. Returned by CreatePlayerObject * * * @@ -548,7 +548,7 @@ native DestroyPlayerObject(playerid, objectid); /** * a_objects - * Move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects. + * Move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects. * The ID of the player whose player-object to move * The ID of the object to move * The x coordinate to move the object to @@ -621,10 +621,10 @@ native AttachPlayerObjectToPlayer(playerid, objectid, parentid, Float:offsetX, F * Replace the texture of an object with the texture from another model in the game. * The ID of the object to change the texture of * The material index on the object to change (0 to 15) - * The modelid on which the replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the texture + * The modelid on which the replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the texture * The name of the txd file which contains the replacement texture (use "none" if not required) * The name of the texture to use as the replacement (use "none" if not required) - * The object colour to set, as an integer or hex in ARGB colour format. Using 0 keeps the existing material colour (optional=0) + * The object colour to set, as an integer or hex in ARGB colour format. Using 0 keeps the existing material colour (optional=0) * * * This function was added in SA-MP 0.3e and will not work in earlier versions! @@ -642,10 +642,10 @@ native SetObjectMaterial(objectid, materialIndex, modelid, const textureLibrary[ * The ID of the player the object is associated to * The ID of the object to replace the texture of * The material index on the object to change (0 to 15) - * The modelid on which replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the existing texture + * The modelid on which replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the existing texture * The name of the txd file which contains the replacement texture (use "none" if not required) * The name of the texture to use as the replacement (use "none" if not required) - * The object colour to set (ARGB). Using 0 keeps the existing material colour (optional=0) + * The object colour to set (ARGB). Using 0 keeps the existing material colour (optional=0) * * * This function was added in SA-MP 0.3e and will not work in earlier versions! @@ -662,7 +662,7 @@ native SetPlayerObjectMaterial(playerid, objectid, materialIndex, modelid, const * The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) * The font to use (optional="Arial") * The size of the text (MAX 255) (optional=24) - * Bold text. Set to 1 for bold, 0 for not (optional=1) + * Bold text. Set to 1 for bold, 0 for not (optional=1) * The colour of the text, in ARGB format (optional=-1) * The background colour, in ARGB format (optional=0) * The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) @@ -714,7 +714,7 @@ native SetObjectMaterialText(objectid, const text[], materialIndex = 0, OBJECT_M * The size of the material (optional=OBJECT_MATERIAL_SIZE_256x128) * The font to use (optional="Arial") * The size of the text (MAX 255) (optional=24) - * Bold text. Set to 1 for bold, 0 for not (optional=1) + * Bold text. Set to 1 for bold, 0 for not (optional=1) * The colour of the text (optional=-1) * The background colour (optional=0) * The alignment of the text (optional=OBJECT_MATERIAL_TEXT_ALIGN_LEFT) diff --git a/a_players.inc b/a_players.inc index c01fad9..ff51586 100644 --- a/a_players.inc +++ b/a_players.inc @@ -155,7 +155,7 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE /** * a_players - * This function can be used to change the spawn information of a specific player. It allows you to automatically set someone's spawn weapons, their team, skin and spawn position, normally used in case of minigames or automatic-spawn systems. This function is more crash-safe then using SetPlayerSkin in OnPlayerSpawn and/or OnPlayerRequestClass, even though this has been fixed in 0.2. + * This function can be used to change the spawn information of a specific player. It allows you to automatically set someone's spawn weapons, their team, skin and spawn position, normally used in case of minigames or automatic-spawn systems. This function is more crash-safe then using SetPlayerSkin in OnPlayerSpawn and/or OnPlayerRequestClass, even though this has been fixed in 0.2. * The Playerid of who you want to set the spawn information * The Team-ID of the chosen player * The skin which the player will spawn with @@ -185,7 +185,7 @@ native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotat * Kills the player if they are in a vehicle and then they spawn with a bottle in their hand. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected. + * 0: The function failed to execute. This means the player is not connected. *
    */ native SpawnPlayer(playerid); @@ -204,10 +204,10 @@ native SpawnPlayer(playerid); * * * - * Using this function on a player in a vehicle will instantly remove them from the vehicle. Useful for quickly ejecting players. + * Using this function on a player in a vehicle will instantly remove them from the vehicle. Useful for quickly ejecting players. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player specified does not exist. + * 0: The function failed to execute. This means the player specified does not exist. *
    */ native SetPlayerPos(playerid, Float:x, Float:y, Float:z); @@ -221,10 +221,10 @@ native SetPlayerPos(playerid, Float:x, Float:y, Float:z); * The z coordinate to position the player at * * - * This function does not work if the new coordinates are far away from where the player currently is. The z height will be 0, which will likely put them underground. It is highly recommended that the MapAndreas plugin be used instead. + * This function does not work if the new coordinates are far away from where the player currently is. The z height will be 0, which will likely put them underground. It is highly recommended that the MapAndreas plugin be used instead. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player specified does not exist. + * 0: The function failed to execute. This means the player specified does not exist. *
    */ native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); @@ -240,8 +240,8 @@ native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); * * * - * This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. - * true on success, false on failure (i.e. player not connected). + * This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. + * true on success, false on failure (i.e. player not connected). */ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); @@ -252,10 +252,10 @@ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); * The angle the player should face * * - * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. + * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player specified does not exist. + * 0: The function failed to execute. The player specified does not exist. *
    */ native SetPlayerFacingAngle(playerid, Float:ang); @@ -267,14 +267,14 @@ native SetPlayerFacingAngle(playerid, Float:ang); * The Float to store the angle in, passed by reference * * - * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. - * Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. + * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. + * Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. */ native GetPlayerFacingAngle(playerid, &Float:ang); /** * a_players - * Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. + * Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. * The ID of the player * The furthest distance the player can be from the point to be in range * The x coordinate of the point to check the range to @@ -323,7 +323,7 @@ native bool:IsPlayerStreamedIn(targetid, playerid); /** * a_players - * Set a player's interior. A list of currently known interiors and their positions can be found here. + * Set a player's interior. A list of currently known interiors and their positions can be found here. * The ID of the player to set the interior of * The interior ID to set the player in * @@ -331,14 +331,14 @@ native bool:IsPlayerStreamedIn(targetid, playerid); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected. + * 0: The function failed to execute. This means the player is not connected. *
    */ native SetPlayerInterior(playerid, interiorid); /** * a_players - * Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page. + * Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page. * The player to get the interior ID of * * @@ -351,7 +351,7 @@ native GetPlayerInterior(playerid); * a_players * Set the health of a player. * The ID of the player to set the health of - * The value to set the player's health to. Max health that can be displayed in the HUD is 100, though higher values are valid + * The value to set the player's health to. Max health that can be displayed in the HUD is 100, though higher values are valid * * * @@ -360,26 +360,26 @@ native GetPlayerInterior(playerid); * If a player's health is below 10 or above 98303, their health bar will flash. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player specified does not exist. + * 0: The function failed to execute. This means the player specified does not exist. *
    */ native SetPlayerHealth(playerid, Float:health); /** * a_players - * The function GetPlayerHealth allows you to retrieve the health of a player. Useful for cheat detection, among other things. + * The function GetPlayerHealth allows you to retrieve the health of a player. Useful for cheat detection, among other things. * The ID of the player * Float to store health, passed by reference * * * * - * Even though the health can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc.
    + * Even though the health can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc.
    * Health is obtained rounded to integers: set 50.15, but get 50.0 *
    * * 1 - success.
    - * 0 - failure (i.e. player not connected).
    + * 0 - failure (i.e. player not connected).
    *
    */ native GetPlayerHealth(playerid, &Float:health); @@ -388,15 +388,15 @@ native GetPlayerHealth(playerid, &Float:health); * a_players * Set a player's armor level. * The ID of the player to set the armour of - * The amount of armour to set, as a percentage (float). Values larger than 100 are valid, but won't be displayed in the HUD's armour bar + * The amount of armour to set, as a percentage (float). Values larger than 100 are valid, but won't be displayed in the HUD's armour bar * * * * Armour is obtained rounded to integers: set 50.15, but get 50.0 - * The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. + * The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player specified does not exist. + * 0: The function failed to execute. This means the player specified does not exist. *
    */ native SetPlayerArmour(playerid, Float:armour); @@ -409,12 +409,12 @@ native SetPlayerArmour(playerid, Float:armour); * * * - * Even though the armour can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc. + * Even though the armour can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc. * Armour is obtained rounded to integers: set 50.15, but get 50.0 - * The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. + * The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. * * 1 - success.
    - * 0 - failure (i.e. player not connected).
    + * 0 - failure (i.e. player not connected).
    *
    */ native GetPlayerArmour(playerid, &Float:armour); @@ -428,10 +428,10 @@ native GetPlayerArmour(playerid, &Float:armour); * * * - * Set the ammo to 0 to remove a weapon from a player's inventory. Note that the weapon will still show up in GetPlayerWeaponData, albeit with 0 ammo. + * Set the ammo to 0 to remove a weapon from a player's inventory. Note that the weapon will still show up in GetPlayerWeaponData, albeit with 0 ammo. * - * 1: The function executed successfully. Success is also returned when the weapon specified is invalid.
    - * 0: The function failed to execute. The player isn't connected.
    + * 1: The function executed successfully. Success is also returned when the weapon specified is invalid.
    + * 0: The function failed to execute. The player isn't connected.
    *
    */ native SetPlayerAmmo(playerid, WEAPON:weaponid, ammo); @@ -499,11 +499,11 @@ native GetPlayerTargetActor(playerid); * a_players * Set the team of a player. * The ID of the player you want to set the team of - * The team to put the player in. Use NO_TEAM to remove the player from any team + * The team to put the player in. Use NO_TEAM to remove the player from any team * * * - * Players can not damage/kill players on the same team unless they use a knife to slit their throat. As of SA-MP 0.3x, players are also unable to damage vehicles driven by a player from the same team. This can be enabled with EnableVehicleFriendlyFire. + * Players can not damage/kill players on the same team unless they use a knife to slit their throat. As of SA-MP 0.3x, players are also unable to damage vehicles driven by a player from the same team. This can be enabled with EnableVehicleFriendlyFire. * 255 (or NO_TEAM) is the default team to be able to shoot other players, not 0. */ native SetPlayerTeam(playerid, teamid); @@ -516,21 +516,21 @@ native SetPlayerTeam(playerid, teamid); * * * 0-254: The player's team. (0 is a valid team).
    - * 255: Defined as NO_TEAM. The player is not on any team.
    - * -1: The function failed to execute. Player is not connected. + * 255: Defined as NO_TEAM. The player is not on any team.
    + * -1: The function failed to execute. Player is not connected. *
    */ native GetPlayerTeam(playerid); /** * a_players - * Set a player's score. Players' scores are shown in the scoreboard (shown by holding the TAB key). + * Set a player's score. Players' scores are shown in the scoreboard (shown by holding the TAB key). * The ID of the player to set the score of * The value to set the player's score to * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player specified does not exist. + * 0: The function failed to execute. This means the player specified does not exist. *
    */ native SetPlayerScore(playerid, score); @@ -548,8 +548,8 @@ native GetPlayerScore(playerid); /** * a_players * - * Checks the player's level of drunkenness. If the level is less than 2000, the player is sober. The player's level of drunkness goes down slowly automatically (1 level per frame) but will always reach 2000 at the end (in 0.3b it will stop at 0). - * The higher drunkenness levels affect the player's camera, and the car driving handling. The level of drunkenness increases when the player drinks from a bottle (You can use SetPlayerSpecialAction to give them bottles). + * Checks the player's level of drunkenness. If the level is less than 2000, the player is sober. The player's level of drunkness goes down slowly automatically (1 level per frame) but will always reach 2000 at the end (in 0.3b it will stop at 0). + * The higher drunkenness levels affect the player's camera, and the car driving handling. The level of drunkenness increases when the player drinks from a bottle (You can use SetPlayerSpecialAction to give them bottles). * * The player you want to check the drunkenness level of * @@ -565,15 +565,15 @@ native GetPlayerDrunkLevel(playerid); * The level of drunkenness to set * * - * Players' drunk level will automatically decrease over time, based on their FPS (players with 50 FPS will lose 50 'levels' per second. This is useful for determining a player's FPS!).
    - * In 0.3a the drunk level will decrement and stop at 2000. In 0.3b+ the drunk level decrements to 0)
    + * Players' drunk level will automatically decrease over time, based on their FPS (players with 50 FPS will lose 50 'levels' per second. This is useful for determining a player's FPS!).
    + * In 0.3a the drunk level will decrement and stop at 2000. In 0.3b+ the drunk level decrements to 0)
    * Levels over 2000 make the player drunk (camera swaying and vehicles difficult to control).
    * Max drunk level is 50000.
    * While the drunk level is above 5000, the player's HUD (radar etc.) will be hidden. *
    * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected. + * 0: The function failed to execute. This means the player is not connected. *
    */ native SetPlayerDrunkLevel(playerid, level); @@ -582,7 +582,7 @@ native SetPlayerDrunkLevel(playerid, level); * a_players * Set the colour of a player's nametag and marker (radar blip). * The ID of the player whose colour to set - * The colour to set. Supports alpha values (RGBA) + * The colour to set. Supports alpha values (RGBA) * * * @@ -593,7 +593,7 @@ native SetPlayerColor(playerid, colour); /** * a_players - * Gets the colour of the player's name and radar marker. Only works after SetPlayerColor. + * Gets the colour of the player's name and radar marker. Only works after SetPlayerColor. * The ID of the player to get the colour of * * @@ -604,17 +604,17 @@ native GetPlayerColor(playerid); /** * a_players - * Set the skin of a player. A player's skin is their character model. + * Set the skin of a player. A player's skin is their character model. * The ID of the player to set the skin of * The skin the player should use * * - * If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, they will become frozen or otherwise glitched. This can be fixed by using TogglePlayerControllable. Players can be detected as being crouched through GetPlayerSpecialAction (SPECIAL_ACTION_DUCK). + * If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, they will become frozen or otherwise glitched. This can be fixed by using TogglePlayerControllable. Players can be detected as being crouched through GetPlayerSpecialAction (SPECIAL_ACTION_DUCK). * Setting a player's skin when he is dead may crash players around him. * Note that 'success' is reported even when skin ID is invalid (not 0-311, or 74), but the skin will be set to ID 0 (CJ). * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player specified does not exist.
    + * 0: The function failed to execute. This means the player specified does not exist.
    *
    */ native SetPlayerSkin(playerid, skinid); @@ -651,7 +651,7 @@ native GetPlayerCustomSkin(playerid); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected.
    + * 0: The function failed to execute. This means the player is not connected.
    *
    */ native GivePlayerWeapon(playerid, WEAPON:weaponid, ammo); @@ -665,7 +665,7 @@ native GivePlayerWeapon(playerid, WEAPON:weaponid, ammo); * To remove individual weapons from a player, set their ammo to 0 using SetPlayerAmmo. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player specified does not exist. + * 0: The function failed to execute. This means the player specified does not exist. *
    */ native ResetPlayerWeapons(playerid); @@ -678,17 +678,17 @@ native ResetPlayerWeapons(playerid); * * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * This function arms a player with a weapon they already have; it does not give them a new weapon. See GivePlayerWeapon. + * This function arms a player with a weapon they already have; it does not give them a new weapon. See GivePlayerWeapon. * - * 1: The function executed successfully. Success is returned even when the function fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).
    - * 0: The function failed to execute. The player is not connected. + * 1: The function executed successfully. Success is returned even when the function fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).
    + * 0: The function failed to execute. The player is not connected. *
    */ native SetPlayerArmedWeapon(playerid, WEAPON:weaponid); /** * a_players - * Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot). + * Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot). * The ID of the player whose weapon data to retrieve * The weapon slot to get data for (0-12) * A variable in which to store the weapon ID, passed by reference @@ -698,7 +698,7 @@ native SetPlayerArmedWeapon(playerid, WEAPON:weaponid); * Old weapons with no ammo left are still returned. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player isn't connected and/or the weapon slot specified is invalid (valid is 0-12). + * 0: The function failed to execute. The player isn't connected and/or the weapon slot specified is invalid (valid is 0-12). *
    */ native GetPlayerWeaponData(playerid, slot, &WEAPON:weapons, &ammo); @@ -707,12 +707,12 @@ native GetPlayerWeaponData(playerid, slot, &WEAPON:weapons, &ammo); * a_players * Give money to or take money from a player. * The ID of the player to give money to or take money from - * The amount of money to give the player. Use a minus value to take money + * The amount of money to give the player. Use a minus value to take money * * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected. + * 0: The function failed to execute. This means the player is not connected. *
    */ native GivePlayerMoney(playerid, money); @@ -725,7 +725,7 @@ native GivePlayerMoney(playerid, money); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected. + * 0: The function failed to execute. This means the player is not connected. *
    */ native ResetPlayerMoney(playerid); @@ -734,12 +734,12 @@ native ResetPlayerMoney(playerid); * a_players * Sets the name of a player. * The ID of the player to set the name of - * The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-z, [], (), $, @, ., _, =) + * The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-z, [], (), $, @, ., _, =) * * Changing the players' name to the same name but with different character cases (e.g. "John" to "JOHN") will not work. * If used in OnPlayerConnect, the new name will not be shown for the connecting player. * Passing a null string as the new name will crash the server. - * Player names can be up to 24 characters when using this function, but when joining the server from the SA-MP server browser, players' names must be no more than 20 and less than 3 characters (the server will deny entry). This allows for 4 characters extra when using SetPlayerName. + * Player names can be up to 24 characters when using this function, but when joining the server from the SA-MP server browser, players' names must be no more than 20 and less than 3 characters (the server will deny entry). This allows for 4 characters extra when using SetPlayerName. * * 1 The name was changed successfully.
    * 0 The player already has that name.
    @@ -797,14 +797,14 @@ native PLAYER_STATE:GetPlayerState(playerid); * * * - * This function does not work when used in OnPlayerDisconnect because the player is already disconnected. It will return an invalid IP (255.255.255.255). Save players' IPs under OnPlayerConnect if they need to be used under OnPlayerDisconnect. + * This function does not work when used in OnPlayerDisconnect because the player is already disconnected. It will return an invalid IP (255.255.255.255). Save players' IPs under OnPlayerConnect if they need to be used under OnPlayerDisconnect. * 1 on success and 0 on failure. */ native GetPlayerIp(playerid, ip[], len = sizeof (ip)); /** * a_players - * Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back. + * Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back. * The ID of the player to get the ping of * * @@ -821,8 +821,8 @@ native GetPlayerPing(playerid); * * * - * Prior to version 0.3z R1-2, when the player state is PLAYER_STATE_PASSENGER this function returns the weapon held by the player before they entered the vehicle. If a cheat is used to spawn a weapon inside a vehicle, this function will not report it. - * The ID of the player's current weapon. Returns -1 if the player specified does not exist. + * Prior to version 0.3z R1-2, when the player state is PLAYER_STATE_PASSENGER this function returns the weapon held by the player before they entered the vehicle. If a cheat is used to spawn a weapon inside a vehicle, this function will not report it. + * The ID of the player's current weapon. Returns -1 if the player specified does not exist. */ native WEAPON:GetPlayerWeapon(playerid); @@ -834,8 +834,8 @@ native WEAPON:GetPlayerWeapon(playerid); * Up/down state * Left/right state * - * Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). - * As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. + * Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). + * As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. * The keys are stored in the specified variables. */ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); @@ -845,20 +845,20 @@ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); * Get a player's name. * The ID of the player to get the name of * An array into which to store the name, passed by reference - * The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME + * The length of the string that should be stored. Recommended to be MAX_PLAYER_NAME * * * * * - * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. + * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. * The length of the player's name. 0 if player specified doesn't exist. */ native GetPlayerName(playerid, name[], len = sizeof (name)); /** * a_players - * Sets the game time for a player. If a player's clock is enabled (TogglePlayerClock) the time displayed by it will update automatically. + * Sets the game time for a player. If a player's clock is enabled (TogglePlayerClock) the time displayed by it will update automatically. * The ID of the player to set the game time of * Hour to set (0-23) * Minutes to set (0-59) @@ -868,14 +868,14 @@ native GetPlayerName(playerid, name[], len = sizeof (name)); * Using this function under OnPlayerConnect doesn't work. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player specified does not exist. + * 0: The function failed to execute. The player specified does not exist. *
    */ native SetPlayerTime(playerid, hour, minute); /** * a_players - * Get the player's current game time. Set by SetWorldTime or SetPlayerTime, or by the game automatically if TogglePlayerClock is used. + * Get the player's current game time. Set by SetWorldTime or SetPlayerTime, or by the game automatically if TogglePlayerClock is used. * The ID of the player to get the game time of * A variable in which to store the hour, passed by reference * A variable in which to store the minutes, passed by reference @@ -884,21 +884,21 @@ native SetPlayerTime(playerid, hour, minute); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player specified does not exist.
    + * 0: The function failed to execute. The player specified does not exist.
    *
    */ native GetPlayerTime(playerid, &hour, &minute); /** * a_players - * Toggle the in-game clock (top-right corner) for a specific player. When this is enabled, time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) when set using SetWeather/SetPlayerWeather. + * Toggle the in-game clock (top-right corner) for a specific player. When this is enabled, time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) when set using SetWeather/SetPlayerWeather. * The player whose clock you want to enable/disable - * 1 to show and 0 to hide. Hidden by default + * 1 to show and 0 to hide. Hidden by default * Time is not synced with other players! Time can be synced using SetPlayerTime. * Time will automatically advance 6 hours when the player dies. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The specified player does not exist. + * 0: The function failed to execute. The specified player does not exist. *
    */ native TogglePlayerClock(playerid, bool:toggle); @@ -922,7 +922,7 @@ native SetPlayerWeather(playerid, weather); * * * - * The player will not return to class selection until they re-spawn. This can be achieved with TogglePlayerSpectating, as seen in the below example. + * The player will not return to class selection until they re-spawn. This can be achieved with TogglePlayerSpectating, as seen in the below example. */ native ForceClassSelection(playerid); @@ -935,7 +935,7 @@ native ForceClassSelection(playerid); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player specified does not exist. + * 0: The function failed to execute. The player specified does not exist. *
    */ native SetPlayerWantedLevel(playerid, level); @@ -952,7 +952,7 @@ native GetPlayerWantedLevel(playerid); /** * a_players - * Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default). + * Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default). * The ID of player to set the fighting style of * The fighting style that should be set * @@ -1006,7 +1006,7 @@ native FIGHT_STYLE:GetPlayerFightingStyle(playerid); * This function was added in SA-MP 0.3a and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected. + * 0: The function failed to execute. This means the player is not connected. *
    */ native SetPlayerVelocity(playerid, Float:x, Float:y, Float:z); @@ -1030,7 +1030,7 @@ native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); * This function plays a crime report for a player - just like in single-player when CJ commits a crime. * The ID of the player that will hear the crime report * The ID of the suspect player whom will be described in the crime report - * The crime ID, which will be reported as a 10-code (i.e. 10-16 if 16 was passed as the crime) + * The crime ID, which will be reported as a 10-code (i.e. 10-16 if 16 was passed as the crime) * * This function was added in SA-MP 0.3a and will not work in earlier versions! * @@ -1062,20 +1062,20 @@ native PlayCrimeReportForPlayer(playerid, suspectid, crime); /** * a_players - * Play an 'audio stream' for a player. Normal audio files also work (e.g. MP3). + * Play an 'audio stream' for a player. Normal audio files also work (e.g. MP3). * The ID of the player to play the audio for - * The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist - * The x position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) - * The y position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) - * The z position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) - * The distance over which the audio will be heard. Has no effect unless usepos is set to 1 (optional=50.0) + * The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist + * The x position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) + * The y position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) + * The z position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) + * The distance over which the audio will be heard. Has no effect unless usepos is set to 1 (optional=50.0) * Use the positions and distance specified. (optional=0) * * * This function was added in SA-MP 0.3d and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player specified does not exist. + * 0: The function failed to execute. The player specified does not exist. *
    */ native PlayAudioStreamForPlayer(playerid, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, bool:usepos = false); @@ -1094,7 +1094,7 @@ native StopAudioStreamForPlayer(playerid); * a_players * Loads or unloads an interior script for a player (for example the ammunation menu). * The ID of the player to load the interior script for - * The shop script to load. Leave blank ("") to unload scripts + * The shop script to load. Leave blank ("") to unload scripts * * * This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -1120,7 +1120,7 @@ native SetPlayerShopName(playerid, const shopName[]); * Set the skill level of a certain weapon type for a player. * The ID of the player to set the weapon skill of * The weapon to set the skill of - * The skill level to set for that weapon, ranging from 0 to 999. A level out of range will max it out + * The skill level to set for that weapon, ranging from 0 to 999. A level out of range will max it out * * * This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -1150,7 +1150,7 @@ native SetPlayerSkillLevel(playerid, WEAPONSKILL:skill, level); * * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified is not connected, INVALID_VEHICLE_ID also. + * The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified is not connected, INVALID_VEHICLE_ID also. */ native GetPlayerSurfingVehicleID(playerid); @@ -1159,7 +1159,7 @@ native GetPlayerSurfingVehicleID(playerid); * Returns the ID of the object the player is surfing on. * The ID of the player surfing the object * This function was added in SA-MP 0.3c R3 and will not work in earlier versions! - * The ID of the moving object the player is surfing. If the player isn't surfing a moving object, it will return INVALID_OBJECT_ID. + * The ID of the moving object the player is surfing. If the player isn't surfing a moving object, it will return INVALID_OBJECT_ID. */ native GetPlayerSurfingObjectID(playerid); @@ -1175,8 +1175,8 @@ native GetPlayerSurfingObjectID(playerid); * * * This function was added in SA-MP 0.3d and will not work in earlier versions! - * There appears to be a limit of around 1000 lines/objects. There is no workaround. - * When removing the same object for a player, they will crash. Commonly, players crash when reconnecting to the server because the server removes buildings on OnPlayerConnect. + * There appears to be a limit of around 1000 lines/objects. There is no workaround. + * When removing the same object for a player, they will crash. Commonly, players crash when reconnecting to the server because the server removes buildings on OnPlayerConnect. * In SA-MP 0.3.7 you can use -1 for the modelid to remove all objects within the specified radius. */ native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, Float:centerZ, Float:radius); @@ -1197,10 +1197,10 @@ native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, * * This function was added in SA-MP 0.3z and will not work in earlier versions! * This function will only work when lag compensation is enabled. - * If the player hit nothing, the hit positions will be 0. This means you can't currently calculate how far a bullet travels through open air. + * If the player hit nothing, the hit positions will be 0. This means you can't currently calculate how far a bullet travels through open air. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player specified does not exist.
    + * 0: The function failed to execute. The player specified does not exist.
    *
    */ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float:originZ, &Float:hitPosX, &Float:hitPosY, &Float:hitPosZ); @@ -1232,7 +1232,7 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float * * * This function was added in SA-MP 0.3c and will not work in earlier versions! - * In version 0.3d and onwards, 10 objects can be attached to a single player (index 0-9). In earlier versions, the limit is 5 (index 0-4). + * In version 0.3d and onwards, 10 objects can be attached to a single player (index 0-9). In earlier versions, the limit is 5 (index 0-4). * This function is separate from the CreateObject / CreatePlayerObject pools. * * Bone IDs:
    @@ -1306,7 +1306,7 @@ native bool:IsPlayerAttachedObjectSlotUsed(playerid, index); * The four buttons in a row are to select the edition mode and save edition: [Move] [Rotate] [Scale] [Save].
    * Clicking save will call OnPlayerEditAttachedObject. *
    - * Players will be able to scale objects up to a very large or negative value size. Limits should be put in place using OnPlayerEditAttachedObject to abort the edit. + * Players will be able to scale objects up to a very large or negative value size. Limits should be put in place using OnPlayerEditAttachedObject to abort the edit. * 1 on success and 0 on failure. */ native EditAttachedObject(playerid, index); @@ -1315,7 +1315,7 @@ native EditAttachedObject(playerid, index); /** * a_players - * Creates a textdraw for a single player. This can be used as a way around the global text-draw limit. + * Creates a textdraw for a single player. This can be used as a way around the global text-draw limit. * The ID of the player to create the textdraw for * x-Coordinate * y-Coordinate @@ -1344,12 +1344,12 @@ native EditAttachedObject(playerid, index); *
    * * This applies ONLY to sa-mp versions before 0.3z:

    - * Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
    + * Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
    * If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.
    *
    * Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ Doesn't work beyond 255th character. * - * The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using PlayerTextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
    + * The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using PlayerTextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
    * This function merely CREATES the textdraw, you must use PlayerTextDrawShow to show it to a player.
    * It is recommended to use WHOLE numbers instead of decimal positions when creating player textdraws to ensure resolution friendly design.
    *
    @@ -1406,7 +1406,7 @@ native PlayerTextDrawDestroy(playerid, PlayerText:text); * * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! * When using this function purely for the benefit of affecting the textdraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements - * Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). + * Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). */ native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:width, Float:height); @@ -1532,7 +1532,7 @@ native PlayerTextDrawUseBox(playerid, PlayerText:text, bool:use); * Sets the colour of a textdraw's box (PlayerTextDrawUseBox). * The ID of the player whose textdraw to set the box colour of * The ID of the player textdraw to set the box colour of - * The colour to set. Alpha (transparency) is supported + * The colour to set. Alpha (transparency) is supported * * * @@ -1579,7 +1579,7 @@ native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); /** * a_players - * Set the outline of a player-textdraw. The outline colour cannot be changed unless PlayerTextDrawBackgroundColor is used. + * Set the outline of a player-textdraw. The outline colour cannot be changed unless PlayerTextDrawBackgroundColor is used. * The ID of the player whose player-textdraw to set the outline of * The ID of the player-textdraw to set the outline of * The thickness of the outline @@ -1624,7 +1624,7 @@ native PlayerTextDrawSetOutline(playerid, PlayerText:text, size); * * * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! - * If PlayerTextDrawSetOutline is used with size > 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in PlayerTextDrawColor + * If PlayerTextDrawSetOutline is used with size > 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in PlayerTextDrawColor */ native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); @@ -1633,7 +1633,7 @@ native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); * Change the font of a player-textdraw. * The ID of the player whose player-textdraw to change the font of * The ID of the player-textdraw to change the font of - * There are four font styles. A font value greater than 3 does not display, and anything greater than 16 crashes the client. See http://wiki.sa-mp.com/wiki/PlayerTextDrawFont + * There are four font styles. A font value greater than 3 does not display, and anything greater than 16 crashes the client. See http://wiki.sa-mp.com/wiki/PlayerTextDrawFont * * * @@ -1655,7 +1655,7 @@ native PlayerTextDrawFont(playerid, PlayerText:text, TEXT_DRAW_FONT:font); /** * a_players - * Appears to scale text spacing to a proportional ratio. Useful when using PlayerTextDrawLetterSize to ensure the text has even character spacing. + * Appears to scale text spacing to a proportional ratio. Useful when using PlayerTextDrawLetterSize to ensure the text has even character spacing. * The ID of the player whose player-textdraw to set the proportionality of * The ID of the player-textdraw to set the proportionality of * 1 to enable proportionality, 0 to disable @@ -1683,7 +1683,7 @@ native PlayerTextDrawSetProportional(playerid, PlayerText:text, bool:set); * Toggles whether a player-textdraw can be selected or not. * The ID of the player whose player-textdraw to set the selectability of * The ID of the player-textdraw to set the selectability of - * Set the player-textdraw selectable (1) or non-selectable (0). By default this is 0 + * Set the player-textdraw selectable (1) or non-selectable (0). By default this is 0 * * * @@ -1781,8 +1781,8 @@ native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); * This function was added in SA-MP 0.3x and will not work in earlier versions! * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. * - * 1: The function executed successfully. If an invalid model is passed 'success' is reported, but the model will appear as a yellow/black question mark.
    - * 0: The function failed to execute. Player and/or textdraw do not exist. + * 1: The function executed successfully. If an invalid model is passed 'success' is reported, but the model will appear as a yellow/black question mark.
    + * 0: The function failed to execute. Player and/or textdraw do not exist. *
    */ native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelIndex); @@ -1839,7 +1839,7 @@ native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, colour1, colour * Variables aren't reset until after OnPlayerDisconnect is called, so the values are still accessible in OnPlayerDisconnect. * * 1: The function executed successfully.
    - * 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. + * 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. *
    */ native SetPVarInt(playerid, const pvar[], value); @@ -1848,14 +1848,14 @@ native SetPVarInt(playerid, const pvar[], value); * a_players * Gets an integer player variable's value. * The ID of the player whose player variable to get - * The name of the player variable (case-insensitive). Assigned in SetPVarInt + * The name of the player variable (case-insensitive). Assigned in SetPVarInt * * * * * * - * The integer value of the specified player variable. It will still return 0 if the variable is not set, or the player does not exist. + * The integer value of the specified player variable. It will still return 0 if the variable is not set, or the player does not exist. */ native GetPVarInt(playerid, const pvar[]); @@ -1906,7 +1906,7 @@ native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. + * 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. *
    */ native SetPVarFloat(playerid, const pvar[], Float:value); @@ -1940,7 +1940,7 @@ native Float:GetPVarFloat(playerid, const pvar[]); * Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings). * * 1: The function executed successfully.
    - * 0: The function failed to execute. Either the player specified isn't connected or there is no variable set with the given name. + * 0: The function failed to execute. Either the player specified isn't connected or there is no variable set with the given name. *
    */ native DeletePVar(playerid, const pvar[]); @@ -1990,7 +1990,7 @@ native GetPVarNameAtIndex(playerid, index, output[], size = sizeof (output)); *
  • PLAYER_VARTYPE_FLOAT
  • * * - * Returns the type of the PVar. See table below. + * Returns the type of the PVar. See table below. */ native PLAYER_VARTYPE:GetPVarType(playerid, const pvar[]); @@ -2007,7 +2007,7 @@ native PLAYER_VARTYPE:GetPVarType(playerid, const pvar[]); * The distance from where players are able to see the chat bubble * The time in miliseconds the bubble should be displayed for * This function was added in SA-MP 0.3a and will not work in earlier versions! - * You can't see your own chatbubbles. The same applies to attached 3D text labels. + * You can't see your own chatbubbles. The same applies to attached 3D text labels. * You can use colour embedding for multiple colours in the message. */ native SetPlayerChatBubble(playerid, const text[], colour, Float:drawDistance, expireTime); @@ -2024,7 +2024,7 @@ native SetPlayerChatBubble(playerid, const text[], colour, Float:drawDistance, e * * * - * If this function is used on a player that is already in a vehicle, other players will still see them in their previous vehicle. To fix this, first remove the player from the vehicle. + * If this function is used on a player that is already in a vehicle, other players will still see them in their previous vehicle. To fix this, first remove the player from the vehicle. * If the seat is invalid or is taken, will cause a crash when they EXIT the vehicle. * You can use GetPlayerVehicleSeat in a loop to check if a seat is occupied by any players. * @@ -2039,14 +2039,14 @@ native SetPlayerChatBubble(playerid, const text[], colour, Float:drawDistance, e * * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player or vehicle don't exist. + * 0: The function failed to execute. The player or vehicle don't exist. *
    */ native PutPlayerInVehicle(playerid, vehicleid, seatid); /** * a_players - * This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. + * This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. * The ID of the player in the vehicle that you want to get the ID of * * @@ -2063,7 +2063,7 @@ native GetPlayerVehicleID(playerid); * * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * Sometimes the result can be 128 which is an invalid seat ID. Circumstances of this are not yet known, but it is best to discard information when returned seat number is 128. + * Sometimes the result can be 128 which is an invalid seat ID. Circumstances of this are not yet known, but it is best to discard information when returned seat number is 128. * The ID of the seat the player is in. -1 is not in vehicle, 0 is the driver, 1 is the front passenger, and 2 & 3 are the rear passengers. */ native GetPlayerVehicleSeat(playerid); @@ -2075,24 +2075,24 @@ native GetPlayerVehicleSeat(playerid); * * * The exiting animation is not synced for other players.
    - * This function will not work when used in OnPlayerEnterVehicle, because the player isn't in the vehicle when the callback is called. Use OnPlayerStateChange instead.
    + * This function will not work when used in OnPlayerEnterVehicle, because the player isn't in the vehicle when the callback is called. Use OnPlayerStateChange instead.
    * The player isn't removed if he is in a RC Vehicle. *
    * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected. + * 0: The function failed to execute. This means the player is not connected. *
    */ native RemovePlayerFromVehicle(playerid); /** * a_players - * Toggles whether a player can control their character or not. The player will also be unable to move their camera. + * Toggles whether a player can control their character or not. The player will also be unable to move their camera. * The ID of the player to toggle the controllability of * 0 to make them uncontrollable, 1 to make them controllable * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player specified does not exist. + * 0: The function failed to execute. The player specified does not exist. *
    */ native TogglePlayerControllable(playerid, bool:toggle); @@ -2108,10 +2108,10 @@ native TogglePlayerControllable(playerid, bool:toggle); * * * - * Only use the coordinates if you want the sound to be played at a certain position. Set coordinates all to 0 to just play the sound. + * Only use the coordinates if you want the sound to be played at a certain position. Set coordinates all to 0 to just play the sound. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected. + * 0: The function failed to execute. This means the player is not connected. *
    */ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); @@ -2123,17 +2123,17 @@ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); * The animation library from which to apply an animation * The name of the animation to apply, within the specified library * The speed to play the animation (use 4.1) - * If set to 1, the animation will loop. If set to 0, the animation will play once + * If set to 1, the animation will loop. If set to 0, the animation will play once * If set to 0, the player is returned to their old x coordinate once the animation is complete (for animations that move the player such as walking). 1 will not return them to their old position - * Same as above but for the y axis. Should be kept the same as the previous parameter + * Same as above but for the y axis. Should be kept the same as the previous parameter * Setting this to 1 will freeze the player at the end of the animation. 0 will not - * Timer in milliseconds. For a never-ending loop it should be 0 + * Timer in milliseconds. For a never-ending loop it should be 0 * Set to 1 to make server sync the animation with all other players in streaming radius. 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) (optional=0) * * - * The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. + * The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. * An invalid animation library will crash the player's game. - * This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). + * This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). */ native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, FORCE_SYNC:forceSync = SYNC_NONE); @@ -2144,7 +2144,7 @@ native ApplyAnimation(playerid, const animationLibrary[], const animationName[], * Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) * * ClearAnimations doesn't do anything when the animation ends if we pass 1 for the freeze parameter in ApplyAnimation. - * Unlike some other ways to remove player from a vehicle, this will also reset the vehicle's velocity to zero, instantly stopping the car. Player will appear on top of the vehicle with the same location as he was in his car seat. + * Unlike some other ways to remove player from a vehicle, this will also reset the vehicle's velocity to zero, instantly stopping the car. Player will appear on top of the vehicle with the same location as he was in his car seat. * This function always returns 1, even when the player specified is not connected. */ native ClearAnimations(playerid, FORCE_SYNC:forceSync = SYNC_NONE); @@ -2261,7 +2261,7 @@ native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected. + * 0: The function failed to execute. This means the player is not connected. *
    */ native SetPlayerSpecialAction(playerid, SPECIAL_ACTION:actionid); @@ -2274,7 +2274,7 @@ native SetPlayerSpecialAction(playerid, SPECIAL_ACTION:actionid); * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player specified does not exist. + * 0: The function failed to execute. The player specified does not exist. *
    */ native DisableRemoteVehicleCollisions(playerid, bool:disable); @@ -2283,7 +2283,7 @@ native DisableRemoteVehicleCollisions(playerid, bool:disable); /** * a_players - * Sets a checkpoint (red cylinder) for a player. Also shows a red blip on the radar. When players enter a checkpoint, OnPlayerEnterCheckpoint is called and actions can be performed. + * Sets a checkpoint (red cylinder) for a player. Also shows a red blip on the radar. When players enter a checkpoint, OnPlayerEnterCheckpoint is called and actions can be performed. * The ID of the player for whom to set a checkpoint * The x coordinate to set the checkpoint at * The y coordinate to set the checkpoint at @@ -2291,19 +2291,19 @@ native DisableRemoteVehicleCollisions(playerid, bool:disable); * The size of the checkpoint * * If a checkpoint is already set it will use the size of that checkpoint instead of the new one.
    - * Checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly. A pickup can be used instead. + * Checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly. A pickup can be used instead. *
    - * Checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' checkpoints (only show them when players are close enough), use a checkpoint streamer. + * Checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' checkpoints (only show them when players are close enough), use a checkpoint streamer. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player specified does not exist. + * 0: The function failed to execute. This means the player specified does not exist. *
    */ native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); /** * a_players - * Disables (hides/destroys) a player's set checkpoint. Players can only have a single checkpoint set at a time. Checkpoints don't need to be disabled before setting another one. + * Disables (hides/destroys) a player's set checkpoint. Players can only have a single checkpoint set at a time. Checkpoints don't need to be disabled before setting another one. * The ID of the player whose checkpoint to disable * * @@ -2315,15 +2315,15 @@ native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); * * * - * 1: The function executed successfully. Success is also returned if the player doesn't have a checkpoint shown already.
    - * 0: The function failed to execute. This means the player is not connected. + * 1: The function executed successfully. Success is also returned if the player doesn't have a checkpoint shown already.
    + * 0: The function failed to execute. This means the player is not connected. *
    */ native DisablePlayerCheckpoint(playerid); /** * a_players - * Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint callback is called. + * Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint callback is called. * The ID of the player to set the checkpoint for * Type of checkpoint. 0-Normal, 1-Finish, 2-Nothing(Only the checkpoint without anything on it), 3-Air normal, 4-Air finish, 5-Air (rotates and stops), 6-Air (increases, decreases and disappears), 7-Air (swings down and up), 8-Air (swings up and down) * x-Coordinate @@ -2345,11 +2345,11 @@ native DisablePlayerCheckpoint(playerid); * If a race checkpoint is already set it will use the size of that checkpoint instead of the new one. * * Race checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly.
    - * Race checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' race checkpoints (only show them when players are close enough), use a race checkpoint streamer. + * Race checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' race checkpoints (only show them when players are close enough), use a race checkpoint streamer. *
    * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player specified does not exist. + * 0: The function failed to execute. This means the player specified does not exist. *
    */ native SetPlayerRaceCheckpoint(playerid, type, Float:centerX, Float:centerY, Float:centerZ, Float:nextX, Float:nextY, Float:nextZ, Float:size); @@ -2372,7 +2372,7 @@ native DisablePlayerRaceCheckpoint(playerid); /** * a_players - * Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in). + * Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in). * The ID of the player to set the world boundaries of * The maximum x coordinate the player can go to * The minimum x coordinate the player can go to @@ -2380,7 +2380,7 @@ native DisablePlayerRaceCheckpoint(playerid); * The minimum y coordinate the player can go to * * This function does not work if used in OnPlayerConnect - * A player's world boundaries can be reset by setting them to 20000.0, -20000.0, 20000.0, -20000.0. These are the default values. + * A player's world boundaries can be reset by setting them to 20000.0, -20000.0, 20000.0, -20000.0. These are the default values. * This function doesn't work in interiors! */ native SetPlayerWorldBounds(playerid, Float:maxX, Float:minX, Float:maxY, Float:minY); @@ -2400,7 +2400,7 @@ native SetPlayerMarkerForPlayer(playerid, targetid, colour); /** * a_players - * This functions allows you to toggle the drawing of player nametags, healthbars and armor bars which display above their head. For use of a similar function like this on a global level, ShowNameTags function. + * This functions allows you to toggle the drawing of player nametags, healthbars and armor bars which display above their head. For use of a similar function like this on a global level, ShowNameTags function. * Player who will see the results of this function * Player whose name tag will be shown or hidden * 1-show name tag, 0-hide name tag @@ -2413,14 +2413,14 @@ native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); /** * a_players - * Place an icon/marker on a player's map. Can be used to mark locations such as banks and hospitals to players. + * Place an icon/marker on a player's map. Can be used to mark locations such as banks and hospitals to players. * The ID of the player to set the map icon for - * The player's icon ID, ranging from 0 to 99. This means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon + * The player's icon ID, ranging from 0 to 99. This means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon * The x coordinate to place the map icon at * The y coordinate to place the map icon at * The z coordinate to place the map icon at * The icon to set - * The colour of the icon (RGBA). This should only be used with the square icon (ID: 0) + * The colour of the icon (RGBA). This should only be used with the square icon (ID: 0) * The style of icon (optional=MAPICON_LOCAL) * * @@ -2438,7 +2438,7 @@ native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. Player is not connected. + * 0: The function failed to execute. Player is not connected. *
    */ native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, colour, MAPICON:style = MAPICON_LOCAL); @@ -2447,7 +2447,7 @@ native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, * a_players * Removes a map icon that was set earlier for a player using SetPlayerMapIcon. * The ID of the player whose icon to remove - * The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon + * The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon * * * 1: The function executed successfully.
    @@ -2461,7 +2461,7 @@ native RemovePlayerMapIcon(playerid, iconid); * Enable/Disable the teleporting ability for a player by right-clicking on the map. * The ID of the player to allow teleport * 1 to allow, 0 to disallow - * This function, as of 0.3d, is deprecated. Check OnPlayerClickMap. + * This function, as of 0.3d, is deprecated. Check OnPlayerClickMap. * This function will work only if AllowAdminTeleport is enabled, and you have to be an admin. * */ @@ -2484,19 +2484,19 @@ native AllowPlayerTeleport(playerid, bool:allow); * Using the camera functions directly after enabling spectator mode doesn't work. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player specified doesn't exist. + * 0: The function failed to execute. The player specified doesn't exist. *
    */ native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); /** * a_players - * Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos. + * Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos. * The ID of the player whose camera to set * The x coordinate for the player's camera to look at * The y coordinate for the player's camera to look at * The z coordinate for the player's camera to look at - * The style of the change. Can be used to interpolate (change slowly) from old pos to new pos using CAMERA_MOVE. Added in 0.3e. Leave out for older versions (optional=CAMERA_CUT) + * The style of the change. Can be used to interpolate (change slowly) from old pos to new pos using CAMERA_MOVE. Added in 0.3e. Leave out for older versions (optional=CAMERA_CUT) * * * @@ -2504,7 +2504,7 @@ native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); * Using the camera functions directly after enabling spectator mode doesn't work. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player specified does not exist. + * 0: The function failed to execute. The player specified does not exist. *
    */ native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, CAM_MOVE:cut = CAMERA_CUT); @@ -2553,7 +2553,7 @@ native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z); /** * a_players - * Returns the current GTA camera mode for the requested player. The camera modes are useful in determining whether a player is aiming, doing a passenger driveby etc. + * Returns the current GTA camera mode for the requested player. The camera modes are useful in determining whether a player is aiming, doing a passenger driveby etc. * The ID of the player whose camera mode to retrieve * * @@ -2567,7 +2567,7 @@ native CAM_MODE:GetPlayerCameraMode(playerid); /** * a_players - * Toggle camera targeting functions for a player. Disabled by default to save bandwidth. + * Toggle camera targeting functions for a player. Disabled by default to save bandwidth. * The ID of the player to toggle camera targeting functions for * 1 to enable camera targeting functions and 0 to disable them * @@ -2576,7 +2576,7 @@ native CAM_MODE:GetPlayerCameraMode(playerid); * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player is not connected. + * 0: The function failed to execute. The player is not connected. *
    */ native EnablePlayerCameraTarget(playerid, bool:enable); @@ -2589,8 +2589,8 @@ native EnablePlayerCameraTarget(playerid, bool:enable); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. - * The ID of the object playerid is looking at. If INVALID_OBJECT_ID (65535) is returned, playerid isn't looking at any object. + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. + * The ID of the object playerid is looking at. If INVALID_OBJECT_ID (65535) is returned, playerid isn't looking at any object. */ native GetPlayerCameraTargetObject(playerid); @@ -2603,8 +2603,8 @@ native GetPlayerCameraTargetObject(playerid); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. - * This function can (obviously) only return one vehicle ID at a time, while the player may be looking at multiple. It generally seems to detect the closest vehicle first. + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. + * This function can (obviously) only return one vehicle ID at a time, while the player may be looking at multiple. It generally seems to detect the closest vehicle first. * The vehicle ID of the vehicle the player is looking at. INVALID_VEHICLE_ID if none. */ native GetPlayerCameraTargetVehicle(playerid); @@ -2618,7 +2618,7 @@ native GetPlayerCameraTargetVehicle(playerid); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. * Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerid is aming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerid is looking at (reference point is the center of the screen). * The ID of the player the playerid is looking at. */ @@ -2634,8 +2634,8 @@ native GetPlayerCameraTargetPlayer(playerid); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. - * This function only tells you which actor (if any) the player is looking at. To find out if they are aiming at them, you need to use GetPlayerTargetActor. + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. + * This function only tells you which actor (if any) the player is looking at. To find out if they are aiming at them, you need to use GetPlayerTargetActor. * The ID of the actor the player is looking at. */ native GetPlayerCameraTargetActor(playerid); @@ -2649,7 +2649,7 @@ native GetPlayerCameraTargetActor(playerid); * * This function was added in SA-MP 0.3z and will not work in earlier versions! * The return value of this function represents the value of the "widescreen" option in the game's display settings, not the actual aspect ratio of the player's display. - * The aspect ratio of the player's camera, as a float. The aspect ratio can be one of three values: 4:3 (1.3333334, Float:0x3FAAAAAB) when widescreen is turned off, 5:4 (1.2470589, Float:0x3F9F9FA0) when letterbox mode is turned on, and 16:9 (1.7764707, Float:0x3FE36364) when widescreen is turned on regardless of the letterbox mode. + * The aspect ratio of the player's camera, as a float. The aspect ratio can be one of three values: 4:3 (1.3333334, Float:0x3FAAAAAB) when widescreen is turned off, 5:4 (1.2470589, Float:0x3F9F9FA0) when letterbox mode is turned on, and 16:9 (1.7764707, Float:0x3FE36364) when widescreen is turned on regardless of the letterbox mode. */ native Float:GetPlayerCameraAspectRatio(playerid); @@ -2679,7 +2679,7 @@ native AttachCameraToObject(playerid, objectid); /** * a_players - * Attaches a player's camera to a player-object. The player is able to move their camera while it is attached to an object. Can be used with MovePlayerObject and AttachPlayerObjectToVehicle. + * Attaches a player's camera to a player-object. The player is able to move their camera while it is attached to an object. Can be used with MovePlayerObject and AttachPlayerObjectToVehicle. * The ID of the player which will have their camera attached to a player-object * The ID of the player-object to which the player's camera will be attached * @@ -2692,7 +2692,7 @@ native AttachCameraToPlayerObject(playerid, objectid); /** * a_players - * Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes. + * Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes. * The ID of the player the camera should be moved for * The x position the camera should start to move from * The y position the camera should start to move from @@ -2701,18 +2701,18 @@ native AttachCameraToPlayerObject(playerid, objectid); * The y position the camera should move to * The z position the camera should move to * Time in milliseconds - * The jumpcut to use. Set to CAMERA_MOVE for a smooth movement (optional=CAMERA_CUT) + * The jumpcut to use. Set to CAMERA_MOVE for a smooth movement (optional=CAMERA_CUT) * * * * This function was added in SA-MP 0.3e and will not work in earlier versions! - * Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. + * Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. */ native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAM_MOVE:cut = CAMERA_CUT); /** * a_players - * Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. + * Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. * The ID of the player the camera should be moved for * The x position the camera should start to move from * The y position the camera should start to move from @@ -2721,12 +2721,12 @@ native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Flo * The y position the camera should move to * The z position the camera should move to * Time in milliseconds to complete interpolation - * The 'jumpcut' to use. Set to CAMERA_MOVE for interpolation (optional=CAMERA_CUT) + * The 'jumpcut' to use. Set to CAMERA_MOVE for interpolation (optional=CAMERA_CUT) * * * * This function was added in SA-MP 0.3e and will not work in earlier versions! - * Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. + * Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. */ native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAM_MOVE:cut = CAMERA_CUT); @@ -2739,7 +2739,7 @@ native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, * * * - * This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. + * This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. * 1 if the player is connected, 0 if not. */ native bool:IsPlayerConnected(playerid); @@ -2803,7 +2803,7 @@ native bool:IsPlayerInRaceCheckpoint(playerid); /** * a_players - * Set the virtual world of a player. They can only see other players or vehicles that are in that same world. + * Set the virtual world of a player. They can only see other players or vehicles that are in that same world. * The ID of the player you want to set the virtual world of * The virtual world ID to put the player in * @@ -2811,7 +2811,7 @@ native bool:IsPlayerInRaceCheckpoint(playerid); * The default virtual world is 0 * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected. + * 0: The function failed to execute. This means the player is not connected. *
    */ native SetPlayerVirtualWorld(playerid, virtualWorld); @@ -2831,20 +2831,20 @@ native GetPlayerVirtualWorld(playerid); /** * a_players - * Toggle stunt bonuses for a player. Enabled by default. + * Toggle stunt bonuses for a player. Enabled by default. * The ID of the player to toggle stunt bonuses for * 1 to enable stunt bonuses and 0 to disable them * * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player is not connected. + * 0: The function failed to execute. The player is not connected. *
    */ native EnableStuntBonusForPlayer(playerid, bool:enable); /** * a_players - * Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie). + * Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie). * 1 to enable stunt bonuses or 0 to disable them * */ @@ -2852,17 +2852,17 @@ native EnableStuntBonusForAll(bool:enable); /** * a_players - * Toggle whether a player is in spectator mode or not. While in spectator mode a player can spectate (watch) other players and vehicles. After using this function, either PlayerSpectatePlayer or PlayerSpectateVehicle needs to be used. + * Toggle whether a player is in spectator mode or not. While in spectator mode a player can spectate (watch) other players and vehicles. After using this function, either PlayerSpectatePlayer or PlayerSpectateVehicle needs to be used. * The ID of the player who should spectate * 1 to enable spectating and 0 to disable * * * If the player is not loaded in before setting the spectate status to false, the connection can be closed unexpectedly. - * When spectator mode is disabled, OnPlayerSpawn will automatically be called, if you wish to restore player to state before spectating, you will have to handle that in OnPlayerSpawn. Note also, that player can also go to class selection before if they used F4 during spectate, a player also CAN die in spectate mode due to various glitches. - * When a player is in spectate mode their HUD is hidden, making it useful for setting a player's camera without the HUD. Also, objects near the player's camera will be streamed in, making this useful for interpolating cameras. + * When spectator mode is disabled, OnPlayerSpawn will automatically be called, if you wish to restore player to state before spectating, you will have to handle that in OnPlayerSpawn. Note also, that player can also go to class selection before if they used F4 during spectate, a player also CAN die in spectate mode due to various glitches. + * When a player is in spectate mode their HUD is hidden, making it useful for setting a player's camera without the HUD. Also, objects near the player's camera will be streamed in, making this useful for interpolating cameras. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player does not exist. + * 0: The function failed to execute. The player does not exist. *
    */ native TogglePlayerSpectating(playerid, bool:toggle); @@ -2880,31 +2880,31 @@ native TogglePlayerSpectating(playerid, bool:toggle); * * Spectate modes:
    *
      - *
    • SPECTATE_MODE_NORMAL - normal spectate mode (third person point of view). Camera can not be changed.
    • + *
    • SPECTATE_MODE_NORMAL - normal spectate mode (third person point of view). Camera can not be changed.
    • *
    • SPECTATE_MODE_FIXED - use SetPlayerCameraPos after this to position the player's camera, and it will track the player/vehicle set with PlayerSpectatePlayer/PlayerSpectateVehicle.
    • *
    • SPECTATE_MODE_SIDE - the camera will be attached to the side of the player/vehicle (like when you're in first-person camera on a bike and you do a wheelie).
    • *
    *
    * * 1: The function executed successfully.
    - * 0: The function failed to execute. One of the players specified does not exist. + * 0: The function failed to execute. One of the players specified does not exist. *
    */ native PlayerSpectatePlayer(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); /** * a_players - * Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. + * Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. * The ID of the player who should spectate a vehicle * The ID of the vehicle the player should spectate - * The spectate mode. Can generally be left blank as it defaults to 'normal' + * The spectate mode. Can generally be left blank as it defaults to 'normal' * * * Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. * playerid and targetid have to be in the same interior for this function to work properly. * - * 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.
    - * 0: The function failed to execute. The player, vehicle, or both don't exist. + * 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.
    + * 0: The function failed to execute. The player, vehicle, or both don't exist. *
    */ native PlayerSpectateVehicle(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_MODE_NORMAL); @@ -2914,7 +2914,7 @@ native PlayerSpectateVehicle(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_M * Starts recording a player's movements to a file, which can then be reproduced by an NPC. * The ID of the player to record * The type of recording - * The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback + * The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback * * This function was added in SA-MP 0.3a and will not work in earlier versions! */ @@ -2953,7 +2953,7 @@ native SelectTextDraw(playerid, hoverColour); // enables the mouse so the player * * * This function was added in SA-MP 0.3e and will not work in earlier versions! - * This function calls OnPlayerClickTextDraw with INVALID_TEXT_DRAW (65535). Using this function inside OnPlayerClickTextDraw without catching this case will cause clients to go into an infinite loop. + * This function calls OnPlayerClickTextDraw with INVALID_TEXT_DRAW (65535). Using this function inside OnPlayerClickTextDraw without catching this case will cause clients to go into an infinite loop. */ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mouse @@ -2961,7 +2961,7 @@ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mou /** * a_players - * Creates an explosion that is only visible to a single player. This can be used to isolate explosions from other players or to make them only appear in specific virtual worlds. + * Creates an explosion that is only visible to a single player. This can be used to isolate explosions from other players or to make them only appear in specific virtual worlds. * The ID of the player to create the explosion for * The x coordinate of the explosion * The y coordinate of the explosion @@ -2970,7 +2970,7 @@ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mou * The radius of the explosion * * This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! - * There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. + * There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. * This function always returns 1, even if the function failed to excute (player doesn't exist, invalid radius, or invalid explosion type). */ native CreateExplosionForPlayer(playerid, Float:x, Float:y, Float:z, type, Float:radius); diff --git a/a_samp.inc b/a_samp.inc index d3c4225..ef6a040 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -591,7 +591,7 @@ open.mp releases can use `A` as the first digit. * Indefinite number of arguments of any tag * * - * The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. + * The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. * This function doesn't support packed strings. * * Format Specifiers:
    @@ -607,8 +607,8 @@ open.mp releases can use `A` as the first digit. *
  • %q - escape a text for SQLite. (Added in 0.3.7 R2)
  • * *
    - * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. - * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) */ #if defined _console_included static stock a_samp_unused_printf(const format[], {Float, _}:...) @@ -649,65 +649,65 @@ open.mp releases can use `A` as the first digit. *
  • %q - escape a text for SQLite. (Added in 0.3.7 R2)
  • * * - * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. - * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) */ native format(output[], len = sizeof (output), const format[], {Float, _}:...); /** * a_samp - * This function sends a message to a specific player with a chosen colour in the chat. The whole line in the chatbox will be in the set colour unless colour embedding is used (since 0.3c). + * This function sends a message to a specific player with a chosen colour in the chat. The whole line in the chatbox will be in the set colour unless colour embedding is used (since 0.3c). * The ID of the player to display the message to * The colour of the message (RGBA) * The text that will be displayed (max 144 characters) * * * - * If a message is longer than 144 characters, it will not be sent. Truncation can be used to prevent this. Displaying a message on multiple lines will also solve this issue. - * Avoid using the percent sign (or format specifiers) in the actual message text without properly escaping it (like %%). It will result in crashes otherwise. + * If a message is longer than 144 characters, it will not be sent. Truncation can be used to prevent this. Displaying a message on multiple lines will also solve this issue. + * Avoid using the percent sign (or format specifiers) in the actual message text without properly escaping it (like %%). It will result in crashes otherwise. * You can use colour embedding for multiple colours in the message. * - * 1: The function executed successfully. Success is reported when the string is over 144 characters, but the message won't be sent.
    - * 0: The function failed to execute. The player is not connected. + * 1: The function executed successfully. Success is reported when the string is over 144 characters, but the message won't be sent.
    + * 0: The function failed to execute. The player is not connected. *
    */ native SendClientMessage(playerid, colour, const message[]); /** * a_samp - * Displays a message in chat to all players. This is a multi-player equivalent of SendClientMessage. + * Displays a message in chat to all players. This is a multi-player equivalent of SendClientMessage. * The colour of the message (RGBA) * The message to show (max 144 characters) * * - * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. + * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. * This function always returns 1. */ native SendClientMessageToAll(colour, const message[]); /** * a_samp - * Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. + * Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. * The ID of the player who will receive the message - * The sender's ID. If invalid, the message will not be sent + * The sender's ID. If invalid, the message will not be sent * The message that will be sent * * * * - * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. + * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. */ native SendPlayerMessageToPlayer(playerid, senderid, const message[]); /** * a_samp - * Sends a message in the name of a player to all other players on the server. The line will start with the sender's name in their colour, followed by the message in white. - * The ID of the sender. If invalid, the message will not be sent + * Sends a message in the name of a player to all other players on the server. The line will start with the sender's name in their colour, followed by the message in white. + * The ID of the sender. If invalid, the message will not be sent * The message that will be sent * * * - * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. + * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. */ native SendPlayerMessageToAll(senderid, const message[]); @@ -716,13 +716,13 @@ native SendPlayerMessageToAll(senderid, const message[]); * Adds a death to the 'killfeed' on the right-hand side of the screen for all players. * The ID of the killer (can be INVALID_PLAYER_ID) * The ID of the player that died - * The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) + * The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) * * * Death messages can be cleared by using a valid player ID for that is not connected. * To show a death message for just a single player, use SendDeathMessageToPlayer. * You can use NPCs to create your own custom death reasons. - * This function always returns 1, even if the function fails to execute. The function fails to execute (no death message shown) if is invalid. If is invalid, a generic skull-and-crossbones icon is shown. being invalid (INVALID_PLAYER_ID) is valid. + * This function always returns 1, even if the function fails to execute. The function fails to execute (no death message shown) if is invalid. If is invalid, a generic skull-and-crossbones icon is shown. being invalid (INVALID_PLAYER_ID) is valid. */ native SendDeathMessage(killer, killee, weapon); @@ -732,7 +732,7 @@ native SendDeathMessage(killer, killee, weapon); * The ID of the player to send the death message to * The ID of the killer (can be INVALID_PLAYER_ID) * The ID of the player that died - * The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) + * The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) * * * This Function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! @@ -765,31 +765,31 @@ native GameTextForAll(const string[], time, style); * * * - * 1: The function executed successfully. Success is reported when the style and/or time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.
    - * 0: The function failed to execute. This means either the string is null or the player is not connected. + * 1: The function executed successfully. Success is reported when the style and/or time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.
    + * 0: The function failed to execute. This means either the string is null or the player is not connected. *
    */ native GameTextForPlayer(playerid, const string[], time, style); /** * a_samp - * Sets a 'timer' to call a function after some time. Can be set to repeat. - * Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server + * Sets a 'timer' to call a function after some time. Can be set to repeat. + * Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server * Interval in milliseconds * Whether the timer should repeat or not * * - * Timer intervals are not accurate (roughly 25% off). There's a fix available here. - * Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. + * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. * The function that should be called must be public. * The use of many timers will result in increased memory/cpu usage. - * The ID of the timer that was started. Timer IDs start at 1. + * The ID of the timer that was started. Timer IDs start at 1. */ native SetTimer(const functionName[], interval, bool:repeating); /** * a_samp - * Sets a timer to call a function after the specified interval. This variant ('Ex') can pass parameters (such as a player ID) to the function. + * Sets a timer to call a function after the specified interval. This variant ('Ex') can pass parameters (such as a player ID) to the function. * The name of a public function to call when the timer expires * Interval in milliseconds * Whether the timer should be called repeatedly (can only be stopped with KillTimer) or only once @@ -799,8 +799,8 @@ native SetTimer(const functionName[], interval, bool:repeating); * * * - * Timer intervals are not accurate (roughly 25% off). There's a fix available here. - * Timer IDs are never used twice. You can use KillTimer() on a timer ID and it won't matter if it's running or not. + * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * Timer IDs are never used twice. You can use KillTimer() on a timer ID and it won't matter if it's running or not. * The function that should be called must be public. * The use of many timers will result in increased memory/cpu usage. * @@ -814,7 +814,7 @@ native SetTimer(const functionName[], interval, bool:repeating); *
  • b - boolean
  • * *
    - * The ID of the timer that was started. Timer IDs start at 1 and are never reused. There are no internal checks to verify that the parameters passed are valid (e.g. duration not a minus value). + * The ID of the timer that was started. Timer IDs start at 1 and are never reused. There are no internal checks to verify that the parameters passed are valid (e.g. duration not a minus value). */ native SetTimerEx(const functionName[], interval, bool:repeating, const format[] = "", {Float, _}:...); @@ -832,8 +832,8 @@ native KillTimer(timerid); * a_samp * Returns the uptime of the actual server (not the SA-MP server) in milliseconds. * - * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. - * One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. + * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. + * One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. * Uptime of the actual server (not the SA-MP server). */ native GetTickCount(); @@ -843,7 +843,7 @@ native GetTickCount(); * Returns the maximum number of players that can join the server, as set by the server variable 'maxplayers' in server.cfg. * * - * This function can not be used in place of MAX_PLAYERS. It can not be used at compile time (e.g. for array sizes). MAX_PLAYERS should always be re-defined to what the 'maxplayers' var will be, or higher. + * This function can not be used in place of MAX_PLAYERS. It can not be used at compile time (e.g. for array sizes). MAX_PLAYERS should always be re-defined to what the 'maxplayers' var will be, or higher. * The maximum number of players that can join the server. */ native GetMaxPlayers(); @@ -981,14 +981,14 @@ native GetActorPoolSize(); /** * a_samp - * Hashes a password using the SHA-256 hashing algorithm. Includes a salt. The output is always 256 bytes in length, or the equivalent of 64 Pawn cells. + * Hashes a password using the SHA-256 hashing algorithm. Includes a salt. The output is always 256 bytes in length, or the equivalent of 64 Pawn cells. * The password to hash * The salt to use in the hash * The returned hash * The returned hash maximum length * This function was added in SA-MP 0.3.7-R1 and will not work in earlier versions! * The salt is appended to the end of the password, meaning password 'foo' and salt 'bar' would form 'foobar'. - * The salt should be random, unique for each player and at least as long as the hashed password. It is to be stored alongside the actual hash in the player's account. + * The salt should be random, unique for each player and at least as long as the hashed password. It is to be stored alongside the actual hash in the player's account. */ #pragma deprecated Use BCrypt for hashing passwords. native SHA256_PassHash(const password[], const salt[], output[], size = sizeof (output)); // SHA256 for password hashing @@ -1009,7 +1009,7 @@ native SHA256_PassHash(const password[], const salt[], output[], size = sizeof ( * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The variable name is null or over 40 characters. + * 0: The function failed to execute. The variable name is null or over 40 characters. *
    */ native SetSVarInt(const svar[], value); @@ -1017,7 +1017,7 @@ native SetSVarInt(const svar[], value); /** * a_samp * Gets an integer server variable's value. - * The name of the server variable (case-insensitive). Assigned in SetSVarInt + * The name of the server variable (case-insensitive). Assigned in SetSVarInt * * * @@ -1025,7 +1025,7 @@ native SetSVarInt(const svar[], value); * * * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! - * The integer value of the specified server variable. It will still return 0 if the variable is not set. + * The integer value of the specified server variable. It will still return 0 if the variable is not set. */ native GetSVarInt(const svar[]); @@ -1043,7 +1043,7 @@ native GetSVarInt(const svar[]); * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The variable name is null or over 40 characters. + * 0: The function failed to execute. The variable name is null or over 40 characters. *
    */ native SetSVarString(const svar[], const value[]); @@ -1051,7 +1051,7 @@ native SetSVarString(const svar[], const value[]); /** * a_samp * Gets a string server variable's value. - * The name of the server variable (case-insensitive). Assigned in SetSVarString + * The name of the server variable (case-insensitive). Assigned in SetSVarString * The array in which to store the string value in, passed by reference * The maximum length of the returned string * @@ -1079,7 +1079,7 @@ native GetSVarString(const svar[], output[], len = sizeof (output)); * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. The variable name is null or over 40 characters. + * 0: The function failed to execute. The variable name is null or over 40 characters. *
    */ native SetSVarFloat(const svar[], Float:value); @@ -1087,7 +1087,7 @@ native SetSVarFloat(const svar[], Float:value); /** * a_samp * Gets a float server variable's value. - * The name of the server variable (case-insensitive). Assigned in SetSVarFloat + * The name of the server variable (case-insensitive). Assigned in SetSVarFloat * * * @@ -1095,7 +1095,7 @@ native SetSVarFloat(const svar[], Float:value); * * * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! - * The float value of the specified server variable. It will still return 0 if the variable is not set. + * The float value of the specified server variable. It will still return 0 if the variable is not set. */ native Float:GetSVarFloat(const svar[]); @@ -1112,7 +1112,7 @@ native Float:GetSVarFloat(const svar[]); * Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings. * * 1: The function executed successfully.
    - * 0: The function failed to execute. There is no variable set with the given name. + * 0: The function failed to execute. There is no variable set with the given name. *
    */ native DeleteSVar(const svar[]); @@ -1159,7 +1159,7 @@ native GetSVarNameAtIndex(index, output[], size = sizeof (output)); *
  • SERVER_VARTYPE_FLOAT
  • * * - * Returns the type of the SVar. See table below. + * Returns the type of the SVar. See table below. */ native SERVER_VARTYPE:GetSVarType(const svar[]); @@ -1174,7 +1174,7 @@ native SetGameModeText(const string[]); /** * a_samp - * This function is used to change the amount of teams used in the gamemode. It has no obvious way of being used, but can help to indicate the number of teams used for better (more effective) internal handling. This function should only be used in the OnGameModeInit callback. Important: You can pass 2 billion here if you like, this function has no effect at all. + * This function is used to change the amount of teams used in the gamemode. It has no obvious way of being used, but can help to indicate the number of teams used for better (more effective) internal handling. This function should only be used in the OnGameModeInit callback. Important: You can pass 2 billion here if you like, this function has no effect at all. * Number of teams the gamemode knows * * @@ -1183,7 +1183,7 @@ native SetTeamCount(count); /** * a_samp - * Adds a class to class selection. Classes are used so players may spawn with a skin of their choice. + * Adds a class to class selection. Classes are used so players may spawn with a skin of their choice. * The skin which the player will spawn with * The x coordinate of the spawnpoint of this class * The y coordinate of the spawnpoint of this class @@ -1198,7 +1198,7 @@ native SetTeamCount(count); * *
      *
    • The ID of the class which was just added.
    • - *
    • 319 if the class limit (320) was reached. The highest possible class ID is 319.
    • + *
    • 319 if the class limit (320) was reached. The highest possible class ID is 319.
    • *
    *
    * @@ -1229,10 +1229,10 @@ native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:a * *
      *
    • The ID of the class which was just added.
    • - *
    • 319 if the class limit (320) was reached. The highest possible class ID is 319.
    • + *
    • 319 if the class limit (320) was reached. The highest possible class ID is 319.
    • *
    *
    - * The maximum class ID is 319 (starting from 0, so a total of 320 classes). When this limit is reached, any more classes that are added will replace ID 319. + * The maximum class ID is 319 (starting from 0, so a total of 320 classes). When this limit is reached, any more classes that are added will replace ID 319. * * * @@ -1265,7 +1265,7 @@ native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float /** * a_samp - * Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from AddStaticVehicle in only one way: allows a respawn time to be set for when the vehicle is left unoccupied by the driver. + * Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from AddStaticVehicle in only one way: allows a respawn time to be set for when the vehicle is left unoccupied by the driver. * The Model ID for the vehicle * The x coordinate of the spawnpoint of this vehicle * The y coordinate of the spawnpoint of this vehicle @@ -1290,19 +1290,19 @@ native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Flo /** * a_samp - * This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically). + * This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically). * The model of the pickup - * The pickup type. Determines how the pickup responds when picked up + * The pickup type. Determines how the pickup responds when picked up * The x coordinate to create the pickup at * The y coordinate to create the pickup at * The z coordinate to create the pickup at - * The virtual world ID to put the pickup in. Use -1 to show the pickup in all worlds + * The virtual world ID to put the pickup in. Use -1 to show the pickup in all worlds * * 1 if the pickup is successfully created. *
    * 0 if failed to create. *
    - * This function doesn't return a pickup ID that you can use in, for example, OnPlayerPickUpPickup. Use CreatePickup if you'd like to assign IDs. + * This function doesn't return a pickup ID that you can use in, for example, OnPlayerPickUpPickup. Use CreatePickup if you'd like to assign IDs. * * * @@ -1317,7 +1317,7 @@ native AddStaticPickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0) * The x coordinate to create the pickup at * The y coordinate to create the pickup at * The z coordinate to create the pickup at - * The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds (optional=0) + * The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds (optional=0) * * * @@ -1328,27 +1328,27 @@ native AddStaticPickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0) * * The only type of pickup that can be picked up from inside a vehicle is 14 (except for special pickups such as bribes).
    * Pickups are shown to, and can be picked up by all players.
    - * It is possible that if DestroyPickup is used when a pickup is picked up, more than one player can pick up the pickup, due to lag. This can be circumvented through the use of variables.
    - * Certain pickup types come with 'automatic responses', for example using an M4 model in the pickup will automatically give the player the weapon and some ammo. For fully scripted pickups, type 1 should be used.
    + * It is possible that if DestroyPickup is used when a pickup is picked up, more than one player can pick up the pickup, due to lag. This can be circumvented through the use of variables.
    + * Certain pickup types come with 'automatic responses', for example using an M4 model in the pickup will automatically give the player the weapon and some ammo. For fully scripted pickups, type 1 should be used.
    *
    * * Available Pickup Types
    * Most other IDs are either undocumented or are similar to type 1 (but do not use them just because they seem similar to ID 1, they might have side-effects like ID 18 and 20). *
      - *
    • 0 - The pickup does not always display. If displayed, it can't be picked up and does not trigger OnPlayerPickUpPickup and it will stay after server shutdown.
    • - *
    • 1 - Exists always. Disables pickup scripts such as horseshoes and oysters to allow for scripted actions ONLY. Will trigger OnPlayerPickUpPickup every few seconds.
    • + *
    • 0 - The pickup does not always display. If displayed, it can't be picked up and does not trigger OnPlayerPickUpPickup and it will stay after server shutdown.
    • + *
    • 1 - Exists always. Disables pickup scripts such as horseshoes and oysters to allow for scripted actions ONLY. Will trigger OnPlayerPickUpPickup every few seconds.
    • *
    • 2 - Disappears after pickup, respawns after 30 seconds if the player is at a distance of at least 15 meters.
    • *
    • 3 - Disappears after pickup, respawns after death.
    • - *
    • 4 - Disappears after 15 to 20 seconds. Respawns after death.
    • + *
    • 4 - Disappears after 15 to 20 seconds. Respawns after death.
    • *
    • 8 - Disappears after pickup, but has no effect.
    • *
    • 11 - Blows up a few seconds after being created (bombs?)
    • *
    • 12 - Blows up a few seconds after being created.
    • - *
    • 13 - Invisible. Triggers checkpoint sound when picked up with a vehicle, but doesn't trigger OnPlayerPickUpPickup.
    • - *
    • 14 - Disappears after pickup, can only be picked up with a vehicle. Triggers checkpoint sound.
    • + *
    • 13 - Invisible. Triggers checkpoint sound when picked up with a vehicle, but doesn't trigger OnPlayerPickUpPickup.
    • + *
    • 14 - Disappears after pickup, can only be picked up with a vehicle. Triggers checkpoint sound.
    • *
    • 15 - Same as type 2.
    • - *
    • 18 - Similar to type 1. Pressing Tab (KEY_ACTION) makes it disappear but the key press doesn't trigger OnPlayerPickUpPickup.
    • - *
    • 19 - Disappears after pickup, but doesn't respawn. Makes "cash pickup" sound if picked up.
    • - *
    • 20 - Similar to type 1. Disappears when you take a picture of it with the Camera weapon, which triggers "Snapshot # out of 0" message. Taking a picture doesn't trigger OnPlayerPickUpPickup.
    • + *
    • 18 - Similar to type 1. Pressing Tab (KEY_ACTION) makes it disappear but the key press doesn't trigger OnPlayerPickUpPickup.
    • + *
    • 19 - Disappears after pickup, but doesn't respawn. Makes "cash pickup" sound if picked up.
    • + *
    • 20 - Similar to type 1. Disappears when you take a picture of it with the Camera weapon, which triggers "Snapshot # out of 0" message. Taking a picture doesn't trigger OnPlayerPickUpPickup.
    • *
    • 22 - Same as type 3.
    • *
    *
    @@ -1372,14 +1372,14 @@ native DestroyPickup(pickup); * * * - * This function can only be used in OnGameModeInit. For other times, see ShowPlayerNameTagForPlayer. + * This function can only be used in OnGameModeInit. For other times, see ShowPlayerNameTagForPlayer. */ native ShowNameTags(bool:show); /** * a_samp - * Toggles player markers (blips on the radar). Must be used when the server starts (OnGameModeInit). For other times, see SetPlayerMarkerForPlayer. - * The mode to use for markers. They can be streamed, meaning they are only visible to nearby players. See table below + * Toggles player markers (blips on the radar). Must be used when the server starts (OnGameModeInit). For other times, see SetPlayerMarkerForPlayer. + * The mode to use for markers. They can be streamed, meaning they are only visible to nearby players. See table below * * * @@ -1392,7 +1392,7 @@ native ShowNameTags(bool:show); *
  • PLAYER_MARKERS_MODE_STREAMED 2
  • * *
    - * It is also possible to set a player's colour to a colour that has full transparency (no alpha value). This makes it possible to show markers on a per-player basis. + * It is also possible to set a player's colour to a colour that has full transparency (no alpha value). This makes it possible to show markers on a per-player basis. */ native ShowPlayerMarkers(PLAYER_MARKERS_MODE:mode); @@ -1426,7 +1426,7 @@ native SetWorldTime(hour); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. The weapon specified does not exist. + * 0: The function failed to execute. The weapon specified does not exist. *
    */ native GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); @@ -1434,14 +1434,14 @@ native GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); /** * a_samp * 1 to enable, 0 to disable tire popping - * This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. + * This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. */ #pragma deprecated Use `OnVehicleDamageStatusUpdate`. native EnableTirePopping(bool:enable); // deprecated function /** * a_samp - * Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles (SetPlayerTeam must be used!). + * Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles (SetPlayerTeam must be used!). * * This function was added in SA-MP 0.3x and will not work in earlier versions! */ @@ -1493,7 +1493,7 @@ native SetGravity(Float:gravity); * a_samp * This function will determine whether RCON admins will be teleported to their waypoint when they set one. * 0 to disable and 1 to enable - * This function, as of 0.3d, is deprecated. Please see OnPlayerClickMap. + * This function, as of 0.3d, is deprecated. Please see OnPlayerClickMap. * * */ @@ -1519,22 +1519,22 @@ native SetDeathDropAmount(amount); * The type of explosion * The explosion radius * - * There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. + * There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. * This function always returns 1, even when the explosion type and/or radius values are invalid. */ native CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); /** * a_samp - * This function allows to turn on zone / area names such as the "Vinewood" or "Doherty" text at the bottom-right of the screen as they enter the area. This is a gamemode option and should be set in the callback OnGameModeInit. + * This function allows to turn on zone / area names such as the "Vinewood" or "Doherty" text at the bottom-right of the screen as they enter the area. This is a gamemode option and should be set in the callback OnGameModeInit. * A toggle option for whether or not you'd like zone names on or off - * This function was removed in SA-MP 0.3. This was due to crashes it caused. + * This function was removed in SA-MP 0.3. This was due to crashes it caused. */ native EnableZoneNames(bool:enable); /** * a_samp - * Uses standard player walking animation (animation of the CJ skin) instead of custom animations for every skin (e.g. skating for skater skins). + * Uses standard player walking animation (animation of the CJ skin) instead of custom animations for every skin (e.g. skating for skater skins). * * * Only works when placed under OnGameModeInit. @@ -1547,7 +1547,7 @@ native UsePlayerPedAnims(); // Will cause the players to use CJ running/walking * Disable all the interior entrances and exits in the game (the yellow arrows at doors). * * If the gamemode is changed after this function has been used, and the new gamemode doesn't disable markers, the markers will NOT reappear for already-connected players (but will for newly connected players). - * This function will only work if it has been used BEFORE a player connects (it is recommended to use it in OnGameModeInit). It will not remove a connected player's markers. + * This function will only work if it has been used BEFORE a player connects (it is recommended to use it in OnGameModeInit). It will not remove a connected player's markers. * This function always returns 1. */ native DisableInteriorEnterExits(); // will disable all interior enter/exits in the game. @@ -1575,7 +1575,7 @@ native DisableNameTagLOS(); // Disables the nametag Line-Of-Sight checking /** * a_samp - * Set a radius limitation for the chat. Only players at a certain distance from the player will see their message in the chat. Also changes the distance at which a player can see other players on the map at the same distance. + * Set a radius limitation for the chat. Only players at a certain distance from the player will see their message in the chat. Also changes the distance at which a player can see other players on the map at the same distance. * The range in which players will be able to see chat * * @@ -1600,12 +1600,12 @@ native LimitPlayerMarkerRadius(Float:markerRadius); /** * a_samp * Connect an NPC to the server. - * The name the NPC should connect as. Must follow the same rules as normal player names + * The name the NPC should connect as. Must follow the same rules as normal player names * The NPC script name that is located in the npcmodes folder (without the .amx extension) * * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * NPCs do not have nametags. These can be scripted with Attach3DTextLabelToPlayer. + * NPCs do not have nametags. These can be scripted with Attach3DTextLabelToPlayer. * This function always return 1. */ native ConnectNPC(const name[], const script[]); @@ -1665,22 +1665,22 @@ native bool:IsPlayerAdmin(playerid); /** * a_samp - * Kicks a player from the server. They will have to quit the game and re-connect if they wish to continue playing. + * Kicks a player from the server. They will have to quit the game and re-connect if they wish to continue playing. * The ID of the player to kick * * - * As of SA-MP 0.3x, any action taken directly before Kick() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the kick. + * As of SA-MP 0.3x, any action taken directly before Kick() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the kick. * This function always returns 1, even if the function failed to execute (player specified doesn't exist). */ native Kick(playerid); /** * a_samp - * Ban a player who is currently in the server. They will be unable to join the server ever again. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. BanEx can be used to give a reason for the ban. IP bans can be added/removed using the RCON banip and unbanip commands (SendRconCommand). + * Ban a player who is currently in the server. They will be unable to join the server ever again. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. BanEx can be used to give a reason for the ban. IP bans can be added/removed using the RCON banip and unbanip commands (SendRconCommand). * The ID of the player to ban * * - * As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. + * As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. * */ native Ban(playerid); @@ -1692,7 +1692,7 @@ native Ban(playerid); * The reason for the ban * * - * As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. + * As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. */ native BanEx(playerid, const reason[]); @@ -1727,7 +1727,7 @@ native SendRconCommand(const command[]); * * * This function was added in SA-MP 0.3c R4 and will not work in earlier versions! - * This function may not return accurate data when used under OnPlayerDisconnect if the player has quit normally. It usually returns accurate data if the player has been kicked or has timed out. + * This function may not return accurate data when used under OnPlayerDisconnect if the player has quit normally. It usually returns accurate data if the player has been kicked or has timed out. */ native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); @@ -1764,7 +1764,7 @@ native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); * Bytes received: 2204
    * Acks received: 0
    * Duplicate acks received: 0
    - * Inst. KBits per second: 28.8
    + * Inst. KBits per second: 28.8
    * KBits per second sent: 10.0
    * KBits per second received: 2.7
    * @@ -1790,13 +1790,13 @@ native GetPlayerVersion(playerid, version[], len = sizeof (version)); // Returns /** * a_samp - * Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. + * Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. * The IP to block * The time (in milliseconds) that the connection will be blocked for. 0 can be used for an indefinite block * * * This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! - * Wildcards can be used with this function, for example blocking the IP 6.9.*.* will block all IPs where the first two octets are 6 and 9 respectively. Any number can be in place of an asterisk. + * Wildcards can be used with this function, for example blocking the IP 6.9.*.* will block all IPs where the first two octets are 6 and 9 respectively. Any number can be in place of an asterisk. */ native BlockIpAddress(const ipAddress[], timeMS); @@ -1820,10 +1820,10 @@ native UnBlockIpAddress(const ipAddress[]); * The length of the string that should be stored * * - * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsString + * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsString * Using this function on anything other than a string (int, bool or float) or a nonexistent server variable, will crash your server! This is a bug. * Type 'varlist' in the server console to display a list of available server variables and their types. - * When filterscripts or plugins is specified as the cvar, this function only returns the name of the first specified filterscript or plugin. This is a bug. + * When filterscripts or plugins is specified as the cvar, this function only returns the name of the first specified filterscript or plugin. This is a bug. * The length of the returned string. 0 if the specified server variable is not a string or doesn't exist. */ #pragma deprecated Use `GetConsoleVarAsString`. @@ -1835,9 +1835,9 @@ native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); * The name of the integer variable to get the value of * * - * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsInt + * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsInt * Type 'varlist' in the server console to display a list of available server variables and their types. - * The value of the specified server variable. 0 if the specified server variable is not an integer or doesn't exist. + * The value of the specified server variable. 0 if the specified server variable is not an integer or doesn't exist. */ #pragma deprecated Use `GetConsoleVarAsInt`. native GetServerVarAsInt(const cvar[]); @@ -1848,7 +1848,7 @@ native GetServerVarAsInt(const cvar[]); * The name of the boolean variable to get the value of * * - * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsBool + * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsBool * Type 'varlist' in the server console to display a list of available server variables and their types. * The value of the specified server variable. 0 if the specified server variable is not a boolean or doesn't exist. */ @@ -1866,7 +1866,7 @@ native bool:GetServerVarAsBool(const cvar[]); * * Type varlist in the server console to display a list of available console variables and their types. * When filterscripts or plugins are specified as the cvar, this function only returns the name of the first specified filterscript or plugin. - * Using this function with anything other than a string (integer, boolean or float) will cause your server to crash. Using it with a nonexistent console variable will also cause your server to crash. + * Using this function with anything other than a string (integer, boolean or float) will cause your server to crash. Using it with a nonexistent console variable will also cause your server to crash. * The length of the returned string. 0 if the specified console variable is not a string or doesn't exist. */ native GetConsoleVarAsString(const cvar[], buffer[], len = sizeof (buffer)); @@ -1900,7 +1900,7 @@ native bool:GetConsoleVarAsBool(const cvar[]); * Gets the tick rate (like FPS) of the server. * * This function was added in SA-MP 0.3z and will not work in earlier versions! - * The server tick rate (per second). Returns 0 when the server is just started. + * The server tick rate (per second). Returns 0 when the server is just started. */ native GetServerTickRate(); @@ -2021,7 +2021,7 @@ native NetStats_MessagesRecvPerSecond(playerid); /** * a_samp - * Gets the packet loss percentage of a player. Packet loss means data the player is sending to the server is being lost (or vice-versa). + * Gets the packet loss percentage of a player. Packet loss means data the player is sending to the server is being lost (or vice-versa). * The ID of the player to get the data from * * @@ -2034,8 +2034,8 @@ native NetStats_MessagesRecvPerSecond(playerid); * * * This function was added in SA-MP 0.3z and will not work in earlier versions! - * Anything greater than 0.0% should already be a cause of concern. Anything greater than 1.0% is outright bad. - * This function has been found to be currently unreliable the output is not as expected when compared to the client. Therefore this function should not be used as a packet loss kicker. + * Anything greater than 0.0% should already be a cause of concern. Anything greater than 1.0% is outright bad. + * This function has been found to be currently unreliable the output is not as expected when compared to the client. Therefore this function should not be used as a packet loss kicker. * A more accurate packetloss function can be found here: http://forum.sa-mp.com/showpost.php?p=2488911&postcount=984 * The percentage packet loss as a float. 0.0 if player not connected. */ @@ -2082,7 +2082,7 @@ native NetStats_ConnectionStatus(playerid); * Get a player's IP and port. * The ID of the player to get the IP and port of * A string array to store the IP and port in, passed by reference - * The maximum length of the IP/port. 22 is recommended + * The maximum length of the IP/port. 22 is recommended * * * @@ -2173,14 +2173,14 @@ native AddMenuItem(Menu:menuid, column, const text[]); * * * Crashes when passed an invalid menu ID. - * Note that you can add only 12 items with AddMenuItem. The 13th object of a menu would replace the header of the column which is correctly set with this function. + * Note that you can add only 12 items with AddMenuItem. The 13th object of a menu would replace the header of the column which is correctly set with this function. */ native SetMenuColumnHeader(Menu:menuid, column, const heading[]); /** * a_samp * Shows a previously created menu for a player. - * The ID of the menu to show. Returned by CreateMenu + * The ID of the menu to show. Returned by CreateMenu * The ID of the player to whom the menu will be shown * * @@ -2191,7 +2191,7 @@ native SetMenuColumnHeader(Menu:menuid, column, const heading[]); * Crashes the both server and player if an invalid menu ID given. * * 1: The function executed successfully.
    - * 0: The function failed to execute. Menu and/or player doesn't exist. + * 0: The function failed to execute. Menu and/or player doesn't exist. *
    */ native ShowMenuForPlayer(Menu:menuid, playerid); @@ -2199,7 +2199,7 @@ native ShowMenuForPlayer(Menu:menuid, playerid); /** * a_samp * Hides a menu for a player. - * The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow + * The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow * The ID of the player that the menu will be hidden for * * @@ -2235,17 +2235,17 @@ native DisableMenu(Menu:menuid); /** * a_samp - * Disable a specific row in a menu for all players. It will be greyed-out and can't be selected by players. - * The ID of the menu to disable a row of. Ensure this is valid, as an invalid menu ID will crash the entire server + * Disable a specific row in a menu for all players. It will be greyed-out and can't be selected by players. + * The ID of the menu to disable a row of. Ensure this is valid, as an invalid menu ID will crash the entire server * The ID of the row to disable (rows start at 0) * * * * * Crashes when passed an invalid menu ID.
    - * This function disabled the specified menu row for all players. There is no function to disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, and one without. Or one per player. + * This function disabled the specified menu row for all players. There is no function to disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, and one without. Or one per player. *
    - * This function always returns 1, even if the function fails. If an invalid row is specified, nothing will happen. If an invalid menu ID is specified, the server will crash. + * This function always returns 1, even if the function fails. If an invalid row is specified, nothing will happen. If an invalid menu ID is specified, the server will crash. */ native DisableMenuRow(Menu:menuid, row); @@ -2267,7 +2267,7 @@ native Menu:GetPlayerMenu(playerid); /** * a_samp - * Creates a textdraw. Textdraws are, as the name implies, text (mainly - there can be boxes, sprites and model previews (skins/vehicles/weapons/objects too) that is drawn on a player's screens. + * Creates a textdraw. Textdraws are, as the name implies, text (mainly - there can be boxes, sprites and model previews (skins/vehicles/weapons/objects too) that is drawn on a player's screens. * The x (left/right) coordinate to create the textdraw at * The y (up/down) coordinate to create the textdraw at * The text that will appear in the textdraw @@ -2279,23 +2279,23 @@ native Menu:GetPlayerMenu(playerid); * * * This applies ONLY to sa-mp versions before 0.3z:
    - * Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
    + * Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
    * If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw. *
    * - * The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using TextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
    + * The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using TextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
    * This function merely CREATES the textdraw, you must use TextDrawShowForPlayer or TextDrawShowForAll to show it.
    * It is recommended to use WHOLE numbers instead of decimal positions when creating textdraws to ensure resolution friendly design. *
    * Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ don't work beyond 255th character. - * The ID of the created textdraw. Textdraw IDs start at 0. + * The ID of the created textdraw. Textdraw IDs start at 0. */ native Text:TextDrawCreate(Float:x, Float:y, const text[]); /** * a_samp * Destroys a previously-created textdraw. - * The ID of the textdraw to destroy. Returned by TextDrawCreate + * The ID of the textdraw to destroy. Returned by TextDrawCreate */ native TextDrawDestroy(Text:text); @@ -2306,8 +2306,8 @@ native TextDrawDestroy(Text:text); * Width of a char * Height of a char * When using this function purely for the benefit of affecting the TextDraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements. Hint: it is easier and extremely precise to use LD_SPAC:white sprite for box-only textdraws, TextDrawTextSize will have regular offsets. - * If you want to change the letter size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. - * Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). + * If you want to change the letter size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). */ native TextDrawLetterSize(Text:text, Float:width, Float:height); @@ -2330,7 +2330,7 @@ native TextDrawLetterSize(Text:text, Float:width, Float:height); * The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).
    * This function defines the clickable area for use with TextDrawSetSelectable, whether a box is shown or not. * - * If you want to change the text size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * If you want to change the text size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. */ native TextDrawTextSize(Text:text, Float:width, Float:height); @@ -2361,7 +2361,7 @@ native TextDrawColor(Text:text, colour); * If the textdraw is already shown, it must be re-shown (TextDrawShowForAll/TextDrawShowForPlayer) to show the changes of this function. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the textdraw specified does not exist. + * 0: The function failed to execute. This means the textdraw specified does not exist. *
    */ native TextDrawUseBox(Text:text, bool:use); @@ -2371,7 +2371,7 @@ native TextDrawUseBox(Text:text, bool:use); * Adjusts the text box colour (only used if TextDrawUseBox 'use' parameter is 1). * The TextDraw to change * The colour (RGBA) - * If you want to change the boxcolour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * If you want to change the boxcolour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. */ native TextDrawBoxColor(Text:text, colour); @@ -2381,10 +2381,10 @@ native TextDrawBoxColor(Text:text, colour); * The ID of the textdraw to set the shadow size of * The size of the shadow. 1 is generally used for a normal shadow size. 0 disables the shadow completely * The shadow can be cut by the box area if the size is set too big for the area. - * If you want to change the shadow of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * If you want to change the shadow of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The textdraw does not exist. + * 0: The function failed to execute. The textdraw does not exist. *
    */ native TextDrawSetShadow(Text:text, size); @@ -2394,17 +2394,17 @@ native TextDrawSetShadow(Text:text, size); * Sets the thickness of a textdraw's text's outline. TextDrawBackgroundColor can be used to change the colour. * The ID of the text draw to set the outline thickness of * The thickness of the outline, as an integer. 0 for no outline - * If you want to change the outline of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * If you want to change the outline of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. */ native TextDrawSetOutline(Text:text, size); /** * a_samp - * Adjusts the text draw area background colour (the outline/shadow - NOT the box. For box colour, see TextDrawBoxColor). + * Adjusts the text draw area background colour (the outline/shadow - NOT the box. For box colour, see TextDrawBoxColor). * The ID of the textdraw to set the background colour of * The colour that the textdraw should be set to - * If TextDrawSetOutline is used with size > 0, the outline colour will match the colour used in TextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in TextDrawColor - * If you want to change the background colour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * If TextDrawSetOutline is used with size > 0, the outline colour will match the colour used in TextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in TextDrawColor + * If you want to change the background colour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. */ native TextDrawBackgroundColor(Text:text, colour); @@ -2412,18 +2412,18 @@ native TextDrawBackgroundColor(Text:text, colour); * a_samp * Changes the text font. * The TextDraw to change - * There are four font styles, see http://wiki.sa-mp.com/wiki/PlayerTextDrawFont. Font value 4 specifies that this is a txd sprite; 5 specifies that this textdraw can display preview models. A font value greater than 5 does not display, and anything greater than 16 crashes the client - * If you want to change the font of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * There are four font styles, see http://wiki.sa-mp.com/wiki/PlayerTextDrawFont. Font value 4 specifies that this is a txd sprite; 5 specifies that this textdraw can display preview models. A font value greater than 5 does not display, and anything greater than 16 crashes the client + * If you want to change the font of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. */ native TextDrawFont(Text:text, TEXT_DRAW_FONT:font); /** * a_samp - * Appears to scale text spacing to a proportional ratio. Useful when using TextDrawLetterSize to ensure the text has even character spacing. + * Appears to scale text spacing to a proportional ratio. Useful when using TextDrawLetterSize to ensure the text has even character spacing. * The ID of the textdraw to set the proportionality of * 1 to enable proportionality, 0 to disable * Proportionality is set to 1 by default, you might skip this function if you don't want to disable it. - * If you want to change the proportionality of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * If you want to change the proportionality of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. */ native TextDrawSetProportional(Text:text, bool:set); @@ -2442,11 +2442,11 @@ native TextDrawSetSelectable(Text:text, bool:set); * a_samp * Shows a textdraw for a specific player. * The ID of the player to show the textdraw for - * The ID of the textdraw to show. Returned by TextDrawCreate - * If only a single player will see a textdraw, it might be wise to use player-textdraws instead. This is also useful for textdraws that need to show information specific for an individual player. + * The ID of the textdraw to show. Returned by TextDrawCreate + * If only a single player will see a textdraw, it might be wise to use player-textdraws instead. This is also useful for textdraws that need to show information specific for an individual player. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means either the player and/or textdraw specified does not exist. + * 0: The function failed to execute. This means either the player and/or textdraw specified does not exist. *
    */ native TextDrawShowForPlayer(playerid, Text:text); @@ -2465,13 +2465,13 @@ native TextDrawHideForPlayer(playerid, Text:text); /** * a_samp * Shows a textdraw for all players. - * The ID of the textdraw to show. Returned by TextDrawCreate + * The ID of the textdraw to show. Returned by TextDrawCreate * * * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the textdraw specified does not exist. + * 0: The function failed to execute. This means the textdraw specified does not exist. *
    */ native TextDrawShowForAll(Text:text); @@ -2497,7 +2497,7 @@ native TextDrawSetString(Text:text, const string[]); /** * a_samp - * Set the model for a textdraw model preview. Click here to see this function's effect. + * Set the model for a textdraw model preview. Click here to see this function's effect. * The textdraw ID that will display the 3D preview * The GTA SA or SA:MP model ID to display * This function was added in SA-MP 0.3x and will not work in earlier versions! @@ -2574,10 +2574,10 @@ native GangZoneDestroy(zone); /** * a_samp - * Show a gangzone for a player. Must be created with GangZoneCreate first. + * Show a gangzone for a player. Must be created with GangZoneCreate first. * The ID of the player you would like to show the gangzone for. - * The ID of the gang zone to show for the player. Returned by GangZoneCreate - * The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * The ID of the gang zone to show for the player. Returned by GangZoneCreate + * The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported * * * @@ -2595,7 +2595,7 @@ native GangZoneShowForPlayer(playerid, zone, colour); * a_samp * Shows a gangzone with the desired colour to all players. * The ID of the gangzone to show (returned by GangZoneCreate) - * The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported * * * @@ -2606,8 +2606,8 @@ native GangZoneShowForPlayer(playerid, zone, colour); * * * - * 1: The function executed successfully. The gang zone was shown for all players.
    - * 0: The function failed to execute. The gangzone does not exist. + * 1: The function executed successfully. The gang zone was shown for all players.
    + * 0: The function failed to execute. The gangzone does not exist. *
    */ native GangZoneShowForAll(zone, colour); @@ -2650,7 +2650,7 @@ native GangZoneHideForAll(zone); * Makes a gangzone flash for a player. * The ID of the player to flash the gangzone for * The ID of the zone to flash - * The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported * * * @@ -2667,7 +2667,7 @@ native GangZoneFlashForPlayer(playerid, zone, flashColour); * a_samp * GangZoneFlashForAll flashes a gangzone for all players. * The zone to flash - * The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported * * * @@ -2700,7 +2700,7 @@ native GangZoneStopFlashForPlayer(playerid, zone); /** * a_samp * Stops a gangzone flashing for all players. - * The ID of the zone to stop flashing. Returned by GangZoneCreate + * The ID of the zone to stop flashing. Returned by GangZoneCreate * * * @@ -2711,8 +2711,8 @@ native GangZoneStopFlashForPlayer(playerid, zone); * * * - * 1: The function executed successfully. Success is reported even if the gang zone wasn't flashing to begin with.
    - * 0: The function failed to execute. The gangzone specified does not exist. + * 1: The function executed successfully. Success is reported even if the gang zone wasn't flashing to begin with.
    + * 0: The function failed to execute. The gangzone specified does not exist. *
    */ native GangZoneStopFlashForAll(zone); @@ -2767,7 +2767,7 @@ native Delete3DTextLabel(Text3D:textid); /** * a_samp * Attach a 3D text label to a player. - * The ID of the 3D text label to attach. Returned by Create3DTextLabel + * The ID of the 3D text label to attach. Returned by Create3DTextLabel * The ID of the player to attach the label to * The x offset from the player * The y offset from the player @@ -2782,7 +2782,7 @@ native Delete3DTextLabel(Text3D:textid); * This function was added in SA-MP 0.3a and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player and/or label do not exist. + * 0: The function failed to execute. This means the player and/or label do not exist. *
    */ native Attach3DTextLabelToPlayer(Text3D:textid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ); @@ -2790,7 +2790,7 @@ native Attach3DTextLabelToPlayer(Text3D:textid, parentid, Float:offsetX, Float:o /** * a_samp * Attaches a 3D Text Label to a specific vehicle. - * The ID of the 3D text label to attach. Returned by Create3DTextLabel + * The ID of the 3D text label to attach. Returned by Create3DTextLabel * The vehicle you want to attach the 3D Text Label to * The offset-x coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). * The offset-y coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0). @@ -2867,7 +2867,7 @@ native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Floa * This function was added in SA-MP 0.3a and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the label specified doesn't exist. + * 0: The function failed to execute. This means the label specified doesn't exist. *
    */ native DeletePlayer3DTextLabel(playerid, PlayerText3D:textid); @@ -2895,12 +2895,12 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const * a_samp * Shows the player a synchronous (only one at a time) dialog box. * The ID of the player to show the dialog to - * An ID to assign this dialog to, so responses can be processed. Max dialogid is 32767. Using negative values will close any open dialog + * An ID to assign this dialog to, so responses can be processed. Max dialogid is 32767. Using negative values will close any open dialog * The style of the dialog - * The title at the top of the dialog. The length of the caption can not exceed more than 64 characters before it starts to cut off - * The text to display in the main dialog. Use \n to start a new line and \t to tabulate + * The title at the top of the dialog. The length of the caption can not exceed more than 64 characters before it starts to cut off + * The text to display in the main dialog. Use \n to start a new line and \t to tabulate * The text on the left button - * The text on the right button. Leave it blank ( "" ) to hide it + * The text on the right button. Leave it blank ( "" ) to hide it * * * This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -2908,7 +2908,7 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const * Using -1 as dialogid closes all dialogs currently shown on the client's screen. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player is not connected.
    + * 0: The function failed to execute. This means the player is not connected.
    *
    */ native ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE:style, const caption[], const info[], const button1[], const button2[]); @@ -2968,7 +2968,7 @@ forward OnGameModeInit(); forward OnGameModeExit(); /** - * This callback is called when a filterscript is initialized (loaded). It is only called inside the filterscript which is starting. + * This callback is called when a filterscript is initialized (loaded). It is only called inside the filterscript which is starting. * * * @@ -2977,7 +2977,7 @@ forward OnGameModeExit(); forward OnFilterScriptInit(); /** - * This callback is called when a filterscript is unloaded. It is only called inside the filterscript which is unloaded. + * This callback is called when a filterscript is unloaded. It is only called inside the filterscript which is unloaded. * * * @@ -3003,16 +3003,16 @@ forward OnPlayerConnect(playerid); /** * This callback is called when a player disconnects from the server. * The ID of the player that disconnected - * The reason for the disconnection. See table below + * The reason for the disconnection. See table below * * * * This callback can also be called by NPC. - * Some functions might not work correctly when used in this callback because the player is already disconnected when the callback is called. This means that you can't get unambiguous information from functions like GetPlayerIp and GetPlayerPos. + * Some functions might not work correctly when used in this callback because the player is already disconnected when the callback is called. This means that you can't get unambiguous information from functions like GetPlayerIp and GetPlayerPos. * * Reasons:
    *
      - *
    • 0 - timeout/Crash - the player's connection was lost. Either their game crashed or their network had a fault.
    • + *
    • 0 - timeout/Crash - the player's connection was lost. Either their game crashed or their network had a fault.
    • *
    • 1 - quit - the player purposefully quit, either using the /quit (/q) command or via the pause menu.
    • *
    • 2 - kick/ban - the player was kicked or banned by the server.
    • *
    @@ -3026,7 +3026,7 @@ forward OnPlayerConnect(playerid); forward OnPlayerDisconnect(playerid, reason); /** - * This callback is called when a player spawns.(i.e. after caling SpawnPlayer function). + * This callback is called when a player spawns.(i.e. after caling SpawnPlayer function). * The ID of the player that spawned * * @@ -3052,8 +3052,8 @@ forward OnPlayerSpawn(playerid); * * * - * The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    - * The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    + * The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    + * The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    * You do not need to check whether killerid is valid before using it in SendDeathMessage. INVALID_PLAYER_ID is a valid killerid ID parameter in that function.
    * playerid is the only one who can call the callback. (good to know for anti fake death) *
    @@ -3083,11 +3083,11 @@ forward OnVehicleSpawn(vehicleid); /** * This callback is called when a vehicle is destroyed - either by exploding or becoming submerged in water. * The ID of the vehicle that was destroyed - * The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player + * The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player * * * This callback can also be called by NPC. - * This callback will also be called when a vehicle enters water, but the vehicle can be saved from destruction by teleportation or driving out (if only partially submerged). The callback won't be called a second time, and the vehicle may disappear when the driver exits, or after a short time. + * This callback will also be called when a vehicle enters water, but the vehicle can be saved from destruction by teleportation or driving out (if only partially submerged). The callback won't be called a second time, and the vehicle may disappear when the driver exits, or after a short time. * * This callback does not handle returns.
    * It is always called first in filterscripts. @@ -3111,7 +3111,7 @@ forward OnVehicleDeath(vehicleid, killerid); forward OnPlayerText(playerid, text[]); /** - * This callback is called when a player enters a command into the client chat window. Commands are anything that start with a forward slash, e.g. /help. + * This callback is called when a player enters a command into the client chat window. Commands are anything that start with a forward slash, e.g. /help. * The ID of the player that entered a command * The command that was entered (including the forward slash) * @@ -3134,7 +3134,7 @@ forward OnPlayerCommandText(playerid, cmdtext[]); * This callback can also be called by NPC. * This callback is also called when a player presses F4. * - * Returning 0 in this callback will prevent the player from spawning. The player can be forced to spawn when SpawnPlayer is used.
    + * Returning 0 in this callback will prevent the player from spawning. The player can be forced to spawn when SpawnPlayer is used.
    * It is always called first in filterscripts. *
    */ @@ -3149,8 +3149,8 @@ forward OnPlayerRequestClass(playerid, classid); * * * - * This callback is called when a player BEGINS to enter a vehicle, not when they HAVE entered it. See OnPlayerStateChange. - * This callback is still called if the player is denied entry to the vehicle (e.g. it is locked or full). + * This callback is called when a player BEGINS to enter a vehicle, not when they HAVE entered it. See OnPlayerStateChange. + * This callback is still called if the player is denied entry to the vehicle (e.g. it is locked or full). * * This callback does not handle returns.
    * It is always called first in filterscripts. @@ -3176,7 +3176,7 @@ forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); forward OnPlayerExitVehicle(playerid, vehicleid); /** - * This callback is called when a player changes state. For example, when a player changes from being the driver of a vehicle to being on-foot. + * This callback is called when a player changes state. For example, when a player changes from being the driver of a vehicle to being on-foot. * The ID of the player that changed state * The player's new state * The player's previous state @@ -3231,7 +3231,7 @@ forward OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldsta forward OnPlayerEnterCheckpoint(playerid); /** - * This callback is called when a player leaves the checkpoint set for them by SetPlayerCheckpoint. Only one checkpoint can be set at a time. + * This callback is called when a player leaves the checkpoint set for them by SetPlayerCheckpoint. Only one checkpoint can be set at a time. * The ID of the player that left their checkpoint * * @@ -3299,7 +3299,7 @@ forward OnPlayerLeaveRaceCheckpoint(playerid); * "/rcon" is not included in "cmd" when a player types a command. * If you use the print function here, it will send a message to the player who typed the command in-game as well as the log. * This callback is not called when the player is not logged in as RCON admin. - * When the player is not logged in as RCON admin and uses /rcon login, this callback will not be called and OnRconLoginAttempt is called instead. However, when the player is logged in as RCON admin, the use of this command will call this callback. + * When the player is not logged in as RCON admin and uses /rcon login, this callback will not be called and OnRconLoginAttempt is called instead. However, when the player is logged in as RCON admin, the use of this command will call this callback. * * 0 if the command was not processed, it will be passed to another script or 1 if the command was processed, will not be passed to other scripts.
    * It is always called first in filterscripts so returning 1 there blocks gamemode from seeing it. @@ -3328,7 +3328,7 @@ forward OnPlayerRequestSpawn(playerid); * * * - * SetObjectPos does not work when used in this callback. To fix it, recreate the object. + * SetObjectPos does not work when used in this callback. To fix it, recreate the object. * * This callback does not handle returns.
    * It is always called first in filterscripts. @@ -3401,7 +3401,7 @@ forward OnVehicleMod(playerid, vehicleid, componentid); forward OnEnterExitModShop(playerid, enterexit, interiorid); /** - * Called when a player previews a vehicle paintjob inside a mod shop. Watch out, this callback is not called when the player buys the paintjob. + * Called when a player previews a vehicle paintjob inside a mod shop. Watch out, this callback is not called when the player buys the paintjob. * The ID of the player that changed the paintjob of their vehicle * The ID of the vehicle that had its paintjob changed * The ID of the new paintjob @@ -3411,14 +3411,14 @@ forward OnEnterExitModShop(playerid, enterexit, interiorid); * * This callback is not called by ChangeVehiclePaintjob. * - * This callback does not handle returns. Returning 0 won't deny the paintjob change.
    + * This callback does not handle returns. Returning 0 won't deny the paintjob change.
    * It is always called first in gamemode so returning 0 there blocks other filterscripts from seeing it. *
    */ forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); /** - * This callback is called when a player exits a mod shop, even if the colors weren't changed. Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. + * This callback is called when a player exits a mod shop, even if the colors weren't changed. Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. * The ID of the player that is driving the vehicle * The ID of the vehicle that was resprayed * The color that the vehicle's primary color was changed to @@ -3431,7 +3431,7 @@ forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); * Previewing a component inside a mod shop might call this callback. * This callback is not called by ChangeVehicleColor. * - * Returning 0 in this callback will deny the colour change. Returning 1 will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.
    + * Returning 0 in this callback will deny the colour change. Returning 1 will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.
    * It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. *
    */ @@ -3454,22 +3454,22 @@ forward OnVehicleRespray(playerid, vehicleid, color1, color2); forward OnVehicleDamageStatusUpdate(vehicleid, playerid); /** - * This callback is called when a player's client updates/syncs the position of a vehicle they're not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle that has no driver. + * This callback is called when a player's client updates/syncs the position of a vehicle they're not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle that has no driver. * The ID of the vehicle that's position was updated * The ID of the player that sent a vehicle position sync update - * The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats - * The new X coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version - * The new Y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version - * The new Z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version - * The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version - * The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version - * The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version + * The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats + * The new X coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version + * The new Y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version + * The new Z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version + * The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version + * The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version + * The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version * * This callback was added in SA-MP 0.3c R3 and will not work in earlier versions! - * This callback is called very frequently per second per unoccupied vehicle. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. + * This callback is called very frequently per second per unoccupied vehicle. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. * GetVehiclePos will return the old coordinates of the vehicle before this update. * - * Returning 0 in this callback will stop the vehicle's position being synced to other players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.
    + * Returning 0 in this callback will stop the vehicle's position being synced to other players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.
    * It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. *
    */ @@ -3478,7 +3478,7 @@ forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new /** * This callback is called when a player selects an item from a menu (ShowMenuForPlayer). * The ID of the player that selected a menu item - * The ID of the row that was selected. The first row is ID 0 + * The ID of the row that was selected. The first row is ID 0 * * * @@ -3508,7 +3508,7 @@ forward OnPlayerSelectedMenuRow(playerid, row); forward OnPlayerExitedMenu(playerid); /** - * Called when a player changes interior. Can be triggered by SetPlayerInterior or when a player enter/exits a building. + * Called when a player changes interior. Can be triggered by SetPlayerInterior or when a player enter/exits a building. * The playerid who changed interior * The interior the player is now in * The interior the player was in before @@ -3524,7 +3524,7 @@ forward OnPlayerExitedMenu(playerid); forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); /** - * This callback is called when the state of any supported key is changed (pressed/released). Directional keys do not trigger OnPlayerKeyStateChange (up/down/left/right). + * This callback is called when the state of any supported key is changed (pressed/released). Directional keys do not trigger OnPlayerKeyStateChange (up/down/left/right). * The ID of the player that pressed or released a key * A map (bitmask) of the keys currently held - see here * A map (bitmask) of the keys held prior to the current change - see here @@ -3566,7 +3566,7 @@ forward OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys); * * This callback was added in SA-MP 0.3a and will not work in earlier versions! * This callback is only called when /rcon login is used in-game. - * This callback is only called when the player is not yet logged in. When the player is logged in, OnRconCommand is called instead. + * This callback is only called when the player is not yet logged in. When the player is logged in, OnRconCommand is called instead. * * This callback does not handle returns.
    * It is always called first in filterscripts. @@ -3575,11 +3575,11 @@ forward OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys); forward OnRconLoginAttempt(ip[], password[], success); /** - * This callback is called every time a client/player updates the server with their status. It is often used to create custom callbacks for client updates that aren't actively tracked by the server, such as health or armor updates or players switching weapons. + * This callback is called every time a client/player updates the server with their status. It is often used to create custom callbacks for client updates that aren't actively tracked by the server, such as health or armor updates or players switching weapons. * ID of the player sending an update packet * This callback can also be called by NPC. * This callback is called, on average, 30 times per second, per player; only use it when you know what it's meant for (or more importantly what it's NOT meant for). - * The frequency with which this callback is called for each player varies, depending on what the player is doing. Driving or shooting will trigger a lot more updates than idling. + * The frequency with which this callback is called for each player varies, depending on what the player is doing. Driving or shooting will trigger a lot more updates than idling. * * 0 - Update from this player will not be replicated to other clients.
    * 1 - Indicates that this update can be processed normally and sent to other players.
    @@ -3702,16 +3702,16 @@ forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]); * The ID of the player that caused the damage. INVALID_PLAYER_ID if self-inflicted * The amount of damage the player took (health and armour combined) * The ID of the weapon/reason for the damage - * The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) + * The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) * * * This callback was added in SA-MP 0.3d and will not work in earlier versions! * GetPlayerHealth and GetPlayerArmour will return the old amounts of the player before this callback. * - * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18).
    - * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    + * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18).
    + * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    * playerid is the only one who can call the callback.
    - * The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. + * The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. *
    * * 1 - Callback will not be called in other filterscripts.
    @@ -3727,16 +3727,16 @@ forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) * The ID of the player that received damage * The amount of health/armour damagedid has lost (combined) * The reason that caused the damage - * The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) + * The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) * * This callback was added in SA-MP 0.3d and will not work in earlier versions! * * Keep in mind this function can be inaccurate in some cases.
    * If you want to prevent certain players from damaging eachother, use SetPlayerTeam.
    - * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    - * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    + * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    + * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    * playerid is the only one who can call the callback.
    - * The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. + * The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. *
    * * 1 - Callback will not be called in other filterscripts.
    @@ -3762,7 +3762,7 @@ forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart * * * This callback was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function does not get called if the actor is set invulnerable (WHICH IS BY DEFAULT). See SetActorInvulnerable. + * This function does not get called if the actor is set invulnerable (WHICH IS BY DEFAULT). See SetActorInvulnerable. * * 1 - Callback will not be called in other filterscripts.
    * 0 - Allows this callback to be called in other filterscripts.
    @@ -3797,17 +3797,17 @@ forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); * * * This callback was added in SA-MP 0.3e and will not work in earlier versions! - * The clickable area is defined by TextDrawTextSize. The x and y parameters passed to that function must not be zero or negative. - * Do not use CancelSelectTextDraw unconditionally within this callback. This results in an infinite loop. + * The clickable area is defined by TextDrawTextSize. The x and y parameters passed to that function must not be zero or negative. + * Do not use CancelSelectTextDraw unconditionally within this callback. This results in an infinite loop. * - * Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
    + * Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
    * It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. *
    */ forward OnPlayerClickTextDraw(playerid, Text:clickedid); /** - * This callback is called when a player clicks on a player-textdraw. It is not called when player cancels the select mode (ESC) - however, OnPlayerClickTextDraw is. + * This callback is called when a player clicks on a player-textdraw. It is not called when player cancels the select mode (ESC) - however, OnPlayerClickTextDraw is. * The ID of the player that selected a textdraw * The ID of the player-textdraw that the player selected * @@ -3816,14 +3816,14 @@ forward OnPlayerClickTextDraw(playerid, Text:clickedid); * This callback was added in SA-MP 0.3e and will not work in earlier versions! * When a player presses ESC to cancel selecting a textdraw, OnPlayerClickTextDraw is called with a textdraw ID of INVALID_TEXT_DRAW. OnPlayerClickPlayerTextDraw won't be called also. * - * Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
    + * Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
    * It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. *
    */ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); /** - * This callback is called when an IP address attempts a connection to the server. To block incoming connections, use BlockIpAddress. + * This callback is called when an IP address attempts a connection to the server. To block incoming connections, use BlockIpAddress. * The ID of the player attempting to connect * The IP address of the player attempting to connect * The port of the attempted connection @@ -3851,9 +3851,9 @@ forward OnIncomingConnection(playerid, ip_address[], port); * * * This callback was added in SA-MP 0.3z R4 and will not work in earlier versions! - * This callback is called very frequently per second per trailer. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. + * This callback is called very frequently per second per trailer. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. * - * 0 - Cancels any trailer updates from being sent to other players. Update is still sent to the updating player.
    + * 0 - Cancels any trailer updates from being sent to other players. Update is still sent to the updating player.
    * 1 - Processes the trailer update as normal and synchronizes it between all players.
    * It is always called first in filterscripts. *
    @@ -3878,7 +3878,7 @@ forward OnTrailerUpdate(playerid, vehicleid); forward OnVehicleSirenStateChange(playerid, vehicleid, newstate); /** - * This callback is called when a player finishes downloading custom models. For more information on how to add custom models to your server, see the release thread and this tutorial. + * This callback is called when a player finishes downloading custom models. For more information on how to add custom models to your server, see the release thread and this tutorial. * The ID of the player that finished downloading custom models * The ID of the virtual world the player finished downloading custom models for * @@ -3898,7 +3898,7 @@ forward OnPlayerRequestDownload(playerid, type, crc); * The source of the player's click * * This callback was added in SA-MP 0.3a and will not work in earlier versions! - * There is currently only one (0 - CLICK_SOURCE_SCOREBOARD). The existence of this argument suggests that more sources may be supported in the future. + * There is currently only one (0 - CLICK_SOURCE_SCOREBOARD). The existence of this argument suggests that more sources may be supported in the future. * * 1 - Will prevent other filterscripts from receiving this callback.
    * 0 - Indicates that this callback will be passed to the next filterscript.
    @@ -3958,7 +3958,7 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:respo * * * This callback was added in SA-MP 0.3e and will not work in earlier versions! - * Editions should be discarded if response was 0 (cancelled). This must be done by storing the offsets etc. in an array BEFORE using EditAttachedObject. + * Editions should be discarded if response was 0 (cancelled). This must be done by storing the offsets etc. in an array BEFORE using EditAttachedObject. * * 1 - Will prevent other scripts from receiving this callback.
    * 0 - Indicates that this callback will be passed to the next script.
    @@ -3993,7 +3993,7 @@ forward OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, mode forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Float:fX, Float:fY, Float:fZ); /** - * This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). + * This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). * The ID of the player that shot a weapon * The ID of the weapon shot by the player * The type of thing the shot hit (none, player, vehicle, or (player)object) @@ -4011,19 +4011,19 @@ forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Fl *
  • BULLET_HIT_TYPE_OBJECT(3)
  • *
  • BULLET_HIT_TYPE_PLAYER_OBJECT(4)
  • *
    - * BULLET_HIT_TYPE_PLAYER is also called for NPCs. Actors are ignored by this callback and detects as BULLET_HIT_TYPE_NONE. + * BULLET_HIT_TYPE_PLAYER is also called for NPCs. Actors are ignored by this callback and detects as BULLET_HIT_TYPE_NONE. * This callback is only called when lag compensation is enabled. * * If hittype is:
    *
      - *
    • - BULLET_HIT_TYPE_NONE: the fX, fY and fZ parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
    • + *
    • - BULLET_HIT_TYPE_NONE: the fX, fY and fZ parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
    • *
    • - Others: the fX, fY and fZ are offsets relative to the hitid.
    • *
    *
    * * Isn't called if you fired in vehicle as driver or if you are looking behind with the aim enabled (shooting in air).
    - * It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitid (the hit player's vehicleid) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER at all.
    - * Partially fixed in SA-MP 0.3.7: If fake weapon data is sent by a malicious user, other player clients may freeze or crash. To combat this, check if the reported weaponid can actually fire bullets. + * It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitid (the hit player's vehicleid) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER at all.
    + * Partially fixed in SA-MP 0.3.7: If fake weapon data is sent by a malicious user, other player clients may freeze or crash. To combat this, check if the reported weaponid can actually fire bullets. *
    * * diff --git a/a_sampdb.inc b/a_sampdb.inc index 89b5bb2..3479d5c 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -36,10 +36,10 @@ native DB:db_open(const name[]); * a_sampdb * Closes an SQLite database that was opened with db_open. * The handle of the database connection to close (returned by db_open) - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references * * 1: The function executed successfully.
    - * 0: The function failed to execute. May mean that the database handle specified is not open. + * 0: The function failed to execute. May mean that the database handle specified is not open. *
    */ native bool:DB_Close(DB:db) = db_close; @@ -85,7 +85,7 @@ native bool:db_free_result(DBResult:result); * a_sampdb * Returns the number of rows from a db_query. * The result of db_query - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references * The number of rows in the result. */ native DB_NumRows(DBResult:result) = db_num_rows; @@ -100,7 +100,7 @@ native db_num_rows(DBResult:result); * a_sampdb * Moves to the next row of the result allocated from db_query. * The result of db_query - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references * Returns 1 on success, otherwise 0 if DBResult:result is a NULL reference or the last row is reached. */ native bool:DB_NextRow(DBResult:result) = db_next_row; @@ -115,7 +115,7 @@ native bool:db_next_row(DBResult:result); * a_sampdb * Get the number of fields in a result. * The result of db_query - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references * The number of fields in the result. */ native DB_NumFields(DBResult:result) = db_num_fields; @@ -133,7 +133,7 @@ native db_num_fields(DBResult:result); * The index of the field to get the name of * The returned value * The max length of the field - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references * Returns 1, if the function was successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. */ native bool:DB_FieldName(DBResult:result, field, output[], size = sizeof (output)) = db_field_name; @@ -151,7 +151,7 @@ native bool:db_field_name(DBResult:result, field, output[], size = sizeof (outpu * The field to get the data from * The returned value * The max length of the field - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references * Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. */ native bool:DB_GetField(DBResult:result, field, output[], size = sizeof (output)) = db_get_field; @@ -167,7 +167,7 @@ native bool:db_get_field(DBResult:result, field, output[], size = sizeof (output * Get the content of a field as an integer from db_query. * The result to get the data from * The field to get the data from (optional=0) - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references * Retrieved value as integer (number). */ native DB_GetFieldInt(DBResult:result, field = 0) = db_get_field_int; @@ -183,7 +183,7 @@ native db_get_field_int(DBResult:result, field = 0); * Get the content of a field as a float from db_query. * The result to get the data from * The field to get the data from (optional=0) - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references * Retrieved value as floating point number. */ native Float:DB_GetFieldFloat(DBResult:result, field = 0) = db_get_field_float; @@ -201,7 +201,7 @@ native Float:db_get_field_float(DBResult:result, field = 0); * The fieldname to get the data from * The returned value * The max length of the field - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references * Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. */ native bool:DB_GetFieldAssoc(DBResult:result, const field[], output[], size = sizeof (output)) = db_get_field_assoc; @@ -217,7 +217,7 @@ native bool:db_get_field_assoc(DBResult:result, const field[], output[], size = * Get the contents of field as an integer with specified name. * The result to get the data from * The fieldname to get the data from - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references * Retrieved value as integer (number). */ native DB_GetFieldAssocInt(DBResult:result, const field[]) = db_get_field_assoc_int; @@ -233,7 +233,7 @@ native db_get_field_assoc_int(DBResult:result, const field[]); * Get the contents of field as a float with specified name. * The result to get the data from * The fieldname to get the data from - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references * Retrieved value as floating point number. */ native Float:DB_GetFieldAssocFloat(DBResult:result, const field[]) = db_get_field_assoc_float; diff --git a/a_vehicles.inc b/a_vehicles.inc index 25d24c4..7f3bdf0 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -69,7 +69,7 @@ enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO /** * a_vehicles - * Creates a vehicle in the world. Can be used in place of AddStaticVehicleEx at any time in the script. + * Creates a vehicle in the world. Can be used in place of AddStaticVehicleEx at any time in the script. * The model for the vehicle * The x coordinate for the vehicle * The y coordinate for the vehicle @@ -77,8 +77,8 @@ enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO * The facing angle for the vehicle * The primary colour ID * The secondary colour ID - * The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning - * Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=false) + * The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning + * Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=false) * * * @@ -95,21 +95,21 @@ native CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:rotation, colour1 /** * a_vehicles - * Destroy a vehicle. It will disappear instantly. + * Destroy a vehicle. It will disappear instantly. * The ID of the vehicle to destroy * * * * * 1: The function executed successfully.
    - * 0: The function failed to execute. The vehicle does not exist. + * 0: The function failed to execute. The vehicle does not exist. *
    */ native DestroyVehicle(vehicleid); /** * a_vehicles - * Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) for a player. + * Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) for a player. * The ID of the vehicle to check * The ID of the player to check * @@ -137,7 +137,7 @@ native bool:IsVehicleStreamedIn(vehicleid, playerid); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. The vehicle specified does not exist. + * 0: The function failed to execute. The vehicle specified does not exist. *
    */ native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); @@ -155,7 +155,7 @@ native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); * An empty vehicle will not fall after being teleported into the air. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The vehicle specified does not exist. + * 0: The function failed to execute. The vehicle specified does not exist. *
    */ native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); @@ -172,7 +172,7 @@ native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the vehicle does not exist. + * 0: The function failed to execute. This means the vehicle does not exist. *
    */ native GetVehicleZAngle(vehicleid, &Float:angle); @@ -202,17 +202,17 @@ native GetVehicleZAngle(vehicleid, &Float:angle); *
    * * There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart from the z angle) - * This function may return incorrect values for unoccupied vehicles. The reason is that the third row of the vehicle's internal rotation matrix gets corrupted if it gets updated while unoccupied. + * This function may return incorrect values for unoccupied vehicles. The reason is that the third row of the vehicle's internal rotation matrix gets corrupted if it gets updated while unoccupied. * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the vehicle specified does not exist. + * 0: The function failed to execute. This means the vehicle specified does not exist. *
    */ native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z); /** * a_vehicles - * This function can be used to calculate the distance (as a float) between a vehicle and another map coordinate. This can be useful to detect how far a vehicle away is from a location. + * This function can be used to calculate the distance (as a float) between a vehicle and another map coordinate. This can be useful to detect how far a vehicle away is from a location. * The ID of the vehicle to calculate the distance for * The x map coordinate * The y map coordinate @@ -231,11 +231,11 @@ native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); * The z angle to set * * - * A vehicle's x and y (pitch and roll) rotation will be reset when this function is used. The x and y rotations can not be set. + * A vehicle's x and y (pitch and roll) rotation will be reset when this function is used. The x and y rotations can not be set. * This function does not work on unoccupied vehicles. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The vehicle specified does not exist. + * 0: The function failed to execute. The vehicle specified does not exist. *
    */ native SetVehicleZAngle(vehicleid, Float:angle); @@ -245,27 +245,27 @@ native SetVehicleZAngle(vehicleid, Float:angle); * Set the parameters of a vehicle for a player. * The ID of the vehicle to set the parameters of * The ID of the player to set the vehicle's parameters for - * 0 to disable the objective or 1 to show it. This is a bobbing yellow arrow above the vehicle + * 0 to disable the objective or 1 to show it. This is a bobbing yellow arrow above the vehicle * 0 to unlock the doors or 1 to lock them * - * Vehicles must be respawned for the 'objective' to be removed. This can be circumvented somewhat using Get/SetVehicleParamsEx which do not require the vehicle to be respawned. It is worth noting however that the object will be disabled on a global scale, and this is only useful if only one player has the vehicle as an objective. + * Vehicles must be respawned for the 'objective' to be removed. This can be circumvented somewhat using Get/SetVehicleParamsEx which do not require the vehicle to be respawned. It is worth noting however that the object will be disabled on a global scale, and this is only useful if only one player has the vehicle as an objective. * Since 0.3a you will have to reapply this function when OnVehicleStreamIn is called. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player and/or vehicle specified do not exist. + * 0: The function failed to execute. The player and/or vehicle specified do not exist. *
    */ native SetVehicleParamsForPlayer(vehicleid, playerid, objective, doors); /** * a_vehicles - * Use this function before any player connects (OnGameModeInit) to tell all clients that the script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when players enter/exit vehicles and headlights automatically coming on when it is dark. + * Use this function before any player connects (OnGameModeInit) to tell all clients that the script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when players enter/exit vehicles and headlights automatically coming on when it is dark. * * * * This Function was added in SA-MP 0.3c and will not work in earlier versions! - * Is it not possible to reverse this function after it has been used. You must either use it or not use it. - * This function always returns 1. It cannot fail to execute. + * Is it not possible to reverse this function after it has been used. You must either use it or not use it. + * This function always returns 1. It cannot fail to execute. */ native ManualVehicleEngineAndLights(); @@ -275,7 +275,7 @@ native ManualVehicleEngineAndLights(); * The ID of the vehicle to set the parameters of * Engine status. 0 - Off, 1 - On * Light status. 0 - Off, 1 - On - * Vehicle alarm status. If on, the alarm starts. 0 - Off, 1 - On + * Vehicle alarm status. If on, the alarm starts. 0 - Off, 1 - On * Door lock status. 0 - Unlocked, 1 - Locked * Bonnet (hood) status. 0 - Closed, 1 - Open * Boot/trunk status. 0 - Closed, 1 - Open @@ -288,7 +288,7 @@ native ManualVehicleEngineAndLights(); * Lights also operate during the day (Only when ManualVehicleEngineAndLights is enabled). * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the vehicle does not exist. + * 0: The function failed to execute. This means the vehicle does not exist. *
    */ native SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS:engine, VEHICLE_PARAMS:lights, VEHICLE_PARAMS:alarm, VEHICLE_PARAMS:doors, VEHICLE_PARAMS:bonnet, VEHICLE_PARAMS:boot, VEHICLE_PARAMS:objective); @@ -297,11 +297,11 @@ native SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS:engine, VEHICLE_PARAMS:light * a_vehicles * Gets a vehicle's parameters. * The ID of the vehicle to get the parameters from - * Get the engine status. If 1, the engine is running. - * Get the vehicle's lights' state. If 1 the lights are on - * Get the vehicle's alarm state. If 1 the alarm is (or was) sounding - * Get the lock status of the doors. If 1 the doors are locked - * Get the bonnet/hood status. If 1, it's open + * Get the engine status. If 1, the engine is running. + * Get the vehicle's lights' state. If 1 the lights are on + * Get the vehicle's alarm state. If 1 the alarm is (or was) sounding + * Get the lock status of the doors. If 1 the doors are locked + * Get the bonnet/hood status. If 1, it's open * Get the boot/trunk status. 1 means it is open * Get the objective status. 1 means the objective is on * @@ -392,29 +392,29 @@ native GetVehicleParamsCarWindows(vehicleid, &frontLeft, &frontRight, &rearLeft, * * * 1: The function executed successfully.
    - * 0: The function failed to execute. The vehicle does not exist. + * 0: The function failed to execute. The vehicle does not exist. *
    */ native SetVehicleToRespawn(vehicleid); /** * a_vehicles - * Links a vehicle to an interior. Vehicles can only be seen by players in the same interior (SetPlayerInterior). + * Links a vehicle to an interior. Vehicles can only be seen by players in the same interior (SetPlayerInterior). * The ID of the vehicle to link to an interior * The Interior ID to link it to * * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the vehicle does not exist.
    + * 0: The function failed to execute. This means the vehicle does not exist.
    *
    */ native LinkVehicleToInterior(vehicleid, interiorid); /** * a_vehicles - * Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components can be found here. - * The ID of the vehicle to add the component to. Not to be confused with modelid + * Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components can be found here. + * The ID of the vehicle to add the component to. Not to be confused with modelid * The ID of the component to add to the vehicle * *
      @@ -422,7 +422,7 @@ native LinkVehicleToInterior(vehicleid, interiorid); *
    • 1 - The component was successfully added to the vehicle.
    • *
    *
    - * Using an invalid component ID crashes the player's game. There are no internal checks for this. + * Using an invalid component ID crashes the player's game. There are no internal checks for this. * * * @@ -452,10 +452,10 @@ native RemoveVehicleComponent(vehicleid, componentid); * The new vehicle's secondary Color ID * * - * Some vehicles have only a primary colour and some can not have the colour changed at all. A few (cement, squallo) have 4 colours, of which 2 can not be changed in SA:MP + * Some vehicles have only a primary colour and some can not have the colour changed at all. A few (cement, squallo) have 4 colours, of which 2 can not be changed in SA:MP * - * 1: The function executed successfully. The vehicle's colour was successfully changed.
    - * 0: The function failed to execute. The vehicle does not exist. + * 1: The function executed successfully. The vehicle's colour was successfully changed.
    + * 0: The function failed to execute. The vehicle does not exist. *
    */ native ChangeVehicleColor(vehicleid, colour1, colour2); @@ -464,7 +464,7 @@ native ChangeVehicleColor(vehicleid, colour1, colour2); * a_vehicles * Change a vehicle's paintjob (for plain colours see ChangeVehicleColor). * The ID of the vehicle to change the paintjob of - * The ID of the Paintjob to apply. Use 3 to remove a paintjob + * The ID of the Paintjob to apply. Use 3 to remove a paintjob * * * @@ -478,7 +478,7 @@ native ChangeVehiclePaintjob(vehicleid, paintjobid); /** * a_vehicles - * Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%). + * Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%). * The ID of the vehicle to set the health of * The health, given as a float value * @@ -498,7 +498,7 @@ native ChangeVehiclePaintjob(vehicleid, paintjobid); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the vehicle does not exist. + * 0: The function failed to execute. This means the vehicle does not exist. *
    */ native SetVehicleHealth(vehicleid, Float:health); @@ -554,7 +554,7 @@ native DetachTrailerFromVehicle(vehicleid); /** * a_vehicles - * Checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer to get the vehicle ID of the trailer (if any). + * Checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer to get the vehicle ID of the trailer (if any). * The ID of the vehicle to check for trailers * * @@ -585,16 +585,16 @@ native GetVehicleTrailer(vehicleid); * This function was added in SA-MP 0.3c and will not work in earlier versions! * You can use colour embedding on the number plate text. * - * This function has no internal error checking. Do not assign custom number plates to vehicles without plates (boats, planes, etc) as this will result in some unneeded processing time on the client.
    + * This function has no internal error checking. Do not assign custom number plates to vehicles without plates (boats, planes, etc) as this will result in some unneeded processing time on the client.
    * The vehicle must be re-spawned or re-streamed for the changes to take effect.
    * There's a limit of 32 characters on each number plate (including embedded colours).
    * The text length that can be seen on the number plate is around 9 to 10 characters, more characters will cause the text to split.
    - * Some vehicle models has a backward number plate, e.g. Boxville (498) (as an alternative to this vehicle you can use vehicle model ID 609, which is a duplicated Boxville (aka Boxburg), but with a regular number plate).
    + * Some vehicle models has a backward number plate, e.g. Boxville (498) (as an alternative to this vehicle you can use vehicle model ID 609, which is a duplicated Boxville (aka Boxburg), but with a regular number plate).
    * This function only works in versions 0.2.1, 0.2.2, 0.2x and 0.3c (and beyond). *
    * * 1: The function executed successfully.
    - * 0: The function failed to execute. The vehicle does not exist.
    + * 0: The function failed to execute. The vehicle does not exist.
    *
    */ native SetVehicleNumberPlate(vehicleid, const numberPlate[]); @@ -644,12 +644,12 @@ native GetVehicleModel(vehicleid); * Known Bugs:
    *
      *
    • Doesn't work for CARMODTYPE_STEREO.
    • - *
    • Both front bull bars and front bumper components are saved in the CARMODTYPE_FRONT_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • - *
    • Both rear bull bars and rear bumper components are saved in the CARMODTYPE_REAR_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • - *
    • Both left side skirt and right side skirt are saved in the CARMODTYPE_SIDESKIRT slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • + *
    • Both front bull bars and front bumper components are saved in the CARMODTYPE_FRONT_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • + *
    • Both rear bull bars and rear bumper components are saved in the CARMODTYPE_REAR_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • + *
    • Both left side skirt and right side skirt are saved in the CARMODTYPE_SIDESKIRT slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
    • *
    * - * The ID of the component installed in the specified slot. Returns 0 if no component in specified vehicle's specified slot, or if vehicle doesn't exist. + * The ID of the component installed in the specified slot. Returns 0 if no component in specified vehicle's specified slot, or if vehicle doesn't exist. */ native GetVehicleComponentInSlot(vehicleid, CARMODTYPE:slot); // There is 1 slot for each CARMODTYPE_* @@ -676,7 +676,7 @@ native CARMODTYPE:GetVehicleComponentType(component); // Find CARMODTYPE_* for c * This function was added in SA-MP 0.3a and will not work in earlier versions! * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the vehicle specified does not exist. + * 0: The function failed to execute. This means the vehicle specified does not exist. *
    */ native RepairVehicle(vehicleid); // Repairs the damage model and resets the health @@ -695,7 +695,7 @@ native RepairVehicle(vehicleid); // Repairs the damage model and resets the heal * Multiply vector with 250.66667 for kmph or 199.416667 for mph or something... * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the vehicle specified does not exist.
    + * 0: The function failed to execute. This means the vehicle specified does not exist.
    *
    */ native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); @@ -711,7 +711,7 @@ native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); * This function has no affect on un-occupied vehicles and does not affect trains. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The vehicle does not exist. + * 0: The function failed to execute. The vehicle does not exist. *
    */ native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); @@ -729,7 +729,7 @@ native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); * This function has no effect on un-occupied vehicles and does not effect trains. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The vehicle does not exist. + * 0: The function failed to execute. The vehicle does not exist. *
    */ native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); @@ -782,7 +782,7 @@ native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the vehicle specified does not exist. + * 0: The function failed to execute. This means the vehicle specified does not exist. *
    */ native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); @@ -867,7 +867,7 @@ native GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO:infotype, &Float:x, /** * a_vehicles - * Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their own virtual world. + * Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their own virtual world. * The ID of vehicle to set the virtual world of * The ID of the virtual world to put the vehicle in * From af6b7d6e4da11898802d09edd1c395b5774ace4a Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 17:33:06 +0000 Subject: [PATCH 056/104] Wrap pawndoc. --- a_actor.inc | 56 ++- a_http.inc | 6 +- a_npc.inc | 116 +++-- a_objects.inc | 139 ++++-- a_players.inc | 874 +++++++++++++++++++++++++----------- a_samp.inc | 1167 +++++++++++++++++++++++++++++++++--------------- a_sampdb.inc | 57 ++- a_vehicles.inc | 205 ++++++--- 8 files changed, 1812 insertions(+), 808 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 70b87fa..6b18d89 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -18,7 +18,8 @@ /** * a_actor - * 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. + * 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. * The model ID (skin ID) the actor should have * The x coordinate to create the actor at * The y coordinate to create the actor at @@ -47,14 +48,16 @@ * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * - * Actors are completely separate from NPCs. They do NOT use player IDs/slots on the server and CANNOT be handled like NPCs.
    + * Actors are completely separate from NPCs. They do NOT use player IDs/slots on the server and CANNOT + * be handled like NPCs.
    * Actors are limited to 1000 (MAX_ACTORS).
    * Actors can be pushed by vehicles, use a timer to put them back at their positions.
    * As of 0.3.7 R2 actors default to being invulnerable. *
    * * The created Actor ID (start at 0).
    - * INVALID_ACTOR_ID (65535) If the actor limit (1000) is reached. + * INVALID_ACTOR_ID (65535) If the actor limit (1000) is + * reached. *
    */ native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); @@ -80,14 +83,16 @@ native DestroyActor(actorid); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * 1 if the actor is streamed in for the player, or 0 if it is not. + * 1 if the actor is streamed in for the player, or 0 if it is + * not. */ native bool:IsActorStreamedIn(actorid, playerid); /** * a_actor * Set the virtual world of an actor. Only players in the same world will see the actor. - * The ID of the actor (returned by CreateActor) to set the virtual world of + * The ID of the actor (returned by CreateActor) to + * set the virtual world of * The virtual world to put the actor ID * * @@ -105,7 +110,8 @@ native SetActorVirtualWorld(actorid, virtualWorld); * The ID of the actor to get the virtual world of * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * The virtual world of the actor. By default this is 0. Also returns 0 if actor specified does not exist. + * The virtual world of the actor. By default this is 0. Also returns 0 + * if actor specified does not exist. */ native GetActorVirtualWorld(actorid); @@ -116,13 +122,19 @@ native GetActorVirtualWorld(actorid); * The animation library from which to apply an animation * The name of the animation to apply, within the specified library * The speed to play the animation (use 4.1) - * If set to 1, the animation will loop. If set to 0, the animation will play once - * If set to 0, the actor is returned to their old x coordinate once the animation is complete (for animations that move the actor such as walking). 1 will not return them to their old position + * If set to 1, the animation will loop. If set to 0, + * the animation will play once + * If set to 0, the actor is returned to their old x coordinate once + * the animation is complete (for animations that move the actor such as walking). 1 will + * not return them to their old position * Same as above but for the y axis. Should be kept the same as the previous parameter - * Setting this to 1 will freeze an actor at the end of the animation. 0 will not + * Setting this to 1 will freeze an actor at the end of the animation. + * 0 will not * Timer in milliseconds. For a never-ending loop it should be 0 * - * You must preload the animation library for the player the actor will be applying the animation for, and not for the actor. Otherwise, the animation won't be applied to the actor until the function is executed again. + * You must preload the animation library for the player the actor will be applying the animation + * for, and not for the actor. Otherwise, the animation won't be applied to the actor until the function + * is executed again. * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * * 1: The function executed successfully.
    @@ -134,7 +146,8 @@ native ApplyActorAnimation(actorid, const animationLibrary[], const animationNam /** * a_actor * Clear any animations applied to an actor. - * The ID of the actor (returned by CreateActor) to clear the animations for + * The ID of the actor (returned by CreateActor) to + * clear the animations for * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * @@ -154,7 +167,8 @@ native ClearActorAnimations(actorid); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * When creating an actor with CreateActor, you specify it's position. You do not need to use this function unless you want to change its position later. + * When creating an actor with CreateActor, you specify it's position. + * You do not need to use this function unless you want to change its position later. * * 1: The function executed successfully.
    * 0: The function failed to execute. The actor specified does not exist. @@ -166,9 +180,12 @@ native SetActorPos(actorid, Float:x, Float:y, Float:z); * a_actor * Get the position of an actor. * The ID of the actor to get the position of. Returned by CreateActor - * A float variable, passed by reference, in which to store the x coordinate of the actor - * A float variable, passed by reference, in which to store the y coordinate of the actor - * A float variable, passed by reference, in which to store the z coordinate of the actor + * A float variable, passed by reference, in which to store the x coordinate of the + * actor + * A float variable, passed by reference, in which to store the y coordinate of the + * actor + * A float variable, passed by reference, in which to store the z coordinate of the + * actor * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * @@ -187,7 +204,8 @@ native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * Players will see actor's facing angle changed only when it is restreamed to them. - * When creating an actor with CreateActor, you specify it's facing angle. You do not need to use this function unless you want to change its facing angle later. + * When creating an actor with CreateActor, you specify it's facing + * angle. You do not need to use this function unless you want to change its facing angle later. * * 1: The function executed successfully.
    * 0: The function failed to execute. The actor specified does not exist. @@ -199,7 +217,8 @@ native SetActorFacingAngle(actorid, Float:angle); * a_actor * Get the facing angle of an actor. * The ID of the actor to get the facing angle of. Returned by CreateActor - * A float variable, passed by reference, in to which the actor's facing angle will be stored + * A float variable, passed by reference, in to which the actor's facing angle will + * be stored * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! @@ -240,7 +259,8 @@ native GetActorHealth(actorid, &Float:health); * a_actor * Toggle an actor's invulnerability. * The ID of the actor to set invulnerability - * false to make them vulnerable, true to make them invulnerable (optional=true) + * false to make them vulnerable, true to make + * them invulnerable (optional=true) * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * Once set invulnerable, the actor does not call OnPlayerGiveDamageActor. * Players will have actor's invulnerability state changed only when it is restreamed to them. diff --git a/a_http.inc b/a_http.inc index 8773ad4..f1d5e99 100644 --- a/a_http.inc +++ b/a_http.inc @@ -45,11 +45,13 @@ enum HTTP_ERROR:__HTTP_ERROR /** * a_http * Sends a threaded HTTP request. - * ID used to differentiate requests that are sent to the same callback (useful for playerids) + * ID used to differentiate requests that are sent to the same callback (useful + * for playerids) * The type of request you wish to send * The URL you want to request. (Without 'http://') * Any POST data you want to send with the request - * Name of the callback function you want to use to handle responses to this request + * Name of the callback function you want to use to handle responses to this + * request * This function was added in SA-MP 0.3b and will not work in earlier versions! * 1 on success, 0 on failure. * diff --git a/a_npc.inc b/a_npc.inc index a5a3c6a..32f20b7 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -379,7 +379,8 @@ open.mp releases can use `A` as the first digit. * Indefinite number of arguments of any tag * * - * The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. + * The format string or its output should not exceed 1024 characters. Anything beyond that + * length can lead to a server to crash. * This function doesn't support packed strings. * * Format Specifiers:
    @@ -395,8 +396,14 @@ open.mp releases can use `A` as the first digit. *
  • %q - escape a text for SQLite. (Added in 0.3.7 R2)
  • * *
    - * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. - * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + * The values for the placeholders follow in the exact same order as parameters in the call. + * For example, "I am %i years old" - the %i will be replaced with an Integer + * variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder + * code. This number indicates the field width; if the size of the parameter to print at the position + * of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the + * number of decimal places beeing shown of a float, you can add .<max number> between + * the % and the f. (example: %.2f) */ #if defined _console_included static stock a_npc_unused_printf(const format[], {Float, _}:...) @@ -437,21 +444,30 @@ open.mp releases can use `A` as the first digit. *
  • %q - escape a text for SQLite. (Added in 0.3.7 R2)
  • * *
    - * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. - * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + * The values for the placeholders follow in the exact same order as parameters in the call. + * For example, "I am %i years old" - the %i will be replaced with an Integer + * variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder + * code. This number indicates the field width; if the size of the parameter to print at the position + * of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the + * number of decimal places beeing shown of a float, you can add .<max number> between + * the % and the f. (example: %.2f) */ native format(output[], len = sizeof (output), const format[], {Float, _}:...); /** * a_npc * Sets a 'timer' to call a function after some time. Can be set to repeat. - * Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server + * Name of the function to call as a string. This must be a public function + * (forwarded). A null string here will crash the server * Interval in milliseconds * Whether the timer should repeat or not * * - * Timer intervals are not accurate (roughly 25% off). There's a fix available here. - * Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. + * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * + * Timer IDs are never used twice. You can use KillTimer on a timer + * ID and it won't matter if it's running or not. * The function that should be called must be public. * The use of many timers will result in increased memory/cpu usage. * The ID of the timer that was started. Timer IDs start at 1. @@ -461,7 +477,8 @@ native SetTimer(const functionName[], interval, bool:repeating); /** * a_npc * Kills (stops) a running timer. - * The ID of the timer to kill (returned by SetTimer or SetTimerEx) + * The ID of the timer to kill (returned by SetTimer or + * SetTimerEx) * * * This function always returns 0. @@ -472,8 +489,11 @@ native KillTimer(timerid); * a_npc * Returns the uptime of the actual server (not the SA-MP server) in milliseconds. * - * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. - * One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. + * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount + * will eventually warp past the integer size constraints. However using this + * function fixes the problem. + * One common use for GetTickCount is for benchmarking. It can be used to calculate how much + * time some code takes to execute. * Uptime of the actual server (not the SA-MP server). */ native GetTickCount(); @@ -519,7 +539,8 @@ native Float:atan2(Float:y, Float:x); /** * a_npc - * This will send a player text by the bot, just like using SendPlayerMessageToAll, but this function is to be used inside the NPC scripts. + * This will send a player text by the bot, just like using SendPlayerMessageToAll, + * but this function is to be used inside the NPC scripts. * The text to be sent by the NPC * * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! @@ -528,7 +549,8 @@ native SendChat(const message[]); /** * a_npc - * This will force the NPC to write a desired command, and this way, getting the effects it would produce. + * This will force the NPC to write a desired command, and this way, getting the effects it + * would produce. * The command text to be sent by the NPC * * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! @@ -554,7 +576,8 @@ native SendCommand(const command[]); *
  • PLAYER_STATE_SPECTATING - player is spectating
  • *
  • PLAYER_STATE_EXIT_VEHICLE - player exits a vehicle
  • *
  • PLAYER_STATE_ENTER_VEHICLE_DRIVER - player enters a vehicle as driver
  • - *
  • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger
  • + *
  • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger + *
  • * * * The player's current state as an integer. @@ -572,14 +595,17 @@ native PLAYER_STATE:GetPlayerState(playerid); * * * - * This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. + * This function is known to return unreliable values when used in OnPlayerDisconnect + * and OnPlayerRequestClass. This is because the player is not + * spawned. * true on success, false on failure (i.e. player not connected). */ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); /** * a_npc - * This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. + * This function gets the ID of the vehicle the player is currently in. Note: NOT the + * model ID of the vehicle. See GetVehicleModel for that. * The ID of the player in the vehicle that you want to get the ID of * * @@ -606,8 +632,10 @@ native GetPlayerArmour(playerid); /** * a_npc - * Retrieves a player's current special action. - * The ID of the player to get the special action of + * Retrieves a player's current special + * action. + * The ID of the player to get the special + * action of * * * The special action of the player. @@ -638,12 +666,16 @@ native bool:IsVehicleStreamedIn(vehicleid); * a_npc * Check which keys a player is pressing. * The ID of the player to get the keys of - * Bitmask containing the player's key states. List of keys + * Bitmask containing the player's key states. List + * of keys * Up/down state * Left/right state * - * Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). - * As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. + * Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible + * to detect if a player presses SPACE, but you can detect if they press SPRINT (which + * can be mapped (assigned/binded) to ANY key (but is space by default)). + * As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, + * keys "W" and "S" can be detected with the "keys" parameter. * The keys are stored in the specified variables. */ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); @@ -653,8 +685,11 @@ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); * Gets the angle a player is facing. * The player you want to get the angle of * The Float to store the angle in, passed by reference - * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. - * Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. + * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA + * 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do + * 360 - angle. + * Angles returned when inside a vehicle is rarely correct. To get the correct facing angle + * while inside a vehicle, use GetVehicleZAngle. */ native GetPlayerFacingAngle(playerid, &Float:ang); @@ -717,7 +752,8 @@ native GetDistanceFromMeToPoint(Float:x, Float:y, Float:z, &Float:distance); /** * a_npc - * Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. + * Checks if a player is in range of a point. This native function is faster than the PAWN + * implementation using distance formula. * The ID of the player * The furthest distance the player can be from the point to be in range * The x coordinate of the point to check the range to @@ -742,7 +778,10 @@ native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Floa * * * - * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. + * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. + * This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can + * only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected + * and the player has to quit to choose a valid name. * The length of the player's name. 0 if player specified doesn't exist. */ native GetPlayerName(playerid, name[], len = sizeof (name)); @@ -754,14 +793,17 @@ native GetPlayerName(playerid, name[], len = sizeof (name)); * * * - * This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. + * This function can be omitted in a lot of cases. Many other functions already have some + * sort of connection check built in. * 1 if the player is connected, 0 if not. */ native bool:IsPlayerConnected(playerid); /** * a_npc - * This will run a .rec file which has to be saved in the npcmodes/recordings folder. These files allow the NPC to follow certain actions. Their actions can be recorded manually. For more information, check the related functions. + * This will run a .rec file which has to be saved in the npcmodes/recordings folder. These + * files allow the NPC to follow certain actions. Their actions can be recorded manually. For more + * information, check the related functions. * The type of recording to be loaded * The filename to be loaded, without the .rec extension * @@ -771,7 +813,8 @@ native StartRecordingPlayback(PLAYER_RECORDING_TYPE:playbackType, const recordFi /** * a_npc - * This will stop the current .rec file which is being ran by the NPC, making it stay idle until some other order is given. + * This will stop the current .rec file which is being ran by the NPC, making it stay idle + * until some other order is given. * * This NPC function was added in SA-MP 0.3a and will not work in earlier versions! */ @@ -854,7 +897,10 @@ forward OnNPCEnterVehicle(vehicleid, seatid); forward OnNPCExitVehicle(); /** - * This callback gets called whenever the NPC sees a ClientMessage. This will be everytime a SendClientMessageToAll function is used and everytime a SendClientMessage function is sent towards the NPC. This callback won't be called when someone says something. For a version of this with player text, see OnPlayerText. + * This callback gets called whenever the NPC sees a ClientMessage. This will be everytime + * a SendClientMessageToAll function is used and everytime a SendClientMessage function is sent towards the NPC. This callback + * won't be called when someone says something. For a version of this with player text, see OnPlayerText. * The colour the ClientMessage is * The actual message * @@ -870,7 +916,8 @@ forward OnClientMessage(colour, text[]); forward OnPlayerDeath(playerid); /** - * Opposed to the player version of this callback, this callback is called everytime anyone says anything in the chat. This includes any player, any other NPC, or the same NPC himself. + * Opposed to the player version of this callback, this callback is called everytime anyone + * says anything in the chat. This includes any player, any other NPC, or the same NPC himself. * The player who has written something in the chat * The text written by playerid * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! @@ -878,7 +925,8 @@ forward OnPlayerDeath(playerid); forward OnPlayerText(playerid, text[]); /** - * This callback is called when a player is streamed in for an NPC. Only nearby players are streamed in. + * This callback is called when a player is streamed in for an NPC. Only nearby players are + * streamed in. * The ID of the player that is now streamed in for the NPC * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! */ @@ -892,7 +940,8 @@ forward OnPlayerStreamIn(playerid); forward OnPlayerStreamOut(playerid); /** - * This callback is called when a vehicle is streamed by the NPC. A simpler definition would be when the NPC sees the grey vehicle icon appear on his map. + * This callback is called when a vehicle is streamed by the NPC. A simpler definition would + * be when the NPC sees the grey vehicle icon appear on his map. * The vehicle that has been streamed * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! */ @@ -906,7 +955,8 @@ forward OnVehicleStreamIn(vehicleid); forward OnVehicleStreamOut(vehicleid); /** - * This callback is called when a recorded file being reproduced with StartRecordingPlayback has reached to its end. + * This callback is called when a recorded file being reproduced with StartRecordingPlayback + * has reached to its end. * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! */ forward OnRecordingPlaybackEnd(); diff --git a/a_objects.inc b/a_objects.inc index db28701..f08b5a8 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -62,7 +62,9 @@ enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN * The x rotation of the object * The y rotation of the object * The z rotation of the object - * The distance that San Andreas renders objects at. 0.0 will cause objects to render at their default distances. Usable since 0.3b, limited to 300 prior to 0.3x (optional=0.0) + * The distance that San Andreas renders objects at. 0.0 will + * cause objects to render at their default distances. Usable since 0.3b, limited to 300 prior + * to 0.3x (optional=0.0) * * * @@ -75,19 +77,29 @@ enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN * * * - * Objects that emit light (lampposts, police lights, bollard lights, neons etc.) that have a greater rotation than 16.26 degrees (or -16.26) on either the x or y axis will stop shining. This effect also applies to light objects attached to other objects, players and vehicles. - * If a light object is attached to a car and the car is rotated over 16.26 degrees (like in a rollover), the object will also stop emitting light. This is a GTA:SA issue and is not caused by a bug in SA-MP. + * Objects that emit light (lampposts, police lights, bollard lights, neons etc.) that have a greater + * rotation than 16.26 degrees (or -16.26) on either the x or y axis will + * stop shining. This effect also applies to light objects attached to other objects, players and vehicles. + * If a light object is attached to a car and the car is rotated over 16.26 degrees + * (like in a rollover), the object will also stop emitting light. This is a GTA:SA issue and is not + * caused by a bug in SA-MP. * - * In case the light is attached to another object, one fix for this is to set SyncRotation to false in AttachObjectToObject. This will ensure the light stays at 0 rotation. This would only really work for objects that consist ONLY of light, so wouldn't work for the police light for example. - * There is a limit of 1000 objects (MAX_OBJECTS). To circumvent this limit, you can use a streamer - * The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. + * In case the light is attached to another object, one fix for this is to set SyncRotation + * to false in AttachObjectToObject. This will ensure the light + * stays at 0 rotation. This would only really work for objects that consist ONLY of + * light, so wouldn't work for the police light for example. + * There is a limit of 1000 objects + * (MAX_OBJECTS). To circumvent this limit, you can use a streamer + * The ID of the object that was created, or INVALID_OBJECT_ID if the object + * limit (MAX_OBJECTS) was reached. */ native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, Float:rotZ, Float:drawDistance = 0.0); /** * a_objects * Attach an object to a vehicle. - * The ID of the object to attach to the vehicle. Note that this is an object ID, not a model ID. The object must be CreateObject created first + * The ID of the object to attach to the vehicle. Note that this is an object + * ID, not a model ID. The object must be CreateObject created first * The ID of the vehicle to attach the object to * The x axis offset from the vehicle to attach the object to * The y axis offset from the vehicle to attach the object to @@ -101,13 +113,16 @@ native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, * * This function was added in SA-MP 0.3c and will not work in earlier versions! * The object must be created first. - * When the vehicle is destroyed or respawned, the attached objects won't be destroyed with it; they will remain stationary at the position the vehicle disappeared and be reattached to the next vehicle to claim the vehicle ID that the objects were attached to. + * When the vehicle is destroyed or respawned, the attached objects won't be destroyed with + * it; they will remain stationary at the position the vehicle disappeared and be reattached to the + * next vehicle to claim the vehicle ID that the objects were attached to. */ native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /** * a_objects - * You can use this function to attach objects to other objects. The objects will folow the main object. + * You can use this function to attach objects to other objects. The objects will folow the + * main object. * The object to attach to another object * The object to attach the object to * The distance between the main object and the object in the x direction @@ -116,7 +131,8 @@ native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, F * The x rotation between the object and the main object * The y rotation between the object and the main object * The z rotation between the object and the main object - * If set to 0, objectid's rotation will not change with 's (optional=1) + * If set to 0, objectid's rotation will not change with 's (optional=1) * * * @@ -124,12 +140,15 @@ native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, F * *
      *
    • Both objects need to be created before attempting to attach them.
    • - *
    • There is no player-object version of this function (AttachPlayerObjectToObject), meaning it will not be supported by streamers.
    • + *
    • There is no player-object version of this function (AttachPlayerObjectToObject), meaning + * it will not be supported by streamers.
    • *
    *
    * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. + * 0: The function failed to execute. This means the first object () does not exist. There are no internal checks to verify that the second object () exists. *
    */ native AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); @@ -204,7 +223,8 @@ native SetObjectRot(objectid, Float:rotX, Float:rotY, Float:rotZ); /** * a_objects - * Use this function to get the objects current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. + * Use this function to get the objects current rotation. The rotation is saved by reference + * in three rotX/rotY/rotZ variables. * The objectid of the object you want to get the rotation from * The variable to store the x rotation, passed by reference * The variable to store the y rotation, passed by reference @@ -235,7 +255,8 @@ native GetObjectModel(objectid); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). + * This only works outside the map boundaries (past -3000/3000 + * units on the x and/or y axis). * * 1: The function executed successfully.
    * 0: The function failed to execute. The object specified does not exist. @@ -267,7 +288,8 @@ native DestroyObject(objectid); /** * a_objects - * Move an object to a new position with a set speed. Players/vehicles will 'surf' the object as it moves. + * Move an object to a new position with a set speed. Players/vehicles will 'surf' the object + * as it moves. * The ID of the object to move * The x coordinate to move the object to * The y coordinate to move the object to @@ -283,8 +305,14 @@ native DestroyObject(objectid); * * * - * This function can be used to make objects rotate smoothly. In order to achieve this however, the object must also be moved. The specified rotation is the rotation the object will have after the movement. Hence the object will not rotate when no movement is applied. For a script example take a look at the ferriswheel.pwn filterscript made by Kye included in the server package (SA-MP 0.3d and above). - * To fully understand the above note, you can (but not limited to) increase the z position by (+0.001) and then (-0.001) after moving it again, as not changing the x, y or z will not rotate the object. + * This function can be used to make objects rotate smoothly. In order to achieve this however, + * the object must also be moved. The specified rotation is the rotation the object will have + * after the movement. Hence the object will not rotate when no movement is applied. For a script + * example take a look at the ferriswheel.pwn filterscript made by Kye included in the server package + * (SA-MP 0.3d and above). + * To fully understand the above note, you can (but not limited to) increase the z position + * by (+0.001) and then (-0.001) after moving it again, as not changing + * the x, y or z will not rotate the object. * The time it will take for the object to move in milliseconds. */ native MoveObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rotX = -1000.0, Float:rotY = -1000.0, Float:rotZ = -1000.0); @@ -315,7 +343,8 @@ native bool:IsObjectMoving(objectid); /** * a_objects - * Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical User Interface). + * Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical + * User Interface). * The ID of the player that should edit the object * The ID of the object to be edited by the player * @@ -323,9 +352,11 @@ native bool:IsObjectMoving(objectid); * * * This function was added in SA-MP 0.3e and will not work in earlier versions! - * You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. + * You can move the camera while editing by pressing and holding the spacebar (or W + * in vehicle) and moving your mouse. * - * 1: The function executed successfully. Success is reported when a non-existent object is specified, but nothing will happen.
    + * 1: The function executed successfully. Success is reported when a non-existent object + * is specified, but nothing will happen.
    * 0: The function failed to execute. The player is not connected. *
    */ @@ -341,7 +372,8 @@ native EditObject(playerid, objectid); * * * This function was added in SA-MP 0.3e and will not work in earlier versions! - * You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. + * You can move the camera while editing by pressing and holding the spacebar (or W + * in vehicle) and moving your mouse. * * 1: The function executed successfully.
    * 0: The function failed to execute. Player or object not valid. @@ -351,7 +383,8 @@ native EditPlayerObject(playerid, objectid); /** * a_objects - * Display the cursor and allow the player to select an object. OnPlayerSelectObject is called when the player selects an object. + * Display the cursor and allow the player to select an object. OnPlayerSelectObject + * is called when the player selects an object. * The ID of the player that should be able to select the object * * @@ -385,7 +418,10 @@ native CancelEdit(playerid); * The x rotation of the object * The y rotation of the object * The z rotation of the object - * The distance from which objects will appear to players. 0.0 will cause an object to render at its default distance. Leaving this parameter out will cause objects to be rendered at their default distance. The maximum usable distance is 300 in versions prior to 0.3x, in which drawdistance can be unlimited (optional=0.0) + * The distance from which objects will appear to players. 0.0 + * will cause an object to render at its default distance. Leaving this parameter out will cause objects + * to be rendered at their default distance. The maximum usable distance is 300 in versions + * prior to 0.3x, in which drawdistance can be unlimited (optional=0.0) * * * @@ -397,8 +433,10 @@ native CancelEdit(playerid); * * * - * The 'DrawDistance' parameter was added in 0.3b. It must be left out in scripts for older versions of SA:MP. - * The ID of the object that was created, or INVALID_OBJECT_ID if the object limit (MAX_OBJECTS) was reached. + * The 'DrawDistance' parameter was added in 0.3b. It must be left out in scripts for + * older versions of SA:MP. + * The ID of the object that was created, or INVALID_OBJECT_ID if the object + * limit (MAX_OBJECTS) was reached. */ native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, Float:rotZ, Float:drawDistance = 0.0); @@ -456,7 +494,8 @@ native SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z); * * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player and/or the object don't exist.
    + * 0: The function failed to execute. The player and/or the object don't exist.
    * The object's position is stored in the specified variables. *
    */ @@ -484,7 +523,8 @@ native SetPlayerObjectRot(playerid, objectid, Float:rotX, Float:rotY, Float:rotZ /** * a_objects - * Use this function to get the object's current rotation. The rotation is saved by reference in three rotX/rotY/rotZ variables. + * Use this function to get the object's current rotation. The rotation is saved by reference + * in three rotX/rotY/rotZ variables. * The player you associated this object to * The objectid of the object you want to get the rotation from * The variable to store the x rotation, passed by reference @@ -506,7 +546,8 @@ native GetPlayerObjectRot(playerid, objectid, &Float:rotX, &Float:rotY, &Float:r * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * The model ID of the player object. If the player or object don't exist, it will return -1 or 0 if the player or object does not exist. + * The model ID of the player object. If the player or object don't exist, it will return + * -1 or 0 if the player or object does not exist. */ native GetPlayerObjectModel(playerid, objectid); @@ -518,7 +559,8 @@ native GetPlayerObjectModel(playerid, objectid); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). + * This only works outside the map boundaries (past -3000/3000 + * units on the x and/or y axis). * 1 regardless of if the object exists or not. */ native SetPlayerObjectNoCameraCol(playerid, objectid); @@ -548,7 +590,8 @@ native DestroyPlayerObject(playerid, objectid); /** * a_objects - * Move a player object with a set speed. Also supports rotation. Players/vehicles will surf moving objects. + * Move a player object with a set speed. Also supports rotation. Players/vehicles will surf + * moving objects. * The ID of the player whose player-object to move * The ID of the object to move * The x coordinate to move the object to @@ -572,7 +615,8 @@ native MovePlayerObject(playerid, objectid, Float:x, Float:y, Float:z, Float:spe /** * a_objects - * Stop a moving player-object after MovePlayerObject has been used. + * Stop a moving player-object after MovePlayerObject has been + * used. * The ID of the player whose player-object to stop * The ID of the player-object to stop * @@ -621,10 +665,14 @@ native AttachPlayerObjectToPlayer(playerid, objectid, parentid, Float:offsetX, F * Replace the texture of an object with the texture from another model in the game. * The ID of the object to change the texture of * The material index on the object to change (0 to 15) - * The modelid on which the replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the texture - * The name of the txd file which contains the replacement texture (use "none" if not required) - * The name of the texture to use as the replacement (use "none" if not required) - * The object colour to set, as an integer or hex in ARGB colour format. Using 0 keeps the existing material colour (optional=0) + * The modelid on which the replacement texture is located. Use 0 + * for alpha. Use -1 to change the material colour without altering the texture + * The name of the txd file which contains the replacement texture (use + * "none" if not required) + * The name of the texture to use as the replacement (use "none" + * if not required) + * The object colour to set, as an integer or hex in ARGB colour + * format. Using 0 keeps the existing material colour (optional=0) * * * This function was added in SA-MP 0.3e and will not work in earlier versions! @@ -642,10 +690,14 @@ native SetObjectMaterial(objectid, materialIndex, modelid, const textureLibrary[ * The ID of the player the object is associated to * The ID of the object to replace the texture of * The material index on the object to change (0 to 15) - * The modelid on which replacement texture is located. Use 0 for alpha. Use -1 to change the material colour without altering the existing texture - * The name of the txd file which contains the replacement texture (use "none" if not required) - * The name of the texture to use as the replacement (use "none" if not required) - * The object colour to set (ARGB). Using 0 keeps the existing material colour (optional=0) + * The modelid on which replacement texture is located. Use 0 for + * alpha. Use -1 to change the material colour without altering the existing texture + * The name of the txd file which contains the replacement texture (use + * "none" if not required) + * The name of the texture to use as the replacement (use "none" + * if not required) + * The object colour to set (ARGB). Using 0 keeps + * the existing material colour (optional=0) * * * This function was added in SA-MP 0.3e and will not work in earlier versions! @@ -755,12 +807,15 @@ native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialInd /** * a_objects * Allows camera collisions with newly created objects to be disabled by default. - * 1 to disable camera collisions for newly created objects and 0 to enable them (enabled by default) + * 1 to disable camera collisions for newly created objects and + * 0 to enable them (enabled by default) * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function only affects the camera collision of objects created AFTER its use - it does not toggle existing objects' camera collisions. - * This only works outside the map boundaries (past -3000/3000 units on the x and/or y axis). + * This function only affects the camera collision of objects created AFTER its use - it does + * not toggle existing objects' camera collisions. + * This only works outside the map boundaries (past -3000/3000 + * units on the x and/or y axis). */ native SetObjectsDefaultCameraCol(bool:disable); diff --git a/a_players.inc b/a_players.inc index ff51586..918c7e3 100644 --- a/a_players.inc +++ b/a_players.inc @@ -155,7 +155,11 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE /** * a_players - * This function can be used to change the spawn information of a specific player. It allows you to automatically set someone's spawn weapons, their team, skin and spawn position, normally used in case of minigames or automatic-spawn systems. This function is more crash-safe then using SetPlayerSkin in OnPlayerSpawn and/or OnPlayerRequestClass, even though this has been fixed in 0.2. + * This function can be used to change the spawn information of a specific player. It allows + * you to automatically set someone's spawn weapons, their team, skin and spawn position, normally used + * in case of minigames or automatic-spawn systems. This function is more crash-safe then using SetPlayerSkin in OnPlayerSpawn and/or OnPlayerRequestClass, + * even though this has been fixed in 0.2. * The Playerid of who you want to set the spawn information * The Team-ID of the chosen player * The skin which the player will spawn with @@ -163,11 +167,14 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE * The y-coordinate of the player's spawn position * The z-coordinate of the player's spawn position * The direction in which the player needs to be facing after spawning - * The first spawn-weapon for the player + * The first spawn-weapon for + * the player * The amount of ammunition for the primary spawnweapon - * The second spawn-weapon for the player + * The second spawn-weapon for + * the player * The amount of ammunition for the second spawnweapon - * The third spawn-weapon for the player + * The third spawn-weapon for + * the player * The amount of ammunition for the third spawnweapon * * @@ -204,7 +211,8 @@ native SpawnPlayer(playerid); * * * - * Using this function on a player in a vehicle will instantly remove them from the vehicle. Useful for quickly ejecting players. + * Using this function on a player in a vehicle will instantly remove them from the vehicle. + * Useful for quickly ejecting players. * * 1: The function executed successfully.
    * 0: The function failed to execute. This means the player specified does not exist. @@ -214,14 +222,18 @@ native SetPlayerPos(playerid, Float:x, Float:y, Float:z); /** * a_players - * This sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position. + * This sets the players position then adjusts the players z-coordinate to the nearest solid + * ground under the position. * The ID of the player to set the position of * The x coordinate to position the player at * The x coordinate to position the player at * The z coordinate to position the player at * * - * This function does not work if the new coordinates are far away from where the player currently is. The z height will be 0, which will likely put them underground. It is highly recommended that the MapAndreas plugin be used instead. + * This function does not work if the new coordinates are far away from where the player currently + * is. The z height will be 0, which will likely put them underground. It is highly + * recommended that the MapAndreas plugin + * be used instead. * * 1: The function executed successfully.
    * 0: The function failed to execute. This means the player specified does not exist. @@ -240,7 +252,9 @@ native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z); * * * - * This function is known to return unreliable values when used in OnPlayerDisconnect and OnPlayerRequestClass. This is because the player is not spawned. + * This function is known to return unreliable values when used in OnPlayerDisconnect + * and OnPlayerRequestClass. This is because the player is not + * spawned. * true on success, false on failure (i.e. player not connected). */ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); @@ -252,7 +266,9 @@ native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z); * The angle the player should face * * - * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. + * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA + * 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do + * 360 - angle. * * 1: The function executed successfully.
    * 0: The function failed to execute. The player specified does not exist. @@ -267,14 +283,18 @@ native SetPlayerFacingAngle(playerid, Float:ang); * The Float to store the angle in, passed by reference * * - * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do 360 - angle. - * Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use GetVehicleZAngle. + * Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA + * 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do + * 360 - angle. + * Angles returned when inside a vehicle is rarely correct. To get the correct facing angle + * while inside a vehicle, use GetVehicleZAngle. */ native GetPlayerFacingAngle(playerid, &Float:ang); /** * a_players - * Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula. + * Checks if a player is in range of a point. This native function is faster than the PAWN + * implementation using distance formula. * The ID of the player * The furthest distance the player can be from the point to be in range * The x coordinate of the point to check the range to @@ -315,17 +335,21 @@ native Float:GetPlayerDistanceFromPoint(playerid, Float:x, Float:y, Float:z); * * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * Players aren't streamed in on their own client, so if playerid is the same as targetid it will return false! - * Players stream out if they are more than 150 meters away (see server.cfg - stream_distance) + * Players aren't streamed in on their own client, so if playerid is the same as targetid it + * will return false! + * Players stream out if they are more than 150 meters away (see server.cfg + * - stream_distance) * 1 if the player is streamed in, 0 if not. */ native bool:IsPlayerStreamedIn(targetid, playerid); /** * a_players - * Set a player's interior. A list of currently known interiors and their positions can be found here. + * Set a player's interior. A list of currently known interiors and their positions can be + * found here. * The ID of the player to set the interior of - * The interior ID to set the player in + * The interior ID to + * set the player in * * * @@ -338,7 +362,8 @@ native SetPlayerInterior(playerid, interiorid); /** * a_players - * Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page. + * Retrieves the player's current interior. A list of currently known interiors with their + * positions can be found on this page. * The player to get the interior ID of * * @@ -351,13 +376,15 @@ native GetPlayerInterior(playerid); * a_players * Set the health of a player. * The ID of the player to set the health of - * The value to set the player's health to. Max health that can be displayed in the HUD is 100, though higher values are valid + * The value to set the player's health to. Max health that can be displayed in + * the HUD is 100, though higher values are valid * * * * Health is obtained rounded to integers: set 50.15, but get 50.0 * If a player's health is set to 0 or a minus value, they will die instantly. - * If a player's health is below 10 or above 98303, their health bar will flash. + * If a player's health is below 10 or above 98303, their health + * bar will flash. * * 1: The function executed successfully.
    * 0: The function failed to execute. This means the player specified does not exist. @@ -367,14 +394,17 @@ native SetPlayerHealth(playerid, Float:health); /** * a_players - * The function GetPlayerHealth allows you to retrieve the health of a player. Useful for cheat detection, among other things. + * The function GetPlayerHealth allows you to retrieve the health of a player. Useful for + * cheat detection, among other things. * The ID of the player * Float to store health, passed by reference * * * * - * Even though the health can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc.
    + * Even though the health can be set to near infinite values on the server side, the individual clients + * will only report values up to 255. Anything higher will wrap around; 256 + * becomes 0, 257 becomes 1, etc.
    * Health is obtained rounded to integers: set 50.15, but get 50.0 *
    * @@ -388,12 +418,14 @@ native GetPlayerHealth(playerid, &Float:health); * a_players * Set a player's armor level. * The ID of the player to set the armour of - * The amount of armour to set, as a percentage (float). Values larger than 100 are valid, but won't be displayed in the HUD's armour bar + * The amount of armour to set, as a percentage (float). Values larger than 100 + * are valid, but won't be displayed in the HUD's armour bar * * * * Armour is obtained rounded to integers: set 50.15, but get 50.0 - * The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. + * The function's name is armour, not armor (Americanized). This is inconsistent with the + * rest of SA-MP, so remember that. * * 1: The function executed successfully.
    * 0: The function failed to execute. This means the player specified does not exist. @@ -409,9 +441,13 @@ native SetPlayerArmour(playerid, Float:armour); * * * - * Even though the armour can be set to near infinite values on the server side, the individual clients will only report values up to 255. Anything higher will wrap around; 256 becomes 0, 257 becomes 1, etc. - * Armour is obtained rounded to integers: set 50.15, but get 50.0 - * The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that. + * Even though the armour can be set to near infinite values on the server side, the individual + * clients will only report values up to 255. Anything higher will wrap around; 256 + * becomes 0, 257 becomes 1, etc. + * Armour is obtained rounded to integers: set 50.15, but get 50.0 + * + * The function's name is armour, not armor (Americanized). This is inconsistent with the + * rest of SA-MP, so remember that. * * 1 - success.
    * 0 - failure (i.e. player not connected).
    @@ -423,14 +459,18 @@ native GetPlayerArmour(playerid, &Float:armour); * a_players * Set the ammo of a player's weapon. * The ID of the player to set the weapon ammo of - * The ID of the weapon to set the ammo of. + * The ID of the weapon to set + * the ammo of. * The amount of ammo to set * * * - * Set the ammo to 0 to remove a weapon from a player's inventory. Note that the weapon will still show up in GetPlayerWeaponData, albeit with 0 ammo. + * Set the ammo to 0 to remove a weapon from a player's inventory. Note that + * the weapon will still show up in GetPlayerWeaponData, albeit with + * 0 ammo. * - * 1: The function executed successfully. Success is also returned when the weapon specified is invalid.
    + * 1: The function executed successfully. Success is also returned when the weapon + * specified is invalid.
    * 0: The function failed to execute. The player isn't connected.
    *
    */ @@ -442,7 +482,8 @@ native SetPlayerAmmo(playerid, WEAPON:weaponid, ammo); * The ID of the player whose ammo to get * * - * The ammo can hold 16-bit values, therefore values over 32767 will return erroneous values. + * The ammo can hold 16-bit values, therefore values over 32767 will return erroneous + * values. * The amount of ammo in the player's current weapon. */ native GetPlayerAmmo(playerid); @@ -476,7 +517,8 @@ native WEAPONSTATE:GetPlayerWeaponState(playerid); * * This function was added in SA-MP 0.3d and will not work in earlier versions! * Does not work for joypads/controllers, and after a certain distance. - * Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. + * Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't + * and won't return a player. * The ID of the target player, or INVALID_PLAYER_ID if none. */ native GetPlayerTargetPlayer(playerid); @@ -490,7 +532,8 @@ native GetPlayerTargetPlayer(playerid); * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * Does not work for joypads/controllers, and after a certain distance. - * Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. + * Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't + * and won't return a player. * The ID of the targeted actor, or INVALID_ACTOR_ID if none. */ native GetPlayerTargetActor(playerid); @@ -499,12 +542,16 @@ native GetPlayerTargetActor(playerid); * a_players * Set the team of a player. * The ID of the player you want to set the team of - * The team to put the player in. Use NO_TEAM to remove the player from any team + * The team to put the player in. Use NO_TEAM to remove the player + * from any team * * * - * Players can not damage/kill players on the same team unless they use a knife to slit their throat. As of SA-MP 0.3x, players are also unable to damage vehicles driven by a player from the same team. This can be enabled with EnableVehicleFriendlyFire. - * 255 (or NO_TEAM) is the default team to be able to shoot other players, not 0. + * Players can not damage/kill players on the same team unless they use a knife to slit their + * throat. As of SA-MP 0.3x, players are also unable to damage vehicles driven by a player from + * the same team. This can be enabled with EnableVehicleFriendlyFire. + * 255 (or NO_TEAM) is the default team to be able to shoot other + * players, not 0. */ native SetPlayerTeam(playerid, teamid); @@ -524,7 +571,8 @@ native GetPlayerTeam(playerid); /** * a_players - * Set a player's score. Players' scores are shown in the scoreboard (shown by holding the TAB key). + * Set a player's score. Players' scores are shown in the scoreboard (shown by holding the + * TAB key). * The ID of the player to set the score of * The value to set the player's score to * @@ -548,8 +596,12 @@ native GetPlayerScore(playerid); /** * a_players * - * Checks the player's level of drunkenness. If the level is less than 2000, the player is sober. The player's level of drunkness goes down slowly automatically (1 level per frame) but will always reach 2000 at the end (in 0.3b it will stop at 0). - * The higher drunkenness levels affect the player's camera, and the car driving handling. The level of drunkenness increases when the player drinks from a bottle (You can use SetPlayerSpecialAction to give them bottles). + * Checks the player's level of drunkenness. If the level is less than 2000, the player + * is sober. The player's level of drunkness goes down slowly automatically (1 level per frame) but + * will always reach 2000 at the end (in 0.3b it will stop at 0). + * The higher drunkenness levels affect the player's camera, and the car driving handling. The level + * of drunkenness increases when the player drinks from a bottle (You can use SetPlayerSpecialAction + * to give them bottles). * * The player you want to check the drunkenness level of * @@ -560,14 +612,19 @@ native GetPlayerDrunkLevel(playerid); /** * a_players - * Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control. + * Sets the drunk level of a player which makes the player's camera sway and vehicles hard + * to control. * The ID of the player to set the drunkenness of * The level of drunkenness to set * * - * Players' drunk level will automatically decrease over time, based on their FPS (players with 50 FPS will lose 50 'levels' per second. This is useful for determining a player's FPS!).
    - * In 0.3a the drunk level will decrement and stop at 2000. In 0.3b+ the drunk level decrements to 0)
    - * Levels over 2000 make the player drunk (camera swaying and vehicles difficult to control).
    + * Players' drunk level will automatically decrease over time, based on their FPS (players with 50 + * FPS will lose 50 'levels' per second. This is useful for determining a player's FPS!).
    + * In 0.3a the drunk level will decrement and stop at 2000. In 0.3b+ + * the drunk level decrements to 0)
    + * Levels over 2000 make the player drunk (camera swaying and vehicles difficult to + * control).
    * Max drunk level is 50000.
    * While the drunk level is above 5000, the player's HUD (radar etc.) will be hidden. *
    @@ -586,8 +643,10 @@ native SetPlayerDrunkLevel(playerid, level); * * * - * This function will change player's colour for everyone, even if player's colour was changed with SetPlayerMarkerForPlayer for any other player. - * If used under OnPlayerConnect, the affecting player will not see the colour in the TAB menu. + * This function will change player's colour for everyone, even if player's colour was changed + * with SetPlayerMarkerForPlayer for any other player. + * If used under OnPlayerConnect, the affecting player will + * not see the colour in the TAB menu. */ native SetPlayerColor(playerid, colour); @@ -597,7 +656,8 @@ native SetPlayerColor(playerid, colour); * The ID of the player to get the colour of * * - * GetPlayerColor will return 0 unless SetPlayerColor has been used first. + * GetPlayerColor will return 0 unless SetPlayerColor + * has been used first. * The player's colour. 0 if no colour set or player not connected. */ native GetPlayerColor(playerid); @@ -609,12 +669,17 @@ native GetPlayerColor(playerid); * The skin the player should use * * - * If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, they will become frozen or otherwise glitched. This can be fixed by using TogglePlayerControllable. Players can be detected as being crouched through GetPlayerSpecialAction (SPECIAL_ACTION_DUCK). + * If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, + * they will become frozen or otherwise glitched. This can be fixed by using TogglePlayerControllable. + * Players can be detected as being crouched through GetPlayerSpecialAction + * (SPECIAL_ACTION_DUCK). * Setting a player's skin when he is dead may crash players around him. - * Note that 'success' is reported even when skin ID is invalid (not 0-311, or 74), but the skin will be set to ID 0 (CJ). + * Note that 'success' is reported even when skin ID is invalid (not 0-311, + * or 74), but the skin will be set to ID 0 (CJ). * * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the player specified does not exist.
    + * 0: The function failed to execute. This means the player specified does not exist.
    *
    */ native SetPlayerSkin(playerid, skinid); @@ -624,8 +689,10 @@ native SetPlayerSkin(playerid, skinid); * Returns the class of the players skin. * The player you want to get the skin from * - * Returns the new skin after SetSpawnInfo is called but before the player actually respawns to get the new skin. - * Returns the old skin if the player was spawned through SpawnPlayer function. + * Returns the new skin after SetSpawnInfo is called but before + * the player actually respawns to get the new skin. + * Returns the old skin if the player was spawned through SpawnPlayer + * function. * The skin ID (0 if invalid). */ native GetPlayerSkin(playerid); @@ -635,8 +702,10 @@ native GetPlayerSkin(playerid); * Returns the class of the players skin. * The player you want to get the skin from * - * Returns the new skin after SetSpawnInfo is called but before the player actually respawns to get the new skin. - * Returns the old skin if the player was spawned through SpawnPlayer function. + * Returns the new skin after SetSpawnInfo is called but before + * the player actually respawns to get the new skin. + * Returns the old skin if the player was spawned through SpawnPlayer + * function. * The skin id (0 if invalid). */ native GetPlayerCustomSkin(playerid); @@ -678,9 +747,11 @@ native ResetPlayerWeapons(playerid); * * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * This function arms a player with a weapon they already have; it does not give them a new weapon. See GivePlayerWeapon. + * This function arms a player with a weapon they already have; it does not give them + * a new weapon. See GivePlayerWeapon. * - * 1: The function executed successfully. Success is returned even when the function fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).
    + * 1: The function executed successfully. Success is returned even when the function + * fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).
    * 0: The function failed to execute. The player is not connected. *
    */ @@ -688,7 +759,8 @@ native SetPlayerArmedWeapon(playerid, WEAPON:weaponid); /** * a_players - * Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot). + * Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' + * slot). * The ID of the player whose weapon data to retrieve * The weapon slot to get data for (0-12) * A variable in which to store the weapon ID, passed by reference @@ -698,7 +770,8 @@ native SetPlayerArmedWeapon(playerid, WEAPON:weaponid); * Old weapons with no ammo left are still returned. * * 1: The function executed successfully.
    - * 0: The function failed to execute. The player isn't connected and/or the weapon slot specified is invalid (valid is 0-12). + * 0: The function failed to execute. The player isn't connected and/or the weapon + * slot specified is invalid (valid is 0-12). *
    */ native GetPlayerWeaponData(playerid, slot, &WEAPON:weapons, &ammo); @@ -734,12 +807,19 @@ native ResetPlayerMoney(playerid); * a_players * Sets the name of a player. * The ID of the player to set the name of - * The name to set. Must be 1-24 characters long and only contain valid characters (0-9, a-z, A-z, [], (), $, @, ., _, =) + * The name to set. Must be 1-24 characters long and only contain valid characters + * (0-9, a-z, A-z, [], (), $, @, ., _, + * =) * - * Changing the players' name to the same name but with different character cases (e.g. "John" to "JOHN") will not work. - * If used in OnPlayerConnect, the new name will not be shown for the connecting player. + * Changing the players' name to the same name but with different character cases (e.g. "John" + * to "JOHN") will not work. + * If used in OnPlayerConnect, the new name will not + * be shown for the connecting player. * Passing a null string as the new name will crash the server. - * Player names can be up to 24 characters when using this function, but when joining the server from the SA-MP server browser, players' names must be no more than 20 and less than 3 characters (the server will deny entry). This allows for 4 characters extra when using SetPlayerName. + * Player names can be up to 24 characters when using this function, but when joining the server + * from the SA-MP server browser, players' names must be no more than 20 and less than 3 characters + * (the server will deny entry). This allows for 4 characters extra when using SetPlayerName. + * * * 1 The name was changed successfully.
    * 0 The player already has that name.
    @@ -777,7 +857,8 @@ native GetPlayerMoney(playerid); *
  • PLAYER_STATE_SPECTATING - player is spectating
  • *
  • PLAYER_STATE_EXIT_VEHICLE - player exits a vehicle
  • *
  • PLAYER_STATE_ENTER_VEHICLE_DRIVER - player enters a vehicle as driver
  • - *
  • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger
  • + *
  • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger + *
  • * * * The player's current state as an integer. @@ -797,14 +878,18 @@ native PLAYER_STATE:GetPlayerState(playerid); * * * - * This function does not work when used in OnPlayerDisconnect because the player is already disconnected. It will return an invalid IP (255.255.255.255). Save players' IPs under OnPlayerConnect if they need to be used under OnPlayerDisconnect. + * This function does not work when used in OnPlayerDisconnect + * because the player is already disconnected. It will return an invalid IP (255.255.255.255). + * Save players' IPs under OnPlayerConnect if they need to be used under + * OnPlayerDisconnect. * 1 on success and 0 on failure. */ native GetPlayerIp(playerid, ip[], len = sizeof (ip)); /** * a_players - * Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back. + * Get the ping of a player. The ping measures the amount of time it takes for the server + * to 'ping' the client and for the client to send the message back. * The ID of the player to get the ping of * * @@ -821,8 +906,11 @@ native GetPlayerPing(playerid); * * * - * Prior to version 0.3z R1-2, when the player state is PLAYER_STATE_PASSENGER this function returns the weapon held by the player before they entered the vehicle. If a cheat is used to spawn a weapon inside a vehicle, this function will not report it. - * The ID of the player's current weapon. Returns -1 if the player specified does not exist. + * Prior to version 0.3z R1-2, when the player state is PLAYER_STATE_PASSENGER + * this function returns the weapon held by the player before they entered the vehicle. If a cheat + * is used to spawn a weapon inside a vehicle, this function will not report it. + * The ID of the player's current weapon. Returns -1 if the player specified + * does not exist. */ native WEAPON:GetPlayerWeapon(playerid); @@ -830,12 +918,16 @@ native WEAPON:GetPlayerWeapon(playerid); * a_players * Check which keys a player is pressing. * The ID of the player to get the keys of - * Bitmask containing the player's key states. List of keys + * Bitmask containing the player's key states. List + * of keys * Up/down state * Left/right state * - * Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)). - * As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. + * Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible + * to detect if a player presses SPACE, but you can detect if they press SPRINT (which + * can be mapped (assigned/binded) to ANY key (but is space by default)). + * As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, + * keys "W" and "S" can be detected with the "keys" parameter. * The keys are stored in the specified variables. */ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); @@ -851,14 +943,18 @@ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); * * * - * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name. + * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. + * This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can + * only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected + * and the player has to quit to choose a valid name. * The length of the player's name. 0 if player specified doesn't exist. */ native GetPlayerName(playerid, name[], len = sizeof (name)); /** * a_players - * Sets the game time for a player. If a player's clock is enabled (TogglePlayerClock) the time displayed by it will update automatically. + * Sets the game time for a player. If a player's clock is enabled (TogglePlayerClock) + * the time displayed by it will update automatically. * The ID of the player to set the game time of * Hour to set (0-23) * Minutes to set (0-59) @@ -875,7 +971,9 @@ native SetPlayerTime(playerid, hour, minute); /** * a_players - * Get the player's current game time. Set by SetWorldTime or SetPlayerTime, or by the game automatically if TogglePlayerClock is used. + * Get the player's current game time. Set by SetWorldTime or + * SetPlayerTime, or by the game automatically if TogglePlayerClock + * is used. * The ID of the player to get the game time of * A variable in which to store the hour, passed by reference * A variable in which to store the minutes, passed by reference @@ -891,7 +989,9 @@ native GetPlayerTime(playerid, &hour, &minute); /** * a_players - * Toggle the in-game clock (top-right corner) for a specific player. When this is enabled, time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) when set using SetWeather/SetPlayerWeather. + * Toggle the in-game clock (top-right corner) for a specific player. When this is enabled, + * time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) + * when set using SetWeather/SetPlayerWeather. * The player whose clock you want to enable/disable * 1 to show and 0 to hide. Hidden by default * Time is not synced with other players! Time can be synced using SetPlayerTime. @@ -910,7 +1010,8 @@ native TogglePlayerClock(playerid, bool:toggle); * The weather to set * * - * If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. + * If TogglePlayerClock is enabled, weather will slowly change + * over time, instead of changing instantly. */ native SetPlayerWeather(playerid, weather); @@ -922,7 +1023,8 @@ native SetPlayerWeather(playerid, weather); * * * - * The player will not return to class selection until they re-spawn. This can be achieved with TogglePlayerSpectating, as seen in the below example. + * The player will not return to class selection until they re-spawn. This can be achieved + * with TogglePlayerSpectating, as seen in the below example. */ native ForceClassSelection(playerid); @@ -952,12 +1054,14 @@ native GetPlayerWantedLevel(playerid); /** * a_players - * Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default). + * Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' + * key (ENTER by default). * The ID of player to set the fighting style of * The fighting style that should be set * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * This does not affect normal fist attacks - only special/secondary attacks (aim + press 'secondary attack' key). + * This does not affect normal fist attacks - only special/secondary attacks (aim + press 'secondary + * attack' key). * * Fighting styles:
    *
      @@ -1027,10 +1131,12 @@ native GetPlayerVelocity(playerid, &Float:x, &Float:y, &Float:z); /** * a_players - * This function plays a crime report for a player - just like in single-player when CJ commits a crime. + * This function plays a crime report for a player - just like in single-player when CJ commits + * a crime. * The ID of the player that will hear the crime report * The ID of the suspect player whom will be described in the crime report - * The crime ID, which will be reported as a 10-code (i.e. 10-16 if 16 was passed as the crime) + * The crime ID, which will be reported as a 10-code (i.e. 10-16 if 16 was passed + * as the crime) * * This function was added in SA-MP 0.3a and will not work in earlier versions! * @@ -1064,11 +1170,16 @@ native PlayCrimeReportForPlayer(playerid, suspectid, crime); * a_players * Play an 'audio stream' for a player. Normal audio files also work (e.g. MP3). * The ID of the player to play the audio for - * The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist - * The x position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) - * The y position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) - * The z position at which to play the audio. Has no effect unless usepos is set to 1 (optional=0.0) - * The distance over which the audio will be heard. Has no effect unless usepos is set to 1 (optional=50.0) + * The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) + * file will play that playlist + * The x position at which to play the audio. Has no effect unless usepos is set + * to 1 (optional=0.0) + * The y position at which to play the audio. Has no effect unless usepos is set + * to 1 (optional=0.0) + * The z position at which to play the audio. Has no effect unless usepos is set + * to 1 (optional=0.0) + * The distance over which the audio will be heard. Has no effect unless usepos + * is set to 1 (optional=50.0) * Use the positions and distance specified. (optional=0) * * @@ -1120,7 +1231,8 @@ native SetPlayerShopName(playerid, const shopName[]); * Set the skill level of a certain weapon type for a player. * The ID of the player to set the weapon skill of * The weapon to set the skill of - * The skill level to set for that weapon, ranging from 0 to 999. A level out of range will max it out + * The skill level to set for that weapon, ranging from 0 to 999. + * A level out of range will max it out * * * This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -1150,7 +1262,9 @@ native SetPlayerSkillLevel(playerid, WEAPONSKILL:skill, level); * * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified is not connected, INVALID_VEHICLE_ID also. + * The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or + * the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified + * is not connected, INVALID_VEHICLE_ID also. */ native GetPlayerSurfingVehicleID(playerid); @@ -1159,7 +1273,8 @@ native GetPlayerSurfingVehicleID(playerid); * Returns the ID of the object the player is surfing on. * The ID of the player surfing the object * This function was added in SA-MP 0.3c R3 and will not work in earlier versions! - * The ID of the moving object the player is surfing. If the player isn't surfing a moving object, it will return INVALID_OBJECT_ID. + * The ID of the moving object the player is surfing. If the player isn't surfing a + * moving object, it will return INVALID_OBJECT_ID. */ native GetPlayerSurfingObjectID(playerid); @@ -1175,9 +1290,13 @@ native GetPlayerSurfingObjectID(playerid); * * * This function was added in SA-MP 0.3d and will not work in earlier versions! - * There appears to be a limit of around 1000 lines/objects. There is no workaround. - * When removing the same object for a player, they will crash. Commonly, players crash when reconnecting to the server because the server removes buildings on OnPlayerConnect. - * In SA-MP 0.3.7 you can use -1 for the modelid to remove all objects within the specified radius. + * There appears to be a limit of around 1000 lines/objects. There is no workaround. + * + * When removing the same object for a player, they will crash. Commonly, players crash when + * reconnecting to the server because the server removes buildings on OnPlayerConnect. + * + * In SA-MP 0.3.7 you can use -1 for the modelid to remove all objects + * within the specified radius. */ native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, Float:centerZ, Float:radius); @@ -1185,9 +1304,12 @@ native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, * a_players * Retrieves the start and end (hit) position of the last bullet a player fired. * The ID of the player to get the last bullet shot information of - * A float variable in which to save the x coordinate of where the bullet originated from - * A float variable in which to save the y coordinate of where the bullet originated from - * A float variable in which to save the z coordinate of where the bullet originated from + * A float variable in which to save the x coordinate of where the bullet originated + * from + * A float variable in which to save the y coordinate of where the bullet originated + * from + * A float variable in which to save the z coordinate of where the bullet originated + * from * A float variable in which to save the x coordinate of where the bullet hit * A float variable in which to save the y coordinate of where the bullet hit * A float variable in which to save the z coordinate of where the bullet hit @@ -1196,8 +1318,10 @@ native RemoveBuildingForPlayer(playerid, modelid, Float:centerX, Float:centerY, * * * This function was added in SA-MP 0.3z and will not work in earlier versions! - * This function will only work when lag compensation is enabled. - * If the player hit nothing, the hit positions will be 0. This means you can't currently calculate how far a bullet travels through open air. + * This function will only work when lag + * compensation is enabled. + * If the player hit nothing, the hit positions will be 0. This means you can't + * currently calculate how far a bullet travels through open air. * * 1: The function executed successfully.
      * 0: The function failed to execute. The player specified does not exist.
      @@ -1232,8 +1356,11 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float * * * This function was added in SA-MP 0.3c and will not work in earlier versions! - * In version 0.3d and onwards, 10 objects can be attached to a single player (index 0-9). In earlier versions, the limit is 5 (index 0-4). - * This function is separate from the CreateObject / CreatePlayerObject pools. + * In version 0.3d and onwards, 10 objects can be attached to a single + * player (index 0-9). In earlier versions, the limit is 5 + * (index 0-4). + * This function is separate from the CreateObject / CreatePlayerObject + * pools. * * Bone IDs:
      *
        @@ -1299,14 +1426,19 @@ native bool:IsPlayerAttachedObjectSlotUsed(playerid, index); * * * This function was added in SA-MP 0.3e and will not work in earlier versions! - * You can move the camera while editing by pressing and holding the spacebar (or W in vehicle) and moving your mouse. + * You can move the camera while editing by pressing and holding the spacebar (or W + * in vehicle) and moving your mouse. * * There are 7 clickable buttons in edition mode.
        - * The three single icons that have x/y/z on them can be dragged to edit position/rotation/scale.
        - * The four buttons in a row are to select the edition mode and save edition: [Move] [Rotate] [Scale] [Save].
        + * The three single icons that have x/y/z on them can be dragged to edit position/rotation/scale.
        + * The four buttons in a row are to select the edition mode and save edition: [Move] [Rotate] [Scale] + * [Save].
        * Clicking save will call OnPlayerEditAttachedObject. *
        - * Players will be able to scale objects up to a very large or negative value size. Limits should be put in place using OnPlayerEditAttachedObject to abort the edit. + * Players will be able to scale objects up to a very large or negative value size. Limits + * should be put in place using OnPlayerEditAttachedObject + * to abort the edit. * 1 on success and 0 on failure. */ native EditAttachedObject(playerid, index); @@ -1315,7 +1447,8 @@ native EditAttachedObject(playerid, index); /** * a_players - * Creates a textdraw for a single player. This can be used as a way around the global text-draw limit. + * Creates a textdraw for a single player. This can be used as a way around the global + * text-draw limit. * The ID of the player to create the textdraw for * x-Coordinate * y-Coordinate @@ -1335,23 +1468,35 @@ native EditAttachedObject(playerid, index); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! * - * If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.
        - * must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
        + * If you choose values for y that are less than 1, the first text row will be invisible and only + * the shadow is visible.
        + * must NOT be empty or the server will crash! If you need a textdraw + * that shows nothing, use " " (a space) or _ (underscore)
        * If the last character in the text is a space (" "), the text will all be blank.
        - * If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will.
        + * If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) + * will.
        *
        * * This applies ONLY to sa-mp versions before 0.3z:

        - * Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
        - * If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.
        + * Maximum length of textdraw is 800 characters. Longer text will crash the client + * in older versions.
        + * If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will + * crash trying to display the textdraw.
        *
        - * Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ Doesn't work beyond 255th character. + * Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ Doesn't work beyond + * 255th character. * - * The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using PlayerTextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
        - * This function merely CREATES the textdraw, you must use PlayerTextDrawShow to show it to a player.
        - * It is recommended to use WHOLE numbers instead of decimal positions when creating player textdraws to ensure resolution friendly design.
        + * The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 + * "canvas" (irrespective of screen resolution). If you plan on using PlayerTextDrawAlignment + * with alignment 3 (right), the x, y coordinate is the top right coordinate for the text + * draw.
        + * This function merely CREATES the textdraw, you must use PlayerTextDrawShow + * to show it to a player.
        + * It is recommended to use WHOLE numbers instead of decimal positions when creating player textdraws + * to ensure resolution friendly design.
        *
        * Player-textdraws are automatically destroyed when a player disconnects. * The ID of the created textdraw. @@ -1378,7 +1523,8 @@ native PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[]) * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! */ native PlayerTextDrawDestroy(playerid, PlayerText:text); @@ -1404,15 +1550,19 @@ native PlayerTextDrawDestroy(playerid, PlayerText:text); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! - * When using this function purely for the benefit of affecting the textdraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements - * Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! + * When using this function purely for the benefit of affecting the textdraw box, multiply + * 'y' by 0.135 to convert to TextDrawTextSize-like measurements + * Fonts appear to look the best with an x to y ratio of 1 to 4 + * (e.g. if x is 0.5 then y should be 2). */ native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:width, Float:height); /** * a_players - * Change the size of a player-textdraw (box if PlayerTextDrawUseBox is enabled and/or clickable area for use with PlayerTextDrawSetSelectable). + * Change the size of a player-textdraw (box if PlayerTextDrawUseBox + * is enabled and/or clickable area for use with PlayerTextDrawSetSelectable). * The ID of the player whose player-textdraw to set the size of * The ID of the player-textdraw to set the size of * The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate @@ -1432,19 +1582,25 @@ native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:width, Float:he * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! * * The x and y have different meanings with different PlayerTextDrawAlignment values:
        *
          *
        • 1 (left): they are the right-most corner of the box, absolute coordinates.
        • - *
        • 2 (center): they need to inverted (switch the two) and the x value is the overall width of the box.
        • - *
        • 3 (right): the x and y are the coordinates of the left-most corner of the box
        • + *
        • 2 (center): they need to inverted (switch the two) and the x value is the overall + * width of the box.
        • + *
        • 3 (right): the x and y are the coordinates of the left-most corner of the box + *
        • *
        *
        * - * Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).
        - * The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).
        - * This function defines the clickable area for use with PlayerTextDrawSetSelectable, whether a box is shown or not. + * Using font type 4 (sprite) and 5 (model preview) converts x and y of + * this function from corner coordinates to WIDTH and HEIGHT (offsets).
        + * The TextDraw box starts 10.0 units up and 5.0 to the left as the origin + * (TextDrawCreate coordinate).
        + * This function defines the clickable area for use with PlayerTextDrawSetSelectable, + * whether a box is shown or not. *
        */ native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:width, Float:height); @@ -1470,8 +1626,10 @@ native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:width, Float:heig * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! - * For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at PlayerTextDrawTextSize. + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! + * For alignment 2 (center) the x and y values of TextSize need to be swapped, + * see notes at PlayerTextDrawTextSize. */ native PlayerTextDrawAlignment(playerid, PlayerText:text, TEXT_DRAW_ALIGN:alignment); @@ -1496,7 +1654,8 @@ native PlayerTextDrawAlignment(playerid, PlayerText:text, TEXT_DRAW_ALIGN:alignm * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! * You can also use Gametext colours in textdraws. * The textdraw must be re-shown to the player in order to update the colour. */ @@ -1523,7 +1682,8 @@ native PlayerTextDrawColor(playerid, PlayerText:text, colour); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! */ native PlayerTextDrawUseBox(playerid, PlayerText:text, bool:use); @@ -1548,7 +1708,8 @@ native PlayerTextDrawUseBox(playerid, PlayerText:text, bool:use); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! */ native PlayerTextDrawBoxColor(playerid, PlayerText:text, colour); @@ -1573,13 +1734,15 @@ native PlayerTextDrawBoxColor(playerid, PlayerText:text, colour); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! */ native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); /** * a_players - * Set the outline of a player-textdraw. The outline colour cannot be changed unless PlayerTextDrawBackgroundColor is used. + * Set the outline of a player-textdraw. The outline colour cannot be changed unless PlayerTextDrawBackgroundColor + * is used. * The ID of the player whose player-textdraw to set the outline of * The ID of the player-textdraw to set the outline of * The thickness of the outline @@ -1598,7 +1761,8 @@ native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! */ native PlayerTextDrawSetOutline(playerid, PlayerText:text, size); @@ -1623,8 +1787,11 @@ native PlayerTextDrawSetOutline(playerid, PlayerText:text, size); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! - * If PlayerTextDrawSetOutline is used with size > 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in PlayerTextDrawColor + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! + * If PlayerTextDrawSetOutline is used with size > + * 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColor. + * Changing the value of colour seems to alter the colour used in PlayerTextDrawColor */ native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); @@ -1633,7 +1800,8 @@ native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); * Change the font of a player-textdraw. * The ID of the player whose player-textdraw to change the font of * The ID of the player-textdraw to change the font of - * There are four font styles. A font value greater than 3 does not display, and anything greater than 16 crashes the client. See http://wiki.sa-mp.com/wiki/PlayerTextDrawFont + * There are four font styles. A font value greater than 3 does not + * display, and anything greater than 16 crashes the client. See http://wiki.sa-mp.com/wiki/PlayerTextDrawFont * * * @@ -1649,13 +1817,15 @@ native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! */ native PlayerTextDrawFont(playerid, PlayerText:text, TEXT_DRAW_FONT:font); /** * a_players - * Appears to scale text spacing to a proportional ratio. Useful when using PlayerTextDrawLetterSize to ensure the text has even character spacing. + * Appears to scale text spacing to a proportional ratio. Useful when using PlayerTextDrawLetterSize + * to ensure the text has even character spacing. * The ID of the player whose player-textdraw to set the proportionality of * The ID of the player-textdraw to set the proportionality of * 1 to enable proportionality, 0 to disable @@ -1674,7 +1844,8 @@ native PlayerTextDrawFont(playerid, PlayerText:text, TEXT_DRAW_FONT:font); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! */ native PlayerTextDrawSetProportional(playerid, PlayerText:text, bool:set); @@ -1683,13 +1854,17 @@ native PlayerTextDrawSetProportional(playerid, PlayerText:text, bool:set); * Toggles whether a player-textdraw can be selected or not. * The ID of the player whose player-textdraw to set the selectability of * The ID of the player-textdraw to set the selectability of - * Set the player-textdraw selectable (1) or non-selectable (0). By default this is 0 + * Set the player-textdraw selectable (1) or non-selectable (0). + * By default this is 0 * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! - * PlayerTextDrawSetSelectable MUST be used BEFORE the textdraw is shown to the player. - * Use PlayerTextDrawTextSize to define the clickable area. + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! + * PlayerTextDrawSetSelectable MUST be used BEFORE + * the textdraw is shown to the player. + * Use PlayerTextDrawTextSize to define the clickable + * area. */ native PlayerTextDrawSetSelectable(playerid, PlayerText:text, bool:set); @@ -1713,7 +1888,8 @@ native PlayerTextDrawSetSelectable(playerid, PlayerText:text, bool:set); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! */ native PlayerTextDrawShow(playerid, PlayerText:text); @@ -1737,7 +1913,8 @@ native PlayerTextDrawShow(playerid, PlayerText:text); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! */ native PlayerTextDrawHide(playerid, PlayerText:text); @@ -1762,8 +1939,10 @@ native PlayerTextDrawHide(playerid, PlayerText:text); * * * - * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions! - * There are limits to the length of textdraw strings! See Limits for more info. + * This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier + * versions! + * There are limits to the length of textdraw strings! See Limits + * for more info. * You don't have to show the TextDraw again in order to apply the changes. */ native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); @@ -1779,9 +1958,11 @@ native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]); * * * This function was added in SA-MP 0.3x and will not work in earlier versions! - * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. + * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order + * for this function to have effect. * - * 1: The function executed successfully. If an invalid model is passed 'success' is reported, but the model will appear as a yellow/black question mark.
        + * 1: The function executed successfully. If an invalid model is passed 'success' is + * reported, but the model will appear as a yellow/black question mark.
        * 0: The function failed to execute. Player and/or textdraw do not exist. *
        */ @@ -1795,14 +1976,16 @@ native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelIndex); * The x rotation value * The y rotation value * The z rotation value - * The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) + * The zoom value, smaller values make the camera closer and larger values make the + * camera further away (optional=1.0) * * * * * * This function was added in SA-MP 0.3x and will not work in earlier versions! - * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW and already have a model set in order for this function to have effect. + * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW and already + * have a model set in order for this function to have effect. */ native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); @@ -1811,14 +1994,17 @@ native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:rotX, Float: * Set the colour of a vehicle in a player-textdraw model preview (if a vehicle is shown). * The ID of the player whose player-textdraw to change * The ID of the player's player-textdraw to change - * The colour to set the vehicle's primary colour to - * The colour to set the vehicle's secondary colour to + * The colour to set + * the vehicle's primary colour to + * The colour to set + * the vehicle's secondary colour to * * * * * This function was added in SA-MP 0.3x and will not work in earlier versions! - * The textdraw MUST use the font TEXT_DRAW_FONT_MODEL_PREVIEW and be showing a vehicle in order for this function to have effect. + * The textdraw MUST use the font TEXT_DRAW_FONT_MODEL_PREVIEW and be showing + * a vehicle in order for this function to have effect. */ native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, colour1, colour2); @@ -1836,10 +2022,12 @@ native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, colour1, colour * * * - * Variables aren't reset until after OnPlayerDisconnect is called, so the values are still accessible in OnPlayerDisconnect. + * Variables aren't reset until after OnPlayerDisconnect + * is called, so the values are still accessible in OnPlayerDisconnect. * * 1: The function executed successfully.
        - * 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. + * 0: The function failed to execute. Either the player specified is not connected, + * or the variable name is null or over 40 characters. *
        */ native SetPVarInt(playerid, const pvar[], value); @@ -1855,7 +2043,8 @@ native SetPVarInt(playerid, const pvar[], value); * * * - * The integer value of the specified player variable. It will still return 0 if the variable is not set, or the player does not exist. + * The integer value of the specified player variable. It will still return 0 + * if the variable is not set, or the player does not exist. */ native GetPVarInt(playerid, const pvar[]); @@ -1887,7 +2076,9 @@ native SetPVarString(playerid, const pvar[], const value[]); * * * - * If length of string is zero (value not set), output text will not be updated or set to anything and will remain with old data, neccesying that you clear the variable to blank value if GetPVarString returns 0 if that behavior is undesired + * If length of string is zero (value not set), output text will not be updated or set to anything + * and will remain with old data, neccesying that you clear the variable to blank value if GetPVarString + * returns 0 if that behavior is undesired * The length of the string. */ native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); @@ -1906,7 +2097,8 @@ native GetPVarString(playerid, const pvar[], output[], len = sizeof (output)); * * * 1: The function executed successfully.
        - * 0: The function failed to execute. Either the player specified is not connected, or the variable name is null or over 40 characters. + * 0: The function failed to execute. Either the player specified is not connected, + * or the variable name is null or over 40 characters. *
        */ native SetPVarFloat(playerid, const pvar[], Float:value); @@ -1937,17 +2129,20 @@ native Float:GetPVarFloat(playerid, const pvar[]); * * * - * Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings). + * Once a variable is deleted, attempts to retrieve the value will return 0 (for + * integers and floats and NULL for strings). * * 1: The function executed successfully.
        - * 0: The function failed to execute. Either the player specified isn't connected or there is no variable set with the given name. + * 0: The function failed to execute. Either the player specified isn't connected or + * there is no variable set with the given name. *
        */ native DeletePVar(playerid, const pvar[]); /** * a_players - * Each PVar (player-variable) has its own unique identification number for lookup, this function returns the highest ID set for a player. + * Each PVar (player-variable) has its own unique identification number for lookup, this function + * returns the highest ID set for a player. * The ID of the player to get the upper PVar index of * * @@ -2024,9 +2219,11 @@ native SetPlayerChatBubble(playerid, const text[], colour, Float:drawDistance, e * * * - * If this function is used on a player that is already in a vehicle, other players will still see them in their previous vehicle. To fix this, first remove the player from the vehicle. + * If this function is used on a player that is already in a vehicle, other players will still + * see them in their previous vehicle. To fix this, first remove the player from the vehicle. * If the seat is invalid or is taken, will cause a crash when they EXIT the vehicle. - * You can use GetPlayerVehicleSeat in a loop to check if a seat is occupied by any players. + * You can use GetPlayerVehicleSeat in a loop to check + * if a seat is occupied by any players. * * Seats:
        *
          @@ -2046,7 +2243,8 @@ native PutPlayerInVehicle(playerid, vehicleid, seatid); /** * a_players - * This function gets the ID of the vehicle the player is currently in. Note: NOT the model ID of the vehicle. See GetVehicleModel for that. + * This function gets the ID of the vehicle the player is currently in. Note: NOT the + * model ID of the vehicle. See GetVehicleModel for that. * The ID of the player in the vehicle that you want to get the ID of * * @@ -2063,8 +2261,11 @@ native GetPlayerVehicleID(playerid); * * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * Sometimes the result can be 128 which is an invalid seat ID. Circumstances of this are not yet known, but it is best to discard information when returned seat number is 128. - * The ID of the seat the player is in. -1 is not in vehicle, 0 is the driver, 1 is the front passenger, and 2 & 3 are the rear passengers. + * Sometimes the result can be 128 which is an invalid seat ID. Circumstances + * of this are not yet known, but it is best to discard information when returned seat number is 128. + * The ID of the seat the player is in. -1 is not in vehicle, 0 + * is the driver, 1 is the front passenger, and 2 & 3 + * are the rear passengers. */ native GetPlayerVehicleSeat(playerid); @@ -2075,7 +2276,9 @@ native GetPlayerVehicleSeat(playerid); * * * The exiting animation is not synced for other players.
          - * This function will not work when used in OnPlayerEnterVehicle, because the player isn't in the vehicle when the callback is called. Use OnPlayerStateChange instead.
          + * This function will not work when used in OnPlayerEnterVehicle, + * because the player isn't in the vehicle when the callback is called. Use OnPlayerStateChange + * instead.
          * The player isn't removed if he is in a RC Vehicle. *
          * @@ -2087,7 +2290,8 @@ native RemovePlayerFromVehicle(playerid); /** * a_players - * Toggles whether a player can control their character or not. The player will also be unable to move their camera. + * Toggles whether a player can control their character or not. The player will also be unable + * to move their camera. * The ID of the player to toggle the controllability of * 0 to make them uncontrollable, 1 to make them controllable * @@ -2108,7 +2312,8 @@ native TogglePlayerControllable(playerid, bool:toggle); * * * - * Only use the coordinates if you want the sound to be played at a certain position. Set coordinates all to 0 to just play the sound. + * Only use the coordinates if you want the sound to be played at a certain position. Set + * coordinates all to 0 to just play the sound. * * 1: The function executed successfully.
          * 0: The function failed to execute. This means the player is not connected. @@ -2123,28 +2328,45 @@ native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z); * The animation library from which to apply an animation * The name of the animation to apply, within the specified library * The speed to play the animation (use 4.1) - * If set to 1, the animation will loop. If set to 0, the animation will play once - * If set to 0, the player is returned to their old x coordinate once the animation is complete (for animations that move the player such as walking). 1 will not return them to their old position + * If set to 1, the animation will loop. If set to 0, + * the animation will play once + * If set to 0, the player is returned to their old x coordinate once + * the animation is complete (for animations that move the player such as walking). 1 + * will not return them to their old position * Same as above but for the y axis. Should be kept the same as the previous parameter - * Setting this to 1 will freeze the player at the end of the animation. 0 will not + * Setting this to 1 will freeze the player at the end of the animation. + * 0 will not * Timer in milliseconds. For a never-ending loop it should be 0 - * Set to 1 to make server sync the animation with all other players in streaming radius. 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) (optional=0) + * Set to 1 to make server sync the animation with all other players + * in streaming radius. 2 works same as 1, but will ONLY apply the animation + * to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent + * animations when players are being streamed) (optional=0) * * - * The optional parameter, which defaults to 0, in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused. + * The optional parameter, which defaults to 0, + * in most cases is not needed since players sync animations themselves. The parameter can force all players who can see to play the animation + * regardless of whether the player is performing that animation. This is useful in circumstances where + * the player can't sync the animation themselves. For example, they may be paused. * An invalid animation library will crash the player's game. - * This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). + * This function always returns 1, even if the player specified does not exist, + * or any of the parameters are invalid (e.g. invalid library). */ native ApplyAnimation(playerid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time, FORCE_SYNC:forceSync = SYNC_NONE); /** * a_players - * Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering vehicles, driving (removes player out of vehicle), swimming, etc.. ). + * Clears all animations for the given player (it also cancels all current tasks such as jetpacking,parachuting,entering + * vehicles, driving (removes player out of vehicle), swimming, etc.. ). * The ID of the player to clear the animations of - * Set to 1 to force playerid to sync the animation with other players in streaming radius (optional=0) + * Set to 1 to force playerid to sync the animation with other + * players in streaming radius (optional=0) * - * ClearAnimations doesn't do anything when the animation ends if we pass 1 for the freeze parameter in ApplyAnimation. - * Unlike some other ways to remove player from a vehicle, this will also reset the vehicle's velocity to zero, instantly stopping the car. Player will appear on top of the vehicle with the same location as he was in his car seat. + * ClearAnimations doesn't do anything when the animation ends if we pass 1 for the freeze + * parameter in ApplyAnimation. + * Unlike some other ways to remove player from a vehicle, this will also reset the vehicle's + * velocity to zero, instantly stopping the car. Player will appear on top of the vehicle with the + * same location as he was in his car seat. * This function always returns 1, even when the player specified is not connected. */ native ClearAnimations(playerid, FORCE_SYNC:forceSync = SYNC_NONE); @@ -2175,8 +2397,10 @@ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibra /** * a_players - * Retrieves a player's current special action. - * The ID of the player to get the special action of + * Retrieves a player's current special + * action. + * The ID of the player to get the special + * action of * * * @@ -2196,21 +2420,29 @@ native GetAnimationName(index, animationLibrary[], len1 = sizeof (animationLibra * added in SA-MP 0.3:
          *
            *
          • 1 - SPECIAL_ACTION_DUCK * - Detect if the player is crouching.
          • - *
          • 3 - SPECIAL_ACTION_ENTER_VEHICLE * - Detect if the player is entering a vehicle via an animation.
          • - *
          • 4 - SPECIAL_ACTION_EXIT_VEHICLE * - Detect if the player is exiting a vehicle via an animation.
          • - *
          • 20 - SPECIAL_ACTION_DRINK_BEER - Will increase the player's drunk level when used
          • + *
          • 3 - SPECIAL_ACTION_ENTER_VEHICLE * - Detect if the player is entering a vehicle + * via an animation.
          • + *
          • 4 - SPECIAL_ACTION_EXIT_VEHICLE * - Detect if the player is exiting a vehicle + * via an animation.
          • + *
          • 20 - SPECIAL_ACTION_DRINK_BEER - Will increase the player's drunk level when + * used
          • *
          • 21 - SPECIAL_ACTION_SMOKE_CIGGY - Will give the player a cigar
          • - *
          • 22 - SPECIAL_ACTION_DRINK_WINE - Will give the player a wine bottle to get drunk from
          • - *
          • 23 - SPECIAL_ACTION_DRINK_SPRUNK - Will give the player a sprunk bottle to drink from
          • - *
          • 68 - SPECIAL_ACTION_PISSING - Will make make the player perform the pissing animation with visible pee.
          • + *
          • 22 - SPECIAL_ACTION_DRINK_WINE - Will give the player a wine bottle to get + * drunk from
          • + *
          • 23 - SPECIAL_ACTION_DRINK_SPRUNK - Will give the player a sprunk bottle to + * drink from
          • + *
          • 68 - SPECIAL_ACTION_PISSING - Will make make the player perform the pissing + * animation with visible pee.
          • *
          * added in SA-MP 0.3e:
          *
            - *
          • 24 - SPECIAL_ACTION_CUFFED - Will force the player in to cuffs (hands are behind their back) (does not work on CJ skin)
          • + *
          • 24 - SPECIAL_ACTION_CUFFED - Will force the player in to cuffs (hands are behind + * their back) (does not work on CJ skin)
          • *
          * added in SA-MP 0.3x:
          *
            - *
          • 25 - SPECIAL_ACTION_CARRY - Will apply a 'carrying' animation to the player and make them unable to sprint, jump or punch (does not work on CJ skin)
          • + *
          • 25 - SPECIAL_ACTION_CARRY - Will apply a 'carrying' animation to the + * player and make them unable to sprint, jump or punch (does not work on CJ skin)
          • *
          *
          * The special action of the player. @@ -2224,7 +2456,8 @@ native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); * The action that should be performed * * - * Removing jetpacks from players by setting their special action to 0 causes the sound to stay until death. + * Removing jetpacks from players by setting their special action to 0 causes + * the sound to stay until death. * * Special actions: (marked with * cannot be set)
          *
            @@ -2242,21 +2475,29 @@ native SPECIAL_ACTION:GetPlayerSpecialAction(playerid); * added in SA-MP 0.3:
            *
              *
            • 1 - SPECIAL_ACTION_DUCK * - Detect if the player is crouching.
            • - *
            • 3 - SPECIAL_ACTION_ENTER_VEHICLE * - Detect if the player is entering a vehicle via an animation.
            • - *
            • 4 - SPECIAL_ACTION_EXIT_VEHICLE * - Detect if the player is exiting a vehicle via an animation.
            • - *
            • 20 - SPECIAL_ACTION_DRINK_BEER - Will increase the player's drunk level when used
            • + *
            • 3 - SPECIAL_ACTION_ENTER_VEHICLE * - Detect if the player is entering a vehicle + * via an animation.
            • + *
            • 4 - SPECIAL_ACTION_EXIT_VEHICLE * - Detect if the player is exiting a vehicle + * via an animation.
            • + *
            • 20 - SPECIAL_ACTION_DRINK_BEER - Will increase the player's drunk level when + * used
            • *
            • 21 - SPECIAL_ACTION_SMOKE_CIGGY - Will give the player a cigar
            • - *
            • 22 - SPECIAL_ACTION_DRINK_WINE - Will give the player a wine bottle to get drunk from
            • - *
            • 23 - SPECIAL_ACTION_DRINK_SPRUNK - Will give the player a sprunk bottle to drink from
            • - *
            • 68 - SPECIAL_ACTION_PISSING - Will make make the player perform the pissing animation with visible pee.
            • + *
            • 22 - SPECIAL_ACTION_DRINK_WINE - Will give the player a wine bottle to get + * drunk from
            • + *
            • 23 - SPECIAL_ACTION_DRINK_SPRUNK - Will give the player a sprunk bottle to + * drink from
            • + *
            • 68 - SPECIAL_ACTION_PISSING - Will make make the player perform the pissing + * animation with visible pee.
            • *
            * added in SA-MP 0.3e:
            *
              - *
            • 24 - SPECIAL_ACTION_CUFFED - Will force the player in to cuffs (hands are behind their back) (does not work on CJ skin)
            • + *
            • 24 - SPECIAL_ACTION_CUFFED - Will force the player in to cuffs (hands are behind + * their back) (does not work on CJ skin)
            • *
            * added in SA-MP 0.3x:
            *
              - *
            • 25 - SPECIAL_ACTION_CARRY - Will apply a 'carrying' animation to the player and make them unable to sprint, jump or punch (does not work on CJ skin)
            • + *
            • 25 - SPECIAL_ACTION_CARRY - Will apply a 'carrying' animation to the + * player and make them unable to sprint, jump or punch (does not work on CJ skin)
            • *
            * * @@ -2283,17 +2524,22 @@ native DisableRemoteVehicleCollisions(playerid, bool:disable); /** * a_players - * Sets a checkpoint (red cylinder) for a player. Also shows a red blip on the radar. When players enter a checkpoint, OnPlayerEnterCheckpoint is called and actions can be performed. + * Sets a checkpoint (red cylinder) for a player. Also shows a red blip on the radar. When + * players enter a checkpoint, OnPlayerEnterCheckpoint is called + * and actions can be performed. * The ID of the player for whom to set a checkpoint * The x coordinate to set the checkpoint at * The y coordinate to set the checkpoint at * The z coordinate to set the checkpoint at * The size of the checkpoint * - * If a checkpoint is already set it will use the size of that checkpoint instead of the new one.
            - * Checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly. A pickup can be used instead. + * If a checkpoint is already set it will use the size of that checkpoint instead of the new one.
            + * Checkpoints created on server-created objects (CreateObject/CreatePlayerObject) + * will appear down on the 'real' ground, but will still function correctly. A pickup can be used instead. *
            - * Checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' checkpoints (only show them when players are close enough), use a checkpoint streamer. + * Checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' checkpoints + * (only show them when players are close enough), use a checkpoint streamer. * * 1: The function executed successfully.
            * 0: The function failed to execute. This means the player specified does not exist. @@ -2303,7 +2549,8 @@ native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); /** * a_players - * Disables (hides/destroys) a player's set checkpoint. Players can only have a single checkpoint set at a time. Checkpoints don't need to be disabled before setting another one. + * Disables (hides/destroys) a player's set checkpoint. Players can only have a single checkpoint + * set at a time. Checkpoints don't need to be disabled before setting another one. * The ID of the player whose checkpoint to disable * * @@ -2315,7 +2562,8 @@ native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); * * * - * 1: The function executed successfully. Success is also returned if the player doesn't have a checkpoint shown already.
            + * 1: The function executed successfully. Success is also returned if the player doesn't + * have a checkpoint shown already.
            * 0: The function failed to execute. This means the player is not connected. *
            */ @@ -2323,9 +2571,13 @@ native DisablePlayerCheckpoint(playerid); /** * a_players - * Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint callback is called. + * Creates a race checkpoint. When the player enters it, the OnPlayerEnterRaceCheckpoint + * callback is called. * The ID of the player to set the checkpoint for - * Type of checkpoint. 0-Normal, 1-Finish, 2-Nothing(Only the checkpoint without anything on it), 3-Air normal, 4-Air finish, 5-Air (rotates and stops), 6-Air (increases, decreases and disappears), 7-Air (swings down and up), 8-Air (swings up and down) + * Type of checkpoint. 0-Normal, 1-Finish, 2-Nothing(Only + * the checkpoint without anything on it), 3-Air normal, 4-Air finish, 5-Air + * (rotates and stops), 6-Air (increases, decreases and disappears), 7-Air + * (swings down and up), 8-Air (swings up and down) * x-Coordinate * y-Coordinate * z-Coordinate @@ -2342,10 +2594,14 @@ native DisablePlayerCheckpoint(playerid); * * * - * If a race checkpoint is already set it will use the size of that checkpoint instead of the new one. + * If a race checkpoint is already set it will use the size of that checkpoint instead of the + * new one. * - * Race checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will still function correctly.
            - * Race checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' race checkpoints (only show them when players are close enough), use a race checkpoint streamer. + * Race checkpoints created on server-created objects (CreateObject/CreatePlayerObject) will appear down on the 'real' ground, but will + * still function correctly.
            + * Race checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' race checkpoints + * (only show them when players are close enough), use a race checkpoint streamer. *
            * * 1: The function executed successfully.
            @@ -2356,7 +2612,8 @@ native SetPlayerRaceCheckpoint(playerid, type, Float:centerX, Float:centerY, Flo /** * a_players - * Disable any initialized race checkpoints for a specific player, since you can only have one at any given time. + * Disable any initialized race checkpoints for a specific player, since you can only have + * one at any given time. * The player to disable the current checkpoint for * * @@ -2372,7 +2629,8 @@ native DisablePlayerRaceCheckpoint(playerid); /** * a_players - * Set the world boundaries for a player. Players can not go out of the boundaries (they will be pushed back in). + * Set the world boundaries for a player. Players can not go out of the boundaries (they will + * be pushed back in). * The ID of the player to set the world boundaries of * The maximum x coordinate the player can go to * The minimum x coordinate the player can go to @@ -2380,7 +2638,8 @@ native DisablePlayerRaceCheckpoint(playerid); * The minimum y coordinate the player can go to * * This function does not work if used in OnPlayerConnect - * A player's world boundaries can be reset by setting them to 20000.0, -20000.0, 20000.0, -20000.0. These are the default values. + * A player's world boundaries can be reset by setting them to 20000.0, -20000.0, + * 20000.0, -20000.0. These are the default values. * This function doesn't work in interiors! */ native SetPlayerWorldBounds(playerid, Float:maxX, Float:minX, Float:maxY, Float:minY); @@ -2400,40 +2659,51 @@ native SetPlayerMarkerForPlayer(playerid, targetid, colour); /** * a_players - * This functions allows you to toggle the drawing of player nametags, healthbars and armor bars which display above their head. For use of a similar function like this on a global level, ShowNameTags function. + * This functions allows you to toggle the drawing of player nametags, healthbars and armor + * bars which display above their head. For use of a similar function like this on a global level, + * ShowNameTags function. * Player who will see the results of this function * Player whose name tag will be shown or hidden * 1-show name tag, 0-hide name tag * * * - * ShowNameTags must be set to 1 to be able to show name tags with ShowPlayerNameTagForPlayer, that means that in order to be effective you need to ShowPlayerNameTagForPlayer(forplayerid, playerid, 0) ahead of time(OnPlayerStreamIn is a good spot). + * ShowNameTags must be set to 1 to be able to show + * name tags with ShowPlayerNameTagForPlayer, that means that in order to be effective you need to ShowPlayerNameTagForPlayer(forplayerid, + * playerid, 0) ahead of time(OnPlayerStreamIn is a good spot). */ native ShowPlayerNameTagForPlayer(playerid, targetid, bool:show); /** * a_players - * Place an icon/marker on a player's map. Can be used to mark locations such as banks and hospitals to players. + * Place an icon/marker on a player's map. Can be used to mark locations such as banks and + * hospitals to players. * The ID of the player to set the map icon for - * The player's icon ID, ranging from 0 to 99. This means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon + * The player's icon ID, ranging from 0 to 99. This + * means there is a maximum of 100 map icons. ID can be used in RemovePlayerMapIcon * The x coordinate to place the map icon at * The y coordinate to place the map icon at * The z coordinate to place the map icon at * The icon to set - * The colour of the icon (RGBA). This should only be used with the square icon (ID: 0) + * The colour of the icon (RGBA). This should only be used with the square + * icon (ID: 0) * The style of icon (optional=MAPICON_LOCAL) * * * If you use an invalid marker type, it will create ID 1 (White Square). - * If you use an icon ID that is already in use, it will replace the current map icon using that ID. - * Marker type 1 (square), 2 (player blip), 4 (north), and 56 (single airstrip blip) will cause your game to crash if you have map legends enabled while viewing the map. + * If you use an icon ID that is already in use, it will replace the current map icon using + * that ID. + * Marker type 1 (square), 2 (player blip), 4 (north), + * and 56 (single airstrip blip) will cause your game to crash if you have map legends + * enabled while viewing the map. * * Map icon styles:
            *
              *
            • 0 MAPICON_LOCAL - close proximity only
            • *
            • 1 MAPICON_GLOBAL - show on radar edge as long as in range
            • *
            • 2 MAPICON_LOCAL_CHECKPOINT - Close proximity only (with checkpoint)
            • - *
            • 3 MAPICON_GLOBAL_CHECKPOINT - Show on radar edge as long as in range (with checkpoint)
            • + *
            • 3 MAPICON_GLOBAL_CHECKPOINT - Show on radar edge as long as in range (with + * checkpoint)
            • *
            *
            * @@ -2462,7 +2732,8 @@ native RemovePlayerMapIcon(playerid, iconid); * The ID of the player to allow teleport * 1 to allow, 0 to disallow * This function, as of 0.3d, is deprecated. Check OnPlayerClickMap. - * This function will work only if AllowAdminTeleport is enabled, and you have to be an admin. + * This function will work only if AllowAdminTeleport is + * enabled, and you have to be an admin. * */ #pragma deprecated Use `OnPlayerClickMap`. @@ -2479,8 +2750,10 @@ native AllowPlayerTeleport(playerid, bool:allow); * The z coordinate to place the camera at * * - * You may also have to use SetPlayerCameraLookAt with this function in order to work properly. - * Use SetCameraBehindPlayer to reset the camera to behind the player. + * You may also have to use SetPlayerCameraLookAt with + * this function in order to work properly. + * Use SetCameraBehindPlayer to reset the camera to behind + * the player. * Using the camera functions directly after enabling spectator mode doesn't work. * * 1: The function executed successfully.
            @@ -2491,12 +2764,15 @@ native SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z); /** * a_players - * Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos. + * Set the direction a player's camera looks at. Generally meant to be used in combination + * with SetPlayerCameraPos. * The ID of the player whose camera to set * The x coordinate for the player's camera to look at * The y coordinate for the player's camera to look at * The z coordinate for the player's camera to look at - * The style of the change. Can be used to interpolate (change slowly) from old pos to new pos using CAMERA_MOVE. Added in 0.3e. Leave out for older versions (optional=CAMERA_CUT) + * The style of the change. Can be used to interpolate (change slowly) from old pos + * to new pos using CAMERA_MOVE. Added in 0.3e. Leave out for older versions + * (optional=CAMERA_CUT) * * * @@ -2532,28 +2808,33 @@ native SetCameraBehindPlayer(playerid); * * This function was added in SA-MP 0.3a and will not work in earlier versions! * Player's camera positions are only updated once a second, unless aiming. - * It is recommended to set a 1 second timer if you wish to take action that relies on a player's camera position. + * It is recommended to set a 1 second timer if you wish to take action that relies on a player's + * camera position. */ native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z); /** * a_players - * This function will return the current direction of player's aiming in 3-D space, the coords are relative to the camera position, see GetPlayerCameraPos. + * This function will return the current direction of player's aiming in 3-D space, the coords + * are relative to the camera position, see GetPlayerCameraPos. * The ID of the player you want to obtain the camera front vector of * A float to store the x coordinate, passed by reference * A float to store the y coordinate, passed by reference * A float to store the z coordinate, passed by reference * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * In 0.3a the camera front vector is only obtainable when player is inside a rhino, S.W.A.T tank, fire truck, or on foot. - * Since 0.3b the camera data can be obtained when the player is in any vehicle or on foot. + * In 0.3a the camera front vector is only obtainable when player is inside a rhino, + * S.W.A.T tank, fire truck, or on foot. + * Since 0.3b the camera data can be obtained when the player is in any vehicle or on + * foot. * The position is stored in the specified variables. */ native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z); /** * a_players - * Returns the current GTA camera mode for the requested player. The camera modes are useful in determining whether a player is aiming, doing a passenger driveby etc. + * Returns the current GTA camera mode for the requested player. The camera modes are useful + * in determining whether a player is aiming, doing a passenger driveby etc. * The ID of the player whose camera mode to retrieve * * @@ -2569,7 +2850,8 @@ native CAM_MODE:GetPlayerCameraMode(playerid); * a_players * Toggle camera targeting functions for a player. Disabled by default to save bandwidth. * The ID of the player to toggle camera targeting functions for - * 1 to enable camera targeting functions and 0 to disable them + * 1 to enable camera targeting functions and 0 to + * disable them * * * @@ -2589,8 +2871,10 @@ native EnablePlayerCameraTarget(playerid, bool:enable); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. - * The ID of the object playerid is looking at. If INVALID_OBJECT_ID (65535) is returned, playerid isn't looking at any object. + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget + * to enable it for each player. + * The ID of the object playerid is looking at. If INVALID_OBJECT_ID (65535) + * is returned, playerid isn't looking at any object. */ native GetPlayerCameraTargetObject(playerid); @@ -2603,9 +2887,12 @@ native GetPlayerCameraTargetObject(playerid); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. - * This function can (obviously) only return one vehicle ID at a time, while the player may be looking at multiple. It generally seems to detect the closest vehicle first. - * The vehicle ID of the vehicle the player is looking at. INVALID_VEHICLE_ID if none. + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget + * to enable it for each player. + * This function can (obviously) only return one vehicle ID at a time, while the player may + * be looking at multiple. It generally seems to detect the closest vehicle first. + * The vehicle ID of the vehicle the player is looking at. INVALID_VEHICLE_ID + * if none. */ native GetPlayerCameraTargetVehicle(playerid); @@ -2618,8 +2905,12 @@ native GetPlayerCameraTargetVehicle(playerid); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. - * Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerid is aming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerid is looking at (reference point is the center of the screen). + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget + * to enable it for each player. + * Do not confuse this function with GetPlayerTargetPlayer. + * GetPlayerTargetPlayer returns the ID of the player playerid + * is aming at (with a weapon). GetPlayerCameraTargetPlayer + * returns the ID of the player playerid is looking at (reference point is the center of the screen). * The ID of the player the playerid is looking at. */ native GetPlayerCameraTargetPlayer(playerid); @@ -2634,8 +2925,10 @@ native GetPlayerCameraTargetPlayer(playerid); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget to enable it for each player. - * This function only tells you which actor (if any) the player is looking at. To find out if they are aiming at them, you need to use GetPlayerTargetActor. + * This function is disabled by default to save bandwidth. Use EnablePlayerCameraTarget + * to enable it for each player. + * This function only tells you which actor (if any) the player is looking at. To find + * out if they are aiming at them, you need to use GetPlayerTargetActor. * The ID of the actor the player is looking at. */ native GetPlayerCameraTargetActor(playerid); @@ -2648,8 +2941,13 @@ native GetPlayerCameraTargetActor(playerid); * * * This function was added in SA-MP 0.3z and will not work in earlier versions! - * The return value of this function represents the value of the "widescreen" option in the game's display settings, not the actual aspect ratio of the player's display. - * The aspect ratio of the player's camera, as a float. The aspect ratio can be one of three values: 4:3 (1.3333334, Float:0x3FAAAAAB) when widescreen is turned off, 5:4 (1.2470589, Float:0x3F9F9FA0) when letterbox mode is turned on, and 16:9 (1.7764707, Float:0x3FE36364) when widescreen is turned on regardless of the letterbox mode. + * The return value of this function represents the value of the "widescreen" option in the + * game's display settings, not the actual aspect ratio of the player's display. + * The aspect ratio of the player's camera, as a float. The aspect ratio can be one of three + * values: 4:3 (1.3333334, Float:0x3FAAAAAB) when widescreen is turned off, + * 5:4 (1.2470589, Float:0x3F9F9FA0) when letterbox mode is turned on, and + * 16:9 (1.7764707, Float:0x3FE36364) when widescreen is turned on regardless + * of the letterbox mode. */ native Float:GetPlayerCameraAspectRatio(playerid); @@ -2679,7 +2977,8 @@ native AttachCameraToObject(playerid, objectid); /** * a_players - * Attaches a player's camera to a player-object. The player is able to move their camera while it is attached to an object. Can be used with MovePlayerObject and AttachPlayerObjectToVehicle. + * Attaches a player's camera to a player-object. The player is able to move their camera + * while it is attached to an object. Can be used with MovePlayerObject and AttachPlayerObjectToVehicle. * The ID of the player which will have their camera attached to a player-object * The ID of the player-object to which the player's camera will be attached * @@ -2692,7 +2991,8 @@ native AttachCameraToPlayerObject(playerid, objectid); /** * a_players - * Move a player's camera from one position to another, within the set time. Useful for scripted cut scenes. + * Move a player's camera from one position to another, within the set time. Useful for scripted + * cut scenes. * The ID of the player the camera should be moved for * The x position the camera should start to move from * The y position the camera should start to move from @@ -2706,13 +3006,15 @@ native AttachCameraToPlayerObject(playerid, objectid); * * * This function was added in SA-MP 0.3e and will not work in earlier versions! - * Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. + * Use TogglePlayerSpectating to make objects stream in for the player while + * the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. */ native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAM_MOVE:cut = CAMERA_CUT); /** * a_players - * Interpolate a player's camera's 'look at' point between two coordinates with a set speed. Can be be used with InterpolateCameraPos. + * Interpolate a player's camera's 'look at' point between two coordinates with a set speed. + * Can be be used with InterpolateCameraPos. * The ID of the player the camera should be moved for * The x position the camera should start to move from * The y position the camera should start to move from @@ -2726,7 +3028,8 @@ native InterpolateCameraPos(playerid, Float:fromX, Float:fromY, Float:fromZ, Flo * * * This function was added in SA-MP 0.3e and will not work in earlier versions! - * Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. + * Use TogglePlayerSpectating to make objects stream in for the player while + * the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer. */ native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, Float:toX, Float:toY, Float:toZ, time, CAM_MOVE:cut = CAMERA_CUT); @@ -2739,7 +3042,8 @@ native InterpolateCameraLookAt(playerid, Float:fromX, Float:fromY, Float:fromZ, * * * - * This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in. + * This function can be omitted in a lot of cases. Many other functions already have some + * sort of connection check built in. * 1 if the player is connected, 0 if not. */ native bool:IsPlayerConnected(playerid); @@ -2767,7 +3071,8 @@ native bool:IsPlayerInAnyVehicle(playerid); /** * a_players - * Check if the player is currently inside a checkpoint, this could be used for properties or teleport points for example. + * Check if the player is currently inside a checkpoint, this could be used for properties + * or teleport points for example. * The player you want to know the status of * * @@ -2803,7 +3108,8 @@ native bool:IsPlayerInRaceCheckpoint(playerid); /** * a_players - * Set the virtual world of a player. They can only see other players or vehicles that are in that same world. + * Set the virtual world of a player. They can only see other players or vehicles that are + * in that same world. * The ID of the player you want to set the virtual world of * The virtual world ID to put the player in * @@ -2844,7 +3150,8 @@ native EnableStuntBonusForPlayer(playerid, bool:enable); /** * a_players - * Enables or disables stunt bonuses for all players. If enabled, players will receive monetary rewards when performing a stunt in a vehicle (e.g. a wheelie). + * Enables or disables stunt bonuses for all players. If enabled, players will receive monetary + * rewards when performing a stunt in a vehicle (e.g. a wheelie). * 1 to enable stunt bonuses or 0 to disable them * */ @@ -2852,14 +3159,22 @@ native EnableStuntBonusForAll(bool:enable); /** * a_players - * Toggle whether a player is in spectator mode or not. While in spectator mode a player can spectate (watch) other players and vehicles. After using this function, either PlayerSpectatePlayer or PlayerSpectateVehicle needs to be used. + * Toggle whether a player is in spectator mode or not. While in spectator mode a player can + * spectate (watch) other players and vehicles. After using this function, either PlayerSpectatePlayer + * or PlayerSpectateVehicle needs to be used. * The ID of the player who should spectate * 1 to enable spectating and 0 to disable * * - * If the player is not loaded in before setting the spectate status to false, the connection can be closed unexpectedly. - * When spectator mode is disabled, OnPlayerSpawn will automatically be called, if you wish to restore player to state before spectating, you will have to handle that in OnPlayerSpawn. Note also, that player can also go to class selection before if they used F4 during spectate, a player also CAN die in spectate mode due to various glitches. - * When a player is in spectate mode their HUD is hidden, making it useful for setting a player's camera without the HUD. Also, objects near the player's camera will be streamed in, making this useful for interpolating cameras. + * If the player is not loaded in before setting the spectate status to false, the connection + * can be closed unexpectedly. + * When spectator mode is disabled, OnPlayerSpawn will automatically + * be called, if you wish to restore player to state before spectating, you will have to handle that + * in OnPlayerSpawn. Note also, that player can also go to class selection + * before if they used F4 during spectate, a player also CAN die in spectate mode due to various glitches. + * When a player is in spectate mode their HUD is hidden, making it useful for setting a player's + * camera without the HUD. Also, objects near the player's camera will be streamed in, making this + * useful for interpolating cameras. * * 1: The function executed successfully.
            * 0: The function failed to execute. The player does not exist. @@ -2875,14 +3190,19 @@ native TogglePlayerSpectating(playerid, bool:toggle); * The mode to spectate with (optional=SPECTATE_MODE_NORMAL) * * - * Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. - * playerid and targetid's virtual world and interior must be the same for this function to work properly. + * Order is CRITICAL! Ensure that you use TogglePlayerSpectating + * before PlayerSpectatePlayer. + * playerid and targetid's virtual world and interior must be the same for this function to + * work properly. * * Spectate modes:
            *
              - *
            • SPECTATE_MODE_NORMAL - normal spectate mode (third person point of view). Camera can not be changed.
            • - *
            • SPECTATE_MODE_FIXED - use SetPlayerCameraPos after this to position the player's camera, and it will track the player/vehicle set with PlayerSpectatePlayer/PlayerSpectateVehicle.
            • - *
            • SPECTATE_MODE_SIDE - the camera will be attached to the side of the player/vehicle (like when you're in first-person camera on a bike and you do a wheelie).
            • + *
            • SPECTATE_MODE_NORMAL - normal spectate mode (third person point of view). + * Camera can not be changed.
            • + *
            • SPECTATE_MODE_FIXED - use SetPlayerCameraPos after this to position the player's + * camera, and it will track the player/vehicle set with PlayerSpectatePlayer/PlayerSpectateVehicle.
            • + *
            • SPECTATE_MODE_SIDE - the camera will be attached to the side of the player/vehicle + * (like when you're in first-person camera on a bike and you do a wheelie).
            • *
            *
            * @@ -2894,16 +3214,22 @@ native PlayerSpectatePlayer(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_MO /** * a_players - * Sets a player to spectate another vehicle. Their camera will be attached to the vehicle as if they are driving it. + * Sets a player to spectate another vehicle. Their camera will be attached to the vehicle + * as if they are driving it. * The ID of the player who should spectate a vehicle * The ID of the vehicle the player should spectate * The spectate mode. Can generally be left blank as it defaults to 'normal' * * - * Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpectatePlayer. - * playerid and targetid have to be in the same interior for this function to work properly. + * Order is CRITICAL! Ensure that you use TogglePlayerSpectating + * before PlayerSpectatePlayer. + * playerid and targetid have to be in the same interior for this function to work properly. + * * - * 1: The function executed successfully. Note that success is reported if the player is not in spectator mode (TogglePlayerSpectating), but nothing will happen. TogglePlayerSpectating MUST be used first.
            + * 1: The function executed successfully. Note that success is reported if the player + * is not in spectator mode (TogglePlayerSpectating), but nothing + * will happen. TogglePlayerSpectating MUST be used first.
            * 0: The function failed to execute. The player, vehicle, or both don't exist. *
            */ @@ -2914,7 +3240,9 @@ native PlayerSpectateVehicle(playerid, targetid, SPECTATE_MODE:mode = SPECTATE_M * Starts recording a player's movements to a file, which can then be reproduced by an NPC. * The ID of the player to record * The type of recording - * The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback + * The name of the file which will hold the recorded data. It will be saved + * in the scriptfiles directory, with an automatically added .rec extension, you will need to move the + * file to npcmodes/recordings to use for playback * * This function was added in SA-MP 0.3a and will not work in earlier versions! */ @@ -2922,7 +3250,8 @@ native StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE:recordType, cons /** * a_players - * Stops all the recordings that had been started with StartRecordingPlayerData for a specific player. + * Stops all the recordings that had been started with StartRecordingPlayerData + * for a specific player. * The player you want to stop the recordings of * * This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -2940,7 +3269,8 @@ native StopRecordingPlayerData(playerid); * * * This function was added in SA-MP 0.3e and will not work in earlier versions! - * TextDrawSetSelectable or PlayerTextDrawSetSelectable MUST be used first, to allow a textdraw to be selectable. + * TextDrawSetSelectable or PlayerTextDrawSetSelectable + * MUST be used first, to allow a textdraw to be selectable. * It is the TEXT which will be highlighted when hovered over, NOT the box (if one is shown). */ native SelectTextDraw(playerid, hoverColour); // enables the mouse so the player can select a textdraw @@ -2953,7 +3283,9 @@ native SelectTextDraw(playerid, hoverColour); // enables the mouse so the player * * * This function was added in SA-MP 0.3e and will not work in earlier versions! - * This function calls OnPlayerClickTextDraw with INVALID_TEXT_DRAW (65535). Using this function inside OnPlayerClickTextDraw without catching this case will cause clients to go into an infinite loop. + * This function calls OnPlayerClickTextDraw with INVALID_TEXT_DRAW + * (65535). Using this function inside OnPlayerClickTextDraw + * without catching this case will cause clients to go into an infinite loop. */ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mouse @@ -2961,7 +3293,9 @@ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mou /** * a_players - * Creates an explosion that is only visible to a single player. This can be used to isolate explosions from other players or to make them only appear in specific virtual worlds. + * Creates an explosion that is only visible to a single player. This can be used to isolate + * explosions from other players or to make them only appear in specific virtual + * worlds. * The ID of the player to create the explosion for * The x coordinate of the explosion * The y coordinate of the explosion @@ -2970,8 +3304,10 @@ native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mou * The radius of the explosion * * This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! - * There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. - * This function always returns 1, even if the function failed to excute (player doesn't exist, invalid radius, or invalid explosion type). + * There is a limit as to how many explosions can be seen at once by a player. This is roughly + * 10. + * This function always returns 1, even if the function failed to excute (player + * doesn't exist, invalid radius, or invalid explosion type). */ native CreateExplosionForPlayer(playerid, Float:x, Float:y, Float:z, type, Float:radius); diff --git a/a_samp.inc b/a_samp.inc index ef6a040..866ec70 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -591,7 +591,8 @@ open.mp releases can use `A` as the first digit. * Indefinite number of arguments of any tag * * - * The format string or its output should not exceed 1024 characters. Anything beyond that length can lead to a server to crash. + * The format string or its output should not exceed 1024 characters. Anything beyond that + * length can lead to a server to crash. * This function doesn't support packed strings. * * Format Specifiers:
            @@ -607,8 +608,14 @@ open.mp releases can use `A` as the first digit. *
          • %q - escape a text for SQLite. (Added in 0.3.7 R2)
          • *
          *
          - * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. - * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + * The values for the placeholders follow in the exact same order as parameters in the call. + * For example, "I am %i years old" - the %i will be replaced with an Integer + * variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder + * code. This number indicates the field width; if the size of the parameter to print at the position + * of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the + * number of decimal places beeing shown of a float, you can add .<max number> between + * the % and the f. (example: %.2f) */ #if defined _console_included static stock a_samp_unused_printf(const format[], {Float, _}:...) @@ -649,25 +656,35 @@ open.mp releases can use `A` as the first digit. *
        • %q - escape a text for SQLite. (Added in 0.3.7 R2)
        • *
        *
        - * The values for the placeholders follow in the exact same order as parameters in the call. For example, "I am %i years old" - the %i will be replaced with an Integer variable, which is the person's age. - * You may optionally put a number between the % and the letter of the placeholder code. This number indicates the field width; if the size of the parameter to print at the position of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the number of decimal places beeing shown of a float, you can add .<max number> between the % and the f. (example: %.2f) + * The values for the placeholders follow in the exact same order as parameters in the call. + * For example, "I am %i years old" - the %i will be replaced with an Integer + * variable, which is the person's age. + * You may optionally put a number between the % and the letter of the placeholder + * code. This number indicates the field width; if the size of the parameter to print at the position + * of the placeholder is smaller than the field width, the field is expanded with spaces. To cut the + * number of decimal places beeing shown of a float, you can add .<max number> between + * the % and the f. (example: %.2f) */ native format(output[], len = sizeof (output), const format[], {Float, _}:...); /** * a_samp - * This function sends a message to a specific player with a chosen colour in the chat. The whole line in the chatbox will be in the set colour unless colour embedding is used (since 0.3c). + * This function sends a message to a specific player with a chosen colour in the chat. The + * whole line in the chatbox will be in the set colour unless colour embedding is used (since 0.3c). * The ID of the player to display the message to * The colour of the message (RGBA) * The text that will be displayed (max 144 characters) * * * - * If a message is longer than 144 characters, it will not be sent. Truncation can be used to prevent this. Displaying a message on multiple lines will also solve this issue. - * Avoid using the percent sign (or format specifiers) in the actual message text without properly escaping it (like %%). It will result in crashes otherwise. + * If a message is longer than 144 characters, it will not be sent. Truncation can be used + * to prevent this. Displaying a message on multiple lines will also solve this issue. + * Avoid using the percent sign (or format specifiers) in the actual message text without properly + * escaping it (like %%). It will result in crashes otherwise. * You can use colour embedding for multiple colours in the message. * - * 1: The function executed successfully. Success is reported when the string is over 144 characters, but the message won't be sent.
        + * 1: The function executed successfully. Success is reported when the string is over + * 144 characters, but the message won't be sent.
        * 0: The function failed to execute. The player is not connected. *
        */ @@ -680,14 +697,17 @@ native SendClientMessage(playerid, colour, const message[]); * The message to show (max 144 characters) * * - * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. + * Avoid using format specifiers in your messages without formatting the string that is sent. + * It will result in crashes otherwise. * This function always returns 1. */ native SendClientMessageToAll(colour, const message[]); /** * a_samp - * Sends a message in the name of a player to another player on the server. The message will appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. + * Sends a message in the name of a player to another player on the server. The message will + * appear in the chat box but can only be seen by the user specified with . The line will start with the sender's name in their colour, followed by the message in white. * The ID of the player who will receive the message * The sender's ID. If invalid, the message will not be sent * The message that will be sent @@ -695,19 +715,22 @@ native SendClientMessageToAll(colour, const message[]); * * * - * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. + * Avoid using format specifiers in your messages without formatting the string that is sent. + * It will result in crashes otherwise. */ native SendPlayerMessageToPlayer(playerid, senderid, const message[]); /** * a_samp - * Sends a message in the name of a player to all other players on the server. The line will start with the sender's name in their colour, followed by the message in white. + * Sends a message in the name of a player to all other players on the server. The line will + * start with the sender's name in their colour, followed by the message in white. * The ID of the sender. If invalid, the message will not be sent * The message that will be sent * * * - * Avoid using format specifiers in your messages without formatting the string that is sent. It will result in crashes otherwise. + * Avoid using format specifiers in your messages without formatting the string that is sent. + * It will result in crashes otherwise. */ native SendPlayerMessageToAll(senderid, const message[]); @@ -716,13 +739,19 @@ native SendPlayerMessageToAll(senderid, const message[]); * Adds a death to the 'killfeed' on the right-hand side of the screen for all players. * The ID of the killer (can be INVALID_PLAYER_ID) * The ID of the player that died - * The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) + * The reason (not always a weapon) + * for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) * * - * Death messages can be cleared by using a valid player ID for that is not connected. - * To show a death message for just a single player, use SendDeathMessageToPlayer. + * Death messages can be cleared by using a valid player ID for + * that is not connected. + * To show a death message for just a single player, use SendDeathMessageToPlayer. + * * You can use NPCs to create your own custom death reasons. - * This function always returns 1, even if the function fails to execute. The function fails to execute (no death message shown) if is invalid. If is invalid, a generic skull-and-crossbones icon is shown. being invalid (INVALID_PLAYER_ID) is valid. + * This function always returns 1, even if the function fails to execute. The + * function fails to execute (no death message shown) if is invalid. If + * is invalid, a generic skull-and-crossbones icon is shown. being invalid (INVALID_PLAYER_ID) is valid. */ native SendDeathMessage(killer, killee, weapon); @@ -732,7 +761,8 @@ native SendDeathMessage(killer, killee, weapon); * The ID of the player to send the death message to * The ID of the killer (can be INVALID_PLAYER_ID) * The ID of the player that died - * The reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) + * The reason (not always a weapon) + * for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT) * * * This Function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! @@ -765,8 +795,11 @@ native GameTextForAll(const string[], time, style); * * * - * 1: The function executed successfully. Success is reported when the style and/or time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.
        - * 0: The function failed to execute. This means either the string is null or the player is not connected. + * 1: The function executed successfully. Success is reported when the style and/or + * time is invalid. Nothing will happen though (no text displayed). May also cause game crashes.
        + * 0: The function failed to execute. This means either the string is null or the player + * is not connected. *
        */ native GameTextForPlayer(playerid, const string[], time, style); @@ -774,13 +807,16 @@ native GameTextForPlayer(playerid, const string[], time, style); /** * a_samp * Sets a 'timer' to call a function after some time. Can be set to repeat. - * Name of the function to call as a string. This must be a public function (forwarded). A null string here will crash the server + * Name of the function to call as a string. This must be a public function + * (forwarded). A null string here will crash the server * Interval in milliseconds * Whether the timer should repeat or not * * - * Timer intervals are not accurate (roughly 25% off). There's a fix available here. - * Timer IDs are never used twice. You can use KillTimer on a timer ID and it won't matter if it's running or not. + * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * + * Timer IDs are never used twice. You can use KillTimer on a timer + * ID and it won't matter if it's running or not. * The function that should be called must be public. * The use of many timers will result in increased memory/cpu usage. * The ID of the timer that was started. Timer IDs start at 1. @@ -789,18 +825,22 @@ native SetTimer(const functionName[], interval, bool:repeating); /** * a_samp - * Sets a timer to call a function after the specified interval. This variant ('Ex') can pass parameters (such as a player ID) to the function. + * Sets a timer to call a function after the specified interval. This variant ('Ex') can pass + * parameters (such as a player ID) to the function. * The name of a public function to call when the timer expires * Interval in milliseconds - * Whether the timer should be called repeatedly (can only be stopped with KillTimer) or only once + * Whether the timer should be called repeatedly (can only be stopped with KillTimer) or only once * Special format indicating the types of values the timer will pass * Indefinite number of arguments to pass (must follow format specified in previous parameter) * * * * - * Timer intervals are not accurate (roughly 25% off). There's a fix available here. - * Timer IDs are never used twice. You can use KillTimer() on a timer ID and it won't matter if it's running or not. + * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * + * Timer IDs are never used twice. You can use KillTimer() on a timer ID and it won't matter + * if it's running or not. * The function that should be called must be public. * The use of many timers will result in increased memory/cpu usage. * @@ -808,20 +848,24 @@ native SetTimer(const functionName[], interval, bool:repeating); *
          *
        • i - integer
        • *
        • d - integer
        • - *
        • a - array The next parameter must be an integer ("i") with the array's size [CURRENTLY UNUSABLE]
        • + *
        • a - array The next parameter must be an integer ("i") with the + * array's size [CURRENTLY UNUSABLE]
        • *
        • s - string [CURRENTLY UNUSABLE]
        • *
        • f - float
        • *
        • b - boolean
        • *
        *
        - * The ID of the timer that was started. Timer IDs start at 1 and are never reused. There are no internal checks to verify that the parameters passed are valid (e.g. duration not a minus value). + * The ID of the timer that was started. Timer IDs start at 1 and are never + * reused. There are no internal checks to verify that the parameters passed are valid (e.g. duration + * not a minus value). */ native SetTimerEx(const functionName[], interval, bool:repeating, const format[] = "", {Float, _}:...); /** * a_samp * Kills (stops) a running timer. - * The ID of the timer to kill (returned by SetTimer or SetTimerEx) + * The ID of the timer to kill (returned by SetTimer or + * SetTimerEx) * * * This function always returns 0. @@ -832,18 +876,24 @@ native KillTimer(timerid); * a_samp * Returns the uptime of the actual server (not the SA-MP server) in milliseconds. * - * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount will eventually warp past the integer size constraints. However using this function fixes the problem. - * One common use for GetTickCount is for benchmarking. It can be used to calculate how much time some code takes to execute. + * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount + * will eventually warp past the integer size constraints. However using this + * function fixes the problem. + * One common use for GetTickCount is for benchmarking. It can be used to calculate how much + * time some code takes to execute. * Uptime of the actual server (not the SA-MP server). */ native GetTickCount(); /** * a_samp - * Returns the maximum number of players that can join the server, as set by the server variable 'maxplayers' in server.cfg. + * Returns the maximum number of players that can join the server, as set by the server variable + * 'maxplayers' in server.cfg. * * - * This function can not be used in place of MAX_PLAYERS. It can not be used at compile time (e.g. for array sizes). MAX_PLAYERS should always be re-defined to what the 'maxplayers' var will be, or higher. + * This function can not be used in place of MAX_PLAYERS. It can not be used + * at compile time (e.g. for array sizes). MAX_PLAYERS should always be re-defined to + * what the 'maxplayers' var will be, or higher. * The maximum number of players that can join the server. */ native GetMaxPlayers(); @@ -953,7 +1003,8 @@ native Float:atan2(Float:y, Float:x); * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * The highest playerid currently in use on the server or 0 if there are no connected players. + * The highest playerid currently in use on the server or 0 if there are no connected + * players. */ native GetPlayerPoolSize(); @@ -962,7 +1013,8 @@ native GetPlayerPoolSize(); * Gets the highest vehicleid currently in use on the server. * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * The highest vehicleid currently in use on the server or 0 if there are no created vehicles. + * The highest vehicleid currently in use on the server or 0 if there are no + * created vehicles. */ native GetVehiclePoolSize(); @@ -981,14 +1033,17 @@ native GetActorPoolSize(); /** * a_samp - * Hashes a password using the SHA-256 hashing algorithm. Includes a salt. The output is always 256 bytes in length, or the equivalent of 64 Pawn cells. + * Hashes a password using the SHA-256 hashing algorithm. Includes a salt. The output is + * always 256 bytes in length, or the equivalent of 64 Pawn cells. * The password to hash * The salt to use in the hash * The returned hash * The returned hash maximum length * This function was added in SA-MP 0.3.7-R1 and will not work in earlier versions! - * The salt is appended to the end of the password, meaning password 'foo' and salt 'bar' would form 'foobar'. - * The salt should be random, unique for each player and at least as long as the hashed password. It is to be stored alongside the actual hash in the player's account. + * The salt is appended to the end of the password, meaning password 'foo' and salt 'bar' would + * form 'foobar'. + * The salt should be random, unique for each player and at least as long as the hashed password. + * It is to be stored alongside the actual hash in the player's account. */ #pragma deprecated Use BCrypt for hashing passwords. native SHA256_PassHash(const password[], const salt[], output[], size = sizeof (output)); // SHA256 for password hashing @@ -1025,7 +1080,8 @@ native SetSVarInt(const svar[], value); * * * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! - * The integer value of the specified server variable. It will still return 0 if the variable is not set. + * The integer value of the specified server variable. It will still return 0 + * if the variable is not set. */ native GetSVarInt(const svar[]); @@ -1095,7 +1151,8 @@ native SetSVarFloat(const svar[], Float:value); * * * This function was added in SA-MP 0.3.7 R2 and will not work in earlier versions! - * The float value of the specified server variable. It will still return 0 if the variable is not set. + * The float value of the specified server variable. It will still return 0 + * if the variable is not set. */ native Float:GetSVarFloat(const svar[]); @@ -1109,7 +1166,8 @@ native Float:GetSVarFloat(const svar[]); * * * - * Once a variable is deleted, attempts to retrieve the value will return 0 (for integers and floats and NULL for strings. + * Once a variable is deleted, attempts to retrieve the value will return 0 (for + * integers and floats and NULL for strings. * * 1: The function executed successfully.
        * 0: The function failed to execute. There is no variable set with the given name. @@ -1119,7 +1177,8 @@ native DeleteSVar(const svar[]); /** * a_samp - * Each SVar (server-variable) has its own unique identification number for lookup, this function returns the highest ID. + * Each SVar (server-variable) has its own unique identification number for lookup, this function + * returns the highest ID. * * * The highest set SVar ID. @@ -1174,7 +1233,10 @@ native SetGameModeText(const string[]); /** * a_samp - * This function is used to change the amount of teams used in the gamemode. It has no obvious way of being used, but can help to indicate the number of teams used for better (more effective) internal handling. This function should only be used in the OnGameModeInit callback. Important: You can pass 2 billion here if you like, this function has no effect at all. + * This function is used to change the amount of teams used in the gamemode. It has no obvious + * way of being used, but can help to indicate the number of teams used for better (more effective) + * internal handling. This function should only be used in the OnGameModeInit + * callback. Important: You can pass 2 billion here if you like, this function has no effect at all. * Number of teams the gamemode knows * * @@ -1183,26 +1245,33 @@ native SetTeamCount(count); /** * a_samp - * Adds a class to class selection. Classes are used so players may spawn with a skin of their choice. - * The skin which the player will spawn with + * Adds a class to class selection. Classes are used so players may spawn with a skin of their + * choice. + * The skin which the player will + * spawn with * The x coordinate of the spawnpoint of this class * The y coordinate of the spawnpoint of this class * The z coordinate of the spawnpoint of this class * The direction in which the player should face after spawning - * The first spawn-weapon for the player + * The first spawn-weapon for + * the player * The amount of ammunition for the primary spawn weapon - * The second spawn-weapon for the player + * The second spawn-weapon for + * the player * The amount of ammunition for the second spawn weapon - * The third spawn-weapon for the player + * The third spawn-weapon for + * the player * The amount of ammunition for the third spawn weapon * *
          *
        • The ID of the class which was just added.
        • - *
        • 319 if the class limit (320) was reached. The highest possible class ID is 319.
        • + *
        • 319 if the class limit (320) was reached. The highest possible + * class ID is 319.
        • *
        *
        * - * The maximum class ID is 319 (starting from 0, so a total of 320 classes). + * The maximum class ID is 319 (starting from 0, so a total of 320 + * classes). * When this limit is reached, any more classes that are added will replace ID 319. * * @@ -1213,26 +1282,34 @@ native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:a /** * a_samp - * This function is exactly the same as the AddPlayerClass function, with the addition of a team parameter. + * This function is exactly the same as the AddPlayerClass function, + * with the addition of a team parameter. * The team you want the player to spawn in - * The skin which the player will spawn with + * The skin which the player will + * spawn with * The x coordinate of the spawnpoint of this class * The y coordinate of the spawnpoint of this class * The z coordinate of the spawnpoint of this class * The direction in which the player should face after spawning - * The first spawn-weapon for the player + * The first spawn-weapon for + * the player * The amount of ammunition for the primary spawn weapon - * The second spawn-weapon for the player + * The second spawn-weapon for + * the player * The amount of ammunition for the second spawn weapon - * The third spawn-weapon for the player + * The third spawn-weapon for + * the player * The amount of ammunition for the third spawn weapon * *
          *
        • The ID of the class which was just added.
        • - *
        • 319 if the class limit (320) was reached. The highest possible class ID is 319.
        • + *
        • 319 if the class limit (320) was reached. The highest possible + * class ID is 319.
        • *
        *
        - * The maximum class ID is 319 (starting from 0, so a total of 320 classes). When this limit is reached, any more classes that are added will replace ID 319. + * The maximum class ID is 319 (starting from 0, so a total of + * 320 classes). When this limit is reached, any more classes that are added will replace + * ID 319. * * * @@ -1243,17 +1320,21 @@ native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawn /** * a_samp * Adds a 'static' vehicle (models are pre-loaded for players) to the gamemode. - * The Model ID for the vehicle + * The Model ID for the + * vehicle * The x coordinate of the spawnpoint of this vehicle * The y coordinate of the spawnpoint of this vehicle * The z coordinate of the spawnpoint of this vehicle * Direction of vehicle - angle - * The primary colour ID. -1 for random (random colour chosen by client) - * The secondary colour ID. -1 for random (random colour chosen by client) + * The primary colour ID. -1 + * for random (random colour chosen by client) + * The secondary colour ID. + * -1 for random (random colour chosen by client) * *
          *
        • The vehicle ID of the vehicle created (between 1 and MAX_VEHICLES).
        • - *
        • INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed).
        • + *
        • INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle + * limit reached or invalid vehicle model ID passed).
        • *
        *
        * Can only be used when the server first starts (under OnGameModeInit). @@ -1265,20 +1346,27 @@ native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float /** * a_samp - * Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from AddStaticVehicle in only one way: allows a respawn time to be set for when the vehicle is left unoccupied by the driver. - * The Model ID for the vehicle + * Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from + * AddStaticVehicle in only one way: allows a respawn time to be set + * for when the vehicle is left unoccupied by the driver. + * The Model ID for the + * vehicle * The x coordinate of the spawnpoint of this vehicle * The y coordinate of the spawnpoint of this vehicle * The z coordinate of the spawnpoint of this vehicle * Direction of vehicle - angle - * The primary colour ID. -1 for random (random colour chosen by client) - * The secondary colour ID. -1 for random (random colour chosen by client) + * The primary colour ID. -1 + * for random (random colour chosen by client) + * The secondary colour ID. + * -1 for random (random colour chosen by client) * The delay until the car is respawned without a driver, in seconds - * Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=0) + * Added in 0.3.7; will not work in earlier versions. Enables the vehicle + * to have a siren, providing the vehicle has a horn (optional=0) * *
          *
        • The vehicle ID of the vehicle created (between 1 and MAX_VEHICLES).
        • - *
        • INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed).
        • + *
        • INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle + * limit reached or invalid vehicle model ID passed).
        • *
        *
        * Can only be used when the server first starts (under OnGameModeInit). @@ -1290,19 +1378,23 @@ native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Flo /** * a_samp - * This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically). + * This function adds a 'static' pickup to the game. These pickups support weapons, health, + * armor etc., with the ability to function without scripting them (weapons/health/armor will be given + * automatically). * The model of the pickup * The pickup type. Determines how the pickup responds when picked up * The x coordinate to create the pickup at * The y coordinate to create the pickup at * The z coordinate to create the pickup at - * The virtual world ID to put the pickup in. Use -1 to show the pickup in all worlds + * The virtual world ID to put the pickup in. Use -1 to show the pickup + * in all worlds * * 1 if the pickup is successfully created. *
        * 0 if failed to create. *
        - * This function doesn't return a pickup ID that you can use in, for example, OnPlayerPickUpPickup. Use CreatePickup if you'd like to assign IDs. + * This function doesn't return a pickup ID that you can use in, for example, OnPlayerPickUpPickup. + * Use CreatePickup if you'd like to assign IDs. * * * @@ -1311,48 +1403,70 @@ native AddStaticPickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0) /** * a_samp - * This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. + * This function does exactly the same as AddStaticPickup, except it returns a pickup ID which + * can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup. * The model of the pickup * The pickup spawn type (see table under remarks) * The x coordinate to create the pickup at * The y coordinate to create the pickup at * The z coordinate to create the pickup at - * The virtual world ID of the pickup. Use -1 to make the pickup show in all worlds (optional=0) + * The virtual world ID of the pickup. Use -1 to make the + * pickup show in all worlds (optional=0) * * * * * Known Bugs:
        - * Pickups that have a x or y lower than -4096.0 or bigger than 4096.0 won't show up and won't trigger OnPlayerPickUpPickup either. + * Pickups that have a x or y lower than -4096.0 or bigger than 4096.0 + * won't show up and won't trigger OnPlayerPickUpPickup either. *
        * - * The only type of pickup that can be picked up from inside a vehicle is 14 (except for special pickups such as bribes).
        + * The only type of pickup that can be picked up from inside a vehicle is 14 (except + * for special pickups such as bribes).
        * Pickups are shown to, and can be picked up by all players.
        - * It is possible that if DestroyPickup is used when a pickup is picked up, more than one player can pick up the pickup, due to lag. This can be circumvented through the use of variables.
        - * Certain pickup types come with 'automatic responses', for example using an M4 model in the pickup will automatically give the player the weapon and some ammo. For fully scripted pickups, type 1 should be used.
        + * It is possible that if DestroyPickup is used when a pickup is picked + * up, more than one player can pick up the pickup, due to lag. This can be circumvented through the + * use of variables.
        + * Certain pickup types come with 'automatic responses', for example using an M4 model in the pickup + * will automatically give the player the weapon and some ammo. For fully scripted pickups, type 1 + * should be used.
        *
        * * Available Pickup Types
        - * Most other IDs are either undocumented or are similar to type 1 (but do not use them just because they seem similar to ID 1, they might have side-effects like ID 18 and 20). + * Most other IDs are either undocumented or are similar to type 1 (but do not use them + * just because they seem similar to ID 1, they might have side-effects like ID 18 + * and 20). *
          - *
        • 0 - The pickup does not always display. If displayed, it can't be picked up and does not trigger OnPlayerPickUpPickup and it will stay after server shutdown.
        • - *
        • 1 - Exists always. Disables pickup scripts such as horseshoes and oysters to allow for scripted actions ONLY. Will trigger OnPlayerPickUpPickup every few seconds.
        • - *
        • 2 - Disappears after pickup, respawns after 30 seconds if the player is at a distance of at least 15 meters.
        • + *
        • 0 - The pickup does not always display. If displayed, it can't be picked up + * and does not trigger OnPlayerPickUpPickup and it will stay after + * server shutdown.
        • + *
        • 1 - Exists always. Disables pickup scripts such as horseshoes and oysters + * to allow for scripted actions ONLY. Will trigger OnPlayerPickUpPickup + * every few seconds.
        • + *
        • 2 - Disappears after pickup, respawns after 30 seconds if the player is at + * a distance of at least 15 meters.
        • *
        • 3 - Disappears after pickup, respawns after death.
        • *
        • 4 - Disappears after 15 to 20 seconds. Respawns after death.
        • *
        • 8 - Disappears after pickup, but has no effect.
        • *
        • 11 - Blows up a few seconds after being created (bombs?)
        • *
        • 12 - Blows up a few seconds after being created.
        • - *
        • 13 - Invisible. Triggers checkpoint sound when picked up with a vehicle, but doesn't trigger OnPlayerPickUpPickup.
        • - *
        • 14 - Disappears after pickup, can only be picked up with a vehicle. Triggers checkpoint sound.
        • + *
        • 13 - Invisible. Triggers checkpoint sound when picked up with a vehicle, but + * doesn't trigger OnPlayerPickUpPickup.
        • + *
        • 14 - Disappears after pickup, can only be picked up with a vehicle. Triggers + * checkpoint sound.
        • *
        • 15 - Same as type 2.
        • - *
        • 18 - Similar to type 1. Pressing Tab (KEY_ACTION) makes it disappear but the key press doesn't trigger OnPlayerPickUpPickup.
        • - *
        • 19 - Disappears after pickup, but doesn't respawn. Makes "cash pickup" sound if picked up.
        • - *
        • 20 - Similar to type 1. Disappears when you take a picture of it with the Camera weapon, which triggers "Snapshot # out of 0" message. Taking a picture doesn't trigger OnPlayerPickUpPickup.
        • + *
        • 18 - Similar to type 1. Pressing Tab (KEY_ACTION) + * makes it disappear but the key press doesn't trigger OnPlayerPickUpPickup.
        • + *
        • 19 - Disappears after pickup, but doesn't respawn. Makes "cash pickup" sound + * if picked up.
        • + *
        • 20 - Similar to type 1. Disappears when you take a picture of + * it with the Camera weapon, which triggers "Snapshot # out of 0" message. Taking a picture doesn't + * trigger OnPlayerPickUpPickup.
        • *
        • 22 - Same as type 3.
        • *
        *
        - * The ID of the created pickup, -1 on failure (pickup max limit). + * The ID of the created pickup, -1 on failure (pickup + * max limit). */ native CreatePickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0); @@ -1372,14 +1486,17 @@ native DestroyPickup(pickup); * * * - * This function can only be used in OnGameModeInit. For other times, see ShowPlayerNameTagForPlayer. + * This function can only be used in OnGameModeInit. For other + * times, see ShowPlayerNameTagForPlayer. */ native ShowNameTags(bool:show); /** * a_samp - * Toggles player markers (blips on the radar). Must be used when the server starts (OnGameModeInit). For other times, see SetPlayerMarkerForPlayer. - * The mode to use for markers. They can be streamed, meaning they are only visible to nearby players. See table below + * Toggles player markers (blips on the radar). Must be used when the server starts (OnGameModeInit). + * For other times, see SetPlayerMarkerForPlayer. + * The mode to use for markers. They can be streamed, meaning they are only visible + * to nearby players. See table below * * * @@ -1392,7 +1509,8 @@ native ShowNameTags(bool:show); *
      • PLAYER_MARKERS_MODE_STREAMED 2
      • *
      *
      - * It is also possible to set a player's colour to a colour that has full transparency (no alpha value). This makes it possible to show markers on a per-player basis. + * It is also possible to set a player's colour to a colour that has full transparency (no + * alpha value). This makes it possible to show markers on a per-player basis. */ native ShowPlayerMarkers(PLAYER_MARKERS_MODE:mode); @@ -1434,14 +1552,16 @@ native GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); /** * a_samp * 1 to enable, 0 to disable tire popping - * This function was removed in SA-MP 0.3. Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. + * This function was removed in SA-MP 0.3. Tire popping is enabled by default. If + * you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. */ #pragma deprecated Use `OnVehicleDamageStatusUpdate`. native EnableTirePopping(bool:enable); // deprecated function /** * a_samp - * Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles (SetPlayerTeam must be used!). + * Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles + * (SetPlayerTeam must be used!). * * This function was added in SA-MP 0.3x and will not work in earlier versions! */ @@ -1450,7 +1570,8 @@ native EnableVehicleFriendlyFire(); /** * a_samp * Toggle whether the usage of weapons in interiors is allowed or not. - * 1 to enable weapons in interiors (enabled by default), 0 to disable weapons in interiors + * 1 to enable weapons in interiors (enabled by default), 0 + * to disable weapons in interiors * This function does not work in the current SA:MP version! * * @@ -1465,7 +1586,8 @@ native AllowInteriorWeapons(bool:allow); * The weather to set * * - * If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly. + * If TogglePlayerClock is enabled, weather will slowly change + * over time, instead of changing instantly. */ native SetWeather(weatherid); @@ -1485,13 +1607,15 @@ native Float:GetGravity(); * * * Default gravity is 0.008. - * This function always returns 1, even when it fails to execute if the gravity is out of the limits (lower than -50.0 or higher than +50.0). + * This function always returns 1, even when it fails to execute if the gravity + * is out of the limits (lower than -50.0 or higher than +50.0). */ native SetGravity(Float:gravity); /** * a_samp - * This function will determine whether RCON admins will be teleported to their waypoint when they set one. + * This function will determine whether RCON admins will be teleported to their waypoint when + * they set one. * 0 to disable and 1 to enable * This function, as of 0.3d, is deprecated. Please see OnPlayerClickMap. * @@ -1519,14 +1643,18 @@ native SetDeathDropAmount(amount); * The type of explosion * The explosion radius * - * There is a limit as to how many explosions can be seen at once by a player. This is roughly 10. - * This function always returns 1, even when the explosion type and/or radius values are invalid. + * There is a limit as to how many explosions can be seen at once by a player. This is roughly + * 10. + * This function always returns 1, even when the explosion type and/or radius + * values are invalid. */ native CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); /** * a_samp - * This function allows to turn on zone / area names such as the "Vinewood" or "Doherty" text at the bottom-right of the screen as they enter the area. This is a gamemode option and should be set in the callback OnGameModeInit. + * This function allows to turn on zone / area names such as the "Vinewood" or "Doherty" text + * at the bottom-right of the screen as they enter the area. This is a gamemode option and should be + * set in the callback OnGameModeInit. * A toggle option for whether or not you'd like zone names on or off * This function was removed in SA-MP 0.3. This was due to crashes it caused. */ @@ -1534,11 +1662,13 @@ native EnableZoneNames(bool:enable); /** * a_samp - * Uses standard player walking animation (animation of the CJ skin) instead of custom animations for every skin (e.g. skating for skater skins). + * Uses standard player walking animation (animation of the CJ skin) instead of custom animations + * for every skin (e.g. skating for skater skins). * * * Only works when placed under OnGameModeInit. - * Not using this function causes two-handed weapons (not dual-handed - a single weapon that is held by both hands) to be held in only one hand. + * Not using this function causes two-handed weapons (not dual-handed - a single weapon that + * is held by both hands) to be held in only one hand. */ native UsePlayerPedAnims(); // Will cause the players to use CJ running/walking animations @@ -1546,8 +1676,11 @@ native UsePlayerPedAnims(); // Will cause the players to use CJ running/walking * a_samp * Disable all the interior entrances and exits in the game (the yellow arrows at doors). * - * If the gamemode is changed after this function has been used, and the new gamemode doesn't disable markers, the markers will NOT reappear for already-connected players (but will for newly connected players). - * This function will only work if it has been used BEFORE a player connects (it is recommended to use it in OnGameModeInit). It will not remove a connected player's markers. + * If the gamemode is changed after this function has been used, and the new gamemode doesn't + * disable markers, the markers will NOT reappear for already-connected players (but will for newly + * connected players). + * This function will only work if it has been used BEFORE a player connects (it is recommended + * to use it in OnGameModeInit). It will not remove a connected player's markers. * This function always returns 1. */ native DisableInteriorEnterExits(); // will disable all interior enter/exits in the game. @@ -1575,7 +1708,9 @@ native DisableNameTagLOS(); // Disables the nametag Line-Of-Sight checking /** * a_samp - * Set a radius limitation for the chat. Only players at a certain distance from the player will see their message in the chat. Also changes the distance at which a player can see other players on the map at the same distance. + * Set a radius limitation for the chat. Only players at a certain distance from the player + * will see their message in the chat. Also changes the distance at which a player can see other players + * on the map at the same distance. * The range in which players will be able to see chat * * @@ -1600,8 +1735,10 @@ native LimitPlayerMarkerRadius(Float:markerRadius); /** * a_samp * Connect an NPC to the server. - * The name the NPC should connect as. Must follow the same rules as normal player names - * The NPC script name that is located in the npcmodes folder (without the .amx extension) + * The name the NPC should connect as. Must follow the same rules as normal player + * names + * The NPC script name that is located in the npcmodes folder (without the + * .amx extension) * * * This function was added in SA-MP 0.3a and will not work in earlier versions! @@ -1665,22 +1802,30 @@ native bool:IsPlayerAdmin(playerid); /** * a_samp - * Kicks a player from the server. They will have to quit the game and re-connect if they wish to continue playing. + * Kicks a player from the server. They will have to quit the game and re-connect if they + * wish to continue playing. * The ID of the player to kick * * - * As of SA-MP 0.3x, any action taken directly before Kick() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the kick. - * This function always returns 1, even if the function failed to execute (player specified doesn't exist). + * As of SA-MP 0.3x, any action taken directly before Kick() (such as sending a message + * with SendClientMessage) will not reach the player. A timer must + * be used to delay the kick. + * This function always returns 1, even if the function failed to execute (player + * specified doesn't exist). */ native Kick(playerid); /** * a_samp - * Ban a player who is currently in the server. They will be unable to join the server ever again. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. BanEx can be used to give a reason for the ban. IP bans can be added/removed using the RCON banip and unbanip commands (SendRconCommand). + * Ban a player who is currently in the server. They will be unable to join the server ever + * again. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. + * BanEx can be used to give a reason for the ban. IP bans can be added/removed + * using the RCON banip and unbanip commands (SendRconCommand). * The ID of the player to ban * * - * As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. + * As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message + * with SendClientMessage) will not reach the player. A timer must be used to delay the ban. * */ native Ban(playerid); @@ -1692,7 +1837,8 @@ native Ban(playerid); * The reason for the ban * * - * As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the ban. + * As of SA-MP 0.3x, any action taken directly before Ban() (such as sending a message + * with SendClientMessage) will not reach the player. A timer must be used to delay the ban. */ native BanEx(playerid, const reason[]); @@ -1727,7 +1873,9 @@ native SendRconCommand(const command[]); * * * This function was added in SA-MP 0.3c R4 and will not work in earlier versions! - * This function may not return accurate data when used under OnPlayerDisconnect if the player has quit normally. It usually returns accurate data if the player has been kicked or has timed out. + * This function may not return accurate data when used under OnPlayerDisconnect + * if the player has quit normally. It usually returns accurate data if the player has been kicked + * or has timed out. */ native GetPlayerNetworkStats(playerid, output[], size = sizeof (output)); @@ -1790,13 +1938,19 @@ native GetPlayerVersion(playerid, version[], len = sizeof (version)); // Returns /** * a_samp - * Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. + * Blocks an IP address from further communication with the server for a set amount of time + * (with wildcards allowed). Players trying to connect to the server with a blocked IP address will + * receive the generic "You are banned from this server." message. Players that are online on the specified + * IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message. * The IP to block - * The time (in milliseconds) that the connection will be blocked for. 0 can be used for an indefinite block + * The time (in milliseconds) that the connection will be blocked for. 0 + * can be used for an indefinite block * * * This function was added in SA-MP 0.3z R2-2 and will not work in earlier versions! - * Wildcards can be used with this function, for example blocking the IP 6.9.*.* will block all IPs where the first two octets are 6 and 9 respectively. Any number can be in place of an asterisk. + * Wildcards can be used with this function, for example blocking the IP 6.9.*.* + * will block all IPs where the first two octets are 6 and 9 respectively. + * Any number can be in place of an asterisk. */ native BlockIpAddress(const ipAddress[], timeMS); @@ -1821,10 +1975,14 @@ native UnBlockIpAddress(const ipAddress[]); * * * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsString - * Using this function on anything other than a string (int, bool or float) or a nonexistent server variable, will crash your server! This is a bug. - * Type 'varlist' in the server console to display a list of available server variables and their types. - * When filterscripts or plugins is specified as the cvar, this function only returns the name of the first specified filterscript or plugin. This is a bug. - * The length of the returned string. 0 if the specified server variable is not a string or doesn't exist. + * Using this function on anything other than a string (int, bool or float) or a nonexistent + * server variable, will crash your server! This is a bug. + * Type 'varlist' in the server console to display a list of available server variables and + * their types. + * When filterscripts or plugins is specified as the cvar, this function only returns the name + * of the first specified filterscript or plugin. This is a bug. + * The length of the returned string. 0 if the specified server variable is not + * a string or doesn't exist. */ #pragma deprecated Use `GetConsoleVarAsString`. native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); @@ -1836,8 +1994,10 @@ native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); * * * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsInt - * Type 'varlist' in the server console to display a list of available server variables and their types. - * The value of the specified server variable. 0 if the specified server variable is not an integer or doesn't exist. + * Type 'varlist' in the server console to display a list of available server variables and + * their types. + * The value of the specified server variable. 0 if the specified server variable is not an + * integer or doesn't exist. */ #pragma deprecated Use `GetConsoleVarAsInt`. native GetServerVarAsInt(const cvar[]); @@ -1849,8 +2009,10 @@ native GetServerVarAsInt(const cvar[]); * * * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsBool - * Type 'varlist' in the server console to display a list of available server variables and their types. - * The value of the specified server variable. 0 if the specified server variable is not a boolean or doesn't exist. + * Type 'varlist' in the server console to display a list of available server variables and + * their types. + * The value of the specified server variable. 0 if the specified server variable + * is not a boolean or doesn't exist. */ #pragma deprecated Use `GetConsoleVarAsBool`. native bool:GetServerVarAsBool(const cvar[]); @@ -1864,10 +2026,15 @@ native bool:GetServerVarAsBool(const cvar[]); * The length of the string that should be stored * * - * Type varlist in the server console to display a list of available console variables and their types. - * When filterscripts or plugins are specified as the cvar, this function only returns the name of the first specified filterscript or plugin. - * Using this function with anything other than a string (integer, boolean or float) will cause your server to crash. Using it with a nonexistent console variable will also cause your server to crash. - * The length of the returned string. 0 if the specified console variable is not a string or doesn't exist. + * Type varlist in the server console to display a list of available console + * variables and their types. + * When filterscripts or plugins are specified as the cvar, this function only returns the + * name of the first specified filterscript or plugin. + * Using this function with anything other than a string (integer, boolean or float) + * will cause your server to crash. Using it with a nonexistent console variable will also cause your + * server to crash. + * The length of the returned string. 0 if the specified console variable is + * not a string or doesn't exist. */ native GetConsoleVarAsString(const cvar[], buffer[], len = sizeof (buffer)); @@ -1877,8 +2044,10 @@ native GetConsoleVarAsString(const cvar[], buffer[], len = sizeof (buffer)); * The name of the integer variable to get the value of * * - * Type varlist in the server console to display a list of available console variables and their types. - * The value of the specified console variable. 0 if the specified console variable is not an integer or doesn't exist. + * Type varlist in the server console to display a list of available console + * variables and their types. + * The value of the specified console variable. 0 if the specified console variable + * is not an integer or doesn't exist. */ native GetConsoleVarAsInt(const cvar[]); @@ -1888,8 +2057,10 @@ native GetConsoleVarAsInt(const cvar[]); * The name of the boolean variable to get the value of * * - * Type varlist in the server console to display a list of available console variables and their types. - * The value of the specified console variable. 0 if the specified console variable is not a boolean or doesn't exist. + * Type varlist in the server console to display a list of available console + * variables and their types. + * The value of the specified console variable. 0 if the specified console variable + * is not a boolean or doesn't exist. */ native bool:GetConsoleVarAsBool(const cvar[]); @@ -1906,7 +2077,8 @@ native GetServerTickRate(); /** * a_samp - * Gets the amount of time (in milliseconds) that a player has been connected to the server for. + * Gets the amount of time (in milliseconds) that a player has been connected to the server + * for. * The ID of the player to get the connected time of * * @@ -1919,8 +2091,10 @@ native GetServerTickRate(); * * * This function was added in SA-MP 0.3z and will not work in earlier versions! - * The return value is not reset to zero after changing the game mode (using the RCON command "gmx"). - * This function returns the amount of time (in milliseconds) that a player has been connected to the server for. 0 is returned if the player is not connected. + * The return value is not reset to zero after changing the game mode (using the RCON command + * "gmx"). + * This function returns the amount of time (in milliseconds) that a player has been connected + * to the server for. 0 is returned if the player is not connected. */ native NetStats_GetConnectedTime(playerid); @@ -1939,7 +2113,8 @@ native NetStats_GetConnectedTime(playerid); * * * This function was added in SA-MP 0.3z and will not work in earlier versions! - * This function returns the number of messages the server has received from the player. 0 is returned if the player is not connected. + * This function returns the number of messages the server has received from the player. 0 + * is returned if the player is not connected. */ native NetStats_MessagesReceived(playerid); @@ -1958,7 +2133,8 @@ native NetStats_MessagesReceived(playerid); * * * This function was added in SA-MP 0.3z and will not work in earlier versions! - * This function returns the number of bytes the server has received from the player. 0 is returned if the player is not connected. + * This function returns the number of bytes the server has received from the player. 0 + * is returned if the player is not connected. */ native NetStats_BytesReceived(playerid); @@ -1996,7 +2172,8 @@ native NetStats_MessagesSent(playerid); * * * This function was added in SA-MP 0.3z and will not work in earlier versions! - * This function returns the number of bytes the server has sent to the player. 0 is returned if the player is not connected. + * This function returns the number of bytes the server has sent to the player. 0 + * is returned if the player is not connected. */ native NetStats_BytesSent(playerid); @@ -2021,7 +2198,8 @@ native NetStats_MessagesRecvPerSecond(playerid); /** * a_samp - * Gets the packet loss percentage of a player. Packet loss means data the player is sending to the server is being lost (or vice-versa). + * Gets the packet loss percentage of a player. Packet loss means data the player is sending + * to the server is being lost (or vice-versa). * The ID of the player to get the data from * * @@ -2034,8 +2212,10 @@ native NetStats_MessagesRecvPerSecond(playerid); * * * This function was added in SA-MP 0.3z and will not work in earlier versions! - * Anything greater than 0.0% should already be a cause of concern. Anything greater than 1.0% is outright bad. - * This function has been found to be currently unreliable the output is not as expected when compared to the client. Therefore this function should not be used as a packet loss kicker. + * Anything greater than 0.0% should already be a cause of concern. Anything greater than + * 1.0% is outright bad. + * This function has been found to be currently unreliable the output is not as expected when + * compared to the client. Therefore this function should not be used as a packet loss kicker. * A more accurate packetloss function can be found here: http://forum.sa-mp.com/showpost.php?p=2488911&postcount=984 * The percentage packet loss as a float. 0.0 if player not connected. */ @@ -2105,8 +2285,10 @@ native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); * Creates a menu. * The title for the new menu * How many colums shall the new menu have - * The x position of the menu (640x460 canvas - 0 would put the menu at the far left) - * The y position of the menu (640x460 canvas - 0 would put the menu at the far top) + * The x position of the menu (640x460 canvas - 0 would put the menu at + * the far left) + * The y position of the menu (640x460 canvas - 0 would put the menu at + * the far top) * The width for the first column * The width for the second column (optional=0.0) * @@ -2117,11 +2299,15 @@ native NetStats_GetIpPort(playerid, output[], size = sizeof (output)); * * * - * This function merely CREATES the menu - ShowMenuForPlayer must be used to show it.
      - * You can only create and access 2 columns (0 and 1).
      - * If the title's length is equal to or greater than 32 chars the title is truncated to 30 characters. + * This function merely CREATES the menu - ShowMenuForPlayer must + * be used to show it.
      + * You can only create and access 2 columns (0 and 1).
      + * If the title's length is equal to or greater than 32 chars the title is truncated + * to 30 characters. *
      - * There is a limit of 12 items per menu, and a limit of 128 menus in total. + * There is a limit of 12 items per menu, and a limit of 128 menus + * in total. * The ID of the new menu or -1 on failure. */ native Menu:CreateMenu(const title[], columns, Float:x, Float:y, Float:col1width, Float:col2width = 0.0); @@ -2148,9 +2334,11 @@ native DestroyMenu(Menu:menuid); * *
        *
      • Crashes when passed an invalid menu ID.
      • - *
      • You can only have 12 items per menu (13th goes to the right side of the header of column name (coloured), 14th and higher not display at all).
      • + *
      • You can only have 12 items per menu (13th goes to the right side of the header + * of column name (coloured), 14th and higher not display at all).
      • *
      • You can only use 2 columns (0 and 1).
      • - *
      • You can only add 8 colour codes per one item (~r~, ~g~ etc.).
      • + *
      • You can only add 8 colour codes per one item (~r~, ~g~ + * etc.).
      • *
      • Maximum length of menu item is 31 symbols.
      • *
      *
      @@ -2173,7 +2361,9 @@ native AddMenuItem(Menu:menuid, column, const text[]); * * * Crashes when passed an invalid menu ID. - * Note that you can add only 12 items with AddMenuItem. The 13th object of a menu would replace the header of the column which is correctly set with this function. + * Note that you can add only 12 items with AddMenuItem. + * The 13th object of a menu would replace the header of the column which is correctly set with this + * function. */ native SetMenuColumnHeader(Menu:menuid, column, const heading[]); @@ -2199,7 +2389,8 @@ native ShowMenuForPlayer(Menu:menuid, playerid); /** * a_samp * Hides a menu for a player. - * The ID of the menu to hide. Returned by CreateMenu and passed to OnPlayerSelectedMenuRow + * The ID of the menu to hide. Returned by CreateMenu + * and passed to OnPlayerSelectedMenuRow * The ID of the player that the menu will be hidden for * * @@ -2235,17 +2426,22 @@ native DisableMenu(Menu:menuid); /** * a_samp - * Disable a specific row in a menu for all players. It will be greyed-out and can't be selected by players. - * The ID of the menu to disable a row of. Ensure this is valid, as an invalid menu ID will crash the entire server + * Disable a specific row in a menu for all players. It will be greyed-out and can't + * be selected by players. + * The ID of the menu to disable a row of. Ensure this is valid, as an invalid + * menu ID will crash the entire server * The ID of the row to disable (rows start at 0) * * * * * Crashes when passed an invalid menu ID.
      - * This function disabled the specified menu row for all players. There is no function to disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, and one without. Or one per player. + * This function disabled the specified menu row for all players. There is no function to + * disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, + * and one without. Or one per player. *
      - * This function always returns 1, even if the function fails. If an invalid row is specified, nothing will happen. If an invalid menu ID is specified, the server will crash. + * This function always returns 1, even if the function fails. If an invalid + * row is specified, nothing will happen. If an invalid menu ID is specified, the server will crash. */ native DisableMenuRow(Menu:menuid, row); @@ -2261,33 +2457,46 @@ native DisableMenuRow(Menu:menuid, row); * * * Returns previous menu when none is displayed. - * The ID of the player's currently shown menu, or INVALID_MENU (255) if no menu shown. + * The ID of the player's currently shown menu, or INVALID_MENU (255) + * if no menu shown. */ native Menu:GetPlayerMenu(playerid); /** * a_samp - * Creates a textdraw. Textdraws are, as the name implies, text (mainly - there can be boxes, sprites and model previews (skins/vehicles/weapons/objects too) that is drawn on a player's screens. + * Creates a textdraw. Textdraws are, as the name implies, text (mainly - there can be boxes, + * sprites and model previews (skins/vehicles/weapons/objects too) that is drawn on a player's screens. * The x (left/right) coordinate to create the textdraw at * The y (up/down) coordinate to create the textdraw at * The text that will appear in the textdraw * - * If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.
      - * text[] must not be empty or the server will crash! If you need a textdraw that shows nothing, use a space underscore. Now it's fixed.
      + * If you choose values for y that are less than 1, the first text row will be invisible and only + * the shadow is visible.
      + * text[] must not be empty or the server will crash! If you need a textdraw that shows nothing, use + * a space underscore. Now it's fixed.
      * If the last character in the text is a space, the text will all be blank.
      - * If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will. + * If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) + * will. *
      * * This applies ONLY to sa-mp versions before 0.3z:
      - * Maximum length of textdraw is 800 characters. Longer text will crash the client in older versions.
      - * If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw. + * Maximum length of textdraw is 800 characters. Longer text will crash the client in older + * versions.
      + * If you use colour codes (such as ~R~ ~G~) beyond 255th character the client will + * crash trying to display the textdraw. *
      * - * The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using TextDrawAlignment with alignment 3 (right), the x, y coordinate is the top right coordinate for the text draw.
      - * This function merely CREATES the textdraw, you must use TextDrawShowForPlayer or TextDrawShowForAll to show it.
      - * It is recommended to use WHOLE numbers instead of decimal positions when creating textdraws to ensure resolution friendly design. + * The x, y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" + * (irrespective of screen resolution). If you plan on using TextDrawAlignment + * with alignment 3 (right), the x, y coordinate is the top right coordinate for the text + * draw.
      + * This function merely CREATES the textdraw, you must use TextDrawShowForPlayer + * or TextDrawShowForAll to show it.
      + * It is recommended to use WHOLE numbers instead of decimal positions when creating textdraws to + * ensure resolution friendly design. *
      - * Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ don't work beyond 255th character. + * Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ don't work beyond + * 255th character. * The ID of the created textdraw. Textdraw IDs start at 0. */ native Text:TextDrawCreate(Float:x, Float:y, const text[]); @@ -2305,15 +2514,22 @@ native TextDrawDestroy(Text:text); * The TextDraw to change * Width of a char * Height of a char - * When using this function purely for the benefit of affecting the TextDraw box, multiply 'y' by 0.135 to convert to TextDrawTextSize-like measurements. Hint: it is easier and extremely precise to use LD_SPAC:white sprite for box-only textdraws, TextDrawTextSize will have regular offsets. - * If you want to change the letter size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. - * Fonts appear to look the best with an x to y ratio of 1 to 4 (e.g. if x is 0.5 then y should be 2). + * When using this function purely for the benefit of affecting the TextDraw box, multiply + * 'y' by 0.135 to convert to TextDrawTextSize-like measurements. + * Hint: it is easier and extremely precise to use LD_SPAC:white sprite for box-only + * textdraws, TextDrawTextSize will have regular offsets. + * If you want to change the letter size of a textdraw that is already shown, you don't have + * to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * after modifying the textdraw and the change will be visible. + * Fonts appear to look the best with an x to y ratio of 1 to 4 + * (e.g. if x is 0.5 then y should be 2). */ native TextDrawLetterSize(Text:text, Float:width, Float:height); /** * a_samp - * Change the size of a textdraw (box if TextDrawUseBox is enabled and/or clickable area for use with TextDrawSetSelectable). + * Change the size of a textdraw (box if TextDrawUseBox is enabled + * and/or clickable area for use with TextDrawSetSelectable). * The TextDraw to set the size of * The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate * The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate @@ -2321,16 +2537,23 @@ native TextDrawLetterSize(Text:text, Float:width, Float:height); * The x and y have different meanings with different TextDrawAlignment values:
      *
        *
      • 1 (left): they are the right-most corner of the box, absolute coordinates.
      • - *
      • 2 (center): they need to inverted (switch the two) and the x value is the overall width of the box.
      • - *
      • 3 (right): the x and y are the coordinates of the left-most corner of the box
      • + *
      • 2 (center): they need to inverted (switch the two) and the x value is the overall + * width of the box.
      • + *
      • 3 (right): the x and y are the coordinates of the left-most corner of the box + *
      • *
      *
      * - * Using font type 4 (sprite) and 5 (model preview) converts x and y of this function from corner coordinates to WIDTH and HEIGHT (offsets).
      - * The TextDraw box starts 10.0 units up and 5.0 to the left as the origin (TextDrawCreate coordinate).
      - * This function defines the clickable area for use with TextDrawSetSelectable, whether a box is shown or not. + * Using font type 4 (sprite) and 5 (model preview) converts x and y of + * this function from corner coordinates to WIDTH and HEIGHT (offsets).
      + * The TextDraw box starts 10.0 units up and 5.0 to the left as the origin + * (TextDrawCreate coordinate).
      + * This function defines the clickable area for use with TextDrawSetSelectable, + * whether a box is shown or not. *
      - * If you want to change the text size of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * If you want to change the text size of a textdraw that is already shown, you don't have + * to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * after modifying the textdraw and the change will be visible. */ native TextDrawTextSize(Text:text, Float:width, Float:height); @@ -2339,7 +2562,9 @@ native TextDrawTextSize(Text:text, Float:width, Float:height); * Set the alignment of text in a text draw. * The ID of the textdraw to set the alignment of * 1-left 2-centered 3-right - * For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at TextDrawTextSize, also position coordinate become position of center of textdraw and not left/top edges. + * For alignment 2 (center) the x and y values of TextSize + * need to be swapped, see notes at TextDrawTextSize, also position + * coordinate become position of center of textdraw and not left/top edges. */ native TextDrawAlignment(Text:text, TEXT_DRAW_ALIGN:alignment); @@ -2349,7 +2574,9 @@ native TextDrawAlignment(Text:text, TEXT_DRAW_ALIGN:alignment); * The ID of the textdraw to change the colour of. * The colour to set the textdraw to * You can also use GameText Colors in TextDraws. - * If the TextDraw is already shown, it must be re-shown (TextDrawShowForAll/TextDrawShowForPlayer) for the changes of this function to take effect. + * If the TextDraw is already shown, it must be re-shown (TextDrawShowForAll/TextDrawShowForPlayer) for the changes of this function to take + * effect. */ native TextDrawColor(Text:text, colour); @@ -2358,7 +2585,8 @@ native TextDrawColor(Text:text, colour); * Toggle whether a textdraw uses a box or not. * The ID of the text textdraw to toggle the box of * 1 to show a box or 0 to not show a box - * If the textdraw is already shown, it must be re-shown (TextDrawShowForAll/TextDrawShowForPlayer) to show the changes of this function. + * If the textdraw is already shown, it must be re-shown (TextDrawShowForAll/TextDrawShowForPlayer) to show the changes of this function. * * 1: The function executed successfully.
      * 0: The function failed to execute. This means the textdraw specified does not exist. @@ -2368,10 +2596,13 @@ native TextDrawUseBox(Text:text, bool:use); /** * a_samp - * Adjusts the text box colour (only used if TextDrawUseBox 'use' parameter is 1). + * Adjusts the text box colour (only used if TextDrawUseBox 'use' + * parameter is 1). * The TextDraw to change * The colour (RGBA) - * If you want to change the boxcolour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * If you want to change the boxcolour of a textdraw that is already shown, you don't have + * to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * after modifying the textdraw and the change will be visible. */ native TextDrawBoxColor(Text:text, colour); @@ -2379,9 +2610,12 @@ native TextDrawBoxColor(Text:text, colour); * a_samp * Sets the size of a textdraw's text's shadow. * The ID of the textdraw to set the shadow size of - * The size of the shadow. 1 is generally used for a normal shadow size. 0 disables the shadow completely + * The size of the shadow. 1 is generally used for a normal shadow + * size. 0 disables the shadow completely * The shadow can be cut by the box area if the size is set too big for the area. - * If you want to change the shadow of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * If you want to change the shadow of a textdraw that is already shown, you don't have to + * recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * after modifying the textdraw and the change will be visible. * * 1: The function executed successfully.
      * 0: The function failed to execute. The textdraw does not exist. @@ -2391,20 +2625,28 @@ native TextDrawSetShadow(Text:text, size); /** * a_samp - * Sets the thickness of a textdraw's text's outline. TextDrawBackgroundColor can be used to change the colour. + * Sets the thickness of a textdraw's text's outline. TextDrawBackgroundColor + * can be used to change the colour. * The ID of the text draw to set the outline thickness of * The thickness of the outline, as an integer. 0 for no outline - * If you want to change the outline of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * If you want to change the outline of a textdraw that is already shown, you don't have to + * recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * after modifying the textdraw and the change will be visible. */ native TextDrawSetOutline(Text:text, size); /** * a_samp - * Adjusts the text draw area background colour (the outline/shadow - NOT the box. For box colour, see TextDrawBoxColor). + * Adjusts the text draw area background colour (the outline/shadow - NOT the box. For box + * colour, see TextDrawBoxColor). * The ID of the textdraw to set the background colour of * The colour that the textdraw should be set to - * If TextDrawSetOutline is used with size > 0, the outline colour will match the colour used in TextDrawBackgroundColor. Changing the value of colour seems to alter the colour used in TextDrawColor - * If you want to change the background colour of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * If TextDrawSetOutline is used with size > 0, + * the outline colour will match the colour used in TextDrawBackgroundColor. + * Changing the value of colour seems to alter the colour used in TextDrawColor + * If you want to change the background colour of a textdraw that is already shown, you don't + * have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * after modifying the textdraw and the change will be visible. */ native TextDrawBackgroundColor(Text:text, colour); @@ -2412,18 +2654,27 @@ native TextDrawBackgroundColor(Text:text, colour); * a_samp * Changes the text font. * The TextDraw to change - * There are four font styles, see http://wiki.sa-mp.com/wiki/PlayerTextDrawFont. Font value 4 specifies that this is a txd sprite; 5 specifies that this textdraw can display preview models. A font value greater than 5 does not display, and anything greater than 16 crashes the client - * If you want to change the font of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * There are four font styles, see http://wiki.sa-mp.com/wiki/PlayerTextDrawFont. + * Font value 4 specifies that this is a txd sprite; 5 specifies that this + * textdraw can display preview models. A font value greater than 5 does not display, and anything + * greater than 16 crashes the client + * If you want to change the font of a textdraw that is already shown, you don't have to recreate + * it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * after modifying the textdraw and the change will be visible. */ native TextDrawFont(Text:text, TEXT_DRAW_FONT:font); /** * a_samp - * Appears to scale text spacing to a proportional ratio. Useful when using TextDrawLetterSize to ensure the text has even character spacing. + * Appears to scale text spacing to a proportional ratio. Useful when using TextDrawLetterSize + * to ensure the text has even character spacing. * The ID of the textdraw to set the proportionality of * 1 to enable proportionality, 0 to disable - * Proportionality is set to 1 by default, you might skip this function if you don't want to disable it. - * If you want to change the proportionality of a textdraw that is already shown, you don't have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll after modifying the textdraw and the change will be visible. + * Proportionality is set to 1 by default, you might skip this function if you + * don't want to disable it. + * If you want to change the proportionality of a textdraw that is already shown, you don't + * have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * after modifying the textdraw and the change will be visible. */ native TextDrawSetProportional(Text:text, bool:set); @@ -2433,7 +2684,8 @@ native TextDrawSetProportional(Text:text, bool:set); * The ID of the textdraw to make selectable * 1 to make it selectable, or 0 to make it not selectable * This function was added in SA-MP 0.3e and will not work in earlier versions! - * TextDrawSetSelectable must be used BEFORE the textdraw is shown to players for it to be selectable. + * TextDrawSetSelectable must be used BEFORE the textdraw + * is shown to players for it to be selectable. * Use TextDrawTextSize to define the clickable area. */ native TextDrawSetSelectable(Text:text, bool:set); @@ -2443,10 +2695,12 @@ native TextDrawSetSelectable(Text:text, bool:set); * Shows a textdraw for a specific player. * The ID of the player to show the textdraw for * The ID of the textdraw to show. Returned by TextDrawCreate - * If only a single player will see a textdraw, it might be wise to use player-textdraws instead. This is also useful for textdraws that need to show information specific for an individual player. + * If only a single player will see a textdraw, it might be wise to use player-textdraws instead. + * This is also useful for textdraws that need to show information specific for an individual player. * * 1: The function executed successfully.
      - * 0: The function failed to execute. This means either the player and/or textdraw specified does not exist. + * 0: The function failed to execute. This means either the player and/or textdraw + * specified does not exist. *
      */ native TextDrawShowForPlayer(playerid, Text:text); @@ -2491,18 +2745,22 @@ native TextDrawHideForAll(Text:text); * Changes the text on a textdraw. * The TextDraw to change * The new string for the TextDraw - * There are limits to the length of textdraw strings - see here for more info. + * There are limits to the length of textdraw strings - see here + * for more info. */ native TextDrawSetString(Text:text, const string[]); /** * a_samp - * Set the model for a textdraw model preview. Click here to see this function's effect. + * Set the model for a textdraw model preview. Click here + * to see this function's effect. * The textdraw ID that will display the 3D preview * The GTA SA or SA:MP model ID to display * This function was added in SA-MP 0.3x and will not work in earlier versions! - * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. - * Use TextDrawBackgroundColor to set the background colour behind the model. + * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order + * for this function to have effect. + * Use TextDrawBackgroundColor to set the background + * colour behind the model. */ native TextDrawSetPreviewModel(Text:text, modelIndex); @@ -2512,20 +2770,24 @@ native TextDrawSetPreviewModel(Text:text, modelIndex); * The x rotation value * The y rotation value * The z rotation value - * The zoom value, smaller values make the camera closer and larger values make the camera further away (optional=1.0) + * The zoom value, smaller values make the camera closer and larger values make the + * camera further away (optional=1.0) * This function was added in SA-MP 0.3x and will not work in earlier versions! - * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. + * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order + * for this function to have effect. */ native TextDrawSetPreviewRot(Text:text, Float:rotX, Float:rotY, Float:rotZ, Float:zoom = 1.0); /** * a_samp - * If a vehicle model is used in a 3D preview textdraw, this sets the two colour values for that vehicle. + * If a vehicle model is used in a 3D preview textdraw, this sets the two colour values for + * that vehicle. * The textdraw ID that is set to display a 3D vehicle model preview * The primary Color ID to set the vehicle to * The secondary Color ID to set the vehicle to * This function was added in SA-MP 0.3x and will not work in earlier versions! - * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order for this function to have effect. + * The textdraw MUST use the font type TEXT_DRAW_FONT_MODEL_PREVIEW in order + * for this function to have effect. */ native TextDrawSetPreviewVehCol(Text:text, colour1, colour2); @@ -2551,7 +2813,8 @@ native TextDrawSetPreviewVehCol(Text:text, colour1, colour2); * There is a limit of 1024 gangzones.
      * Putting the parameters in the wrong order results in glitchy behavior. * - * This function merely CREATES the gangzone, you must use GangZoneShowForPlayer or GangZoneShowForAll to show it. + * This function merely CREATES the gangzone, you must use GangZoneShowForPlayer + * or GangZoneShowForAll to show it. * The ID of the created zone, returns -1 if not created. */ native GangZoneCreate(Float:minX, Float:minY, Float:maxX, Float:maxY); @@ -2574,10 +2837,12 @@ native GangZoneDestroy(zone); /** * a_samp - * Show a gangzone for a player. Must be created with GangZoneCreate first. + * Show a gangzone for a player. Must be created with GangZoneCreate + * first. * The ID of the player you would like to show the gangzone for. * The ID of the gang zone to show for the player. Returned by GangZoneCreate - * The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * The colour to show the gang zone, as an integer or hex in RGBA colour + * format. Alpha transparency supported * * * @@ -2595,7 +2860,8 @@ native GangZoneShowForPlayer(playerid, zone, colour); * a_samp * Shows a gangzone with the desired colour to all players. * The ID of the gangzone to show (returned by GangZoneCreate) - * The colour to show the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * The colour to show the gang zone, as an integer or hex in RGBA colour + * format. Alpha transparency supported * * * @@ -2606,7 +2872,8 @@ native GangZoneShowForPlayer(playerid, zone, colour); * * * - * 1: The function executed successfully. The gang zone was shown for all players.
      + * 1: The function executed successfully. The gang zone was shown for all players.
      * 0: The function failed to execute. The gangzone does not exist. *
      */ @@ -2650,7 +2917,8 @@ native GangZoneHideForAll(zone); * Makes a gangzone flash for a player. * The ID of the player to flash the gangzone for * The ID of the zone to flash - * The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * The colour to flash the gang zone, as an integer or hex in RGBA + * colour format. Alpha transparency supported * * * @@ -2667,7 +2935,8 @@ native GangZoneFlashForPlayer(playerid, zone, flashColour); * a_samp * GangZoneFlashForAll flashes a gangzone for all players. * The zone to flash - * The colour to flash the gang zone, as an integer or hex in RGBA colour format. Alpha transparency supported + * The colour to flash the gang zone, as an integer or hex in RGBA + * colour format. Alpha transparency supported * * * @@ -2711,7 +2980,8 @@ native GangZoneStopFlashForPlayer(playerid, zone); * * * - * 1: The function executed successfully. Success is reported even if the gang zone wasn't flashing to begin with.
      + * 1: The function executed successfully. Success is reported even if the gang zone + * wasn't flashing to begin with.
      * 0: The function failed to execute. The gangzone specified does not exist. *
      */ @@ -2743,8 +3013,10 @@ native GangZoneStopFlashForAll(zone); * If the virtualWorld is set as -1 the text will not appear. * * drawdistance seems to be a lot smaller when spectating. - * Use colour embedding for multiple colours in the text. - * The ID of the newly created 3D Text Label, or INVALID_3DTEXT_ID if the 3D Text Label limit (MAX_3DTEXT_GLOBAL) was reached. + * Use colour embedding + * for multiple colours in the text. + * The ID of the newly created 3D Text Label, or INVALID_3DTEXT_ID if the 3D + * Text Label limit (MAX_3DTEXT_GLOBAL) was reached. */ native Text3D:Create3DTextLabel(const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, virtualWorld, bool:testLOS = false); @@ -2802,7 +3074,8 @@ native Attach3DTextLabelToPlayer(Text3D:textid, parentid, Float:offsetX, Float:o * * * - * Attach3DTextLabelToPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions! + * Attach3DTextLabelToPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a + * and will not work in earlier versions! */ native Attach3DTextLabelToVehicle(Text3D:textid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ); @@ -2849,7 +3122,8 @@ native Update3DTextLabelText(Text3D:textid, colour, const text[]); * This function was added in SA-MP 0.3a and will not work in earlier versions! * If is empty, the server/clients next to the text might crash! * drawdistance seems to be a lot smaller when spectating. - * The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. + * The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if + * the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. */ native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayerid = INVALID_PLAYER_ID, parentVehicleid = INVALID_VEHICLE_ID, bool:testLOS = false); @@ -2895,17 +3169,21 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const * a_samp * Shows the player a synchronous (only one at a time) dialog box. * The ID of the player to show the dialog to - * An ID to assign this dialog to, so responses can be processed. Max dialogid is 32767. Using negative values will close any open dialog + * An ID to assign this dialog to, so responses can be processed. Max dialogid + * is 32767. Using negative values will close any open dialog * The style of the dialog - * The title at the top of the dialog. The length of the caption can not exceed more than 64 characters before it starts to cut off - * The text to display in the main dialog. Use \n to start a new line and \t to tabulate + * The title at the top of the dialog. The length of the caption can not exceed + * more than 64 characters before it starts to cut off + * The text to display in the main dialog. Use \n to start a new line + * and \t to tabulate * The text on the left button * The text on the right button. Leave it blank ( "" ) to hide it * * * This function was added in SA-MP 0.3a and will not work in earlier versions! * Use colour embedding for multiple colours in the text. - * Using -1 as dialogid closes all dialogs currently shown on the client's screen. + * Using -1 as dialogid closes all dialogs currently shown on the client's screen. + * * * 1: The function executed successfully.
      * 0: The function failed to execute. This means the player is not connected.
      @@ -2941,7 +3219,8 @@ native GPCI(playerid, serial[], len = sizeof (serial)) = gpci; * * * - * This function can also be used in a filterscript to detect if the gamemode changes with RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. + * This function can also be used in a filterscript to detect if the gamemode changes with + * RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. * * 0 - Will prevent other filterscripts from receiving this callback.
      * 1 - Indicates that this callback will be passed to the next filterscript.
      @@ -2951,14 +3230,20 @@ native GPCI(playerid, serial[], len = sizeof (serial)) = gpci; forward OnGameModeInit(); /** - * This callback is called when a gamemode ends, either through 'gmx', the server being shut down, or GameModeExit. + * This callback is called when a gamemode ends, either through 'gmx', the server being shut + * down, or GameModeExit. * * * * - * This function can also be used in a filterscript to detect if the gamemode changes with RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. - * When using OnGameModeExit in conjunction with the 'rcon gmx' console command keep in mind there is a potential for client bugs to occur an example of this is excessive RemoveBuildingForPlayer calls during OnGameModeInit which could result in a client crash. - * This callback will NOT be called if the server crashes or the process is killed by other means, such as using the Linux kill command or pressing the close-button on the Windows console. + * This function can also be used in a filterscript to detect if the gamemode changes with + * RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. + * When using OnGameModeExit in conjunction with the 'rcon gmx' console command keep in mind + * there is a potential for client bugs to occur an example of this is excessive RemoveBuildingForPlayer + * calls during OnGameModeInit which could result in a client crash. + * This callback will NOT be called if the server crashes or the process is killed by other + * means, such as using the Linux kill command or pressing the close-button on the Windows console. + * * * 0 - Will prevent other filterscripts from receiving this callback.
      * 1 - Indicates that this callback will be passed to the next filterscript.
      @@ -2968,7 +3253,8 @@ forward OnGameModeInit(); forward OnGameModeExit(); /** - * This callback is called when a filterscript is initialized (loaded). It is only called inside the filterscript which is starting. + * This callback is called when a filterscript is initialized (loaded). It is only called + * inside the filterscript which is starting. * * * @@ -2977,7 +3263,8 @@ forward OnGameModeExit(); forward OnFilterScriptInit(); /** - * This callback is called when a filterscript is unloaded. It is only called inside the filterscript which is unloaded. + * This callback is called when a filterscript is unloaded. It is only called inside the filterscript + * which is unloaded. * * * @@ -3008,12 +3295,16 @@ forward OnPlayerConnect(playerid); * * * This callback can also be called by NPC. - * Some functions might not work correctly when used in this callback because the player is already disconnected when the callback is called. This means that you can't get unambiguous information from functions like GetPlayerIp and GetPlayerPos. + * Some functions might not work correctly when used in this callback because the player is + * already disconnected when the callback is called. This means that you can't get unambiguous information + * from functions like GetPlayerIp and GetPlayerPos. * * Reasons:
      *
        - *
      • 0 - timeout/Crash - the player's connection was lost. Either their game crashed or their network had a fault.
      • - *
      • 1 - quit - the player purposefully quit, either using the /quit (/q) command or via the pause menu.
      • + *
      • 0 - timeout/Crash - the player's connection was lost. Either their game crashed + * or their network had a fault.
      • + *
      • 1 - quit - the player purposefully quit, either using the /quit (/q) + * command or via the pause menu.
      • *
      • 2 - kick/ban - the player was kicked or banned by the server.
      • *
      *
      @@ -3026,7 +3317,8 @@ forward OnPlayerConnect(playerid); forward OnPlayerDisconnect(playerid, reason); /** - * This callback is called when a player spawns.(i.e. after caling SpawnPlayer function). + * This callback is called when a player spawns.(i.e. after caling SpawnPlayer + * function). * The ID of the player that spawned * * @@ -3044,17 +3336,21 @@ forward OnPlayerDisconnect(playerid, reason); forward OnPlayerSpawn(playerid); /** - * This callback is called when a player dies, either by suicide or by being killed by another player. + * This callback is called when a player dies, either by suicide or by being killed by another + * player. * The ID of the player that died - * The ID of the player that killed the player who died, or INVALID_PLAYER_ID if there was none - * The ID of the reason for the player's death + * The ID of the player that killed the player who died, or INVALID_PLAYER_ID + * if there was none + * The ID of the reason for the + * player's death * * * * * The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
      * The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
      - * You do not need to check whether killerid is valid before using it in SendDeathMessage. INVALID_PLAYER_ID is a valid killerid ID parameter in that function.
      + * You do not need to check whether killerid is valid before using it in SendDeathMessage. + * INVALID_PLAYER_ID is a valid killerid ID parameter in that function.
      * playerid is the only one who can call the callback. (good to know for anti fake death) *
      * @@ -3081,13 +3377,17 @@ forward OnPlayerDeath(playerid, killerid, reason); forward OnVehicleSpawn(vehicleid); /** - * This callback is called when a vehicle is destroyed - either by exploding or becoming submerged in water. + * This callback is called when a vehicle is destroyed - either by exploding or becoming submerged + * in water. * The ID of the vehicle that was destroyed - * The ID of the player that reported (synced) the vehicle's destruction (name is misleading). Generally the driver or a passenger (if any) or the closest player + * The ID of the player that reported (synced) the vehicle's destruction (name + * is misleading). Generally the driver or a passenger (if any) or the closest player * * * This callback can also be called by NPC. - * This callback will also be called when a vehicle enters water, but the vehicle can be saved from destruction by teleportation or driving out (if only partially submerged). The callback won't be called a second time, and the vehicle may disappear when the driver exits, or after a short time. + * This callback will also be called when a vehicle enters water, but the vehicle can be saved + * from destruction by teleportation or driving out (if only partially submerged). The callback won't + * be called a second time, and the vehicle may disappear when the driver exits, or after a short time. * * This callback does not handle returns.
      * It is always called first in filterscripts. @@ -3104,14 +3404,17 @@ forward OnVehicleDeath(vehicleid, killerid); * * This callback can also be called by NPC. * - * Returning 0 in this callback will stop the text from being sent to all players.
      - * It is always called first in filterscripts so returning 0 there blocks other scripts from seeing it. + * Returning 0 in this callback will stop the text from being sent to all players.
      + * It is always called first in filterscripts so returning 0 there blocks other scripts + * from seeing it. *
      */ forward OnPlayerText(playerid, text[]); /** - * This callback is called when a player enters a command into the client chat window. Commands are anything that start with a forward slash, e.g. /help. + * This callback is called when a player enters a command into the client chat window. Commands + * are anything that start with a forward slash, e.g. /help. * The ID of the player that entered a command * The command that was entered (including the forward slash) * @@ -3119,8 +3422,11 @@ forward OnPlayerText(playerid, text[]); * * This callback can also be called by NPC. * - * Return 1 if the command was processed, otherwise 0; If the command was not found both in filterscripts and in gamemode, the player will be received a message: SERVER: Unknown command.
      - * It is always called first in filterscripts so returning 1 there blocks other scripts from seeing it. + * Return 1 if the command was processed, otherwise 0; If the command + * was not found both in filterscripts and in gamemode, the player will be received a message: SERVER: + * Unknown command.
      + * It is always called first in filterscripts so returning 1 there blocks other scripts + * from seeing it. *
      */ forward OnPlayerCommandText(playerid, cmdtext[]); @@ -3134,14 +3440,16 @@ forward OnPlayerCommandText(playerid, cmdtext[]); * This callback can also be called by NPC. * This callback is also called when a player presses F4. * - * Returning 0 in this callback will prevent the player from spawning. The player can be forced to spawn when SpawnPlayer is used.
      + * Returning 0 in this callback will prevent the player from spawning. The player can + * be forced to spawn when SpawnPlayer is used.
      * It is always called first in filterscripts. *
      */ forward OnPlayerRequestClass(playerid, classid); /** - * This callback is called when a player starts to enter a vehicle, meaning the player is not in vehicle yet at the time this callback is called. + * This callback is called when a player starts to enter a vehicle, meaning the + * player is not in vehicle yet at the time this callback is called. * ID of the player who attempts to enter a vehicle * ID of the vehicle the player is attempting to enter * 0 if entering as driver. 1 if entering as passenger @@ -3149,8 +3457,10 @@ forward OnPlayerRequestClass(playerid, classid); * * * - * This callback is called when a player BEGINS to enter a vehicle, not when they HAVE entered it. See OnPlayerStateChange. - * This callback is still called if the player is denied entry to the vehicle (e.g. it is locked or full). + * This callback is called when a player BEGINS to enter a vehicle, not when they HAVE + * entered it. See OnPlayerStateChange. + * This callback is still called if the player is denied entry to the vehicle (e.g. it is + * locked or full). * * This callback does not handle returns.
      * It is always called first in filterscripts. @@ -3166,8 +3476,11 @@ forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); * * * - * Not called if the player falls off a bike or is removed from a vehicle by other means such as using SetPlayerPos. - * You must use OnPlayerStateChange and check if their old state is PLAYER_STATE_DRIVER or PLAYER_STATE_PASSENGER and their new state is PLAYER_STATE_ONFOOT. + * Not called if the player falls off a bike or is removed from a vehicle by other means such + * as using SetPlayerPos. + * You must use OnPlayerStateChange and check if their old + * state is PLAYER_STATE_DRIVER or PLAYER_STATE_PASSENGER and their new + * state is PLAYER_STATE_ONFOOT. * * This callback does not handle returns.
      * It is always called first in filterscripts. @@ -3176,7 +3489,8 @@ forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); forward OnPlayerExitVehicle(playerid, vehicleid); /** - * This callback is called when a player changes state. For example, when a player changes from being the driver of a vehicle to being on-foot. + * This callback is called when a player changes state. For example, when a player changes + * from being the driver of a vehicle to being on-foot. * The ID of the player that changed state * The player's new state * The player's previous state @@ -3197,7 +3511,8 @@ forward OnPlayerExitVehicle(playerid, vehicleid); *
    • PLAYER_STATE_SPECTATING - player is spectating
    • *
    • PLAYER_STATE_EXIT_VEHICLE - player exits a vehicle
    • *
    • PLAYER_STATE_ENTER_VEHICLE_DRIVER - player enters a vehicle as driver
    • - *
    • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger
    • + *
    • PLAYER_STATE_ENTER_VEHICLE_PASSENGER - player enters a vehicle as passenger + *
    • *
    *
    * @@ -3231,7 +3546,8 @@ forward OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldsta forward OnPlayerEnterCheckpoint(playerid); /** - * This callback is called when a player leaves the checkpoint set for them by SetPlayerCheckpoint. Only one checkpoint can be set at a time. + * This callback is called when a player leaves the checkpoint set for them by SetPlayerCheckpoint. + * Only one checkpoint can be set at a time. * The ID of the player that left their checkpoint * * @@ -3291,44 +3607,55 @@ forward OnPlayerEnterRaceCheckpoint(playerid); forward OnPlayerLeaveRaceCheckpoint(playerid); /** - * This callback is called when a command is sent through the server console, remote RCON, or via the in-game "/rcon command". + * This callback is called when a command is sent through the server console, remote RCON, + * or via the in-game "/rcon command". * A string containing the command that was typed, as well as any passed parameters * * * You will need to include this callback in a loaded filterscript for it to work in the gamemode! * "/rcon" is not included in "cmd" when a player types a command. - * If you use the print function here, it will send a message to the player who typed the command in-game as well as the log. + * If you use the print function here, it will send a message to the player + * who typed the command in-game as well as the log. * This callback is not called when the player is not logged in as RCON admin. - * When the player is not logged in as RCON admin and uses /rcon login, this callback will not be called and OnRconLoginAttempt is called instead. However, when the player is logged in as RCON admin, the use of this command will call this callback. + * When the player is not logged in as RCON admin and uses /rcon login, this callback + * will not be called and OnRconLoginAttempt is called instead. However, + * when the player is logged in as RCON admin, the use of this command will call this callback. * - * 0 if the command was not processed, it will be passed to another script or 1 if the command was processed, will not be passed to other scripts.
    - * It is always called first in filterscripts so returning 1 there blocks gamemode from seeing it. + * 0 if the command was not processed, it will be passed to another script or 1 + * if the command was processed, will not be passed to other scripts.
    + * It is always called first in filterscripts so returning 1 there blocks gamemode from + * seeing it. *
    */ forward OnRconCommand(cmd[]); /** - * Called when a player attempts to spawn via class selection either by pressing SHIFT or clicking the 'Spawn' button. + * Called when a player attempts to spawn via class selection either by pressing SHIFT or clicking + * the 'Spawn' button. * The ID of the player that requested to spawn * * * This callback can also be called by NPC. - * To prevent players from spawning with certain classes, the last viewed class must be saved in a variable in OnPlayerRequestClass. + * To prevent players from spawning with certain classes, the last viewed class must be saved + * in a variable in OnPlayerRequestClass. * * Returning 0 in this callback will prevent the player from spawning.
    - * It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. + * It is always called first in filterscripts so returning 0 there also blocks other + * scripts from seeing it. *
    */ forward OnPlayerRequestSpawn(playerid); /** - * This callback is called when an object is moved after MoveObject (when it stops moving). + * This callback is called when an object is moved after MoveObject + * (when it stops moving). * The ID of the object that was moved * * * * - * SetObjectPos does not work when used in this callback. To fix it, recreate the object. + * SetObjectPos does not work when used in this callback. To fix + * it, recreate the object. * * This callback does not handle returns.
    * It is always called first in filterscripts. @@ -3337,7 +3664,8 @@ forward OnPlayerRequestSpawn(playerid); forward OnObjectMoved(objectid); /** - * This callback is called when a player object is moved after MovePlayerObject (when it stops moving). + * This callback is called when a player object is moved after MovePlayerObject + * (when it stops moving). * The playerid the object is assigned to * The ID of the player object that was moved * @@ -3376,8 +3704,10 @@ forward OnPlayerPickUpPickup(playerid, pickupid); * * This callback is NOT called by AddVehicleComponent. * - * Return 0 to desync the mod (or an invalid mod) from propagating and / or crashing players.
    - * It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. + * Return 0 to desync the mod (or an invalid mod) from propagating and / or crashing + * players.
    + * It is always called first in gamemode so returning 0 there also blocks other filterscripts + * from seeing it. *
    */ forward OnVehicleMod(playerid, vehicleid, componentid); @@ -3401,7 +3731,8 @@ forward OnVehicleMod(playerid, vehicleid, componentid); forward OnEnterExitModShop(playerid, enterexit, interiorid); /** - * Called when a player previews a vehicle paintjob inside a mod shop. Watch out, this callback is not called when the player buys the paintjob. + * Called when a player previews a vehicle paintjob inside a mod shop. Watch out, this callback + * is not called when the player buys the paintjob. * The ID of the player that changed the paintjob of their vehicle * The ID of the vehicle that had its paintjob changed * The ID of the new paintjob @@ -3411,14 +3742,17 @@ forward OnEnterExitModShop(playerid, enterexit, interiorid); * * This callback is not called by ChangeVehiclePaintjob. * - * This callback does not handle returns. Returning 0 won't deny the paintjob change.
    - * It is always called first in gamemode so returning 0 there blocks other filterscripts from seeing it. + * This callback does not handle returns. Returning 0 won't deny the paintjob change.
    + * It is always called first in gamemode so returning 0 there blocks other filterscripts + * from seeing it. *
    */ forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); /** - * This callback is called when a player exits a mod shop, even if the colors weren't changed. Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. + * This callback is called when a player exits a mod shop, even if the colors weren't changed. + * Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. * The ID of the player that is driving the vehicle * The ID of the vehicle that was resprayed * The color that the vehicle's primary color was changed to @@ -3431,16 +3765,21 @@ forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); * Previewing a component inside a mod shop might call this callback. * This callback is not called by ChangeVehicleColor. * - * Returning 0 in this callback will deny the colour change. Returning 1 will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.
    - * It is always called first in gamemode so returning 0 there also blocks other filterscripts from seeing it. + * Returning 0 in this callback will deny the colour change. Returning 1 + * will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.
    + * It is always called first in gamemode so returning 0 there also blocks other filterscripts + * from seeing it. *
    */ forward OnVehicleRespray(playerid, vehicleid, color1, color2); /** - * This callback is called when a vehicle element such as doors, tires, panels, or lights change their damage status. + * This callback is called when a vehicle element such as doors, tires, panels, or lights change + * their damage status. * The ID of the vehicle that was changed its damage status - * The ID of the player who synced the change in the damage status (who had the car damaged or repaired) + * The ID of the player who synced the change in the damage status (who had the + * car damaged or repaired) * * * This callback was added in SA-MP 0.3a and will not work in earlier versions! @@ -3454,23 +3793,37 @@ forward OnVehicleRespray(playerid, vehicleid, color1, color2); forward OnVehicleDamageStatusUpdate(vehicleid, playerid); /** - * This callback is called when a player's client updates/syncs the position of a vehicle they're not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle that has no driver. + * This callback is called when a player's client updates/syncs the position of a vehicle they're + * not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle + * that has no driver. * The ID of the vehicle that's position was updated * The ID of the player that sent a vehicle position sync update - * The ID of the seat if the player is a passenger. 0=not in vehicle, 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats - * The new X coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version - * The new Y coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version - * The new Z coordinate of the vehicle. This parameter was added in 0.3z. Leave it out if using an earlier version - * The new X velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version - * The new Y velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version - * The new Z velocity of the vehicle. This parameter was added in 0.3z R4. Leave it out if using an earlier version + * The ID of the seat if the player is a passenger. 0=not in vehicle, + * 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats + * The new X coordinate of the vehicle. This parameter was added in 0.3z. + * Leave it out if using an earlier version + * The new Y coordinate of the vehicle. This parameter was added in 0.3z. + * Leave it out if using an earlier version + * The new Z coordinate of the vehicle. This parameter was added in 0.3z. + * Leave it out if using an earlier version + * The new X velocity of the vehicle. This parameter was added in 0.3z R4. + * Leave it out if using an earlier version + * The new Y velocity of the vehicle. This parameter was added in 0.3z R4. + * Leave it out if using an earlier version + * The new Z velocity of the vehicle. This parameter was added in 0.3z R4. + * Leave it out if using an earlier version * * This callback was added in SA-MP 0.3c R3 and will not work in earlier versions! - * This callback is called very frequently per second per unoccupied vehicle. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. - * GetVehiclePos will return the old coordinates of the vehicle before this update. + * This callback is called very frequently per second per unoccupied vehicle. You should refrain + * from implementing intensive calculations or intensive file writing/reading operations in this callback. + * GetVehiclePos will return the old coordinates of the vehicle + * before this update. * - * Returning 0 in this callback will stop the vehicle's position being synced to other players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.
    - * It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. + * Returning 0 in this callback will stop the vehicle's position being synced to other + * players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.
    + * It is always called first in filterscripts so returning 0 there also blocks other + * scripts from seeing it. *
    */ forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); @@ -3486,7 +3839,8 @@ forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new * * * - * The menu ID is not passed to this callback. GetPlayerMenu must be used to determine which menu the player selected an item on. + * The menu ID is not passed to this callback. GetPlayerMenu must + * be used to determine which menu the player selected an item on. * * This callback does not handle returns.
    * It is always called first in gamemode. @@ -3508,7 +3862,8 @@ forward OnPlayerSelectedMenuRow(playerid, row); forward OnPlayerExitedMenu(playerid); /** - * Called when a player changes interior. Can be triggered by SetPlayerInterior or when a player enter/exits a building. + * Called when a player changes interior. Can be triggered by SetPlayerInterior or when a + * player enter/exits a building. * The playerid who changed interior * The interior the player is now in * The interior the player was in before @@ -3524,7 +3879,8 @@ forward OnPlayerExitedMenu(playerid); forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); /** - * This callback is called when the state of any supported key is changed (pressed/released). Directional keys do not trigger OnPlayerKeyStateChange (up/down/left/right). + * This callback is called when the state of any supported key is changed (pressed/released). + * Directional keys do not trigger OnPlayerKeyStateChange (up/down/left/right). * The ID of the player that pressed or released a key * A map (bitmask) of the keys currently held - see here * A map (bitmask) of the keys held prior to the current change - see here @@ -3537,13 +3893,15 @@ forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); * #define HOLDING(%0) ((newkeys & (%0)) == (%0))
    *
    * // PRESSED(keys)
    - * #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
    + * #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
    *
    * // PRESSING(keyVariable, keys)
    * #define PRESSING(%0,%1) (%0 & (%1))
    *
    * // RELEASED(keys)
    - * #define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
    + * #define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
    *
    * * @@ -3560,13 +3918,15 @@ forward OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys); * This callback is called when someone attempts to log in to RCON in-game; successful or not. * The IP of the player that tried to log in to RCON * The password used to login with - * 0 if the password was incorrect or 1 if it was correct + * 0 if the password was incorrect or 1 if it was + * correct * * * * This callback was added in SA-MP 0.3a and will not work in earlier versions! * This callback is only called when /rcon login is used in-game. - * This callback is only called when the player is not yet logged in. When the player is logged in, OnRconCommand is called instead. + * This callback is only called when the player is not yet logged in. When the player is logged + * in, OnRconCommand is called instead. * * This callback does not handle returns.
    * It is always called first in filterscripts. @@ -3575,14 +3935,19 @@ forward OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys); forward OnRconLoginAttempt(ip[], password[], success); /** - * This callback is called every time a client/player updates the server with their status. It is often used to create custom callbacks for client updates that aren't actively tracked by the server, such as health or armor updates or players switching weapons. + * This callback is called every time a client/player updates the server with their status. + * It is often used to create custom callbacks for client updates that aren't actively tracked by the + * server, such as health or armor updates or players switching weapons. * ID of the player sending an update packet * This callback can also be called by NPC. - * This callback is called, on average, 30 times per second, per player; only use it when you know what it's meant for (or more importantly what it's NOT meant for). - * The frequency with which this callback is called for each player varies, depending on what the player is doing. Driving or shooting will trigger a lot more updates than idling. + * This callback is called, on average, 30 times per second, per player; only use it when you + * know what it's meant for (or more importantly what it's NOT meant for). + * The frequency with which this callback is called for each player varies, depending on what + * the player is doing. Driving or shooting will trigger a lot more updates than idling. * * 0 - Update from this player will not be replicated to other clients.
    - * 1 - Indicates that this update can be processed normally and sent to other players.
    + * 1 - Indicates that this update can be processed normally and sent to other players.
    * It is always called first in filterscripts. *
    */ @@ -3637,7 +4002,8 @@ forward OnPlayerStreamOut(playerid, forplayerid); forward OnVehicleStreamIn(vehicleid, forplayerid); /** - * This callback is called when a vehicle is streamed out for a player's client (it's so far away that they can't see it). + * This callback is called when a vehicle is streamed out for a player's client (it's so far + * away that they can't see it). * The ID of the vehicle that streamed out * The ID of the player who is no longer streaming the vehicle * @@ -3679,19 +4045,28 @@ forward OnActorStreamIn(actorid, forplayerid); forward OnActorStreamOut(actorid, forplayerid); /** - * This callback is called when a player responds to a dialog shown using ShowPlayerDialog by either clicking a button, pressing ENTER/ESC or double-clicking a list item (if using a list style dialog). + * This callback is called when a player responds to a dialog shown using ShowPlayerDialog + * by either clicking a button, pressing ENTER/ESC or double-clicking a list item (if using a list style + * dialog). * The ID of the player that responded to the dialog * The ID of the dialog the player responded to, assigned in ShowPlayerDialog - * 1 for left button and 0 for right button (if only one button shown, always 1) - * The ID of the list item selected by the player (starts at 0) (only if using a list style dialog) - * The text entered into the input box by the player or the selected list item text + * 1 for left button and 0 for right button (if only + * one button shown, always 1) + * The ID of the list item selected by the player (starts at 0) + * (only if using a list style dialog) + * The text entered into the input box by the player or the selected list item + * text * * This callback was added in SA-MP 0.3a and will not work in earlier versions! - * A player's dialog doesn't hide when the gamemode restarts, causing the server to print "Warning: PlayerDialogResponse PlayerId: 0 dialog ID doesn't match last sent dialog ID" if a player responded to this dialog after restart. + * A player's dialog doesn't hide when the gamemode restarts, causing the server to print "Warning: + * PlayerDialogResponse PlayerId: 0 dialog ID doesn't match last sent dialog ID" if a player responded + * to this dialog after restart. * Parameters can contain different values, based on dialog's style. * - * Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.
    - * It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. + * Returning 0 in this callback will pass the dialog to another script in case no matching + * code were found in your gamemode's callback.
    + * It is always called first in filterscripts so returning 1 there blocks other filterscripts + * from seeing it. *
    */ forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]); @@ -3699,24 +4074,35 @@ forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]); /** * This callback is called when a player takes damage. * The ID of the player that took damage - * The ID of the player that caused the damage. INVALID_PLAYER_ID if self-inflicted + * The ID of the player that caused the damage. INVALID_PLAYER_ID + * if self-inflicted * The amount of damage the player took (health and armour combined) - * The ID of the weapon/reason for the damage - * The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) + * The ID of the weapon/reason + * for the damage + * The body part that was hit. (NOTE: This parameter was added in 0.3z. + * Leave it out if using an older version!) * * * This callback was added in SA-MP 0.3d and will not work in earlier versions! - * GetPlayerHealth and GetPlayerArmour will return the old amounts of the player before this callback. + * GetPlayerHealth and GetPlayerArmour + * will return the old amounts of the player before this callback. * - * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18).
    - * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    + * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, + * 18).
    + * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, + * grenade)
    * playerid is the only one who can call the callback.
    - * The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. + * The amount is always the maximum damage the weaponid can do, even when the health left is less + * than that maximum damage. So when a player has 100.0 health and gets shot with a Desert + * Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All + * 3 shots will show an amount of 46.2, even though when the last shot hits, the player + * only has 7.6 health left. *
    * * 1 - Callback will not be called in other filterscripts.
    * 0 - Allows this callback to be called in other filterscripts.
    - * It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. + * It is always called first in filterscripts so returning 1 there blocks other filterscripts + * from seeing it. *
    */ forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart); @@ -3726,22 +4112,32 @@ forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) * The ID of the player that gave damage * The ID of the player that received damage * The amount of health/armour damagedid has lost (combined) - * The reason that caused the damage - * The body part that was hit. (NOTE: This parameter was added in 0.3z. Leave it out if using an older version!) + * The reason that caused the + * damage + * The body part that was hit. (NOTE: This parameter was added in 0.3z. + * Leave it out if using an older version!) * * This callback was added in SA-MP 0.3d and will not work in earlier versions! * * Keep in mind this function can be inaccurate in some cases.
    - * If you want to prevent certain players from damaging eachother, use SetPlayerTeam.
    - * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    - * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    + * If you want to prevent certain players from damaging eachother, use SetPlayerTeam.
    + * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, + * 18)
    + * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, + * grenade)
    * playerid is the only one who can call the callback.
    - * The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. + * The amount is always the maximum damage the weaponid can do, even when the health left is less + * than that maximum damage. So when a player has 100.0 health and gets shot with a Desert + * Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All + * 3 shots will show an amount of 46.2, even though when the last shot hits, the player + * only has 7.6 health left. *
    * * 1 - Callback will not be called in other filterscripts.
    * 0 - Allows this callback to be called in other filterscripts.
    - * It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. + * It is always called first in filterscripts so returning 1 there blocks other filterscripts + * from seeing it. *
    */ forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart); @@ -3762,17 +4158,20 @@ forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart * * * This callback was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function does not get called if the actor is set invulnerable (WHICH IS BY DEFAULT). See SetActorInvulnerable. + * This function does not get called if the actor is set invulnerable (WHICH IS BY DEFAULT). + * See SetActorInvulnerable. * * 1 - Callback will not be called in other filterscripts.
    * 0 - Allows this callback to be called in other filterscripts.
    - * It is always called first in filterscripts so returning 1 there blocks other filterscripts from seeing it. + * It is always called first in filterscripts so returning 1 there blocks other filterscripts + * from seeing it. *
    */ forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart); /** - * OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map (by right-clicking). + * OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map + * (by right-clicking). * The ID of the player that placed a target/waypoint * The X float coordinate where the player clicked * The Y float coordinate where the player clicked @@ -3781,7 +4180,9 @@ forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponi * * * This callback was added in SA-MP 0.3d and will not work in earlier versions! - * The Z value returned will be 0 (invalid) if it is far away from the player; use the MapAndreas plugin to get a more accurate Z coordinate. + * The Z value returned will be 0 (invalid) if it is far away from the player; + * use the MapAndreas plugin to get a more + * accurate Z coordinate. * * 1 - Will prevent other filterscripts from receiving this callback.
    * 0 - Indicates that this callback will be passed to the next filterscript.
    @@ -3791,39 +4192,56 @@ forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponi forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); /** - * This callback is called when a player clicks on a textdraw or cancels the select mode with the Escape key. + * This callback is called when a player clicks on a textdraw or cancels the select mode with + * the Escape key. * The ID of the player that clicked on the textdraw - * The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection was cancelled + * The ID of the clicked textdraw. INVALID_TEXT_DRAW if selection + * was cancelled * * * This callback was added in SA-MP 0.3e and will not work in earlier versions! - * The clickable area is defined by TextDrawTextSize. The x and y parameters passed to that function must not be zero or negative. - * Do not use CancelSelectTextDraw unconditionally within this callback. This results in an infinite loop. + * The clickable area is defined by TextDrawTextSize. The + * x and y parameters passed to that function must not be zero or negative. + * Do not use CancelSelectTextDraw unconditionally within + * this callback. This results in an infinite loop. * - * Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
    - * It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. + * Returning 1 in this callback will prevent it being called in other scripts. This + * should be used to signal that the textdraw on which they clicked was 'found' and no further processing + * is needed. You should return 0 if the textdraw on which they clicked wasn't found, + * just like in OnPlayerCommandText.
    + * It is always called first in filterscripts so returning 1 there also blocks other + * scripts from seeing it. *
    */ forward OnPlayerClickTextDraw(playerid, Text:clickedid); /** - * This callback is called when a player clicks on a player-textdraw. It is not called when player cancels the select mode (ESC) - however, OnPlayerClickTextDraw is. + * This callback is called when a player clicks on a player-textdraw. It is not called when + * player cancels the select mode (ESC) - however, OnPlayerClickTextDraw + * is. * The ID of the player that selected a textdraw * The ID of the player-textdraw that the player selected * * * * This callback was added in SA-MP 0.3e and will not work in earlier versions! - * When a player presses ESC to cancel selecting a textdraw, OnPlayerClickTextDraw is called with a textdraw ID of INVALID_TEXT_DRAW. OnPlayerClickPlayerTextDraw won't be called also. + * When a player presses ESC to cancel selecting a textdraw, OnPlayerClickTextDraw + * is called with a textdraw ID of INVALID_TEXT_DRAW. OnPlayerClickPlayerTextDraw + * won't be called also. * - * Returning 1 in this callback will prevent it being called in other scripts. This should be used to signal that the textdraw on which they clicked was 'found' and no further processing is needed. You should return 0 if the textdraw on which they clicked wasn't found, just like in OnPlayerCommandText.
    - * It is always called first in filterscripts so returning 1 there also blocks other scripts from seeing it. + * Returning 1 in this callback will prevent it being called in other scripts. This + * should be used to signal that the textdraw on which they clicked was 'found' and no further processing + * is needed. You should return 0 if the textdraw on which they clicked wasn't found, + * just like in OnPlayerCommandText.
    + * It is always called first in filterscripts so returning 1 there also blocks other + * scripts from seeing it. *
    */ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); /** - * This callback is called when an IP address attempts a connection to the server. To block incoming connections, use BlockIpAddress. + * This callback is called when an IP address attempts a connection to the server. To block + * incoming connections, use BlockIpAddress. * The ID of the player attempting to connect * The IP address of the player attempting to connect * The port of the attempted connection @@ -3851,10 +4269,14 @@ forward OnIncomingConnection(playerid, ip_address[], port); * * * This callback was added in SA-MP 0.3z R4 and will not work in earlier versions! - * This callback is called very frequently per second per trailer. You should refrain from implementing intensive calculations or intensive file writing/reading operations in this callback. + * This callback is called very frequently per second per trailer. You should refrain from + * implementing intensive calculations or intensive file writing/reading operations in this callback. + * * - * 0 - Cancels any trailer updates from being sent to other players. Update is still sent to the updating player.
    - * 1 - Processes the trailer update as normal and synchronizes it between all players.
    + * 0 - Cancels any trailer updates from being sent to other players. Update is still + * sent to the updating player.
    + * 1 - Processes the trailer update as normal and synchronizes it between all players.
    * It is always called first in filterscripts. *
    */ @@ -3864,11 +4286,13 @@ forward OnTrailerUpdate(playerid, vehicleid); * This callback is called when a vehicle's siren is toggled. * The ID of the player that toggled the siren (driver) * The ID of the vehicle of which the siren was toggled for - * 0 if siren was turned off, 1 if siren was turned on + * 0 if siren was turned off, 1 if siren was turned + * on * * This callback was added in SA-MP 0.3.7 and will not work in earlier versions! * This callback can also be called by NPC. - * This callback is only called when a vehicle's siren is toggled on or off, NOT when the alternate siren is in use (holding horn). + * This callback is only called when a vehicle's siren is toggled on or off, NOT when the alternate + * siren is in use (holding horn). * * 1 - Will prevent gamemode from receiving this callback.
    * 0 - Indicates that this callback will be passed to the gamemode.
    @@ -3878,14 +4302,18 @@ forward OnTrailerUpdate(playerid, vehicleid); forward OnVehicleSirenStateChange(playerid, vehicleid, newstate); /** - * This callback is called when a player finishes downloading custom models. For more information on how to add custom models to your server, see the release thread and this tutorial. + * This callback is called when a player finishes downloading custom models. For more information + * on how to add custom models to your server, see the + * release thread and this tutorial. * The ID of the player that finished downloading custom models - * The ID of the virtual world the player finished downloading custom models for + * The ID of the virtual world the player finished downloading custom models + * for * * * * This callback was added in SA-MP 0.3DL and will not work in earlier versions! - * This callback is called every time a player changes virtual worlds, even if there are no custom models present in that world. + * This callback is called every time a player changes virtual worlds, even if there are no + * custom models present in that world. * This callback does not handle returns. */ forward OnPlayerFinishedDownloading(playerid, virtualworld); @@ -3898,7 +4326,8 @@ forward OnPlayerRequestDownload(playerid, type, crc); * The source of the player's click * * This callback was added in SA-MP 0.3a and will not work in earlier versions! - * There is currently only one (0 - CLICK_SOURCE_SCOREBOARD). The existence of this argument suggests that more sources may be supported in the future. + * There is currently only one (0 - CLICK_SOURCE_SCOREBOARD). + * The existence of this argument suggests that more sources may be supported in the future. * * 1 - Will prevent other filterscripts from receiving this callback.
    * 0 - Indicates that this callback will be passed to the next filterscript.
    @@ -3911,9 +4340,11 @@ forward OnPlayerRequestDownload(playerid, type, crc); forward OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source); /** - * This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). + * This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). * The ID of the player that edited an object - * 0 if it is a global object or 1 if it is a playerobject + * 0 if it is a global object or 1 if it is a + * playerobject * The ID of the edited object * The type of response * The X offset for the object that was edited @@ -3927,7 +4358,9 @@ forward OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source); * * * This callback was added in SA-MP 0.3e and will not work in earlier versions! - * When using EDIT_RESPONSE_UPDATE be aware that this callback will not be called when releasing an edit in progress resulting in the last update of EDIT_RESPONSE_UPDATE being out of sync of the objects current position. + * When using EDIT_RESPONSE_UPDATE be aware that this callback will not be called + * when releasing an edit in progress resulting in the last update of EDIT_RESPONSE_UPDATE + * being out of sync of the objects current position. * * 1 - Will prevent other scripts from receiving this callback.
    * 0 - Indicates that this callback will be passed to the next script.
    @@ -3942,7 +4375,8 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:respo /** * This callback is called when a player ends attached object edition mode. * The ID of the player that ended edition mode - * 0 if they cancelled (ESC) or 1 if they clicked the save icon + * 0 if they cancelled (ESC) or 1 if they clicked + * the save icon * The index of the attached object * The model of the attached object that was edited * The bone of the attached object that was edited @@ -3958,7 +4392,8 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:respo * * * This callback was added in SA-MP 0.3e and will not work in earlier versions! - * Editions should be discarded if response was 0 (cancelled). This must be done by storing the offsets etc. in an array BEFORE using EditAttachedObject. + * Editions should be discarded if response was 0 (cancelled). This must be + * done by storing the offsets etc. in an array BEFORE using EditAttachedObject. * * 1 - Will prevent other scripts from receiving this callback.
    * 0 - Indicates that this callback will be passed to the next script.
    @@ -3971,7 +4406,8 @@ forward OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:respo forward OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); /** - * This callback is called when a player selects an object after SelectObject has been used. + * This callback is called when a player selects an object after SelectObject + * has been used. * The ID of the player that selected an object * The type of selection * The ID of the selected object @@ -3993,9 +4429,12 @@ forward OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, mode forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Float:fX, Float:fY, Float:fZ); /** - * This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots). + * This callback is called when a player fires a shot from a weapon. Only bullet weapons are + * supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow + * / hunter shots). * The ID of the player that shot a weapon - * The ID of the weapon shot by the player + * The ID of the weapon shot + * by the player * The type of thing the shot hit (none, player, vehicle, or (player)object) * The ID of the player, vehicle or object that was hit * The X coordinate that the shot hit @@ -4011,27 +4450,35 @@ forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Fl *
  • BULLET_HIT_TYPE_OBJECT(3)
  • *
  • BULLET_HIT_TYPE_PLAYER_OBJECT(4)
  • * - * BULLET_HIT_TYPE_PLAYER is also called for NPCs. Actors are ignored by this callback and detects as BULLET_HIT_TYPE_NONE. + * BULLET_HIT_TYPE_PLAYER is also called for NPCs. Actors are ignored by this + * callback and detects as BULLET_HIT_TYPE_NONE. * This callback is only called when lag compensation is enabled. * * If hittype is:
    *
      - *
    • - BULLET_HIT_TYPE_NONE: the fX, fY and fZ parameters are normal coordinates, will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
    • + *
    • - BULLET_HIT_TYPE_NONE: the fX, fY and fZ parameters are normal coordinates, + * will give 0.0 for coordinates if nothing was hit (e.g. far object that the bullet can't reach);
    • *
    • - Others: the fX, fY and fZ are offsets relative to the hitid.
    • *
    *
    * - * Isn't called if you fired in vehicle as driver or if you are looking behind with the aim enabled (shooting in air).
    - * It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitid (the hit player's vehicleid) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER at all.
    - * Partially fixed in SA-MP 0.3.7: If fake weapon data is sent by a malicious user, other player clients may freeze or crash. To combat this, check if the reported weaponid can actually fire bullets. + * Isn't called if you fired in vehicle as driver or if you are looking behind with the aim enabled + * (shooting in air).
    + * It is called as BULLET_HIT_TYPE_VEHICLE with the correct hitid (the hit player's + * vehicleid) if you are shooting a player which is in a vehicle. It won't be called as BULLET_HIT_TYPE_PLAYER + * at all.
    + * Partially fixed in SA-MP 0.3.7: If fake weapon data is sent by a malicious user, other player + * clients may freeze or crash. To combat this, check if the reported weaponid can actually fire bullets. *
    * * - * GetPlayerLastShotVectors can be used in this callback for more detailed bullet vector information. + * GetPlayerLastShotVectors can be used in this callback + * for more detailed bullet vector information. * * 0 - Prevent the bullet from causing damage.
    * 1 - Allow the bullet to cause damage.
    - * It is always called first in filterscripts so returning 0 there also blocks other scripts from seeing it. + * It is always called first in filterscripts so returning 0 there also blocks other + * scripts from seeing it. *
    */ #if !defined BULLET_HIT_TYPE diff --git a/a_sampdb.inc b/a_sampdb.inc index 3479d5c..471e09e 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -18,11 +18,13 @@ /** * a_sampdb - * This function is used to open a connection to a SQLite database, which is inside the /scriptfiles folder. + * This function is used to open a connection to a SQLite database, which is inside the /scriptfiles + * folder. * File name of the database * Return type for this function has changed since version 0.3.7 R2. * - * It will create a new SQLite database, if there is no SQLite database with the same file name available.
    + * It will create a new SQLite database, if there is no SQLite database with the same file name available.
    * Close your database connection with db_close! *
    * Returns index (starting at 1) of the database connection . @@ -36,10 +38,12 @@ native DB:db_open(const name[]); * a_sampdb * Closes an SQLite database that was opened with db_open. * The handle of the database connection to close (returned by db_open) - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using + * db_open. But it's protected against NULL references * * 1: The function executed successfully.
    - * 0: The function failed to execute. May mean that the database handle specified is not open. + * 0: The function failed to execute. May mean that the database handle specified is + * not open. *
    */ native bool:DB_Close(DB:db) = db_close; @@ -71,7 +75,8 @@ native DBResult:db_query(DB:db, const query[]); * a_sampdb * Frees result memory allocated from db_query. * The result to free - * If DBResult:dbhandle is a valid handle, it returns 1, otherwise 0 if DBResult:dbhandle is a NULL reference. + * If DBResult:dbhandle is a valid handle, it returns 1, otherwise + * 0 if DBResult:dbhandle is a NULL reference. */ native bool:DB_FreeResult(DBResult:result) = db_free_result; @@ -85,7 +90,8 @@ native bool:db_free_result(DBResult:result); * a_sampdb * Returns the number of rows from a db_query. * The result of db_query - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using + * db_open. But it's protected against NULL references * The number of rows in the result. */ native DB_NumRows(DBResult:result) = db_num_rows; @@ -100,8 +106,10 @@ native db_num_rows(DBResult:result); * a_sampdb * Moves to the next row of the result allocated from db_query. * The result of db_query - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references - * Returns 1 on success, otherwise 0 if DBResult:result is a NULL reference or the last row is reached. + * Using an invalid handle will crash your server! Get a valid handle by using + * db_open. But it's protected against NULL references + * Returns 1 on success, otherwise 0 if DBResult:result + * is a NULL reference or the last row is reached. */ native bool:DB_NextRow(DBResult:result) = db_next_row; @@ -115,7 +123,8 @@ native bool:db_next_row(DBResult:result); * a_sampdb * Get the number of fields in a result. * The result of db_query - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using + * db_open. But it's protected against NULL references * The number of fields in the result. */ native DB_NumFields(DBResult:result) = db_num_fields; @@ -133,8 +142,10 @@ native db_num_fields(DBResult:result); * The index of the field to get the name of * The returned value * The max length of the field - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references - * Returns 1, if the function was successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. + * Using an invalid handle will crash your server! Get a valid handle by using + * db_open. But it's protected against NULL references + * Returns 1, if the function was successful, otherwise 0 if DBResult:result + * is a NULL reference or the column index not available. */ native bool:DB_FieldName(DBResult:result, field, output[], size = sizeof (output)) = db_field_name; @@ -151,8 +162,10 @@ native bool:db_field_name(DBResult:result, field, output[], size = sizeof (outpu * The field to get the data from * The returned value * The max length of the field - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references - * Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. + * Using an invalid handle will crash your server! Get a valid handle by using + * db_open. But it's protected against NULL references + * Returns 1 if successful, otherwise 0 if DBResult:result + * is a NULL reference or the column index not available. */ native bool:DB_GetField(DBResult:result, field, output[], size = sizeof (output)) = db_get_field; @@ -167,7 +180,8 @@ native bool:db_get_field(DBResult:result, field, output[], size = sizeof (output * Get the content of a field as an integer from db_query. * The result to get the data from * The field to get the data from (optional=0) - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using + * db_open. But it's protected against NULL references * Retrieved value as integer (number). */ native DB_GetFieldInt(DBResult:result, field = 0) = db_get_field_int; @@ -183,7 +197,8 @@ native db_get_field_int(DBResult:result, field = 0); * Get the content of a field as a float from db_query. * The result to get the data from * The field to get the data from (optional=0) - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using + * db_open. But it's protected against NULL references * Retrieved value as floating point number. */ native Float:DB_GetFieldFloat(DBResult:result, field = 0) = db_get_field_float; @@ -201,8 +216,10 @@ native Float:db_get_field_float(DBResult:result, field = 0); * The fieldname to get the data from * The returned value * The max length of the field - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references - * Returns 1 if successful, otherwise 0 if DBResult:result is a NULL reference or the column index not available. + * Using an invalid handle will crash your server! Get a valid handle by using + * db_open. But it's protected against NULL references + * Returns 1 if successful, otherwise 0 if DBResult:result + * is a NULL reference or the column index not available. */ native bool:DB_GetFieldAssoc(DBResult:result, const field[], output[], size = sizeof (output)) = db_get_field_assoc; @@ -217,7 +234,8 @@ native bool:db_get_field_assoc(DBResult:result, const field[], output[], size = * Get the contents of field as an integer with specified name. * The result to get the data from * The fieldname to get the data from - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using + * db_open. But it's protected against NULL references * Retrieved value as integer (number). */ native DB_GetFieldAssocInt(DBResult:result, const field[]) = db_get_field_assoc_int; @@ -233,7 +251,8 @@ native db_get_field_assoc_int(DBResult:result, const field[]); * Get the contents of field as a float with specified name. * The result to get the data from * The fieldname to get the data from - * Using an invalid handle will crash your server! Get a valid handle by using db_open. But it's protected against NULL references + * Using an invalid handle will crash your server! Get a valid handle by using + * db_open. But it's protected against NULL references * Retrieved value as floating point number. */ native Float:DB_GetFieldAssocFloat(DBResult:result, const field[]) = db_get_field_assoc_float; diff --git a/a_vehicles.inc b/a_vehicles.inc index 7f3bdf0..417ca3d 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -69,7 +69,8 @@ enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO /** * a_vehicles - * Creates a vehicle in the world. Can be used in place of AddStaticVehicleEx at any time in the script. + * Creates a vehicle in the world. Can be used in place of AddStaticVehicleEx + * at any time in the script. * The model for the vehicle * The x coordinate for the vehicle * The y coordinate for the vehicle @@ -77,8 +78,10 @@ enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO * The facing angle for the vehicle * The primary colour ID * The secondary colour ID - * The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning - * Added in 0.3.7; will not work in earlier versions. Enables the vehicle to have a siren, providing the vehicle has a horn (optional=false) + * The delay until the car is respawned without a driver in seconds. + * Using -1 will prevent the vehicle from respawning + * Added in 0.3.7; will not work in earlier versions. Enables the vehicle + * to have a siren, providing the vehicle has a horn (optional=false) * * * @@ -88,7 +91,8 @@ enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO * Trains can only be added with AddStaticVehicle and AddStaticVehicleEx. * * The vehicle ID of the vehicle created (1 to MAX_VEHICLES).
    - * INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid vehicle model ID passed). + * INVALID_VEHICLE_ID (65535) if vehicle was not created (vehicle limit reached or invalid + * vehicle model ID passed). *
    */ native CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:rotation, colour1, colour2, respawnDelay, bool:addSiren = false); @@ -109,7 +113,8 @@ native DestroyVehicle(vehicleid); /** * a_vehicles - * Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) for a player. + * Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible) + * for a player. * The ID of the vehicle to check * The ID of the player to check * @@ -119,7 +124,8 @@ native DestroyVehicle(vehicleid); * * This function was added in SA-MP 0.3a and will not work in earlier versions! * - * 0: Vehicle is not streamed in for the player, or the function failed to execute (player and/or vehicle do not exist).
    + * 0: Vehicle is not streamed in for the player, or the function failed to execute (player + * and/or vehicle do not exist).
    * 1: Vehicle is streamed in for the player. *
    */ @@ -201,8 +207,11 @@ native GetVehicleZAngle(vehicleid, &Float:angle); * } * * - * There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart from the z angle) - * This function may return incorrect values for unoccupied vehicles. The reason is that the third row of the vehicle's internal rotation matrix gets corrupted if it gets updated while unoccupied. + * There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart + * from the z angle) + * This function may return incorrect values for unoccupied vehicles. The reason is that the + * third row of the vehicle's internal rotation matrix gets corrupted if it gets updated while unoccupied. + * * * 1: The function executed successfully.
    * 0: The function failed to execute. This means the vehicle specified does not exist. @@ -212,7 +221,8 @@ native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z) /** * a_vehicles - * This function can be used to calculate the distance (as a float) between a vehicle and another map coordinate. This can be useful to detect how far a vehicle away is from a location. + * This function can be used to calculate the distance (as a float) between a vehicle and another + * map coordinate. This can be useful to detect how far a vehicle away is from a location. * The ID of the vehicle to calculate the distance for * The x map coordinate * The y map coordinate @@ -231,7 +241,8 @@ native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); * The z angle to set * * - * A vehicle's x and y (pitch and roll) rotation will be reset when this function is used. The x and y rotations can not be set. + * A vehicle's x and y (pitch and roll) rotation will be reset when this function is used. + * The x and y rotations can not be set. * This function does not work on unoccupied vehicles. * * 1: The function executed successfully.
    @@ -245,11 +256,16 @@ native SetVehicleZAngle(vehicleid, Float:angle); * Set the parameters of a vehicle for a player. * The ID of the vehicle to set the parameters of * The ID of the player to set the vehicle's parameters for - * 0 to disable the objective or 1 to show it. This is a bobbing yellow arrow above the vehicle + * 0 to disable the objective or 1 to show it. + * This is a bobbing yellow arrow above the vehicle * 0 to unlock the doors or 1 to lock them * - * Vehicles must be respawned for the 'objective' to be removed. This can be circumvented somewhat using Get/SetVehicleParamsEx which do not require the vehicle to be respawned. It is worth noting however that the object will be disabled on a global scale, and this is only useful if only one player has the vehicle as an objective. - * Since 0.3a you will have to reapply this function when OnVehicleStreamIn is called. + * Vehicles must be respawned for the 'objective' to be removed. This can be circumvented + * somewhat using Get/SetVehicleParamsEx which do not require the vehicle to be respawned. It is worth + * noting however that the object will be disabled on a global scale, and this is only useful if only + * one player has the vehicle as an objective. + * Since 0.3a you will have to reapply this function when OnVehicleStreamIn + * is called. * * 1: The function executed successfully.
    * 0: The function failed to execute. The player and/or vehicle specified do not exist. @@ -259,12 +275,16 @@ native SetVehicleParamsForPlayer(vehicleid, playerid, objective, doors); /** * a_vehicles - * Use this function before any player connects (OnGameModeInit) to tell all clients that the script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when players enter/exit vehicles and headlights automatically coming on when it is dark. + * Use this function before any player connects (OnGameModeInit) + * to tell all clients that the script will control vehicle engines and lights. This prevents the game + * automatically turning the engine on/off when players enter/exit vehicles and headlights automatically + * coming on when it is dark. * * * * This Function was added in SA-MP 0.3c and will not work in earlier versions! - * Is it not possible to reverse this function after it has been used. You must either use it or not use it. + * Is it not possible to reverse this function after it has been used. You must either use + * it or not use it. * This function always returns 1. It cannot fail to execute. */ native ManualVehicleEngineAndLights(); @@ -275,17 +295,21 @@ native ManualVehicleEngineAndLights(); * The ID of the vehicle to set the parameters of * Engine status. 0 - Off, 1 - On * Light status. 0 - Off, 1 - On - * Vehicle alarm status. If on, the alarm starts. 0 - Off, 1 - On + * Vehicle alarm status. If on, the alarm starts. 0 - Off, 1 + * - On * Door lock status. 0 - Unlocked, 1 - Locked * Bonnet (hood) status. 0 - Closed, 1 - Open * Boot/trunk status. 0 - Closed, 1 - Open - * Toggle the objective arrow above the vehicle. 0 - Off, 1 - On + * Toggle the objective arrow above the vehicle. 0 - Off, 1 + * - On * * * * This function was added in SA-MP 0.3c and will not work in earlier versions! - * The alarm will not reset when finished, you'll need to reset it by yourself with this function. - * Lights also operate during the day (Only when ManualVehicleEngineAndLights is enabled). + * The alarm will not reset when finished, you'll need to reset it by yourself with this function. + * + * Lights also operate during the day (Only when ManualVehicleEngineAndLights + * is enabled). * * 1: The function executed successfully.
    * 0: The function failed to execute. This means the vehicle does not exist. @@ -306,7 +330,8 @@ native SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS:engine, VEHICLE_PARAMS:light * Get the objective status. 1 means the objective is on * * This function was added in SA-MP 0.3c and will not work in earlier versions! - * If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset'). + * If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 + * ('unset'). */ native GetVehicleParamsEx(vehicleid, &VEHICLE_PARAMS:engine, &VEHICLE_PARAMS:lights, &VEHICLE_PARAMS:alarm, &VEHICLE_PARAMS:doors, &VEHICLE_PARAMS:bonnet, &VEHICLE_PARAMS:boot, &VEHICLE_PARAMS:objective); @@ -324,10 +349,14 @@ native GetVehicleParamsSirenState(vehicleid); * a_vehicles * Allows you to open and close the doors of a vehicle. * The ID of the vehicle to set the door state of - * The state of the driver's door. 1 to open, 0 to close - * The state of the passenger door. 1 to open, 0 to close - * The state of the rear left door (if available). 1 to open, 0 to close - * The state of the rear right door (if available). 1 to open, 0 to close + * The state of the driver's door. 1 to open, 0 + * to close + * The state of the passenger door. 1 to open, 0 + * to close + * The state of the rear left door (if available). 1 to open, 0 + * to close + * The state of the rear right door (if available). 1 to open, + * 0 to close * * * @@ -348,7 +377,8 @@ native SetVehicleParamsCarDoors(vehicleid, frontLeft, frontRight, rearLeft, rear * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. + * The values returned in each variable are as follows: -1 if not set, 0 + * if closed, 1 if open. */ native GetVehicleParamsCarDoors(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); @@ -356,10 +386,14 @@ native GetVehicleParamsCarDoors(vehicleid, &frontLeft, &frontRight, &rearLeft, & * a_vehicles * Allows you to open and close the windows of a vehicle. * The ID of the vehicle to set the window state of - * The state of the driver's window. 0 to open, 1 to close - * The state of the passenger window. 0 to open, 1 to close - * The state of the rear left window (if available). 0 to open, 1 to close - * The state of the rear right window (if available). 0 to open, 1 to close + * The state of the driver's window. 0 to open, 1 + * to close + * The state of the passenger window. 0 to open, 1 + * to close + * The state of the rear left window (if available). 0 to open, + * 1 to close + * The state of the rear right window (if available). 0 to open, + * 1 to close * * * @@ -379,7 +413,8 @@ native SetVehicleParamsCarWindows(vehicleid, frontLeft, frontRight, rearLeft, re * * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * The values returned in each variable are as follows: -1 if not set, 0 if closed, 1 if open. + * The values returned in each variable are as follows: -1 if not set, 0 + * if closed, 1 if open. * The vehicle's windows state is stored in the specified variables. */ native GetVehicleParamsCarWindows(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); @@ -399,9 +434,11 @@ native SetVehicleToRespawn(vehicleid); /** * a_vehicles - * Links a vehicle to an interior. Vehicles can only be seen by players in the same interior (SetPlayerInterior). + * Links a vehicle to an interior. Vehicles can only be seen by players in the same interior + * (SetPlayerInterior). * The ID of the vehicle to link to an interior - * The Interior ID to link it to + * The Interior ID to + * link it to * * * @@ -413,16 +450,20 @@ native LinkVehicleToInterior(vehicleid, interiorid); /** * a_vehicles - * Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components can be found here. - * The ID of the vehicle to add the component to. Not to be confused with modelid - * The ID of the component to add to the vehicle + * Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components + * can be found here. + * The ID of the vehicle to add the component to. Not to be confused with modelid + * The ID of the component + * to add to the vehicle * *
      *
    • 0 - The component was not added because the vehicle does not exist.
    • *
    • 1 - The component was successfully added to the vehicle.
    • *
    *
    - * Using an invalid component ID crashes the player's game. There are no internal checks for this. + * Using an invalid component ID + * crashes the player's game. There are no internal checks for this. * * * @@ -435,7 +476,8 @@ native AddVehicleComponent(vehicleid, componentid); * a_vehicles * Remove a component from a vehicle. * ID of the vehicle - * ID of the component to remove + * ID of the component + * to remove * * * @@ -448,13 +490,17 @@ native RemoveVehicleComponent(vehicleid, componentid); * a_vehicles * Change a vehicle's primary and secondary colours. * The ID of the vehicle to change the colours of - * The new vehicle's primary Color ID - * The new vehicle's secondary Color ID + * The new vehicle's primary Color + * ID + * The new vehicle's secondary Color + * ID * * - * Some vehicles have only a primary colour and some can not have the colour changed at all. A few (cement, squallo) have 4 colours, of which 2 can not be changed in SA:MP + * Some vehicles have only a primary colour and some can not have the colour changed at all. + * A few (cement, squallo) have 4 colours, of which 2 can not be changed in SA:MP * - * 1: The function executed successfully. The vehicle's colour was successfully changed.
    + * 1: The function executed successfully. The vehicle's colour was successfully changed.
    * 0: The function failed to execute. The vehicle does not exist. *
    */ @@ -472,20 +518,23 @@ native ChangeVehicleColor(vehicleid, colour1, colour2); * This function calls OnVehicleRespray.
    * Vehicles change their colour to white anymore when a paintjob is removed. * - * This function always returns 1 (success), even if the vehicle passed is not created. + * This function always returns 1 (success), even if the vehicle passed is not + * created. */ native ChangeVehiclePaintjob(vehicleid, paintjobid); /** * a_vehicles - * Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, and finally fire when it decreases to less than 250 (25%). + * Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke, + * and finally fire when it decreases to less than 250 (25%). * The ID of the vehicle to set the health of * The health, given as a float value * * * * - * Full vehicle health is 1000, however higher values are possible and increase the health of the vehicle. + * Full vehicle health is 1000, however higher values are possible and increase + * the health of the vehicle. * * Health:
    *
      @@ -511,7 +560,8 @@ native SetVehicleHealth(vehicleid, Float:health); * * * - * Full vehicle health is 1000, however higher values are possible and increase the health of the vehicle. + * Full vehicle health is 1000, however higher values are possible and increase + * the health of the vehicle. * * Health:
      *
        @@ -538,7 +588,8 @@ native GetVehicleHealth(vehicleid, &Float:health); * * * This will only work if both vehicles are streamed in for a player (check IsVehicleStreamedIn). - * This function always returns 1, even if neither of the vehicle IDs passed are valid. + * This function always returns 1, even if neither of the vehicle IDs passed + * are valid. */ native AttachTrailerToVehicle(trailerid, vehicleid); @@ -554,7 +605,8 @@ native DetachTrailerFromVehicle(vehicleid); /** * a_vehicles - * Checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer to get the vehicle ID of the trailer (if any). + * Checks if a vehicle has a trailer attached to it. Use GetVehicleTrailer + * to get the vehicle ID of the trailer (if any). * The ID of the vehicle to check for trailers * * @@ -585,12 +637,18 @@ native GetVehicleTrailer(vehicleid); * This function was added in SA-MP 0.3c and will not work in earlier versions! * You can use colour embedding on the number plate text. * - * This function has no internal error checking. Do not assign custom number plates to vehicles without plates (boats, planes, etc) as this will result in some unneeded processing time on the client.
        + * This function has no internal error checking. Do not assign custom number plates to vehicles without + * plates (boats, planes, etc) as this will result in some unneeded processing time on the client.
        * The vehicle must be re-spawned or re-streamed for the changes to take effect.
        * There's a limit of 32 characters on each number plate (including embedded colours).
        - * The text length that can be seen on the number plate is around 9 to 10 characters, more characters will cause the text to split.
        - * Some vehicle models has a backward number plate, e.g. Boxville (498) (as an alternative to this vehicle you can use vehicle model ID 609, which is a duplicated Boxville (aka Boxburg), but with a regular number plate).
        - * This function only works in versions 0.2.1, 0.2.2, 0.2x and 0.3c (and beyond). + * The text length that can be seen on the number plate is around 9 to 10 characters, more characters + * will cause the text to split.
        + * Some vehicle models has a backward number plate, e.g. Boxville (498) (as an alternative to this + * vehicle you can use vehicle model ID 609, which is a duplicated Boxville (aka Boxburg), but with + * a regular number plate).
        + * This function only works in versions 0.2.1, 0.2.2, 0.2x and 0.3c (and + * beyond). *
        * * 1: The function executed successfully.
        @@ -607,13 +665,15 @@ native SetVehicleNumberPlate(vehicleid, const numberPlate[]); * * * - * The vehicle's model ID, or 0 if the vehicle doesn't exist. + * The vehicle's model ID, or 0 + * if the vehicle doesn't exist. */ native GetVehicleModel(vehicleid); /** * a_vehicles - * Retrieves the installed component ID (modshop mod(ification)) on a vehicle in a specific slot. + * Retrieves the installed component ID (modshop mod(ification)) on a vehicle in a specific + * slot. * The ID of the vehicle to check for the component * The component slot to check for components (see below) * @@ -644,12 +704,19 @@ native GetVehicleModel(vehicleid); * Known Bugs:
        *
          *
        • Doesn't work for CARMODTYPE_STEREO.
        • - *
        • Both front bull bars and front bumper components are saved in the CARMODTYPE_FRONT_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
        • - *
        • Both rear bull bars and rear bumper components are saved in the CARMODTYPE_REAR_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
        • - *
        • Both left side skirt and right side skirt are saved in the CARMODTYPE_SIDESKIRT slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
        • + *
        • Both front bull bars and front bumper components are saved in the CARMODTYPE_FRONT_BUMPER + * slot. If a vehicle has both of them installed, this function will only return the one which was + * installed last.
        • + *
        • Both rear bull bars and rear bumper components are saved in the CARMODTYPE_REAR_BUMPER + * slot. If a vehicle has both of them installed, this function will only return the one which was + * installed last.
        • + *
        • Both left side skirt and right side skirt are saved in the CARMODTYPE_SIDESKIRT + * slot. If a vehicle has both of them installed, this function will only return the one which was + * installed last.
        • *
        * - * The ID of the component installed in the specified slot. Returns 0 if no component in specified vehicle's specified slot, or if vehicle doesn't exist. + * The ID of the component installed in the specified slot. Returns 0 if no + * component in specified vehicle's specified slot, or if vehicle doesn't exist. */ native GetVehicleComponentInSlot(vehicleid, CARMODTYPE:slot); // There is 1 slot for each CARMODTYPE_* @@ -663,13 +730,15 @@ native GetVehicleComponentInSlot(vehicleid, CARMODTYPE:slot); // There is 1 slot * * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * The component slot ID of the specified component or -1 if the component is invalid. + * The component slot ID of the specified component or -1 if the component is + * invalid. */ native CARMODTYPE:GetVehicleComponentType(component); // Find CARMODTYPE_* for component ID /** * a_vehicles - * Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.). + * Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires + * etc.). * The ID of the vehicle to repair * * @@ -692,10 +761,12 @@ native RepairVehicle(vehicleid); // Repairs the damage model and resets the heal * * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * Multiply vector with 250.66667 for kmph or 199.416667 for mph or something... + * Multiply vector with 250.66667 for kmph or 199.416667 for mph + * or something... * * 1: The function executed successfully.
        - * 0: The function failed to execute. This means the vehicle specified does not exist.
        + * 0: The function failed to execute. This means the vehicle specified does not exist.
        *
        */ native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); @@ -789,7 +860,8 @@ native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); /** * a_vehicles - * Sets the various visual damage statuses of a vehicle, such as popped tires, broken lights and damaged panels. + * Sets the various visual damage statuses of a vehicle, such as popped tires, broken lights + * and damaged panels. * The ID of the vehicle to set the damage of * A set of bits containing the panel damage status * A set of bits containing the door damage status @@ -839,7 +911,8 @@ native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); /** * a_vehicles * Retrieve information about a specific vehicle model such as the size or position of seats. - * The vehicle model to get info of + * The vehicle model + * to get info of * The type of information to retrieve * A float to store the x value * A float to store the y value @@ -855,7 +928,8 @@ native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); *
      • VEHICLE_MODEL_INFO_PETROLCAP - position of the fuel cap
      • *
      • VEHICLE_MODEL_INFO_WHEELSFRONT - position of the front wheels
      • *
      • VEHICLE_MODEL_INFO_WHEELSREAR - position of the rear wheels
      • - *
      • VEHICLE_MODEL_INFO_WHEELSMID - position of the middle wheels (applies to vehicles with 3 axes)
      • + *
      • VEHICLE_MODEL_INFO_WHEELSMID - position of the middle wheels (applies to vehicles + * with 3 axes)
      • *
      • VEHICLE_MODEL_INFO_FRONT_BUMPER_Z - height of the front bumper
      • *
      • VEHICLE_MODEL_INFO_REAR_BUMPER_Z - height of the rear bumper
      • *
      @@ -867,7 +941,8 @@ native GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO:infotype, &Float:x, /** * a_vehicles - * Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their own virtual world. + * Sets the 'virtual world' of a vehicle. Players will only be able to see vehicles in their + * own virtual world. * The ID of vehicle to set the virtual world of * The ID of the virtual world to put the vehicle in * From fd0663da028d4abfc10b0f9ebb625ab27ad23892 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 17:45:12 +0000 Subject: [PATCH 057/104] Wrap lines more aggressively. --- a_npc.inc | 9 ++++--- a_objects.inc | 6 +++-- a_players.inc | 42 +++++++++++++++++++++----------- a_samp.inc | 66 +++++++++++++++++++++++++++++++++----------------- a_vehicles.inc | 3 ++- 5 files changed, 84 insertions(+), 42 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index 32f20b7..d4b69dd 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -464,7 +464,8 @@ native format(output[], len = sizeof (output), const format[], {Float, _}:...); * Whether the timer should repeat or not * * - * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * Timer intervals are not accurate (roughly 25% off). There's a fix available + * here. * * Timer IDs are never used twice. You can use KillTimer on a timer * ID and it won't matter if it's running or not. @@ -490,7 +491,8 @@ native KillTimer(timerid); * Returns the uptime of the actual server (not the SA-MP server) in milliseconds. * * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount - * will eventually warp past the integer size constraints. However using this + * will eventually warp past the integer size constraints. However using + * this * function fixes the problem. * One common use for GetTickCount is for benchmarking. It can be used to calculate how much * time some code takes to execute. @@ -900,7 +902,8 @@ forward OnNPCExitVehicle(); * This callback gets called whenever the NPC sees a ClientMessage. This will be everytime * a SendClientMessageToAll function is used and everytime a SendClientMessage function is sent towards the NPC. This callback - * won't be called when someone says something. For a version of this with player text, see OnPlayerText. + * won't be called when someone says something. For a version of this with player text, see + * OnPlayerText.
    * The colour the ClientMessage is * The actual message * diff --git a/a_objects.inc b/a_objects.inc index f08b5a8..d851053 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -89,7 +89,8 @@ enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN * stays at 0 rotation. This would only really work for objects that consist ONLY of * light, so wouldn't work for the police light for example. * There is a limit of 1000 objects - * (MAX_OBJECTS). To circumvent this limit, you can use a streamer + * (MAX_OBJECTS). To circumvent this limit, you can use a + * streamer * The ID of the object that was created, or INVALID_OBJECT_ID if the object * limit (MAX_OBJECTS) was reached. */ @@ -464,7 +465,8 @@ native AttachPlayerObjectToVehicle(playerid, objectid, parentid, Float:offsetX, * a_objects * Sets the position of a player-object to the specified coordinates. * The ID of the player whose player-object to set the position of - * The ID of the player-object to set the position of. Returned by CreatePlayerObject + * The ID of the player-object to set the position of. Returned by + * CreatePlayerObject * The x coordinate to put the object at * The y coordinate to put the object at * The z coordinate to put the object at diff --git a/a_players.inc b/a_players.inc index 918c7e3..2a4f057 100644 --- a/a_players.inc +++ b/a_players.inc @@ -158,7 +158,8 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE * This function can be used to change the spawn information of a specific player. It allows * you to automatically set someone's spawn weapons, their team, skin and spawn position, normally used * in case of minigames or automatic-spawn systems. This function is more crash-safe then using SetPlayerSkin in OnPlayerSpawn and/or OnPlayerRequestClass, + * href="#SetPlayerSkin">SetPlayerSkin in OnPlayerSpawn and/or + * OnPlayerRequestClass, * even though this has been fixed in 0.2. * The Playerid of who you want to set the spawn information * The Team-ID of the chosen player @@ -670,7 +671,8 @@ native GetPlayerColor(playerid); * * * If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, - * they will become frozen or otherwise glitched. This can be fixed by using TogglePlayerControllable. + * they will become frozen or otherwise glitched. This can be fixed by using + * TogglePlayerControllable. * Players can be detected as being crouched through GetPlayerSpecialAction * (SPECIAL_ACTION_DUCK). * Setting a player's skin when he is dead may crash players around him. @@ -731,7 +733,8 @@ native GivePlayerWeapon(playerid, WEAPON:weaponid, ammo); * The ID of the player whose weapons to remove * * - * To remove individual weapons from a player, set their ammo to 0 using SetPlayerAmmo. + * To remove individual weapons from a player, set their ammo to 0 using + * SetPlayerAmmo. * * 1: The function executed successfully.
    * 0: The function failed to execute. This means the player specified does not exist. @@ -1359,7 +1362,8 @@ native GetPlayerLastShotVectors(playerid, &Float:originX, &Float:originY, &Float * In version 0.3d and onwards, 10 objects can be attached to a single * player (index 0-9). In earlier versions, the limit is 5 * (index 0-4). - * This function is separate from the CreateObject / CreatePlayerObject + * This function is separate from the CreateObject/ + * CreatePlayerObject * pools. * * Bone IDs:
    @@ -1565,8 +1569,10 @@ native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:width, Float:he * is enabled and/or clickable area for use with PlayerTextDrawSetSelectable). * The ID of the player whose player-textdraw to set the size of * The ID of the player-textdraw to set the size of - * The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate - * The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate + * The size on the x axis (left/right) following the same 640x480 grid as + * TextDrawCreate + * The size on the y axis (up/down) following the same 640x480 grid as + * TextDrawCreate * * * @@ -1741,7 +1747,8 @@ native PlayerTextDrawSetShadow(playerid, PlayerText:text, size); /** * a_players - * Set the outline of a player-textdraw. The outline colour cannot be changed unless PlayerTextDrawBackgroundColor + * Set the outline of a player-textdraw. The outline colour cannot be changed unless + * PlayerTextDrawBackgroundColor * is used. * The ID of the player whose player-textdraw to set the outline of * The ID of the player-textdraw to set the outline of @@ -1801,7 +1808,8 @@ native PlayerTextDrawBackgroundColor(playerid, PlayerText:text, colour); * The ID of the player whose player-textdraw to change the font of * The ID of the player-textdraw to change the font of * There are four font styles. A font value greater than 3 does not - * display, and anything greater than 16 crashes the client. See http://wiki.sa-mp.com/wiki/PlayerTextDrawFont + * display, and anything greater than 16 crashes the client. See + * http://wiki.sa-mp.com/wiki/PlayerTextDrawFont * * * @@ -1824,7 +1832,8 @@ native PlayerTextDrawFont(playerid, PlayerText:text, TEXT_DRAW_FONT:font); /** * a_players - * Appears to scale text spacing to a proportional ratio. Useful when using PlayerTextDrawLetterSize + * Appears to scale text spacing to a proportional ratio. Useful when using + * PlayerTextDrawLetterSize * to ensure the text has even character spacing. * The ID of the player whose player-textdraw to set the proportionality of * The ID of the player-textdraw to set the proportionality of @@ -2535,7 +2544,8 @@ native DisableRemoteVehicleCollisions(playerid, bool:disable); * * If a checkpoint is already set it will use the size of that checkpoint instead of the new one.
    - * Checkpoints created on server-created objects (CreateObject/CreatePlayerObject) + * Checkpoints created on server-created objects (CreateObject/ + * CreatePlayerObject) * will appear down on the 'real' ground, but will still function correctly. A pickup can be used instead. *
    * Checkpoints are asynchronous, meaning only one can be shown at a time. To 'stream' checkpoints @@ -2717,7 +2727,8 @@ native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markerType, * a_players * Removes a map icon that was set earlier for a player using SetPlayerMapIcon. * The ID of the player whose icon to remove - * The ID of the icon to remove. This is the second parameter of SetPlayerMapIcon + * The ID of the icon to remove. This is the second parameter of + * SetPlayerMapIcon * * * 1: The function executed successfully.
    @@ -2787,7 +2798,8 @@ native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z, CAM_MOVE:cut = /** * a_players - * Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos. + * Restore the camera to a place behind the player, after using a function like + * SetPlayerCameraPos. * The player you want to restore the camera for * * @@ -3089,7 +3101,8 @@ native bool:IsPlayerInCheckpoint(playerid); /** * a_players - * Check if the player is inside their current set race checkpoint (SetPlayerRaceCheckpoint). + * Check if the player is inside their current set race checkpoint + * (SetPlayerRaceCheckpoint). * The ID of the player to check * * @@ -3269,7 +3282,8 @@ native StopRecordingPlayerData(playerid); * * * This function was added in SA-MP 0.3e and will not work in earlier versions! - * TextDrawSetSelectable or PlayerTextDrawSetSelectable + * TextDrawSetSelectable or + * PlayerTextDrawSetSelectable * MUST be used first, to allow a textdraw to be selectable. * It is the TEXT which will be highlighted when hovered over, NOT the box (if one is shown). */ diff --git a/a_samp.inc b/a_samp.inc index 866ec70..1d4db5a 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -692,7 +692,8 @@ native SendClientMessage(playerid, colour, const message[]); /** * a_samp - * Displays a message in chat to all players. This is a multi-player equivalent of SendClientMessage. + * Displays a message in chat to all players. This is a multi-player equivalent of + * SendClientMessage. * The colour of the message (RGBA) * The message to show (max 144 characters) * @@ -813,7 +814,8 @@ native GameTextForPlayer(playerid, const string[], time, style); * Whether the timer should repeat or not * * - * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * Timer intervals are not accurate (roughly 25% off). There's a fix available + * here. * * Timer IDs are never used twice. You can use KillTimer on a timer * ID and it won't matter if it's running or not. @@ -837,7 +839,8 @@ native SetTimer(const functionName[], interval, bool:repeating); * * * - * Timer intervals are not accurate (roughly 25% off). There's a fix available here. + * Timer intervals are not accurate (roughly 25% off). There's a fix available + * here. * * Timer IDs are never used twice. You can use KillTimer() on a timer ID and it won't matter * if it's running or not. @@ -877,7 +880,8 @@ native KillTimer(timerid); * Returns the uptime of the actual server (not the SA-MP server) in milliseconds. * * GetTickCount will cause problems on servers with uptime of over 24 days as GetTickCount - * will eventually warp past the integer size constraints. However using this + * will eventually warp past the integer size constraints. However using + * this * function fixes the problem. * One common use for GetTickCount is for benchmarking. It can be used to calculate how much * time some code takes to execute. @@ -1393,7 +1397,8 @@ native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Flo *
    * 0 if failed to create. *
    - * This function doesn't return a pickup ID that you can use in, for example, OnPlayerPickUpPickup. + * This function doesn't return a pickup ID that you can use in, for example, + * OnPlayerPickUpPickup. * Use CreatePickup if you'd like to assign IDs. * * @@ -1529,7 +1534,8 @@ native GameModeExit(); * * * To set the minutes and/or to set the time for individual players, see SetPlayerTime. - * This function is only relevant for players that do not use a passing clock - see TogglePlayerClock. + * This function is only relevant for players that do not use a passing clock - see + * TogglePlayerClock. */ native SetWorldTime(hour); @@ -1553,7 +1559,8 @@ native GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); * a_samp * 1 to enable, 0 to disable tire popping * This function was removed in SA-MP 0.3. Tire popping is enabled by default. If - * you want to disable tire popping, you'll have to manually script it using OnVehicleDamageStatusUpdate. + * you want to disable tire popping, you'll have to manually script it using + * OnVehicleDamageStatusUpdate. */ #pragma deprecated Use `OnVehicleDamageStatusUpdate`. native EnableTirePopping(bool:enable); // deprecated function @@ -1742,7 +1749,8 @@ native LimitPlayerMarkerRadius(Float:markerRadius); * * * This function was added in SA-MP 0.3a and will not work in earlier versions! - * NPCs do not have nametags. These can be scripted with Attach3DTextLabelToPlayer. + * NPCs do not have nametags. These can be scripted with + * Attach3DTextLabelToPlayer. * This function always return 1. */ native ConnectNPC(const name[], const script[]); @@ -1974,7 +1982,8 @@ native UnBlockIpAddress(const ipAddress[]); * The length of the string that should be stored * * - * This function, as of 0.3.7 R2, is deprecated. Please see GetConsoleVarAsString + * This function, as of 0.3.7 R2, is deprecated. Please see + * GetConsoleVarAsString * Using this function on anything other than a string (int, bool or float) or a nonexistent * server variable, will crash your server! This is a bug. * Type 'varlist' in the server console to display a list of available server variables and @@ -2216,7 +2225,8 @@ native NetStats_MessagesRecvPerSecond(playerid); * 1.0% is outright bad. * This function has been found to be currently unreliable the output is not as expected when * compared to the client. Therefore this function should not be used as a packet loss kicker. - * A more accurate packetloss function can be found here: http://forum.sa-mp.com/showpost.php?p=2488911&postcount=984 + * A more accurate packetloss function can be found here: + * http://forum.sa-mp.com/showpost.php?p=2488911&postcount=984 * The percentage packet loss as a float. 0.0 if player not connected. */ native Float:NetStats_PacketLossPercent(playerid); @@ -2519,7 +2529,8 @@ native TextDrawDestroy(Text:text); * Hint: it is easier and extremely precise to use LD_SPAC:white sprite for box-only * textdraws, TextDrawTextSize will have regular offsets.
    * If you want to change the letter size of a textdraw that is already shown, you don't have - * to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * to recreate it. Simply use TextDrawShowForPlayer/ + * TextDrawShowForAll * after modifying the textdraw and the change will be visible. * Fonts appear to look the best with an x to y ratio of 1 to 4 * (e.g. if x is 0.5 then y should be 2). @@ -2531,8 +2542,10 @@ native TextDrawLetterSize(Text:text, Float:width, Float:height); * Change the size of a textdraw (box if TextDrawUseBox is enabled * and/or clickable area for use with TextDrawSetSelectable). * The TextDraw to set the size of - * The size on the x axis (left/right) following the same 640x480 grid as TextDrawCreate - * The size on the y axis (up/down) following the same 640x480 grid as TextDrawCreate + * The size on the x axis (left/right) following the same 640x480 grid as + * TextDrawCreate + * The size on the y axis (up/down) following the same 640x480 grid as + * TextDrawCreate * * The x and y have different meanings with different TextDrawAlignment values:
    *
      @@ -2552,7 +2565,8 @@ native TextDrawLetterSize(Text:text, Float:width, Float:height); * whether a box is shown or not. * * If you want to change the text size of a textdraw that is already shown, you don't have - * to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * to recreate it. Simply use TextDrawShowForPlayer/ + * TextDrawShowForAll * after modifying the textdraw and the change will be visible. */ native TextDrawTextSize(Text:text, Float:width, Float:height); @@ -2601,7 +2615,8 @@ native TextDrawUseBox(Text:text, bool:use); * The TextDraw to change * The colour (RGBA) * If you want to change the boxcolour of a textdraw that is already shown, you don't have - * to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * to recreate it. Simply use TextDrawShowForPlayer/ + * TextDrawShowForAll * after modifying the textdraw and the change will be visible. */ native TextDrawBoxColor(Text:text, colour); @@ -2645,7 +2660,8 @@ native TextDrawSetOutline(Text:text, size); * the outline colour will match the colour used in TextDrawBackgroundColor. * Changing the value of colour seems to alter the colour used in TextDrawColor * If you want to change the background colour of a textdraw that is already shown, you don't - * have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * have to recreate it. Simply use TextDrawShowForPlayer/ + * TextDrawShowForAll * after modifying the textdraw and the change will be visible. */ native TextDrawBackgroundColor(Text:text, colour); @@ -2654,7 +2670,8 @@ native TextDrawBackgroundColor(Text:text, colour); * a_samp * Changes the text font. * The TextDraw to change - * There are four font styles, see http://wiki.sa-mp.com/wiki/PlayerTextDrawFont. + * There are four font styles, see + * http://wiki.sa-mp.com/wiki/PlayerTextDrawFont. * Font value 4 specifies that this is a txd sprite; 5 specifies that this * textdraw can display preview models. A font value greater than 5 does not display, and anything * greater than 16 crashes the client @@ -2673,7 +2690,8 @@ native TextDrawFont(Text:text, TEXT_DRAW_FONT:font); * Proportionality is set to 1 by default, you might skip this function if you * don't want to disable it. * If you want to change the proportionality of a textdraw that is already shown, you don't - * have to recreate it. Simply use TextDrawShowForPlayer/TextDrawShowForAll + * have to recreate it. Simply use TextDrawShowForPlayer/ + * TextDrawShowForAll * after modifying the textdraw and the change will be visible. */ native TextDrawSetProportional(Text:text, bool:set); @@ -3239,7 +3257,8 @@ forward OnGameModeInit(); * This function can also be used in a filterscript to detect if the gamemode changes with * RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript. * When using OnGameModeExit in conjunction with the 'rcon gmx' console command keep in mind - * there is a potential for client bugs to occur an example of this is excessive RemoveBuildingForPlayer + * there is a potential for client bugs to occur an example of this is excessive + * RemoveBuildingForPlayer * calls during OnGameModeInit which could result in a client crash. * This callback will NOT be called if the server crashes or the process is killed by other * means, such as using the Linux kill command or pressing the close-button on the Windows console. @@ -3546,7 +3565,8 @@ forward OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldsta forward OnPlayerEnterCheckpoint(playerid); /** - * This callback is called when a player leaves the checkpoint set for them by SetPlayerCheckpoint. + * This callback is called when a player leaves the checkpoint set for them by + * SetPlayerCheckpoint. * Only one checkpoint can be set at a time. * The ID of the player that left their checkpoint * @@ -3883,7 +3903,8 @@ forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); * Directional keys do not trigger OnPlayerKeyStateChange (up/down/left/right). * The ID of the player that pressed or released a key * A map (bitmask) of the keys currently held - see here - * A map (bitmask) of the keys held prior to the current change - see here + * A map (bitmask) of the keys held prior to the current change - see + * here * * This callback can also be called by NPC. * @@ -4061,7 +4082,8 @@ forward OnActorStreamOut(actorid, forplayerid); * A player's dialog doesn't hide when the gamemode restarts, causing the server to print "Warning: * PlayerDialogResponse PlayerId: 0 dialog ID doesn't match last sent dialog ID" if a player responded * to this dialog after restart. - * Parameters can contain different values, based on dialog's style. + * Parameters can contain different values, based on dialog's style. + * * * Returning 0 in this callback will pass the dialog to another script in case no matching * code were found in your gamemode's callback.
      diff --git a/a_vehicles.inc b/a_vehicles.inc index 417ca3d..d1370b1 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -587,7 +587,8 @@ native GetVehicleHealth(vehicleid, &Float:health); * * * - * This will only work if both vehicles are streamed in for a player (check IsVehicleStreamedIn). + * This will only work if both vehicles are streamed in for a player (check + * IsVehicleStreamedIn). * This function always returns 1, even if neither of the vehicle IDs passed * are valid. */ From 054510b71abb3302ec83eb46552454dc1ada2fe9 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 26 Feb 2022 17:57:34 +0000 Subject: [PATCH 058/104] Make the library declaration conditional. --- a_actor.inc | 15 +++++++-------- a_http.inc | 13 ++++++------- a_npc.inc | 17 ++++++++--------- a_objects.inc | 15 +++++++-------- a_players.inc | 15 +++++++-------- a_samp.inc | 17 ++++++++--------- a_sampdb.inc | 15 +++++++-------- a_vehicles.inc | 15 +++++++-------- 8 files changed, 57 insertions(+), 65 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 6b18d89..b8033f9 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -1,3 +1,9 @@ +#if defined _INC_a_actor + #endinput +#endif +#define _INC_a_actor +#define _actor_included + /** * * @@ -6,15 +12,8 @@ * */ -#if defined _INC_a_actor - #endinput -#endif -#define _INC_a_actor -#define _actor_included - -#define SAMP_CONST_CORRECT - #pragma tabsize 4 +#define SAMP_CONST_CORRECT /** * a_actor diff --git a/a_http.inc b/a_http.inc index f1d5e99..6d98543 100644 --- a/a_http.inc +++ b/a_http.inc @@ -1,3 +1,8 @@ +#if defined _INC_a_http + #endinput +#endif +#define _INC_a_http + /** * * @@ -6,14 +11,8 @@ * */ -#if defined _INC_a_http - #endinput -#endif -#define _INC_a_http - -#define SAMP_CONST_CORRECT - #pragma tabsize 4 +#define SAMP_CONST_CORRECT // -------------------------------------------------- // Defines diff --git a/a_npc.inc b/a_npc.inc index d4b69dd..76970f5 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -1,11 +1,3 @@ -/** - * - * - * (c) Copyright 2009, SA-MP Team - * - * - */ - #if defined _INC_a_npc #endinput #endif @@ -15,11 +7,18 @@ #define _INC_a_npc #define _samp_included -#define SAMP_CONST_CORRECT +/** + * + * + * (c) Copyright 2009, SA-MP Team + * + * + */ // Ignores warning 217 for properly indented PAWNO code // It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8 #pragma tabsize 4 +#define SAMP_CONST_CORRECT // -------------------------------------------------- // Defines diff --git a/a_objects.inc b/a_objects.inc index d851053..0edcd14 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -1,3 +1,9 @@ +#if defined _INC_a_objects + #endinput +#endif +#define _INC_a_objects +#define _objects_included + /** * * @@ -6,15 +12,8 @@ * */ -#if defined _INC_a_objects - #endinput -#endif -#define _INC_a_objects -#define _objects_included - -#define SAMP_CONST_CORRECT - #pragma tabsize 4 +#define SAMP_CONST_CORRECT // -------------------------------------------------- // Defines diff --git a/a_players.inc b/a_players.inc index 2a4f057..d195970 100644 --- a/a_players.inc +++ b/a_players.inc @@ -1,3 +1,9 @@ +#if defined _INC_a_players + #endinput +#endif +#define _INC_a_players +#define _players_included + /** * * @@ -6,15 +12,8 @@ * */ -#if defined _INC_a_players - #endinput -#endif -#define _INC_a_players -#define _players_included - -#define SAMP_CONST_CORRECT - #pragma tabsize 4 +#define SAMP_CONST_CORRECT // Limits #if !defined MAX_PLAYER_ATTACHED_OBJECTS diff --git a/a_samp.inc b/a_samp.inc index 1d4db5a..63ab8c7 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -1,11 +1,3 @@ -/** - * - * - * (c) Copyright 2005-2017, SA-MP Team - * - * - */ - #if defined _INC_a_samp #endinput #endif @@ -15,11 +7,18 @@ #define _INC_a_samp #define _samp_included -#define SAMP_CONST_CORRECT +/** + * + * + * (c) Copyright 2005-2017, SA-MP Team + * + * + */ // Ignores warning 217 for properly indented PAWNO code // It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8 #pragma tabsize 4 +#define SAMP_CONST_CORRECT // -------------------------------------------------- // Defines diff --git a/a_sampdb.inc b/a_sampdb.inc index 471e09e..8ad0199 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -1,3 +1,9 @@ +#if defined _INC_a_sampdb + #endinput +#endif +#define _INC_a_sampdb +#define _sampdb_included + /** * * @@ -6,15 +12,8 @@ * */ -#if defined _INC_a_sampdb - #endinput -#endif -#define _INC_a_sampdb -#define _sampdb_included - -#define SAMP_CONST_CORRECT - #pragma tabsize 4 +#define SAMP_CONST_CORRECT /** * a_sampdb diff --git a/a_vehicles.inc b/a_vehicles.inc index d1370b1..5139623 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -1,3 +1,9 @@ +#if defined _INC_a_vehicles + #endinput +#endif +#define _INC_a_vehicles +#define _vehicles_included + /** * * @@ -6,15 +12,8 @@ * */ -#if defined _INC_a_vehicles - #endinput -#endif -#define _INC_a_vehicles -#define _vehicles_included - -#define SAMP_CONST_CORRECT - #pragma tabsize 4 +#define SAMP_CONST_CORRECT // -------------------------------------------------- // Defines From 475a9550f600b168e613e971beb200f1cc3a7690 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 27 Feb 2022 18:33:18 +0000 Subject: [PATCH 059/104] Set library on constants. --- a_http.inc | 28 +++++++++-- a_npc.inc | 131 ++++++++++++++++++++++++++++++++++++++++--------- a_objects.inc | 8 +++ a_players.inc | 46 +++++++++++++++-- a_samp.inc | 131 ++++++++++++++++++++++++++++++++++++++++--------- a_sampdb.inc | 3 ++ a_vehicles.inc | 12 +++++ 7 files changed, 305 insertions(+), 54 deletions(-) diff --git a/a_http.inc b/a_http.inc index 6d98543..6769ee1 100644 --- a/a_http.inc +++ b/a_http.inc @@ -18,7 +18,12 @@ // Defines // -------------------------------------------------- -// HTTP requests +/** + * a_http + * + * HTTP request types + * + */ #define HTTP_METHOD: __TAG(HTTP_METHOD): enum HTTP_METHOD:__HTTP_METHOD { @@ -26,10 +31,17 @@ enum HTTP_METHOD:__HTTP_METHOD HTTP_POST, HTTP_HEAD } +static stock HTTP_METHOD:_@HTTP_METHOD() { return HTTP_METHOD; } -// HTTP error response codes -// These codes compliment ordinary HTTP response codes returned in 'responseCode' -// (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error) +/** + * a_http + * + * HTTP error response codes + * + * These codes compliment ordinary HTTP response codes returned in 'responseCode' + * (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error) + * + */ #define HTTP_ERROR: __TAG(HTTP_ERROR): enum HTTP_ERROR:__HTTP_ERROR { @@ -40,6 +52,7 @@ enum HTTP_ERROR:__HTTP_ERROR HTTP_ERROR_CONTENT_TOO_BIG, HTTP_ERROR_MALFORMED_RESPONSE } +static stock HTTP_ERROR:_@HTTP_ERROR() { return HTTP_ERROR; } /** * a_http @@ -73,8 +86,13 @@ enum HTTP_ERROR:__HTTP_ERROR *
    • + standard HTTP response codes
    • *
    *
    + * + * + * // HTTP callback.
    + * public MyHttpResponse(index, responseCode, const data[]) { ... } + *
    + *
    */ native HTTP(index, HTTP_METHOD:method, const url[], const data[], const callback[]); -// example HTTP callback: public MyHttpResponse(index, responseCode, const data[]) { ... } diff --git a/a_npc.inc b/a_npc.inc index 76970f5..793b379 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -25,102 +25,187 @@ // -------------------------------------------------- // Limits +/** + * a_npc + */ #if defined MAX_PLAYER_NAME static const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; #undef MAX_PLAYER_NAME - const MAX_PLAYER_NAME = __MAX_PLAYER_NAME; #else - const MAX_PLAYER_NAME = 24; + static const __MAX_PLAYER_NAME = 24; #endif +/** + * a_npc + */ +const MAX_PLAYER_NAME = __MAX_PLAYER_NAME; + +/** + * a_npc + */ #if defined MAX_PLAYERS static const __MAX_PLAYERS = MAX_PLAYERS; #undef MAX_PLAYERS - const MAX_PLAYERS = __MAX_PLAYERS; #else - const MAX_PLAYERS = 1000; + static const __MAX_PLAYERS = 1000; #endif +/** + * a_npc + */ +const MAX_PLAYERS = __MAX_PLAYERS; + +/** + * a_npc + */ #if defined MAX_VEHICLES static const __MAX_VEHICLES = MAX_VEHICLES; #undef MAX_VEHICLES - const MAX_VEHICLES = __MAX_VEHICLES; #else - const MAX_VEHICLES = 2000; + static const __MAX_VEHICLES = 2000; #endif +/** + * a_npc + */ +const MAX_VEHICLES = __MAX_VEHICLES; + +/** + * a_npc + */ #if defined MAX_ACTORS static const __MAX_ACTORS = MAX_ACTORS; #undef MAX_ACTORS - const MAX_ACTORS = __MAX_ACTORS; #else - const MAX_ACTORS = 1000; + static const __MAX_ACTORS = 1000; #endif +/** + * a_npc + */ +const MAX_ACTORS = __MAX_ACTORS; + +/** + * a_npc + */ #if defined MAX_OBJECTS static const __MAX_OBJECTS = MAX_OBJECTS; #undef MAX_OBJECTS - const MAX_OBJECTS = __MAX_OBJECTS; #else - const MAX_OBJECTS = 2000; + static const __MAX_OBJECTS = 2000; #endif +/** + * a_npc + */ +const MAX_OBJECTS = __MAX_OBJECTS; + +/** + * a_npc + */ #if defined MAX_GANG_ZONES static const __MAX_GANG_ZONES = MAX_GANG_ZONES; #undef MAX_GANG_ZONES - const MAX_GANG_ZONES = __MAX_GANG_ZONES; #else - const MAX_GANG_ZONES = 1024; + static const __MAX_GANG_ZONES = 1024; #endif +/** + * a_npc + */ +const MAX_GANG_ZONES = __MAX_GANG_ZONES; + +/** + * a_npc + */ #if defined MAX_TEXT_DRAWS static const Text:__MAX_TEXT_DRAWS = Text:MAX_TEXT_DRAWS; #undef MAX_TEXT_DRAWS const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; #else - const Text:MAX_TEXT_DRAWS = Text:2048; + static const Text:__MAX_TEXT_DRAWS = Text:2048; #endif +/** + * a_npc + */ +const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; + +/** + * a_npc + */ #if defined MAX_PLAYER_TEXT_DRAWS static const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:MAX_PLAYER_TEXT_DRAWS; #undef MAX_PLAYER_TEXT_DRAWS - const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:__MAX_PLAYER_TEXT_DRAWS; #else - const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:256; + static const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:256; #endif +/** + * a_npc + */ +const PlayerText:MAX_PLAYER_TEXT_DRAWS = __MAX_PLAYER_TEXT_DRAWS; + +/** + * a_npc + */ #if defined MAX_MENUS static const Menu:__MAX_MENUS = Menu:MAX_MENUS; #undef MAX_MENUS - const Menu:MAX_MENUS = Menu:__MAX_MENUS; #else - const Menu:MAX_MENUS = Menu:128; + static const Menu:__MAX_MENUS = Menu:128; #endif +/** + * a_npc + */ +const Menu:MAX_MENUS = __MAX_MENUS; + +/** + * a_npc + */ #if defined MAX_3DTEXT_GLOBAL static const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:MAX_3DTEXT_GLOBAL; #undef MAX_3DTEXT_GLOBAL - const Text3D:MAX_3DTEXT_GLOBAL = Text3D:__MAX_3DTEXT_GLOBAL; #else - const Text3D:MAX_3DTEXT_GLOBAL = Text3D:1024; + static const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:1024; #endif +/** + * a_npc + */ +const Text3D:MAX_3DTEXT_GLOBAL = __MAX_3DTEXT_GLOBAL; + +/** + * a_npc + */ #if defined MAX_3DTEXT_PLAYER static const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:MAX_3DTEXT_PLAYER; #undef MAX_3DTEXT_PLAYER - const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:__MAX_3DTEXT_PLAYER; #else - const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:1024; + static const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:1024; #endif +/** + * a_npc + */ +const PlayerText3D:MAX_3DTEXT_PLAYER = __MAX_3DTEXT_PLAYER; + +/** + * a_npc + */ #if defined MAX_PICKUPS static const __MAX_PICKUPS = MAX_PICKUPS; #undef MAX_PICKUPS - const MAX_PICKUPS = __MAX_PICKUPS; #else - const MAX_PICKUPS = 4096; + static const __MAX_PICKUPS = 4096; #endif +/** + * a_npc + */ +const MAX_PICKUPS = __MAX_PICKUPS; + #define INVALID_TIMER (0) #if defined NO_TAGS diff --git a/a_objects.inc b/a_objects.inc index 0edcd14..ccfcb03 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -19,6 +19,9 @@ // Defines // -------------------------------------------------- +/** + * a_objects + */ #define OBJECT_MATERIAL_SIZE: __TAG(OBJECT_MATERIAL_SIZE): enum OBJECT_MATERIAL_SIZE:__OBJECT_MATERIAL_SIZE (+= 10) { @@ -37,7 +40,11 @@ enum OBJECT_MATERIAL_SIZE:__OBJECT_MATERIAL_SIZE (+= 10) OBJECT_MATERIAL_SIZE_512x256, OBJECT_MATERIAL_SIZE_512x512 } +static stock OBJECT_MATERIAL_SIZE:_@OBJECT_MATERIAL_SIZE() { return OBJECT_MATERIAL_SIZE; } +/** + * a_objects + */ #define OBJECT_MATERIAL_TEXT_ALIGN: __TAG(OBJECT_MATERIAL_TEXT_ALIGN): enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN { @@ -45,6 +52,7 @@ enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN OBJECT_MATERIAL_TEXT_ALIGN_CENT, OBJECT_MATERIAL_TEXT_ALIGN_RIGT } +static stock OBJECT_MATERIAL_TEXT_ALIGN:_@OBJECT_MATERIAL_TEXT_ALIGN() { return OBJECT_MATERIAL_TEXT_ALIGN; } #define OBJECT_MATERIAL_TEXT_ALIGN_CENTER OBJECT_MATERIAL_TEXT_ALIGN_CENT #define OBJECT_MATERIAL_TEXT_ALIGN_RIGHT OBJECT_MATERIAL_TEXT_ALIGN_RIGT diff --git a/a_players.inc b/a_players.inc index d195970..7625707 100644 --- a/a_players.inc +++ b/a_players.inc @@ -24,6 +24,9 @@ #define MAX_CHATBUBBLE_LENGTH (144) #endif +/** + * a_players + */ #define SPECIAL_ACTION: __TAG(SPECIAL_ACTION): enum SPECIAL_ACTION:__SPECIAL_ACTION { @@ -48,7 +51,11 @@ enum SPECIAL_ACTION:__SPECIAL_ACTION SPECIAL_ACTION_CARRY, SPECIAL_ACTION_PISSING = 68 } +static stock SPECIAL_ACTION:_@SPECIAL_ACTION() { return SPECIAL_ACTION; } +/** + * a_players + */ #define FIGHT_STYLE: __TAG(FIGHT_STYLE): enum FIGHT_STYLE:__FIGHT_STYLE { @@ -59,7 +66,11 @@ enum FIGHT_STYLE:__FIGHT_STYLE FIGHT_STYLE_GRABKICK = 15, FIGHT_STYLE_ELBOW } +static stock FIGHT_STYLE:_@FIGHT_STYLE() { return FIGHT_STYLE; } +/** + * a_players + */ #define WEAPONSKILL: __TAG(WEAPONSKILL): enum WEAPONSKILL:__WEAPONSKILL { @@ -75,7 +86,11 @@ enum WEAPONSKILL:__WEAPONSKILL WEAPONSKILL_M4, WEAPONSKILL_SNIPERRIFLE, } +static stock WEAPONSKILL:_@WEAPONSKILL() { return WEAPONSKILL; } +/** + * a_players + */ #define WEAPONSTATE: __TAG(WEAPONSTATE): enum WEAPONSTATE:__WEAPONSTATE { @@ -85,8 +100,12 @@ enum WEAPONSTATE:__WEAPONSTATE WEAPONSTATE_MORE_BULLETS, WEAPONSTATE_RELOADING } +static stock WEAPONSTATE:_@WEAPONSTATE() { return WEAPONSTATE; } -// PVar enumeration +/** + * a_players + * PVar enumeration + */ #define PLAYER_VARTYPE: __TAG(PLAYER_VARTYPE): enum PLAYER_VARTYPE:__PLAYER_VARTYPE { @@ -95,7 +114,11 @@ enum PLAYER_VARTYPE:__PLAYER_VARTYPE PLAYER_VARTYPE_STRING, PLAYER_VARTYPE_FLOAT } +static stock PLAYER_VARTYPE:_@PLAYER_VARTYPE() { return PLAYER_VARTYPE; } +/** + * a_players + */ #define MAPICON: __TAG(MAPICON): enum MAPICON:__MAPICON { @@ -104,14 +127,22 @@ enum MAPICON:__MAPICON MAPICON_LOCAL_CHECKPOINT, // Displays in the player's local area and has a checkpoint marker MAPICON_GLOBAL_CHECKPOINT // Displays always and has a checkpoint marker } +static stock MAPICON:_@MAPICON() { return MAPICON; } +/** + * a_players + */ #define CAM_MOVE: __TAG(CAM_MOVE): enum CAM_MOVE:__CAMERA { CAMERA_MOVE = 1, CAMERA_CUT } +static stock CAMERA_MOVE:_@CAMERA_MOVE() { return CAMERA_MOVE; } +/** + * a_players + */ #define CAM_MODE: __TAG(CAM_MODE): enum CAM_MODE:__CAM_MODE { @@ -131,8 +162,12 @@ enum CAM_MODE:__CAM_MODE CAM_MODE_AIMWEAPON_FROMCAR = 55, CAM_MODE_DW_HELI_CHASE = 56 } +static stock CAM_MODE:_@CAM_MODE() { return CAM_MODE; } -// Spectating +/** + * a_players + * Spectating + */ #define SPECTATE_MODE: __TAG(SPECTATE_MODE): enum SPECTATE_MODE:__SPECTATE_MODE { @@ -140,8 +175,12 @@ enum SPECTATE_MODE:__SPECTATE_MODE SPECTATE_MODE_FIXED, SPECTATE_MODE_SIDE } +static stock SPECTATE_MODE:_@SPECTATE_MODE() { return SPECTATE_MODE; } -// Recording for NPC playback +/** + * a_players + * Recording for NPC playback + */ #define PLAYER_RECORDING_TYPE: __TAG(PLAYER_RECORDING_TYPE): enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE { @@ -149,6 +188,7 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE PLAYER_RECORDING_TYPE_DRIVER, PLAYER_RECORDING_TYPE_ONFOOT } +static stock PLAYER_RECORDING_TYPE:_@PLAYER_RECORDING_TYPE() { return PLAYER_RECORDING_TYPE; } // Player diff --git a/a_samp.inc b/a_samp.inc index 63ab8c7..25b9174 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -25,102 +25,187 @@ // -------------------------------------------------- // Limits +/** + * a_samp + */ #if defined MAX_PLAYER_NAME static const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; #undef MAX_PLAYER_NAME - const MAX_PLAYER_NAME = __MAX_PLAYER_NAME; #else - const MAX_PLAYER_NAME = 24; + static const __MAX_PLAYER_NAME = 24; #endif +/** + * a_samp + */ +const MAX_PLAYER_NAME = __MAX_PLAYER_NAME; + +/** + * a_samp + */ #if defined MAX_PLAYERS static const __MAX_PLAYERS = MAX_PLAYERS; #undef MAX_PLAYERS - const MAX_PLAYERS = __MAX_PLAYERS; #else - const MAX_PLAYERS = 1000; + static const __MAX_PLAYERS = 1000; #endif +/** + * a_samp + */ +const MAX_PLAYERS = __MAX_PLAYERS; + +/** + * a_samp + */ #if defined MAX_VEHICLES static const __MAX_VEHICLES = MAX_VEHICLES; #undef MAX_VEHICLES - const MAX_VEHICLES = __MAX_VEHICLES; #else - const MAX_VEHICLES = 2000; + static const __MAX_VEHICLES = 2000; #endif +/** + * a_samp + */ +const MAX_VEHICLES = __MAX_VEHICLES; + +/** + * a_samp + */ #if defined MAX_ACTORS static const __MAX_ACTORS = MAX_ACTORS; #undef MAX_ACTORS - const MAX_ACTORS = __MAX_ACTORS; #else - const MAX_ACTORS = 1000; + static const __MAX_ACTORS = 1000; #endif +/** + * a_samp + */ +const MAX_ACTORS = __MAX_ACTORS; + +/** + * a_samp + */ #if defined MAX_OBJECTS static const __MAX_OBJECTS = MAX_OBJECTS; #undef MAX_OBJECTS - const MAX_OBJECTS = __MAX_OBJECTS; #else - const MAX_OBJECTS = 2000; + static const __MAX_OBJECTS = 2000; #endif +/** + * a_samp + */ +const MAX_OBJECTS = __MAX_OBJECTS; + +/** + * a_samp + */ #if defined MAX_GANG_ZONES static const __MAX_GANG_ZONES = MAX_GANG_ZONES; #undef MAX_GANG_ZONES - const MAX_GANG_ZONES = __MAX_GANG_ZONES; #else - const MAX_GANG_ZONES = 1024; + static const __MAX_GANG_ZONES = 1024; #endif +/** + * a_samp + */ +const MAX_GANG_ZONES = __MAX_GANG_ZONES; + +/** + * a_samp + */ #if defined MAX_TEXT_DRAWS static const Text:__MAX_TEXT_DRAWS = Text:MAX_TEXT_DRAWS; #undef MAX_TEXT_DRAWS const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; #else - const Text:MAX_TEXT_DRAWS = Text:2048; + static const Text:__MAX_TEXT_DRAWS = Text:2048; #endif +/** + * a_samp + */ +const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; + +/** + * a_samp + */ #if defined MAX_PLAYER_TEXT_DRAWS static const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:MAX_PLAYER_TEXT_DRAWS; #undef MAX_PLAYER_TEXT_DRAWS - const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:__MAX_PLAYER_TEXT_DRAWS; #else - const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:256; + static const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:256; #endif +/** + * a_samp + */ +const PlayerText:MAX_PLAYER_TEXT_DRAWS = __MAX_PLAYER_TEXT_DRAWS; + +/** + * a_samp + */ #if defined MAX_MENUS static const Menu:__MAX_MENUS = Menu:MAX_MENUS; #undef MAX_MENUS - const Menu:MAX_MENUS = Menu:__MAX_MENUS; #else - const Menu:MAX_MENUS = Menu:128; + static const Menu:__MAX_MENUS = Menu:128; #endif +/** + * a_samp + */ +const Menu:MAX_MENUS = __MAX_MENUS; + +/** + * a_samp + */ #if defined MAX_3DTEXT_GLOBAL static const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:MAX_3DTEXT_GLOBAL; #undef MAX_3DTEXT_GLOBAL - const Text3D:MAX_3DTEXT_GLOBAL = Text3D:__MAX_3DTEXT_GLOBAL; #else - const Text3D:MAX_3DTEXT_GLOBAL = Text3D:1024; + static const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:1024; #endif +/** + * a_samp + */ +const Text3D:MAX_3DTEXT_GLOBAL = __MAX_3DTEXT_GLOBAL; + +/** + * a_samp + */ #if defined MAX_3DTEXT_PLAYER static const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:MAX_3DTEXT_PLAYER; #undef MAX_3DTEXT_PLAYER - const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:__MAX_3DTEXT_PLAYER; #else - const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:1024; + static const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:1024; #endif +/** + * a_samp + */ +const PlayerText3D:MAX_3DTEXT_PLAYER = __MAX_3DTEXT_PLAYER; + +/** + * a_samp + */ #if defined MAX_PICKUPS static const __MAX_PICKUPS = MAX_PICKUPS; #undef MAX_PICKUPS - const MAX_PICKUPS = __MAX_PICKUPS; #else - const MAX_PICKUPS = 4096; + static const __MAX_PICKUPS = 4096; #endif +/** + * a_samp + */ +const MAX_PICKUPS = __MAX_PICKUPS; + #define INVALID_TIMER (0) #if defined NO_TAGS diff --git a/a_sampdb.inc b/a_sampdb.inc index 8ad0199..2eba3eb 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -30,6 +30,9 @@ */ native DB:DB_Open(const name[]) = db_open; +/** + * a_sampdb + */ #pragma deprecated Use `DB_Open`. native DB:db_open(const name[]); diff --git a/a_vehicles.inc b/a_vehicles.inc index 5139623..c4c8896 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -19,6 +19,9 @@ // Defines // -------------------------------------------------- +/** + * a_vehicles + */ #define CARMODTYPE: __TAG(CARMODTYPE): enum CARMODTYPE:__CARMODTYPE { @@ -39,7 +42,11 @@ enum CARMODTYPE:__CARMODTYPE CARMODTYPE_FRONT_BULLBAR, CARMODTYPE_REAR_BULLBAR } +static stock CARMODTYPE:_@CARMODTYPE() { return CARMODTYPE; } +/** + * a_vehicles + */ #define VEHICLE_PARAMS: __TAG(VEHICLE_PARAMS): enum VEHICLE_PARAMS:__VEHICLE_PARAMS { @@ -47,7 +54,11 @@ enum VEHICLE_PARAMS:__VEHICLE_PARAMS VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_ON } +static stock VEHICLE_PARAMS:_@VEHICLE_PARAMS() { return VEHICLE_PARAMS; } +/** + * a_vehicles + */ #define VEHICLE_MODEL_INFO: __TAG(VEHICLE_MODEL_INFO): enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO { @@ -61,6 +72,7 @@ enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO VEHICLE_MODEL_INFO_FRONT_BUMPER, VEHICLE_MODEL_INFO_REAR_BUMPER } +static stock VEHICLE_MODEL_INFO:_@VEHICLE_MODEL_INFO() { return VEHICLE_MODEL_INFO; } #define VEHICLE_MODEL_INFO_FRONT_BUMPER_Z VEHICLE_MODEL_INFO_FRONT_BUMPER #define VEHICLE_MODEL_INFO_REAR_BUMPER_Z VEHICLE_MODEL_INFO_REAR_BUMPER From 1e5a62d8db71fe89494a009fb24d8fcf63689a31 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 27 Feb 2022 18:37:54 +0000 Subject: [PATCH 060/104] Better constants. --- a_npc.inc | 61 ++++++++++++++++++++++++++++++++---------------------- a_samp.inc | 61 ++++++++++++++++++++++++++++++++---------------------- 2 files changed, 72 insertions(+), 50 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index 793b379..45fc472 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -29,182 +29,193 @@ * a_npc */ #if defined MAX_PLAYER_NAME - static const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; + const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; #undef MAX_PLAYER_NAME #else - static const __MAX_PLAYER_NAME = 24; + const __MAX_PLAYER_NAME = 24; #endif /** * a_npc */ const MAX_PLAYER_NAME = __MAX_PLAYER_NAME; +#define __MAX_PLAYER_NAME /** * a_npc */ #if defined MAX_PLAYERS - static const __MAX_PLAYERS = MAX_PLAYERS; + const __MAX_PLAYERS = MAX_PLAYERS; #undef MAX_PLAYERS #else - static const __MAX_PLAYERS = 1000; + const __MAX_PLAYERS = 1000; #endif /** * a_npc */ const MAX_PLAYERS = __MAX_PLAYERS; +#define __MAX_PLAYERS /** * a_npc */ #if defined MAX_VEHICLES - static const __MAX_VEHICLES = MAX_VEHICLES; + const __MAX_VEHICLES = MAX_VEHICLES; #undef MAX_VEHICLES #else - static const __MAX_VEHICLES = 2000; + const __MAX_VEHICLES = 2000; #endif /** * a_npc */ const MAX_VEHICLES = __MAX_VEHICLES; +#define __MAX_VEHICLES /** * a_npc */ #if defined MAX_ACTORS - static const __MAX_ACTORS = MAX_ACTORS; + const __MAX_ACTORS = MAX_ACTORS; #undef MAX_ACTORS #else - static const __MAX_ACTORS = 1000; + const __MAX_ACTORS = 1000; #endif /** * a_npc */ const MAX_ACTORS = __MAX_ACTORS; +#define __MAX_ACTORS /** * a_npc */ #if defined MAX_OBJECTS - static const __MAX_OBJECTS = MAX_OBJECTS; + const __MAX_OBJECTS = MAX_OBJECTS; #undef MAX_OBJECTS #else - static const __MAX_OBJECTS = 2000; + const __MAX_OBJECTS = 2000; #endif /** * a_npc */ const MAX_OBJECTS = __MAX_OBJECTS; +#define __MAX_OBJECTS /** * a_npc */ #if defined MAX_GANG_ZONES - static const __MAX_GANG_ZONES = MAX_GANG_ZONES; + const __MAX_GANG_ZONES = MAX_GANG_ZONES; #undef MAX_GANG_ZONES #else - static const __MAX_GANG_ZONES = 1024; + const __MAX_GANG_ZONES = 1024; #endif /** * a_npc */ const MAX_GANG_ZONES = __MAX_GANG_ZONES; +#define __MAX_GANG_ZONES /** * a_npc */ #if defined MAX_TEXT_DRAWS - static const Text:__MAX_TEXT_DRAWS = Text:MAX_TEXT_DRAWS; + const Text:__MAX_TEXT_DRAWS = Text:MAX_TEXT_DRAWS; #undef MAX_TEXT_DRAWS - const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; #else - static const Text:__MAX_TEXT_DRAWS = Text:2048; + const Text:__MAX_TEXT_DRAWS = Text:2048; #endif /** * a_npc */ const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; +#define __MAX_TEXT_DRAWS /** * a_npc */ #if defined MAX_PLAYER_TEXT_DRAWS - static const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:MAX_PLAYER_TEXT_DRAWS; + const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:MAX_PLAYER_TEXT_DRAWS; #undef MAX_PLAYER_TEXT_DRAWS #else - static const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:256; + const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:256; #endif /** * a_npc */ const PlayerText:MAX_PLAYER_TEXT_DRAWS = __MAX_PLAYER_TEXT_DRAWS; +#define __MAX_PLAYER_TEXT_DRAWS /** * a_npc */ #if defined MAX_MENUS - static const Menu:__MAX_MENUS = Menu:MAX_MENUS; + const Menu:__MAX_MENUS = Menu:MAX_MENUS; #undef MAX_MENUS #else - static const Menu:__MAX_MENUS = Menu:128; + const Menu:__MAX_MENUS = Menu:128; #endif /** * a_npc */ const Menu:MAX_MENUS = __MAX_MENUS; +#define __MAX_MENUS /** * a_npc */ #if defined MAX_3DTEXT_GLOBAL - static const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:MAX_3DTEXT_GLOBAL; + const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:MAX_3DTEXT_GLOBAL; #undef MAX_3DTEXT_GLOBAL #else - static const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:1024; + const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:1024; #endif /** * a_npc */ const Text3D:MAX_3DTEXT_GLOBAL = __MAX_3DTEXT_GLOBAL; +#define __MAX_3DTEXT_GLOBAL /** * a_npc */ #if defined MAX_3DTEXT_PLAYER - static const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:MAX_3DTEXT_PLAYER; + const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:MAX_3DTEXT_PLAYER; #undef MAX_3DTEXT_PLAYER #else - static const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:1024; + const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:1024; #endif /** * a_npc */ const PlayerText3D:MAX_3DTEXT_PLAYER = __MAX_3DTEXT_PLAYER; +#define __MAX_3DTEXT_PLAYER /** * a_npc */ #if defined MAX_PICKUPS - static const __MAX_PICKUPS = MAX_PICKUPS; + const __MAX_PICKUPS = MAX_PICKUPS; #undef MAX_PICKUPS #else - static const __MAX_PICKUPS = 4096; + const __MAX_PICKUPS = 4096; #endif /** * a_npc */ const MAX_PICKUPS = __MAX_PICKUPS; +#define __MAX_PICKUPS #define INVALID_TIMER (0) diff --git a/a_samp.inc b/a_samp.inc index 25b9174..127cb68 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -29,182 +29,193 @@ * a_samp */ #if defined MAX_PLAYER_NAME - static const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; + const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; #undef MAX_PLAYER_NAME #else - static const __MAX_PLAYER_NAME = 24; + const __MAX_PLAYER_NAME = 24; #endif /** * a_samp */ const MAX_PLAYER_NAME = __MAX_PLAYER_NAME; +#define __MAX_PLAYER_NAME /** * a_samp */ #if defined MAX_PLAYERS - static const __MAX_PLAYERS = MAX_PLAYERS; + const __MAX_PLAYERS = MAX_PLAYERS; #undef MAX_PLAYERS #else - static const __MAX_PLAYERS = 1000; + const __MAX_PLAYERS = 1000; #endif /** * a_samp */ const MAX_PLAYERS = __MAX_PLAYERS; +#define __MAX_PLAYERS /** * a_samp */ #if defined MAX_VEHICLES - static const __MAX_VEHICLES = MAX_VEHICLES; + const __MAX_VEHICLES = MAX_VEHICLES; #undef MAX_VEHICLES #else - static const __MAX_VEHICLES = 2000; + const __MAX_VEHICLES = 2000; #endif /** * a_samp */ const MAX_VEHICLES = __MAX_VEHICLES; +#define __MAX_VEHICLES /** * a_samp */ #if defined MAX_ACTORS - static const __MAX_ACTORS = MAX_ACTORS; + const __MAX_ACTORS = MAX_ACTORS; #undef MAX_ACTORS #else - static const __MAX_ACTORS = 1000; + const __MAX_ACTORS = 1000; #endif /** * a_samp */ const MAX_ACTORS = __MAX_ACTORS; +#define __MAX_ACTORS /** * a_samp */ #if defined MAX_OBJECTS - static const __MAX_OBJECTS = MAX_OBJECTS; + const __MAX_OBJECTS = MAX_OBJECTS; #undef MAX_OBJECTS #else - static const __MAX_OBJECTS = 2000; + const __MAX_OBJECTS = 2000; #endif /** * a_samp */ const MAX_OBJECTS = __MAX_OBJECTS; +#define __MAX_OBJECTS /** * a_samp */ #if defined MAX_GANG_ZONES - static const __MAX_GANG_ZONES = MAX_GANG_ZONES; + const __MAX_GANG_ZONES = MAX_GANG_ZONES; #undef MAX_GANG_ZONES #else - static const __MAX_GANG_ZONES = 1024; + const __MAX_GANG_ZONES = 1024; #endif /** * a_samp */ const MAX_GANG_ZONES = __MAX_GANG_ZONES; +#define __MAX_GANG_ZONES /** * a_samp */ #if defined MAX_TEXT_DRAWS - static const Text:__MAX_TEXT_DRAWS = Text:MAX_TEXT_DRAWS; + const Text:__MAX_TEXT_DRAWS = Text:MAX_TEXT_DRAWS; #undef MAX_TEXT_DRAWS - const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; #else - static const Text:__MAX_TEXT_DRAWS = Text:2048; + const Text:__MAX_TEXT_DRAWS = Text:2048; #endif /** * a_samp */ const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; +#define __MAX_TEXT_DRAWS /** * a_samp */ #if defined MAX_PLAYER_TEXT_DRAWS - static const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:MAX_PLAYER_TEXT_DRAWS; + const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:MAX_PLAYER_TEXT_DRAWS; #undef MAX_PLAYER_TEXT_DRAWS #else - static const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:256; + const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:256; #endif /** * a_samp */ const PlayerText:MAX_PLAYER_TEXT_DRAWS = __MAX_PLAYER_TEXT_DRAWS; +#define __MAX_PLAYER_TEXT_DRAWS /** * a_samp */ #if defined MAX_MENUS - static const Menu:__MAX_MENUS = Menu:MAX_MENUS; + const Menu:__MAX_MENUS = Menu:MAX_MENUS; #undef MAX_MENUS #else - static const Menu:__MAX_MENUS = Menu:128; + const Menu:__MAX_MENUS = Menu:128; #endif /** * a_samp */ const Menu:MAX_MENUS = __MAX_MENUS; +#define __MAX_MENUS /** * a_samp */ #if defined MAX_3DTEXT_GLOBAL - static const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:MAX_3DTEXT_GLOBAL; + const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:MAX_3DTEXT_GLOBAL; #undef MAX_3DTEXT_GLOBAL #else - static const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:1024; + const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:1024; #endif /** * a_samp */ const Text3D:MAX_3DTEXT_GLOBAL = __MAX_3DTEXT_GLOBAL; +#define __MAX_3DTEXT_GLOBAL /** * a_samp */ #if defined MAX_3DTEXT_PLAYER - static const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:MAX_3DTEXT_PLAYER; + const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:MAX_3DTEXT_PLAYER; #undef MAX_3DTEXT_PLAYER #else - static const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:1024; + const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:1024; #endif /** * a_samp */ const PlayerText3D:MAX_3DTEXT_PLAYER = __MAX_3DTEXT_PLAYER; +#define __MAX_3DTEXT_PLAYER /** * a_samp */ #if defined MAX_PICKUPS - static const __MAX_PICKUPS = MAX_PICKUPS; + const __MAX_PICKUPS = MAX_PICKUPS; #undef MAX_PICKUPS #else - static const __MAX_PICKUPS = 4096; + const __MAX_PICKUPS = 4096; #endif /** * a_samp */ const MAX_PICKUPS = __MAX_PICKUPS; +#define __MAX_PICKUPS #define INVALID_TIMER (0) From 85b206370b7867fb6afcaa06fe6a9e591a9b5bb1 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 27 Feb 2022 18:52:54 +0000 Subject: [PATCH 061/104] enum documentation --- a_http.inc | 7 +-- a_npc.inc | 44 ++++++++++++++-- a_players.inc | 6 +-- a_samp.inc | 139 +++++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 173 insertions(+), 23 deletions(-) diff --git a/a_http.inc b/a_http.inc index 6769ee1..50ca016 100644 --- a/a_http.inc +++ b/a_http.inc @@ -20,9 +20,7 @@ /** * a_http - * - * HTTP request types - * + * HTTP request types */ #define HTTP_METHOD: __TAG(HTTP_METHOD): enum HTTP_METHOD:__HTTP_METHOD @@ -35,9 +33,8 @@ static stock HTTP_METHOD:_@HTTP_METHOD() { return HTTP_METHOD; } /** * a_http + * HTTP error response codes * - * HTTP error response codes - * * These codes compliment ordinary HTTP response codes returned in 'responseCode' * (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error) * diff --git a/a_npc.inc b/a_npc.inc index 45fc472..b6c421d 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -249,7 +249,10 @@ const INVALID_GANG_ZONE = 0xFFFFFFFF; const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; -// States +/** + * a_npc + * States + */ #define PLAYER_STATE: __TAG(PLAYER_STATE): enum PLAYER_STATE:__PLAYER_STATE { @@ -261,8 +264,33 @@ enum PLAYER_STATE:__PLAYER_STATE PLAYER_STATE_SPAWNED, PLAYER_STATE_SPECTATING } +static stock PLAYER_STATE:_@PLAYER_STATE() { return PLAYER_STATE; } + +/** + * a_npc + * Used internally + */ +#pragma deprecated Used internally. +const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; + +/** + * a_npc + * Used internally + */ +#pragma deprecated Used internally. +const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRIVER = PLAYER_STATE:5; + +/** + * a_npc + * Used internally + */ +#pragma deprecated Used internally. +const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASSENGER = PLAYER_STATE:6; -// Weapons +/** + * a_npc + * Weapons + */ #define WEAPON: __TAG(WEAPON): enum WEAPON:__WEAPON { @@ -315,9 +343,14 @@ enum WEAPON:__WEAPON WEAPON_VEHICLE = 49, WEAPON_DROWN = 53, WEAPON_COLLISION, + WEAPON_SPLAT = WEAPON_COLLISION, } +static stock WEAPON:_@WEAPON() { return WEAPON; } -// Keys +/** + * a_npc + * Keys + */ #define KEY: __TAG(KEY): enum KEY:__KEY (<<= 1) { @@ -346,7 +379,11 @@ enum KEY:__KEY (<<= 1) KEY_LEFT = -128, KEY_RIGHT = 128, } +static stock KEY:_@KEY() { return KEY; } +/** + * a_npc + */ #define PLAYER_RECORDING_TYPE: __TAG(PLAYER_RECORDING_TYPE): enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE { @@ -354,6 +391,7 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE PLAYER_RECORDING_TYPE_DRIVER, PLAYER_RECORDING_TYPE_ONFOOT } +static stock PLAYER_RECORDING_TYPE:_@PLAYER_RECORDING_TYPE() { return PLAYER_RECORDING_TYPE; } // Limits #if MAX_PLAYER_NAME < 1 || MAX_PLAYER_NAME > 24 diff --git a/a_players.inc b/a_players.inc index 7625707..e223ca4 100644 --- a/a_players.inc +++ b/a_players.inc @@ -104,7 +104,7 @@ static stock WEAPONSTATE:_@WEAPONSTATE() { return WEAPONSTATE; } /** * a_players - * PVar enumeration + * PVar enumeration */ #define PLAYER_VARTYPE: __TAG(PLAYER_VARTYPE): enum PLAYER_VARTYPE:__PLAYER_VARTYPE @@ -166,7 +166,7 @@ static stock CAM_MODE:_@CAM_MODE() { return CAM_MODE; } /** * a_players - * Spectating + * Spectating */ #define SPECTATE_MODE: __TAG(SPECTATE_MODE): enum SPECTATE_MODE:__SPECTATE_MODE @@ -179,7 +179,7 @@ static stock SPECTATE_MODE:_@SPECTATE_MODE() { return SPECTATE_MODE; } /** * a_players - * Recording for NPC playback + * Recording for NPC playback */ #define PLAYER_RECORDING_TYPE: __TAG(PLAYER_RECORDING_TYPE): enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE diff --git a/a_samp.inc b/a_samp.inc index 127cb68..83b0cf0 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -236,20 +236,65 @@ const MAX_PICKUPS = __MAX_PICKUPS; #define __LESS __TAG // Invalids +/** + * a_samp + */ const NO_TEAM = 0xFF; +/** + * a_samp + */ const INVALID_PLAYER_ID = 0xFFFF; + +/** + * a_samp + */ const INVALID_VEHICLE_ID = 0xFFFF; + +/** + * a_samp + */ const INVALID_ACTOR_ID = 0xFFFF; + +/** + * a_samp + */ const INVALID_OBJECT_ID = 0xFFFF; + +/** + * a_samp + */ const Menu:INVALID_MENU = Menu:0xFF; + +/** + * a_samp + */ const Text:INVALID_TEXT_DRAW = Text:0xFFFF; + +/** + * a_samp + */ const PlayerText:INVALID_PLAYER_TEXT_DRAW = PlayerText:0xFFFF; + +/** + * a_samp + */ const INVALID_GANG_ZONE = 0xFFFFFFFF; + +/** + * a_samp + */ const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; + +/** + * a_samp + */ const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; -// States +/** + * a_samp + * States + */ #define PLAYER_STATE: __TAG(PLAYER_STATE): enum PLAYER_STATE:__PLAYER_STATE { @@ -261,13 +306,33 @@ enum PLAYER_STATE:__PLAYER_STATE PLAYER_STATE_SPAWNED, PLAYER_STATE_SPECTATING } +static stock PLAYER_STATE:_@PLAYER_STATE() { return PLAYER_STATE; } -// Deprecated. -#define PLAYER_STATE_EXIT_VEHICLE (4) -#define PLAYER_STATE_ENTER_VEHICLE_DRIVER (5) -#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER (6) +/** + * a_samp + * Used internally + */ +#pragma deprecated Used internally. +const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; -// Marker modes used by ShowPlayerMarkers() +/** + * a_samp + * Used internally + */ +#pragma deprecated Used internally. +const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRIVER = PLAYER_STATE:5; + +/** + * a_samp + * Used internally + */ +#pragma deprecated Used internally. +const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASSENGER = PLAYER_STATE:6; + +/** + * a_samp + * Marker modes used by ShowPlayerMarkers() + */ #define PLAYER_MARKERS_MODE: __TAG(PLAYER_MARKERS_MODE): enum PLAYER_MARKERS_MODE:__PLAYER_MARKERS_MODE { @@ -275,8 +340,12 @@ enum PLAYER_MARKERS_MODE:__PLAYER_MARKERS_MODE PLAYER_MARKERS_MODE_GLOBAL, PLAYER_MARKERS_MODE_STREAMED } +static stock PLAYER_MARKERS_MODE:_@PLAYER_MARKERS_MODE() { return PLAYER_MARKERS_MODE; } -// Weapons +/** + * a_samp + * Weapons + */ #define WEAPON: __TAG(WEAPON): enum WEAPON:__WEAPON { @@ -331,8 +400,12 @@ enum WEAPON:__WEAPON WEAPON_COLLISION, WEAPON_SPLAT = WEAPON_COLLISION, } +static stock WEAPON:_@WEAPON() { return WEAPON; } -// Keys +/** + * a_samp + * Keys + */ #define KEY: __TAG(KEY): enum KEY:__KEY (<<= 1) { @@ -361,8 +434,12 @@ enum KEY:__KEY (<<= 1) KEY_LEFT = -128, KEY_RIGHT = 128, } +static stock KEY:_@KEY() { return KEY; } -// Player GUI Dialog +/** + * a_samp + * Player GUI dialog + */ #define DIALOG_STYLE: __TAG(DIALOG_STYLE): enum DIALOG_STYLE:__DIALOG_STYLE { @@ -373,8 +450,12 @@ enum DIALOG_STYLE:__DIALOG_STYLE DIALOG_STYLE_TABLIST, DIALOG_STYLE_TABLIST_HEADERS } +static stock DIALOG_STYLE:_@DIALOG_STYLE() { return DIALOG_STYLE; } -// Text Draw +/** + * a_samp + * Text draw font + */ #define TEXT_DRAW_FONT: __TAG(TEXT_DRAW_FONT): enum TEXT_DRAW_FONT:__TEXT_DRAW_FONT { @@ -385,7 +466,12 @@ enum TEXT_DRAW_FONT:__TEXT_DRAW_FONT TEXT_DRAW_FONT_SPRITE_DRAW, TEXT_DRAW_FONT_MODEL_PREVIEW, } +static stock TEXT_DRAW_FONT:_@TEXT_DRAW_FONT() { return TEXT_DRAW_FONT; } +/** + * a_samp + * Text draw alignment + */ #define TEXT_DRAW_ALIGN: __TAG(TEXT_DRAW_ALIGN): enum TEXT_DRAW_ALIGN:__TEXT_DRAW_ALIGN { @@ -394,8 +480,12 @@ enum TEXT_DRAW_ALIGN:__TEXT_DRAW_ALIGN TEXT_DRAW_ALIGN_CENTER = TEXT_DRAW_ALIGN_CENTRE, TEXT_DRAW_ALIGN_RIGHT } +static stock TEXT_DRAW_ALIGN:_@TEXT_DRAW_ALIGN() { return TEXT_DRAW_ALIGN; } -// SVar enumeration +/** + * a_samp + * SVar enumeration + */ #define SERVER_VARTYPE: __TAG(SERVER_VARTYPE): enum SERVER_VARTYPE:__SERVER_VARTYPE { @@ -404,8 +494,12 @@ enum SERVER_VARTYPE:__SERVER_VARTYPE SERVER_VARTYPE_STRING, SERVER_VARTYPE_FLOAT } +static stock SERVER_VARTYPE:_@SERVER_VARTYPE() { return SERVER_VARTYPE; } -// Artwork/NetModels +/** + * a_samp + * Artwork/NetModels + */ #define DOWNLOAD_REQUEST: __TAG(DOWNLOAD_REQUEST): enum DOWNLOAD_REQUEST:__DOWNLOAD_REQUEST { @@ -413,13 +507,21 @@ enum DOWNLOAD_REQUEST:__DOWNLOAD_REQUEST DOWNLOAD_REQUEST_MODEL_FILE, DOWNLOAD_REQUEST_TEXTURE_FILE } +static stock DOWNLOAD_REQUEST:_@DOWNLOAD_REQUEST() { return DOWNLOAD_REQUEST; } +/** + * a_samp + */ #define CLICK_SOURCE: __TAG(CLICK_SOURCE): enum CLICK_SOURCE:__CLICK_SOURCE { CLICK_SOURCE_SCOREBOARD } +static stock CLICK_SOURCE:_@CLICK_SOURCE() { return CLICK_SOURCE; } +/** + * a_samp + */ #define EDIT_RESPONSE: __TAG(EDIT_RESPONSE): enum EDIT_RESPONSE:__EDIT_RESPONSE { @@ -427,14 +529,22 @@ enum EDIT_RESPONSE:__EDIT_RESPONSE EDIT_RESPONSE_FINAL, EDIT_RESPONSE_UPDATE } +static stock EDIT_RESPONSE:_@EDIT_RESPONSE() { return EDIT_RESPONSE; } +/** + * a_samp + */ #define SELECT_OBJECT: __TAG(SELECT_OBJECT): enum SELECT_OBJECT:__SELECT_OBJECT { SELECT_OBJECT_GLOBAL_OBJECT = 1, SELECT_OBJECT_PLAYER_OBJECT } +static stock SELECT_OBJECT:_@SELECT_OBJECT() { return SELECT_OBJECT; } +/** + * a_samp + */ #define BULLET_HIT_TYPE: __TAG(BULLET_HIT_TYPE): enum BULLET_HIT_TYPE:__BULLET_HIT_TYPE { @@ -444,7 +554,11 @@ enum BULLET_HIT_TYPE:__BULLET_HIT_TYPE BULLET_HIT_TYPE_OBJECT, BULLET_HIT_TYPE_PLAYER_OBJECT } +static stock BULLET_HIT_TYPE:_@BULLET_HIT_TYPE() { return BULLET_HIT_TYPE; } +/** + * a_samp + */ #define FORCE_SYNC: __TAG(FORCE_SYNC): enum FORCE_SYNC:__FORCE_SYNC { @@ -452,6 +566,7 @@ enum FORCE_SYNC:__FORCE_SYNC SYNC_ALL, // Sync to all streamed-in players. SYNC_OTHER // Sync to all streamed-in players, except the player with the animation. } +static stock FORCE_SYNC:_@FORCE_SYNC() { return FORCE_SYNC; } // Limits #if MAX_PLAYER_NAME < 3 || MAX_PLAYER_NAME > 24 From 89e8cf7168bdba145e9e8d9d5140ff72e841706e Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 27 Feb 2022 18:56:10 +0000 Subject: [PATCH 062/104] Return the correct enum names. --- a_http.inc | 4 ++-- a_npc.inc | 51 ++++++++++++++++++++++++++++++++++++++++++++++---- a_objects.inc | 4 ++-- a_players.inc | 20 ++++++++++---------- a_samp.inc | 28 +++++++++++++-------------- a_vehicles.inc | 6 +++--- 6 files changed, 78 insertions(+), 35 deletions(-) diff --git a/a_http.inc b/a_http.inc index 50ca016..ee01e8b 100644 --- a/a_http.inc +++ b/a_http.inc @@ -29,7 +29,7 @@ enum HTTP_METHOD:__HTTP_METHOD HTTP_POST, HTTP_HEAD } -static stock HTTP_METHOD:_@HTTP_METHOD() { return HTTP_METHOD; } +static stock HTTP_METHOD:_@HTTP_METHOD() { return __HTTP_METHOD; } /** * a_http @@ -49,7 +49,7 @@ enum HTTP_ERROR:__HTTP_ERROR HTTP_ERROR_CONTENT_TOO_BIG, HTTP_ERROR_MALFORMED_RESPONSE } -static stock HTTP_ERROR:_@HTTP_ERROR() { return HTTP_ERROR; } +static stock HTTP_ERROR:_@HTTP_ERROR() { return __HTTP_ERROR; } /** * a_http diff --git a/a_npc.inc b/a_npc.inc index b6c421d..349b5c6 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -236,17 +236,60 @@ const MAX_PICKUPS = __MAX_PICKUPS; #define __LESS __TAG // Invalids + +/** + * a_npc + */ const NO_TEAM = 0xFF; +/** + * a_npc + */ const INVALID_PLAYER_ID = 0xFFFF; + +/** + * a_npc + */ const INVALID_VEHICLE_ID = 0xFFFF; + +/** + * a_npc + */ const INVALID_ACTOR_ID = 0xFFFF; + +/** + * a_npc + */ const INVALID_OBJECT_ID = 0xFFFF; + +/** + * a_npc + */ const Menu:INVALID_MENU = Menu:0xFF; + +/** + * a_npc + */ const Text:INVALID_TEXT_DRAW = Text:0xFFFF; + +/** + * a_npc + */ const PlayerText:INVALID_PLAYER_TEXT_DRAW = PlayerText:0xFFFF; + +/** + * a_npc + */ const INVALID_GANG_ZONE = 0xFFFFFFFF; + +/** + * a_npc + */ const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; + +/** + * a_npc + */ const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; /** @@ -264,7 +307,7 @@ enum PLAYER_STATE:__PLAYER_STATE PLAYER_STATE_SPAWNED, PLAYER_STATE_SPECTATING } -static stock PLAYER_STATE:_@PLAYER_STATE() { return PLAYER_STATE; } +static stock PLAYER_STATE:_@PLAYER_STATE() { return __PLAYER_STATE; } /** * a_npc @@ -345,7 +388,7 @@ enum WEAPON:__WEAPON WEAPON_COLLISION, WEAPON_SPLAT = WEAPON_COLLISION, } -static stock WEAPON:_@WEAPON() { return WEAPON; } +static stock WEAPON:_@WEAPON() { return __WEAPON; } /** * a_npc @@ -379,7 +422,7 @@ enum KEY:__KEY (<<= 1) KEY_LEFT = -128, KEY_RIGHT = 128, } -static stock KEY:_@KEY() { return KEY; } +static stock KEY:_@KEY() { return __KEY; } /** * a_npc @@ -391,7 +434,7 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE PLAYER_RECORDING_TYPE_DRIVER, PLAYER_RECORDING_TYPE_ONFOOT } -static stock PLAYER_RECORDING_TYPE:_@PLAYER_RECORDING_TYPE() { return PLAYER_RECORDING_TYPE; } +static stock PLAYER_RECORDING_TYPE:_@PLAYER_RECORDING_TYPE() { return __PLAYER_RECORDING_TYPE; } // Limits #if MAX_PLAYER_NAME < 1 || MAX_PLAYER_NAME > 24 diff --git a/a_objects.inc b/a_objects.inc index ccfcb03..99bcbdb 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -40,7 +40,7 @@ enum OBJECT_MATERIAL_SIZE:__OBJECT_MATERIAL_SIZE (+= 10) OBJECT_MATERIAL_SIZE_512x256, OBJECT_MATERIAL_SIZE_512x512 } -static stock OBJECT_MATERIAL_SIZE:_@OBJECT_MATERIAL_SIZE() { return OBJECT_MATERIAL_SIZE; } +static stock OBJECT_MATERIAL_SIZE:_@OBJECT_MATERIAL_SIZE() { return __OBJECT_MATERIAL_SIZE; } /** * a_objects @@ -52,7 +52,7 @@ enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN OBJECT_MATERIAL_TEXT_ALIGN_CENT, OBJECT_MATERIAL_TEXT_ALIGN_RIGT } -static stock OBJECT_MATERIAL_TEXT_ALIGN:_@OBJECT_MATERIAL_TEXT_ALIGN() { return OBJECT_MATERIAL_TEXT_ALIGN; } +static stock OBJECT_MATERIAL_TEXT_ALIGN:_@OBJECT_MATERIAL_TEXT_ALIGN() { return __OBJECT_MATERIAL_TEXT_ALIGN; } #define OBJECT_MATERIAL_TEXT_ALIGN_CENTER OBJECT_MATERIAL_TEXT_ALIGN_CENT #define OBJECT_MATERIAL_TEXT_ALIGN_RIGHT OBJECT_MATERIAL_TEXT_ALIGN_RIGT diff --git a/a_players.inc b/a_players.inc index e223ca4..8a93318 100644 --- a/a_players.inc +++ b/a_players.inc @@ -51,7 +51,7 @@ enum SPECIAL_ACTION:__SPECIAL_ACTION SPECIAL_ACTION_CARRY, SPECIAL_ACTION_PISSING = 68 } -static stock SPECIAL_ACTION:_@SPECIAL_ACTION() { return SPECIAL_ACTION; } +static stock SPECIAL_ACTION:_@SPECIAL_ACTION() { return __SPECIAL_ACTION; } /** * a_players @@ -66,7 +66,7 @@ enum FIGHT_STYLE:__FIGHT_STYLE FIGHT_STYLE_GRABKICK = 15, FIGHT_STYLE_ELBOW } -static stock FIGHT_STYLE:_@FIGHT_STYLE() { return FIGHT_STYLE; } +static stock FIGHT_STYLE:_@FIGHT_STYLE() { return __FIGHT_STYLE; } /** * a_players @@ -86,7 +86,7 @@ enum WEAPONSKILL:__WEAPONSKILL WEAPONSKILL_M4, WEAPONSKILL_SNIPERRIFLE, } -static stock WEAPONSKILL:_@WEAPONSKILL() { return WEAPONSKILL; } +static stock WEAPONSKILL:_@WEAPONSKILL() { return __WEAPONSKILL; } /** * a_players @@ -100,7 +100,7 @@ enum WEAPONSTATE:__WEAPONSTATE WEAPONSTATE_MORE_BULLETS, WEAPONSTATE_RELOADING } -static stock WEAPONSTATE:_@WEAPONSTATE() { return WEAPONSTATE; } +static stock WEAPONSTATE:_@WEAPONSTATE() { return __WEAPONSTATE; } /** * a_players @@ -114,7 +114,7 @@ enum PLAYER_VARTYPE:__PLAYER_VARTYPE PLAYER_VARTYPE_STRING, PLAYER_VARTYPE_FLOAT } -static stock PLAYER_VARTYPE:_@PLAYER_VARTYPE() { return PLAYER_VARTYPE; } +static stock PLAYER_VARTYPE:_@PLAYER_VARTYPE() { return __PLAYER_VARTYPE; } /** * a_players @@ -127,7 +127,7 @@ enum MAPICON:__MAPICON MAPICON_LOCAL_CHECKPOINT, // Displays in the player's local area and has a checkpoint marker MAPICON_GLOBAL_CHECKPOINT // Displays always and has a checkpoint marker } -static stock MAPICON:_@MAPICON() { return MAPICON; } +static stock MAPICON:_@MAPICON() { return __MAPICON; } /** * a_players @@ -138,7 +138,7 @@ enum CAM_MOVE:__CAMERA CAMERA_MOVE = 1, CAMERA_CUT } -static stock CAMERA_MOVE:_@CAMERA_MOVE() { return CAMERA_MOVE; } +static stock CAMERA_MOVE:_@CAMERA_MOVE() { return __CAMERA_MOVE; } /** * a_players @@ -162,7 +162,7 @@ enum CAM_MODE:__CAM_MODE CAM_MODE_AIMWEAPON_FROMCAR = 55, CAM_MODE_DW_HELI_CHASE = 56 } -static stock CAM_MODE:_@CAM_MODE() { return CAM_MODE; } +static stock CAM_MODE:_@CAM_MODE() { return __CAM_MODE; } /** * a_players @@ -175,7 +175,7 @@ enum SPECTATE_MODE:__SPECTATE_MODE SPECTATE_MODE_FIXED, SPECTATE_MODE_SIDE } -static stock SPECTATE_MODE:_@SPECTATE_MODE() { return SPECTATE_MODE; } +static stock SPECTATE_MODE:_@SPECTATE_MODE() { return __SPECTATE_MODE; } /** * a_players @@ -188,7 +188,7 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE PLAYER_RECORDING_TYPE_DRIVER, PLAYER_RECORDING_TYPE_ONFOOT } -static stock PLAYER_RECORDING_TYPE:_@PLAYER_RECORDING_TYPE() { return PLAYER_RECORDING_TYPE; } +static stock PLAYER_RECORDING_TYPE:_@PLAYER_RECORDING_TYPE() { return __PLAYER_RECORDING_TYPE; } // Player diff --git a/a_samp.inc b/a_samp.inc index 83b0cf0..68dc2f7 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -306,7 +306,7 @@ enum PLAYER_STATE:__PLAYER_STATE PLAYER_STATE_SPAWNED, PLAYER_STATE_SPECTATING } -static stock PLAYER_STATE:_@PLAYER_STATE() { return PLAYER_STATE; } +static stock PLAYER_STATE:_@PLAYER_STATE() { return __PLAYER_STATE; } /** * a_samp @@ -340,7 +340,7 @@ enum PLAYER_MARKERS_MODE:__PLAYER_MARKERS_MODE PLAYER_MARKERS_MODE_GLOBAL, PLAYER_MARKERS_MODE_STREAMED } -static stock PLAYER_MARKERS_MODE:_@PLAYER_MARKERS_MODE() { return PLAYER_MARKERS_MODE; } +static stock PLAYER_MARKERS_MODE:_@PLAYER_MARKERS_MODE() { return __PLAYER_MARKERS_MODE; } /** * a_samp @@ -400,7 +400,7 @@ enum WEAPON:__WEAPON WEAPON_COLLISION, WEAPON_SPLAT = WEAPON_COLLISION, } -static stock WEAPON:_@WEAPON() { return WEAPON; } +static stock WEAPON:_@WEAPON() { return __WEAPON; } /** * a_samp @@ -434,7 +434,7 @@ enum KEY:__KEY (<<= 1) KEY_LEFT = -128, KEY_RIGHT = 128, } -static stock KEY:_@KEY() { return KEY; } +static stock KEY:_@KEY() { return __KEY; } /** * a_samp @@ -450,7 +450,7 @@ enum DIALOG_STYLE:__DIALOG_STYLE DIALOG_STYLE_TABLIST, DIALOG_STYLE_TABLIST_HEADERS } -static stock DIALOG_STYLE:_@DIALOG_STYLE() { return DIALOG_STYLE; } +static stock DIALOG_STYLE:_@DIALOG_STYLE() { return __DIALOG_STYLE; } /** * a_samp @@ -466,7 +466,7 @@ enum TEXT_DRAW_FONT:__TEXT_DRAW_FONT TEXT_DRAW_FONT_SPRITE_DRAW, TEXT_DRAW_FONT_MODEL_PREVIEW, } -static stock TEXT_DRAW_FONT:_@TEXT_DRAW_FONT() { return TEXT_DRAW_FONT; } +static stock TEXT_DRAW_FONT:_@TEXT_DRAW_FONT() { return __TEXT_DRAW_FONT; } /** * a_samp @@ -480,7 +480,7 @@ enum TEXT_DRAW_ALIGN:__TEXT_DRAW_ALIGN TEXT_DRAW_ALIGN_CENTER = TEXT_DRAW_ALIGN_CENTRE, TEXT_DRAW_ALIGN_RIGHT } -static stock TEXT_DRAW_ALIGN:_@TEXT_DRAW_ALIGN() { return TEXT_DRAW_ALIGN; } +static stock TEXT_DRAW_ALIGN:_@TEXT_DRAW_ALIGN() { return __TEXT_DRAW_ALIGN; } /** * a_samp @@ -494,7 +494,7 @@ enum SERVER_VARTYPE:__SERVER_VARTYPE SERVER_VARTYPE_STRING, SERVER_VARTYPE_FLOAT } -static stock SERVER_VARTYPE:_@SERVER_VARTYPE() { return SERVER_VARTYPE; } +static stock SERVER_VARTYPE:_@SERVER_VARTYPE() { return __SERVER_VARTYPE; } /** * a_samp @@ -507,7 +507,7 @@ enum DOWNLOAD_REQUEST:__DOWNLOAD_REQUEST DOWNLOAD_REQUEST_MODEL_FILE, DOWNLOAD_REQUEST_TEXTURE_FILE } -static stock DOWNLOAD_REQUEST:_@DOWNLOAD_REQUEST() { return DOWNLOAD_REQUEST; } +static stock DOWNLOAD_REQUEST:_@DOWNLOAD_REQUEST() { return __DOWNLOAD_REQUEST; } /** * a_samp @@ -517,7 +517,7 @@ enum CLICK_SOURCE:__CLICK_SOURCE { CLICK_SOURCE_SCOREBOARD } -static stock CLICK_SOURCE:_@CLICK_SOURCE() { return CLICK_SOURCE; } +static stock CLICK_SOURCE:_@CLICK_SOURCE() { return __CLICK_SOURCE; } /** * a_samp @@ -529,7 +529,7 @@ enum EDIT_RESPONSE:__EDIT_RESPONSE EDIT_RESPONSE_FINAL, EDIT_RESPONSE_UPDATE } -static stock EDIT_RESPONSE:_@EDIT_RESPONSE() { return EDIT_RESPONSE; } +static stock EDIT_RESPONSE:_@EDIT_RESPONSE() { return __EDIT_RESPONSE; } /** * a_samp @@ -540,7 +540,7 @@ enum SELECT_OBJECT:__SELECT_OBJECT SELECT_OBJECT_GLOBAL_OBJECT = 1, SELECT_OBJECT_PLAYER_OBJECT } -static stock SELECT_OBJECT:_@SELECT_OBJECT() { return SELECT_OBJECT; } +static stock SELECT_OBJECT:_@SELECT_OBJECT() { return __SELECT_OBJECT; } /** * a_samp @@ -554,7 +554,7 @@ enum BULLET_HIT_TYPE:__BULLET_HIT_TYPE BULLET_HIT_TYPE_OBJECT, BULLET_HIT_TYPE_PLAYER_OBJECT } -static stock BULLET_HIT_TYPE:_@BULLET_HIT_TYPE() { return BULLET_HIT_TYPE; } +static stock BULLET_HIT_TYPE:_@BULLET_HIT_TYPE() { return __BULLET_HIT_TYPE; } /** * a_samp @@ -566,7 +566,7 @@ enum FORCE_SYNC:__FORCE_SYNC SYNC_ALL, // Sync to all streamed-in players. SYNC_OTHER // Sync to all streamed-in players, except the player with the animation. } -static stock FORCE_SYNC:_@FORCE_SYNC() { return FORCE_SYNC; } +static stock FORCE_SYNC:_@FORCE_SYNC() { return __FORCE_SYNC; } // Limits #if MAX_PLAYER_NAME < 3 || MAX_PLAYER_NAME > 24 diff --git a/a_vehicles.inc b/a_vehicles.inc index c4c8896..a7f5267 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -42,7 +42,7 @@ enum CARMODTYPE:__CARMODTYPE CARMODTYPE_FRONT_BULLBAR, CARMODTYPE_REAR_BULLBAR } -static stock CARMODTYPE:_@CARMODTYPE() { return CARMODTYPE; } +static stock CARMODTYPE:_@CARMODTYPE() { return __CARMODTYPE; } /** * a_vehicles @@ -54,7 +54,7 @@ enum VEHICLE_PARAMS:__VEHICLE_PARAMS VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_ON } -static stock VEHICLE_PARAMS:_@VEHICLE_PARAMS() { return VEHICLE_PARAMS; } +static stock VEHICLE_PARAMS:_@VEHICLE_PARAMS() { return __VEHICLE_PARAMS; } /** * a_vehicles @@ -72,7 +72,7 @@ enum VEHICLE_MODEL_INFO:__VEHICLE_MODEL_INFO VEHICLE_MODEL_INFO_FRONT_BUMPER, VEHICLE_MODEL_INFO_REAR_BUMPER } -static stock VEHICLE_MODEL_INFO:_@VEHICLE_MODEL_INFO() { return VEHICLE_MODEL_INFO; } +static stock VEHICLE_MODEL_INFO:_@VEHICLE_MODEL_INFO() { return __VEHICLE_MODEL_INFO; } #define VEHICLE_MODEL_INFO_FRONT_BUMPER_Z VEHICLE_MODEL_INFO_FRONT_BUMPER #define VEHICLE_MODEL_INFO_REAR_BUMPER_Z VEHICLE_MODEL_INFO_REAR_BUMPER From c8857392b1de66597d8c19ada4b2c072ad0dfb84 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 27 Feb 2022 20:19:17 +0000 Subject: [PATCH 063/104] Trying to fix the bug. --- a_actor.inc | 3 +++ a_http.inc | 3 +++ a_npc.inc | 3 +++ a_objects.inc | 3 +++ a_players.inc | 3 +++ a_samp.inc | 3 +++ a_sampdb.inc | 3 +++ a_vehicles.inc | 3 +++ 8 files changed, 24 insertions(+) diff --git a/a_actor.inc b/a_actor.inc index b8033f9..2e8b5d9 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -15,6 +15,9 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// Fixes a bug with two pawndoc comments before an enum. +static stock const __A_ACTOR_PAWNDOC = 0; + /** * a_actor * Create a static 'actor' in the world. These 'actors' are like NPCs, however they have limited diff --git a/a_http.inc b/a_http.inc index ee01e8b..3f594b1 100644 --- a/a_http.inc +++ b/a_http.inc @@ -14,6 +14,9 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// Fixes a bug with two pawndoc comments before an enum. +static stock const __A_HTTP_PAWNDOC = 0; + // -------------------------------------------------- // Defines // -------------------------------------------------- diff --git a/a_npc.inc b/a_npc.inc index 349b5c6..dc56bdf 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -20,6 +20,9 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// Fixes a bug with two pawndoc comments before an enum. +static stock const __A_NPC_PAWNDOC = 0; + // -------------------------------------------------- // Defines // -------------------------------------------------- diff --git a/a_objects.inc b/a_objects.inc index 99bcbdb..734c6a0 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -15,6 +15,9 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// Fixes a bug with two pawndoc comments before an enum. +static stock const __A_OBJECTS_PAWNDOC = 0; + // -------------------------------------------------- // Defines // -------------------------------------------------- diff --git a/a_players.inc b/a_players.inc index 8a93318..ac144a0 100644 --- a/a_players.inc +++ b/a_players.inc @@ -15,6 +15,9 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// Fixes a bug with two pawndoc comments before an enum. +static stock const __A_PLAYERS_PAWNDOC = 0; + // Limits #if !defined MAX_PLAYER_ATTACHED_OBJECTS #define MAX_PLAYER_ATTACHED_OBJECTS (10) diff --git a/a_samp.inc b/a_samp.inc index 68dc2f7..60fd169 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -20,6 +20,9 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// Fixes a bug with two pawndoc comments before an enum. +static stock const __A_SAMP_PAWNDOC = 0; + // -------------------------------------------------- // Defines // -------------------------------------------------- diff --git a/a_sampdb.inc b/a_sampdb.inc index 2eba3eb..0f13264 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -15,6 +15,9 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// Fixes a bug with two pawndoc comments before an enum. +static stock const __A_SAMPDB_PAWNDOC = 0; + /** * a_sampdb * This function is used to open a connection to a SQLite database, which is inside the /scriptfiles diff --git a/a_vehicles.inc b/a_vehicles.inc index a7f5267..eb5241a 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -15,6 +15,9 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// Fixes a bug with two pawndoc comments before an enum. +static stock const __A_VEHICLES_PAWNDOC = 0; + // -------------------------------------------------- // Defines // -------------------------------------------------- From 3afdb09c910cb099c7fbf260e79aa563e6da1313 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 27 Feb 2022 20:26:18 +0000 Subject: [PATCH 064/104] Fix pawndoc bugs. --- a_actor.inc | 4 ++-- a_http.inc | 5 +++-- a_npc.inc | 12 +++++++----- a_objects.inc | 4 ++-- a_players.inc | 4 ++-- a_samp.inc | 10 ++++++---- a_sampdb.inc | 4 ++-- a_vehicles.inc | 4 ++-- 8 files changed, 26 insertions(+), 21 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 2e8b5d9..7d505c4 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -15,8 +15,8 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// Fixes a bug with two pawndoc comments before an enum. -static stock const __A_ACTOR_PAWNDOC = 0; +// Fixes a bug with two pawndoc comments before an enum. +/// /** * a_actor diff --git a/a_http.inc b/a_http.inc index 3f594b1..6a7e4fc 100644 --- a/a_http.inc +++ b/a_http.inc @@ -2,6 +2,7 @@ #endinput #endif #define _INC_a_http +#define _http_included /** * @@ -14,8 +15,8 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// Fixes a bug with two pawndoc comments before an enum. -static stock const __A_HTTP_PAWNDOC = 0; +// Fixes a bug with two pawndoc comments before an enum. +/// // -------------------------------------------------- // Defines diff --git a/a_npc.inc b/a_npc.inc index dc56bdf..03de359 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -20,8 +20,8 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// Fixes a bug with two pawndoc comments before an enum. -static stock const __A_NPC_PAWNDOC = 0; +// Fixes a bug with two pawndoc comments before an enum. +/// // -------------------------------------------------- // Defines @@ -324,14 +324,16 @@ const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; * Used internally */ #pragma deprecated Used internally. -const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRIVER = PLAYER_STATE:5; +const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; +#define PLAYER_STATE_ENTER_VEHICLE_DRIVER PLAYER_STATE_ENTER_VEHICLE_DRV /** - * a_npc + * a_samp * Used internally */ #pragma deprecated Used internally. -const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASSENGER = PLAYER_STATE:6; +const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; +#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS /** * a_npc diff --git a/a_objects.inc b/a_objects.inc index 734c6a0..dd0df45 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -15,8 +15,8 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// Fixes a bug with two pawndoc comments before an enum. -static stock const __A_OBJECTS_PAWNDOC = 0; +// Fixes a bug with two pawndoc comments before an enum. +/// // -------------------------------------------------- // Defines diff --git a/a_players.inc b/a_players.inc index ac144a0..48a7bfb 100644 --- a/a_players.inc +++ b/a_players.inc @@ -15,8 +15,8 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// Fixes a bug with two pawndoc comments before an enum. -static stock const __A_PLAYERS_PAWNDOC = 0; +// Fixes a bug with two pawndoc comments before an enum. +/// // Limits #if !defined MAX_PLAYER_ATTACHED_OBJECTS diff --git a/a_samp.inc b/a_samp.inc index 60fd169..d9b4813 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -20,8 +20,8 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// Fixes a bug with two pawndoc comments before an enum. -static stock const __A_SAMP_PAWNDOC = 0; +// Fixes a bug with two pawndoc comments before an enum. +/// // -------------------------------------------------- // Defines @@ -323,14 +323,16 @@ const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; * Used internally */ #pragma deprecated Used internally. -const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRIVER = PLAYER_STATE:5; +const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; +#define PLAYER_STATE_ENTER_VEHICLE_DRIVER PLAYER_STATE_ENTER_VEHICLE_DRV /** * a_samp * Used internally */ #pragma deprecated Used internally. -const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASSENGER = PLAYER_STATE:6; +const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; +#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS /** * a_samp diff --git a/a_sampdb.inc b/a_sampdb.inc index 0f13264..1a25864 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -15,8 +15,8 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// Fixes a bug with two pawndoc comments before an enum. -static stock const __A_SAMPDB_PAWNDOC = 0; +// Fixes a bug with two pawndoc comments before an enum. +/// /** * a_sampdb diff --git a/a_vehicles.inc b/a_vehicles.inc index eb5241a..c083a71 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -15,8 +15,8 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// Fixes a bug with two pawndoc comments before an enum. -static stock const __A_VEHICLES_PAWNDOC = 0; +// Fixes a bug with two pawndoc comments before an enum. +/// // -------------------------------------------------- // Defines From 72c76dd9992bdb7d65147b972fd2bd1e3fc75b51 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 27 Feb 2022 20:36:48 +0000 Subject: [PATCH 065/104] Add `///` before all enum documentation. --- a_actor.inc | 3 --- a_http.inc | 7 ++++--- a_npc.inc | 11 ++++++++--- a_objects.inc | 7 ++++--- a_players.inc | 23 ++++++++++++++++++++--- a_samp.inc | 29 ++++++++++++++++++++++++++--- a_sampdb.inc | 3 --- a_vehicles.inc | 9 ++++++--- 8 files changed, 68 insertions(+), 24 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 7d505c4..b8033f9 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -15,9 +15,6 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -// Fixes a bug with two pawndoc comments before an enum. -/// - /** * a_actor * Create a static 'actor' in the world. These 'actors' are like NPCs, however they have limited diff --git a/a_http.inc b/a_http.inc index 6a7e4fc..3730ec4 100644 --- a/a_http.inc +++ b/a_http.inc @@ -15,13 +15,12 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -// Fixes a bug with two pawndoc comments before an enum. -/// - // -------------------------------------------------- // Defines // -------------------------------------------------- +/// + /** * a_http * HTTP request types @@ -35,6 +34,8 @@ enum HTTP_METHOD:__HTTP_METHOD } static stock HTTP_METHOD:_@HTTP_METHOD() { return __HTTP_METHOD; } +/// + /** * a_http * HTTP error response codes diff --git a/a_npc.inc b/a_npc.inc index 03de359..b114417 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -20,9 +20,6 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -// Fixes a bug with two pawndoc comments before an enum. -/// - // -------------------------------------------------- // Defines // -------------------------------------------------- @@ -295,6 +292,8 @@ const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; */ const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; +/// + /** * a_npc * States @@ -335,6 +334,8 @@ const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; #define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS +/// + /** * a_npc * Weapons @@ -395,6 +396,8 @@ enum WEAPON:__WEAPON } static stock WEAPON:_@WEAPON() { return __WEAPON; } +/// + /** * a_npc * Keys @@ -429,6 +432,8 @@ enum KEY:__KEY (<<= 1) } static stock KEY:_@KEY() { return __KEY; } +/// + /** * a_npc */ diff --git a/a_objects.inc b/a_objects.inc index dd0df45..cf606b1 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -15,13 +15,12 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -// Fixes a bug with two pawndoc comments before an enum. -/// - // -------------------------------------------------- // Defines // -------------------------------------------------- +/// + /** * a_objects */ @@ -45,6 +44,8 @@ enum OBJECT_MATERIAL_SIZE:__OBJECT_MATERIAL_SIZE (+= 10) } static stock OBJECT_MATERIAL_SIZE:_@OBJECT_MATERIAL_SIZE() { return __OBJECT_MATERIAL_SIZE; } +/// + /** * a_objects */ diff --git a/a_players.inc b/a_players.inc index 48a7bfb..2b7c7f4 100644 --- a/a_players.inc +++ b/a_players.inc @@ -15,9 +15,6 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -// Fixes a bug with two pawndoc comments before an enum. -/// - // Limits #if !defined MAX_PLAYER_ATTACHED_OBJECTS #define MAX_PLAYER_ATTACHED_OBJECTS (10) @@ -27,6 +24,8 @@ #define MAX_CHATBUBBLE_LENGTH (144) #endif +/// + /** * a_players */ @@ -56,6 +55,8 @@ enum SPECIAL_ACTION:__SPECIAL_ACTION } static stock SPECIAL_ACTION:_@SPECIAL_ACTION() { return __SPECIAL_ACTION; } +/// + /** * a_players */ @@ -71,6 +72,8 @@ enum FIGHT_STYLE:__FIGHT_STYLE } static stock FIGHT_STYLE:_@FIGHT_STYLE() { return __FIGHT_STYLE; } +/// + /** * a_players */ @@ -91,6 +94,8 @@ enum WEAPONSKILL:__WEAPONSKILL } static stock WEAPONSKILL:_@WEAPONSKILL() { return __WEAPONSKILL; } +/// + /** * a_players */ @@ -105,6 +110,8 @@ enum WEAPONSTATE:__WEAPONSTATE } static stock WEAPONSTATE:_@WEAPONSTATE() { return __WEAPONSTATE; } +/// + /** * a_players * PVar enumeration @@ -119,6 +126,8 @@ enum PLAYER_VARTYPE:__PLAYER_VARTYPE } static stock PLAYER_VARTYPE:_@PLAYER_VARTYPE() { return __PLAYER_VARTYPE; } +/// + /** * a_players */ @@ -132,6 +141,8 @@ enum MAPICON:__MAPICON } static stock MAPICON:_@MAPICON() { return __MAPICON; } +/// + /** * a_players */ @@ -143,6 +154,8 @@ enum CAM_MOVE:__CAMERA } static stock CAMERA_MOVE:_@CAMERA_MOVE() { return __CAMERA_MOVE; } +/// + /** * a_players */ @@ -167,6 +180,8 @@ enum CAM_MODE:__CAM_MODE } static stock CAM_MODE:_@CAM_MODE() { return __CAM_MODE; } +/// + /** * a_players * Spectating @@ -180,6 +195,8 @@ enum SPECTATE_MODE:__SPECTATE_MODE } static stock SPECTATE_MODE:_@SPECTATE_MODE() { return __SPECTATE_MODE; } +/// + /** * a_players * Recording for NPC playback diff --git a/a_samp.inc b/a_samp.inc index d9b4813..434bd5d 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -20,9 +20,6 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -// Fixes a bug with two pawndoc comments before an enum. -/// - // -------------------------------------------------- // Defines // -------------------------------------------------- @@ -334,6 +331,8 @@ const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; #define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS +/// + /** * a_samp * Marker modes used by ShowPlayerMarkers() @@ -347,6 +346,8 @@ enum PLAYER_MARKERS_MODE:__PLAYER_MARKERS_MODE } static stock PLAYER_MARKERS_MODE:_@PLAYER_MARKERS_MODE() { return __PLAYER_MARKERS_MODE; } +/// + /** * a_samp * Weapons @@ -407,6 +408,8 @@ enum WEAPON:__WEAPON } static stock WEAPON:_@WEAPON() { return __WEAPON; } +/// + /** * a_samp * Keys @@ -441,6 +444,8 @@ enum KEY:__KEY (<<= 1) } static stock KEY:_@KEY() { return __KEY; } +/// + /** * a_samp * Player GUI dialog @@ -457,6 +462,8 @@ enum DIALOG_STYLE:__DIALOG_STYLE } static stock DIALOG_STYLE:_@DIALOG_STYLE() { return __DIALOG_STYLE; } +/// + /** * a_samp * Text draw font @@ -473,6 +480,8 @@ enum TEXT_DRAW_FONT:__TEXT_DRAW_FONT } static stock TEXT_DRAW_FONT:_@TEXT_DRAW_FONT() { return __TEXT_DRAW_FONT; } +/// + /** * a_samp * Text draw alignment @@ -487,6 +496,8 @@ enum TEXT_DRAW_ALIGN:__TEXT_DRAW_ALIGN } static stock TEXT_DRAW_ALIGN:_@TEXT_DRAW_ALIGN() { return __TEXT_DRAW_ALIGN; } +/// + /** * a_samp * SVar enumeration @@ -501,6 +512,8 @@ enum SERVER_VARTYPE:__SERVER_VARTYPE } static stock SERVER_VARTYPE:_@SERVER_VARTYPE() { return __SERVER_VARTYPE; } +/// + /** * a_samp * Artwork/NetModels @@ -514,6 +527,8 @@ enum DOWNLOAD_REQUEST:__DOWNLOAD_REQUEST } static stock DOWNLOAD_REQUEST:_@DOWNLOAD_REQUEST() { return __DOWNLOAD_REQUEST; } +/// + /** * a_samp */ @@ -524,6 +539,8 @@ enum CLICK_SOURCE:__CLICK_SOURCE } static stock CLICK_SOURCE:_@CLICK_SOURCE() { return __CLICK_SOURCE; } +/// + /** * a_samp */ @@ -536,6 +553,8 @@ enum EDIT_RESPONSE:__EDIT_RESPONSE } static stock EDIT_RESPONSE:_@EDIT_RESPONSE() { return __EDIT_RESPONSE; } +/// + /** * a_samp */ @@ -547,6 +566,8 @@ enum SELECT_OBJECT:__SELECT_OBJECT } static stock SELECT_OBJECT:_@SELECT_OBJECT() { return __SELECT_OBJECT; } +/// + /** * a_samp */ @@ -561,6 +582,8 @@ enum BULLET_HIT_TYPE:__BULLET_HIT_TYPE } static stock BULLET_HIT_TYPE:_@BULLET_HIT_TYPE() { return __BULLET_HIT_TYPE; } +/// + /** * a_samp */ diff --git a/a_sampdb.inc b/a_sampdb.inc index 1a25864..2eba3eb 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -15,9 +15,6 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -// Fixes a bug with two pawndoc comments before an enum. -/// - /** * a_sampdb * This function is used to open a connection to a SQLite database, which is inside the /scriptfiles diff --git a/a_vehicles.inc b/a_vehicles.inc index c083a71..033d07e 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -15,13 +15,12 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -// Fixes a bug with two pawndoc comments before an enum. -/// - // -------------------------------------------------- // Defines // -------------------------------------------------- +/// + /** * a_vehicles */ @@ -47,6 +46,8 @@ enum CARMODTYPE:__CARMODTYPE } static stock CARMODTYPE:_@CARMODTYPE() { return __CARMODTYPE; } +/// + /** * a_vehicles */ @@ -59,6 +60,8 @@ enum VEHICLE_PARAMS:__VEHICLE_PARAMS } static stock VEHICLE_PARAMS:_@VEHICLE_PARAMS() { return __VEHICLE_PARAMS; } +/// + /** * a_vehicles */ From 9c14138d7a7bc39883fa2292952c6912364b0476 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 27 Feb 2022 21:27:10 +0000 Subject: [PATCH 066/104] Add `pawndoc.xsl`. --- pawndoc.xsl | 613 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 613 insertions(+) create mode 100644 pawndoc.xsl diff --git a/pawndoc.xsl b/pawndoc.xsl new file mode 100644 index 0000000..7b2e40c --- /dev/null +++ b/pawndoc.xsl @@ -0,0 +1,613 @@ + + + + + + + + +<xsl:value-of select="doc/assembly/name" /> + + + +

    +

    ==========================================

    + +
    + + + + +
    + +
    + + + + +
    + +
    + + + + +
    + +
    + + + + +
    + + + +
    + +
    + + + + +
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    ## 


    +
    +
    +

    ### ``:

    +
    + + +

    #### Remarks


    + +
    + +

    #### Members


    +
    +
    +
    +
    + + +

    #### Used by


    +
    +
    + +

    #### Fixes

    +
    +
    + +

    #### Depends on

    +
    +
    + +

    #### See Also

    +
    +
    +
    +
    + +

    ## 


    +
    +
    +

    ### ``:

    +

    + +

    + + + + + + +
    **Value** | `` |
    +

    + +

    #### Remarks


    + +
    + + +

    #### Used by


    +
    +
    + +

    #### Fixes

    +
    +
    + +

    #### Depends on

    +
    +
    + +

    #### See Also

    +
    +
    +
    +
    + +

    ## 


    +
    +
    +

    ### ``:

    +
    + +

    #### Syntax



    ```pawn

    ```

    + +

    +
    +

    + + +
    +

    + + +

    #### Remarks

    + +
    + + +

    #### Used by

    +
    +
    + +

    #### Fixes

    +
    +
    + +

    #### Depends on

    +
    +
    + +

    #### Attributes

    +
    +
    + + +

    #### Transition table

    +

    + + + +
    SourceTargetCondition
    +


    +
    + + +

    #### See Also


    +
    +
    +
    +
    + + + + +

    ## 


    +
    +
    +

    ### ``:

    +
    + +

    + + +
    +

    + +

    #### Remarks


    + +
    + + +

    #### Used by


    +
    +
    + +

    #### Fixes

    +
    +
    + +

    #### Depends on

    +
    +
    + +

    #### See Also

    +
    +
    +
    +
    +
    +
    + + + + + +
    +

    ### :

    +
    + +
    +
    +
    + + + + +
  • ` = `
  • +
    +
    +
    + + +


    +
    + + + + | `` |  | + + + + + `` + + + + + | **Tag** | `:` | + + + + + + | **Size** | `` | + + + + +

    #### Returns

    +


    +
    + + +


    +
    + + +

    #### Example

    +


    +
    + + +
  • ``
  • +
    + + +
  • #[``](#)
  • +
    + + +
  • #[``](#)
  • +
    + + +

    #### Estimated stack usage

    +

    cells


    +
    + + +

    #### Automaton

    +


    +
    + + + + + + + + + + +
    ```pawn

    ```

    +
    + + + #[``](#)
    +
    + + + + + +`` + +** + +

    + +

    + +

  • + +


    + +


    + +

    ## 

    + +

    ### 

    + + +


    __________________________________________


    + +

    +

    ==========================================

    + +

    +

    ------------------------------------------

    +
    +

    + +
    +

    ## Fixes


    + +
    +
    + +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + +
    +
    + +
    + +
    +     + + + + []() + []() + + + + + #[``](#) + + + +
  • #[``](#)
  • +
    + + +
  • ``: Synonym for ``.
  • +
    + + +
  • ####

    +
  • +
    + + + + + +
    **Fixed in **
    +
    + + +
    **Disabled By Default**
    +
    +
    + +

    #### Problem


    + +

    #### Solution


    + + +

    #### See


    +

    +
    + +

    #### Author(s)


    +

    +
    + +

    #### Post(s)


    +

    +
    +
    + + +
  • []()
  • +
    + +
  • #[``](#)
  • +
    + +
  • + + + []() + + + + + +
  • +
    + +


    +
    + +


    +
    + + + + +
  • #FIX_[](#FIX_)
  • +
    + +
    + From 01a95275cb23d599618a85708d1be063c0384cde Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 27 Feb 2022 22:03:36 +0000 Subject: [PATCH 067/104] Fix close tag. --- a_http.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a_http.inc b/a_http.inc index 3730ec4..5d806f9 100644 --- a/a_http.inc +++ b/a_http.inc @@ -38,7 +38,7 @@ static stock HTTP_METHOD:_@HTTP_METHOD() { return __HTTP_METHOD; } /** * a_http - * HTTP error response codes + * HTTP error response codes * * These codes compliment ordinary HTTP response codes returned in 'responseCode' * (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error) From 3bcd2948543a90fecde528fdb9e48a51bfc04ab5 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Mon, 28 Feb 2022 11:23:48 +0000 Subject: [PATCH 068/104] `description=` to `summary=` --- a_actor.inc | 2 +- a_http.inc | 2 +- a_npc.inc | 2 +- a_objects.inc | 2 +- a_players.inc | 2 +- a_samp.inc | 2 +- a_sampdb.inc | 2 +- a_vehicles.inc | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index b8033f9..53c5f8c 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -5,7 +5,7 @@ #define _actor_included /** - * + * * * (c) Copyright 2015, SA-MP Team * diff --git a/a_http.inc b/a_http.inc index 5d806f9..d2bd361 100644 --- a/a_http.inc +++ b/a_http.inc @@ -5,7 +5,7 @@ #define _http_included /** - * + * * * (c) Copyright 2010, SA-MP Team * diff --git a/a_npc.inc b/a_npc.inc index b114417..b50e816 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -8,7 +8,7 @@ #define _samp_included /** - * + * * * (c) Copyright 2009, SA-MP Team * diff --git a/a_objects.inc b/a_objects.inc index cf606b1..6f4cd07 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -5,7 +5,7 @@ #define _objects_included /** - * + * * * (c) Copyright 2005-2015, SA-MP Team * diff --git a/a_players.inc b/a_players.inc index 2b7c7f4..3f83a81 100644 --- a/a_players.inc +++ b/a_players.inc @@ -5,7 +5,7 @@ #define _players_included /** - * + * * * (c) Copyright 2005-2017, SA-MP Team * diff --git a/a_samp.inc b/a_samp.inc index 434bd5d..bdccfab 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -8,7 +8,7 @@ #define _samp_included /** - * + * * * (c) Copyright 2005-2017, SA-MP Team * diff --git a/a_sampdb.inc b/a_sampdb.inc index 2eba3eb..2a15acb 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -5,7 +5,7 @@ #define _sampdb_included /** - * + * * * (c) Copyright 2015, SA-MP Team * diff --git a/a_vehicles.inc b/a_vehicles.inc index 033d07e..64260bb 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -5,7 +5,7 @@ #define _vehicles_included /** - * + * * * (c) Copyright 2005-2012, SA-MP Team * From ab9c69ed584d6b726aedb35dc8a6edfdef5907c6 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 11:22:55 +0000 Subject: [PATCH 069/104] Switch back to real defines so `#MAX_PLAYERS` etc work correctly. Some won't because they have brackets, but there's not much we can do about that except get 2.10.11 released. You can also define things like `MAX_PLAYERS` before including `a_samp` and it will check the tags. --- a_npc.inc | 202 +++++++++++++++++++++-------------------------------- a_samp.inc | 195 ++++++++++++++++++++------------------------------- 2 files changed, 154 insertions(+), 243 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index b50e816..b2b4d96 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -20,6 +20,23 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +// Optionally stricter tags. +#if defined NO_TAGS + #define __TAG(%0) _ +#elseif defined STRONG_TAGS + #define __TAG(%0) E_%0 +#else // if defined WEAK_TAGS + #define __TAG(%0) e_%0 + #define WEAK_TAGS +#endif +#if defined MORE_TAGS + #define __MORE(%0) __TAG(%0) +#else + #define __MORE(%0) _ + #define LESS_TAGS +#endif +#define __LESS __TAG + // -------------------------------------------------- // Defines // -------------------------------------------------- @@ -30,269 +47,205 @@ */ #if defined MAX_PLAYER_NAME const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; - #undef MAX_PLAYER_NAME + #define __MAX_PLAYER_NAME #else - const __MAX_PLAYER_NAME = 24; + const MAX_PLAYER_NAME = 24; + #define MAX_PLAYER_NAME 24 #endif -/** - * a_npc - */ -const MAX_PLAYER_NAME = __MAX_PLAYER_NAME; -#define __MAX_PLAYER_NAME - /** * a_npc */ #if defined MAX_PLAYERS const __MAX_PLAYERS = MAX_PLAYERS; - #undef MAX_PLAYERS + #define __MAX_PLAYERS #else - const __MAX_PLAYERS = 1000; + const MAX_PLAYERS = 1000; + #define MAX_PLAYERS 1000 #endif -/** - * a_npc - */ -const MAX_PLAYERS = __MAX_PLAYERS; -#define __MAX_PLAYERS - /** * a_npc */ #if defined MAX_VEHICLES const __MAX_VEHICLES = MAX_VEHICLES; - #undef MAX_VEHICLES + #define __MAX_VEHICLES #else - const __MAX_VEHICLES = 2000; + const MAX_VEHICLES = 2000; + #define MAX_VEHICLES 2000 #endif -/** - * a_npc - */ -const MAX_VEHICLES = __MAX_VEHICLES; -#define __MAX_VEHICLES - /** * a_npc */ #if defined MAX_ACTORS const __MAX_ACTORS = MAX_ACTORS; - #undef MAX_ACTORS + #define __MAX_ACTORS #else - const __MAX_ACTORS = 1000; + const MAX_ACTORS = 1000; + #define MAX_ACTORS 1000 #endif -/** - * a_npc - */ -const MAX_ACTORS = __MAX_ACTORS; -#define __MAX_ACTORS - /** * a_npc */ #if defined MAX_OBJECTS const __MAX_OBJECTS = MAX_OBJECTS; - #undef MAX_OBJECTS + #define __MAX_OBJECTS #else - const __MAX_OBJECTS = 2000; + const MAX_OBJECTS = 2000; + #define MAX_OBJECTS 2000 #endif -/** - * a_npc - */ -const MAX_OBJECTS = __MAX_OBJECTS; -#define __MAX_OBJECTS - /** * a_npc */ #if defined MAX_GANG_ZONES const __MAX_GANG_ZONES = MAX_GANG_ZONES; - #undef MAX_GANG_ZONES + #define __MAX_GANG_ZONES #else - const __MAX_GANG_ZONES = 1024; + const MAX_GANG_ZONES = 1024; + #define MAX_GANG_ZONES 1024 #endif -/** - * a_npc - */ -const MAX_GANG_ZONES = __MAX_GANG_ZONES; -#define __MAX_GANG_ZONES - /** * a_npc */ #if defined MAX_TEXT_DRAWS - const Text:__MAX_TEXT_DRAWS = Text:MAX_TEXT_DRAWS; - #undef MAX_TEXT_DRAWS + const Text:__MAX_TEXT_DRAWS = MAX_TEXT_DRAWS; + #define __MAX_TEXT_DRAWS #else - const Text:__MAX_TEXT_DRAWS = Text:2048; + const Text:MAX_TEXT_DRAWS = Text:2048; + #define MAX_TEXT_DRAWS (Text:2048) #endif -/** - * a_npc - */ -const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; -#define __MAX_TEXT_DRAWS - /** * a_npc */ #if defined MAX_PLAYER_TEXT_DRAWS - const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:MAX_PLAYER_TEXT_DRAWS; - #undef MAX_PLAYER_TEXT_DRAWS + const PlayerText:__MAX_PLAYER_TEXT_DRAWS = MAX_PLAYER_TEXT_DRAWS; + #define __MAX_PLAYER_TEXT_DRAWS #else - const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:256; + const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:256; + #define MAX_PLAYER_TEXT_DRAWS (PlayerText:256) #endif -/** - * a_npc - */ -const PlayerText:MAX_PLAYER_TEXT_DRAWS = __MAX_PLAYER_TEXT_DRAWS; -#define __MAX_PLAYER_TEXT_DRAWS - /** * a_npc */ #if defined MAX_MENUS - const Menu:__MAX_MENUS = Menu:MAX_MENUS; - #undef MAX_MENUS + const Menu:__MAX_MENUS = MAX_MENUS; + #define __MAX_MENUS #else - const Menu:__MAX_MENUS = Menu:128; + const Menu:MAX_MENUS = Menu:128; + #define MAX_MENUS (Menu:128) #endif -/** - * a_npc - */ -const Menu:MAX_MENUS = __MAX_MENUS; -#define __MAX_MENUS - /** * a_npc */ #if defined MAX_3DTEXT_GLOBAL - const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:MAX_3DTEXT_GLOBAL; - #undef MAX_3DTEXT_GLOBAL + const Text3D:__MAX_3DTEXT_GLOBAL = MAX_3DTEXT_GLOBAL; + #define __MAX_3DTEXT_GLOBAL #else - const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:1024; + const Text3D:MAX_3DTEXT_GLOBAL = Text3D:1024; + #define MAX_3DTEXT_GLOBAL (Text3D:1024) #endif -/** - * a_npc - */ -const Text3D:MAX_3DTEXT_GLOBAL = __MAX_3DTEXT_GLOBAL; -#define __MAX_3DTEXT_GLOBAL - /** * a_npc */ #if defined MAX_3DTEXT_PLAYER - const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:MAX_3DTEXT_PLAYER; - #undef MAX_3DTEXT_PLAYER + const PlayerText3D:__MAX_3DTEXT_PLAYER = MAX_3DTEXT_PLAYER; + #define __MAX_3DTEXT_PLAYER #else - const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:1024; + const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:1024; + #define MAX_3DTEXT_PLAYER (PlayerText3D:1024) #endif -/** - * a_npc - */ -const PlayerText3D:MAX_3DTEXT_PLAYER = __MAX_3DTEXT_PLAYER; -#define __MAX_3DTEXT_PLAYER - /** * a_npc */ #if defined MAX_PICKUPS const __MAX_PICKUPS = MAX_PICKUPS; - #undef MAX_PICKUPS + #define __MAX_PICKUPS #else - const __MAX_PICKUPS = 4096; + const MAX_PICKUPS = 4096; + #define MAX_PICKUPS 4096 #endif +// Invalids /** * a_npc */ -const MAX_PICKUPS = __MAX_PICKUPS; -#define __MAX_PICKUPS - -#define INVALID_TIMER (0) - -#if defined NO_TAGS - #define __TAG(%0) _ -#elseif defined STRONG_TAGS - #define __TAG(%0) E_%0 -#else // if defined WEAK_TAGS - #define __TAG(%0) e_%0 - #define WEAK_TAGS -#endif -#if defined MORE_TAGS - #define __MORE(%0) __TAG(%0) -#else - #define __MORE(%0) _ - #define LESS_TAGS -#endif -#define __LESS __TAG - -// Invalids +const INVALID_TIMER = 0; +#define INVALID_TIMER 0 /** * a_npc */ -const NO_TEAM = 0xFF; +const NO_TEAM = 0xFF; +#define NO_TEAM 0xFF /** * a_npc */ const INVALID_PLAYER_ID = 0xFFFF; +#define INVALID_PLAYER_ID 0xFFFF /** * a_npc */ const INVALID_VEHICLE_ID = 0xFFFF; +#define INVALID_VEHICLE_ID 0xFFFF /** * a_npc */ const INVALID_ACTOR_ID = 0xFFFF; +#define INVALID_ACTOR_ID 0xFFFF /** * a_npc */ const INVALID_OBJECT_ID = 0xFFFF; +#define INVALID_OBJECT_ID 0xFFFF /** * a_npc */ const Menu:INVALID_MENU = Menu:0xFF; +#define INVALID_MENU (Menu:0xFF) /** * a_npc */ const Text:INVALID_TEXT_DRAW = Text:0xFFFF; +#define INVALID_TEXT_DRAW (Text:0xFFFF) /** * a_npc */ const PlayerText:INVALID_PLAYER_TEXT_DRAW = PlayerText:0xFFFF; +#define INVALID_PLAYER_TEXT_DRAW (PlayerText:0xFFFF) /** * a_npc */ const INVALID_GANG_ZONE = 0xFFFFFFFF; +#define INVALID_GANG_ZONE 0xFFFFFFFF /** * a_npc */ const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; +#define INVALID_3DTEXT_ID (Text3D:0xFFFF) /** * a_npc */ const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; - -/// +#define INVALID_PLAYER_3DTEXT_ID (PlayerText3D:0xFFFF) /** * a_npc @@ -317,6 +270,7 @@ static stock PLAYER_STATE:_@PLAYER_STATE() { return __PLAYER_STATE; } */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; +#define PLAYER_STATE_EXIT_VEHICLE (PLAYER_STATE:4) /** * a_npc @@ -324,15 +278,15 @@ const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; -#define PLAYER_STATE_ENTER_VEHICLE_DRIVER PLAYER_STATE_ENTER_VEHICLE_DRV +#define PLAYER_STATE_ENTER_VEHICLE_DRIVER (PLAYER_STATE:5) /** - * a_samp + * a_npc * Used internally */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; -#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS +#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER (PLAYER_STATE:6) /// @@ -967,7 +921,7 @@ native bool:IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Floa * * * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. - * This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can + * This is defined in a_npc.inc as MAX_PLAYER_NAME. However, the client can * only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected * and the player has to quit to choose a valid name. * The length of the player's name. 0 if player specified doesn't exist. diff --git a/a_samp.inc b/a_samp.inc index bdccfab..9764fbe 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -20,6 +20,23 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +// Optionally stricter tags. +#if defined NO_TAGS + #define __TAG(%0) _ +#elseif defined STRONG_TAGS + #define __TAG(%0) E_%0 +#else // if defined WEAK_TAGS + #define __TAG(%0) e_%0 + #define WEAK_TAGS +#endif +#if defined MORE_TAGS + #define __MORE(%0) __TAG(%0) +#else + #define __MORE(%0) _ + #define LESS_TAGS +#endif +#define __LESS __TAG + // -------------------------------------------------- // Defines // -------------------------------------------------- @@ -30,266 +47,205 @@ */ #if defined MAX_PLAYER_NAME const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; - #undef MAX_PLAYER_NAME + #define __MAX_PLAYER_NAME #else - const __MAX_PLAYER_NAME = 24; + const MAX_PLAYER_NAME = 24; + #define MAX_PLAYER_NAME 24 #endif -/** - * a_samp - */ -const MAX_PLAYER_NAME = __MAX_PLAYER_NAME; -#define __MAX_PLAYER_NAME - /** * a_samp */ #if defined MAX_PLAYERS const __MAX_PLAYERS = MAX_PLAYERS; - #undef MAX_PLAYERS + #define __MAX_PLAYERS #else - const __MAX_PLAYERS = 1000; + const MAX_PLAYERS = 1000; + #define MAX_PLAYERS 1000 #endif -/** - * a_samp - */ -const MAX_PLAYERS = __MAX_PLAYERS; -#define __MAX_PLAYERS - /** * a_samp */ #if defined MAX_VEHICLES const __MAX_VEHICLES = MAX_VEHICLES; - #undef MAX_VEHICLES + #define __MAX_VEHICLES #else - const __MAX_VEHICLES = 2000; + const MAX_VEHICLES = 2000; + #define MAX_VEHICLES 2000 #endif -/** - * a_samp - */ -const MAX_VEHICLES = __MAX_VEHICLES; -#define __MAX_VEHICLES - /** * a_samp */ #if defined MAX_ACTORS const __MAX_ACTORS = MAX_ACTORS; - #undef MAX_ACTORS + #define __MAX_ACTORS #else - const __MAX_ACTORS = 1000; + const MAX_ACTORS = 1000; + #define MAX_ACTORS 1000 #endif -/** - * a_samp - */ -const MAX_ACTORS = __MAX_ACTORS; -#define __MAX_ACTORS - /** * a_samp */ #if defined MAX_OBJECTS const __MAX_OBJECTS = MAX_OBJECTS; - #undef MAX_OBJECTS + #define __MAX_OBJECTS #else - const __MAX_OBJECTS = 2000; + const MAX_OBJECTS = 2000; + #define MAX_OBJECTS 2000 #endif -/** - * a_samp - */ -const MAX_OBJECTS = __MAX_OBJECTS; -#define __MAX_OBJECTS - /** * a_samp */ #if defined MAX_GANG_ZONES const __MAX_GANG_ZONES = MAX_GANG_ZONES; - #undef MAX_GANG_ZONES + #define __MAX_GANG_ZONES #else - const __MAX_GANG_ZONES = 1024; + const MAX_GANG_ZONES = 1024; + #define MAX_GANG_ZONES 1024 #endif -/** - * a_samp - */ -const MAX_GANG_ZONES = __MAX_GANG_ZONES; -#define __MAX_GANG_ZONES - /** * a_samp */ #if defined MAX_TEXT_DRAWS - const Text:__MAX_TEXT_DRAWS = Text:MAX_TEXT_DRAWS; - #undef MAX_TEXT_DRAWS + const Text:__MAX_TEXT_DRAWS = MAX_TEXT_DRAWS; + #define __MAX_TEXT_DRAWS #else - const Text:__MAX_TEXT_DRAWS = Text:2048; + const Text:MAX_TEXT_DRAWS = Text:2048; + #define MAX_TEXT_DRAWS (Text:2048) #endif -/** - * a_samp - */ -const Text:MAX_TEXT_DRAWS = __MAX_TEXT_DRAWS; -#define __MAX_TEXT_DRAWS - /** * a_samp */ #if defined MAX_PLAYER_TEXT_DRAWS - const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:MAX_PLAYER_TEXT_DRAWS; - #undef MAX_PLAYER_TEXT_DRAWS + const PlayerText:__MAX_PLAYER_TEXT_DRAWS = MAX_PLAYER_TEXT_DRAWS; + #define __MAX_PLAYER_TEXT_DRAWS #else - const PlayerText:__MAX_PLAYER_TEXT_DRAWS = PlayerText:256; + const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:256; + #define MAX_PLAYER_TEXT_DRAWS (PlayerText:256) #endif -/** - * a_samp - */ -const PlayerText:MAX_PLAYER_TEXT_DRAWS = __MAX_PLAYER_TEXT_DRAWS; -#define __MAX_PLAYER_TEXT_DRAWS - /** * a_samp */ #if defined MAX_MENUS - const Menu:__MAX_MENUS = Menu:MAX_MENUS; - #undef MAX_MENUS + const Menu:__MAX_MENUS = MAX_MENUS; + #define __MAX_MENUS #else - const Menu:__MAX_MENUS = Menu:128; + const Menu:MAX_MENUS = Menu:128; + #define MAX_MENUS (Menu:128) #endif -/** - * a_samp - */ -const Menu:MAX_MENUS = __MAX_MENUS; -#define __MAX_MENUS - /** * a_samp */ #if defined MAX_3DTEXT_GLOBAL - const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:MAX_3DTEXT_GLOBAL; - #undef MAX_3DTEXT_GLOBAL + const Text3D:__MAX_3DTEXT_GLOBAL = MAX_3DTEXT_GLOBAL; + #define __MAX_3DTEXT_GLOBAL #else - const Text3D:__MAX_3DTEXT_GLOBAL = Text3D:1024; + const Text3D:MAX_3DTEXT_GLOBAL = Text3D:1024; + #define MAX_3DTEXT_GLOBAL (Text3D:1024) #endif -/** - * a_samp - */ -const Text3D:MAX_3DTEXT_GLOBAL = __MAX_3DTEXT_GLOBAL; -#define __MAX_3DTEXT_GLOBAL - /** * a_samp */ #if defined MAX_3DTEXT_PLAYER - const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:MAX_3DTEXT_PLAYER; - #undef MAX_3DTEXT_PLAYER + const PlayerText3D:__MAX_3DTEXT_PLAYER = MAX_3DTEXT_PLAYER; + #define __MAX_3DTEXT_PLAYER #else - const PlayerText3D:__MAX_3DTEXT_PLAYER = PlayerText3D:1024; + const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:1024; + #define MAX_3DTEXT_PLAYER (PlayerText3D:1024) #endif -/** - * a_samp - */ -const PlayerText3D:MAX_3DTEXT_PLAYER = __MAX_3DTEXT_PLAYER; -#define __MAX_3DTEXT_PLAYER - /** * a_samp */ #if defined MAX_PICKUPS const __MAX_PICKUPS = MAX_PICKUPS; - #undef MAX_PICKUPS + #define __MAX_PICKUPS #else - const __MAX_PICKUPS = 4096; + const MAX_PICKUPS = 4096; + #define MAX_PICKUPS 4096 #endif +// Invalids /** * a_samp */ -const MAX_PICKUPS = __MAX_PICKUPS; -#define __MAX_PICKUPS - -#define INVALID_TIMER (0) +const INVALID_TIMER = 0; +#define INVALID_TIMER 0 -#if defined NO_TAGS - #define __TAG(%0) _ -#elseif defined STRONG_TAGS - #define __TAG(%0) E_%0 -#else // if defined WEAK_TAGS - #define __TAG(%0) e_%0 - #define WEAK_TAGS -#endif -#if defined MORE_TAGS - #define __MORE(%0) __TAG(%0) -#else - #define __MORE(%0) _ - #define LESS_TAGS -#endif -#define __LESS __TAG - -// Invalids /** * a_samp */ -const NO_TEAM = 0xFF; +const NO_TEAM = 0xFF; +#define NO_TEAM 0xFF /** * a_samp */ const INVALID_PLAYER_ID = 0xFFFF; +#define INVALID_PLAYER_ID 0xFFFF /** * a_samp */ const INVALID_VEHICLE_ID = 0xFFFF; +#define INVALID_VEHICLE_ID 0xFFFF /** * a_samp */ const INVALID_ACTOR_ID = 0xFFFF; +#define INVALID_ACTOR_ID 0xFFFF /** * a_samp */ const INVALID_OBJECT_ID = 0xFFFF; +#define INVALID_OBJECT_ID 0xFFFF /** * a_samp */ const Menu:INVALID_MENU = Menu:0xFF; +#define INVALID_MENU (Menu:0xFF) /** * a_samp */ const Text:INVALID_TEXT_DRAW = Text:0xFFFF; +#define INVALID_TEXT_DRAW (Text:0xFFFF) /** * a_samp */ const PlayerText:INVALID_PLAYER_TEXT_DRAW = PlayerText:0xFFFF; +#define INVALID_PLAYER_TEXT_DRAW (PlayerText:0xFFFF) /** * a_samp */ const INVALID_GANG_ZONE = 0xFFFFFFFF; +#define INVALID_GANG_ZONE 0xFFFFFFFF /** * a_samp */ const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; +#define INVALID_3DTEXT_ID (Text3D:0xFFFF) /** * a_samp */ const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; +#define INVALID_PLAYER_3DTEXT_ID (PlayerText3D:0xFFFF) /** * a_samp @@ -314,6 +270,7 @@ static stock PLAYER_STATE:_@PLAYER_STATE() { return __PLAYER_STATE; } */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; +#define PLAYER_STATE_EXIT_VEHICLE (PLAYER_STATE:4) /** * a_samp @@ -321,7 +278,7 @@ const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; -#define PLAYER_STATE_ENTER_VEHICLE_DRIVER PLAYER_STATE_ENTER_VEHICLE_DRV +#define PLAYER_STATE_ENTER_VEHICLE_DRIVER (PLAYER_STATE:5) /** * a_samp @@ -329,7 +286,7 @@ const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; -#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS +#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER (PLAYER_STATE:6) /// From 873c51238735c2c2d5c2eb06ba509e83298833d3 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 11:28:06 +0000 Subject: [PATCH 070/104] Re-enable deprecation warnings. --- a_npc.inc | 6 +++--- a_samp.inc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index b2b4d96..312e983 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -270,7 +270,7 @@ static stock PLAYER_STATE:_@PLAYER_STATE() { return __PLAYER_STATE; } */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; -#define PLAYER_STATE_EXIT_VEHICLE (PLAYER_STATE:4) +#define PLAYER_STATE_EXIT_VEHICLE PLAYER_STATE_EXIT_VEHICLE /** * a_npc @@ -278,7 +278,7 @@ const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; -#define PLAYER_STATE_ENTER_VEHICLE_DRIVER (PLAYER_STATE:5) +#define PLAYER_STATE_ENTER_VEHICLE_DRIVER PLAYER_STATE_ENTER_VEHICLE_DRV /** * a_npc @@ -286,7 +286,7 @@ const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; -#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER (PLAYER_STATE:6) +#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS /// diff --git a/a_samp.inc b/a_samp.inc index 9764fbe..14e4de7 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -270,7 +270,7 @@ static stock PLAYER_STATE:_@PLAYER_STATE() { return __PLAYER_STATE; } */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; -#define PLAYER_STATE_EXIT_VEHICLE (PLAYER_STATE:4) +#define PLAYER_STATE_EXIT_VEHICLE PLAYER_STATE_EXIT_VEHICLE /** * a_samp @@ -278,7 +278,7 @@ const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; -#define PLAYER_STATE_ENTER_VEHICLE_DRIVER (PLAYER_STATE:5) +#define PLAYER_STATE_ENTER_VEHICLE_DRIVER PLAYER_STATE_ENTER_VEHICLE_DRV /** * a_samp @@ -286,7 +286,7 @@ const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; */ #pragma deprecated Used internally. const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; -#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER (PLAYER_STATE:6) +#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS /// From bde8012b5cb27d12afa20ee0b777213522a5af51 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 11:29:52 +0000 Subject: [PATCH 071/104] Fix replacement loop. --- a_npc.inc | 4 ++-- a_samp.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index 312e983..fcd4cab 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -269,8 +269,8 @@ static stock PLAYER_STATE:_@PLAYER_STATE() { return __PLAYER_STATE; } * Used internally */ #pragma deprecated Used internally. -const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; -#define PLAYER_STATE_EXIT_VEHICLE PLAYER_STATE_EXIT_VEHICLE +const PLAYER_STATE:PLAYER_STATE_EXIT_VEH = PLAYER_STATE:4; +#define PLAYER_STATE_EXIT_VEHICLE PLAYER_STATE_EXIT_VEH /** * a_npc diff --git a/a_samp.inc b/a_samp.inc index 14e4de7..0ef4439 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -269,8 +269,8 @@ static stock PLAYER_STATE:_@PLAYER_STATE() { return __PLAYER_STATE; } * Used internally */ #pragma deprecated Used internally. -const PLAYER_STATE:PLAYER_STATE_EXIT_VEHICLE = PLAYER_STATE:4; -#define PLAYER_STATE_EXIT_VEHICLE PLAYER_STATE_EXIT_VEHICLE +const PLAYER_STATE:PLAYER_STATE_EXIT_VEH = PLAYER_STATE:4; +#define PLAYER_STATE_EXIT_VEHICLE PLAYER_STATE_EXIT_VEH /** * a_samp From f98c14a504f6fbe16b19e3e9da90ec636bf242e2 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 11:36:04 +0000 Subject: [PATCH 072/104] Hide some pawndoc better. --- a_npc.inc | 20 ++++++++------------ a_samp.inc | 20 ++++++++------------ 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index fcd4cab..3e012c8 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -503,12 +503,10 @@ open.mp releases can use `A` as the first digit. * */ #if defined _console_included - static stock a_samp_unused_print(const string[]) - { - #pragma unused string - // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still - // put in the output, unattached to any function. So make a function. - } + // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still put + // in the output, unattached to any function. So make a function. + native a_npc_unused_print(const string[]); + #define a_npc_unused_print #else native print(const string[]); #endif @@ -546,12 +544,10 @@ open.mp releases can use `A` as the first digit. * the % and the f. (example: %.2f) */ #if defined _console_included - static stock a_npc_unused_printf(const format[], {Float, _}:...) - { - #pragma unused format - // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still - // put in the output, unattached to any function. So make a function. - } + // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still put + // in the output, unattached to any function. So make a function. + native a_npc_unused_printf(const format[], {Float, _}:...); + #define a_npc_unused_printf #else native printf(const format[], {Float, _}:...); #endif diff --git a/a_samp.inc b/a_samp.inc index 0ef4439..7d850ed 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -769,12 +769,10 @@ open.mp releases can use `A` as the first digit. * */ #if defined _console_included - static stock a_samp_unused_print(const string[]) - { - #pragma unused string - // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still - // put in the output, unattached to any function. So make a function. - } + // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still put + // in the output, unattached to any function. So make a function. + native a_samp_unused_print(const string[]); + #define a_samp_unused_print #else native print(const string[]); #endif @@ -813,12 +811,10 @@ open.mp releases can use `A` as the first digit. * the % and the f. (example: %.2f) */ #if defined _console_included - static stock a_samp_unused_printf(const format[], {Float, _}:...) - { - #pragma unused format - // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still - // put in the output, unattached to any function. So make a function. - } + // Fixes a pawndoc bug - comments on `#ifdef`ed out functions are still put + // in the output, unattached to any function. So make a function. + native a_samp_unused_printf(const format[], {Float, _}:...); + #define a_samp_unused_printf #else native printf(const format[], {Float, _}:...); #endif From c8ad7a56bda7a27d15f4d99c5396dd0dfd7252e8 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 11:39:01 +0000 Subject: [PATCH 073/104] Two missing `a_npc` library tags. --- a_npc.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/a_npc.inc b/a_npc.inc index 3e012c8..1a56a30 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -498,6 +498,7 @@ open.mp releases can use `A` as the first digit. // Util /** + * a_npc * Prints a string to the server console (not in-game chat) and logs (server_log.txt). * The string to print * @@ -512,6 +513,7 @@ open.mp releases can use `A` as the first digit. #endif /** + * a_npc * Outputs a formatted string on the console (the server window, not the in-game chat). * The format string * Indefinite number of arguments of any tag From c335579f923edd6d79ac1ce97509fee0242cf88e Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 12:01:45 +0000 Subject: [PATCH 074/104] Move some player defines around. --- a_npc.inc | 116 ++++++++++---------- a_players.inc | 144 +++++++++++++++++++++++-- a_samp.inc | 286 ++++++++++++++++---------------------------------- 3 files changed, 290 insertions(+), 256 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index 1a56a30..e6347e8 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -15,6 +15,66 @@ * */ +/// + +/** + * + * Version examples: + *
      + *
    • 0.3.DL R1 - 03D010
    • + *
    • + *
    • 0.3.7 R3 - 037030
    • + *
    • 0.3.7 R2-2 - 037022
    • + *
    • 0.3.7 R1-2 - 037012
    • + *
    • 0.3.7 - 037000
    • + *
    • + *
    • 0.3z R4 - 030700
    • + *
    • 0.3z R3 - 030700
    • + *
    • 0.3z R2-1 - 030700
    • + *
    • 0.3z R1-2 - 030700
    • + *
    • 0.3z - 030700
    • + *
    • 0.3x R2 patch 1 - 030621
    • + *
    • 0.3x R2 - 030620
    • + *
    • 0.3x R1-2 - 030612
    • + *
    • 0.3x - 030600
    • + *
    • 0.3e - 030500
    • + *
    • 0.3d - 030400
    • + *
    • 0.3c - 030300
    • + *
    • 0.3b - 030200
    • + *
    • 0.3a - 030100
    • + *
    • + *
    • 0.2X - 02A000
    • + *
    • 0.2.2 R3 - 022300
    • + *
    + * Rough rules: + * + *

    + * Uses (roughtly) BCD. Special versions are denoted outside 0-9. + * + * 0.1.2c R4-5 + * | | || | | + * 0 1 23 4 5 + * = + * 0x012345 + * + * (assuming c is the third revision) + * + *

    + * 0.2X becomes 02A000 because it is basically 0.2.3, but not, while higher than + * 0.2.2 so can't be 020400 (for example). Also, its a capital letter, so doesn't + * use the revision method. + * + *

    + * P.S. Making a consistent scheme for SA:MP versions is REALLY hard. + * + *

    + * open.mp releases can use `A` as the first digit. + * + */ + +public const SAMP_INCLUDES_VERSION = 0x037030; +#pragma unused SAMP_INCLUDES_VERSION + // Ignores warning 217 for properly indented PAWNO code // It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8 #pragma tabsize 4 @@ -400,7 +460,7 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE } static stock PLAYER_RECORDING_TYPE:_@PLAYER_RECORDING_TYPE() { return __PLAYER_RECORDING_TYPE; } -// Limits +// Checks #if MAX_PLAYER_NAME < 1 || MAX_PLAYER_NAME > 24 #error MAX_PLAYER_NAME must be >= 1 and <= 24 #endif @@ -429,9 +489,6 @@ static stock PLAYER_RECORDING_TYPE:_@PLAYER_RECORDING_TYPE() { return __PLAYER_R #error MAX_MENUS must be >= 1 and <= 128 #endif -public const SAMP_INCLUDES_VERSION = 0x037030; -#pragma unused SAMP_INCLUDES_VERSION - #include #include #include @@ -440,57 +497,6 @@ public const SAMP_INCLUDES_VERSION = 0x037030; #include #tryinclude -/* - -Version examples: - -0.3.DL R1 - 03D010 - -0.3.7 R3 - 037030 -0.3.7 R2-2 - 037022 -0.3.7 R1-2 - 037012 -0.3.7 - 037000 - -0.3z R4 - 030700 -0.3z R3 - 030700 -0.3z R2-1 - 030700 -0.3z R1-2 - 030700 -0.3z - 030700 -0.3x R2 patch 1 - 030621 -0.3x R2 - 030620 -0.3x R1-2 - 030612 -0.3x - 030600 -0.3e - 030500 -0.3d - 030400 -0.3c - 030300 -0.3b - 030200 -0.3a - 030100 - -0.2X - 02A000 -0.2.2 R3 - 022300 - -Rough rules: - -Uses (roughtly) BCD. Special versions are denoted outside 0-9. - -0.1.2c R4-5 -| | || | | -0 1 23 4 5 -= -0x012345 - -(assuming c is the third revision) - -0.2X becomes 02A000 because it is basically 0.2.3, but not, while higher than -0.2.2 so can't be 020400 (for example). Also, its a capital letter, so doesn't -use the revision method. - -P.S. Making a consistent scheme for SA:MP versions is REALLY hard. - -open.mp releases can use `A` as the first digit. - -*/ - // -------------------------------------------------- // Natives // -------------------------------------------------- diff --git a/a_players.inc b/a_players.inc index 3f83a81..a2d0d24 100644 --- a/a_players.inc +++ b/a_players.inc @@ -12,19 +12,85 @@ * */ +/// + #pragma tabsize 4 #define SAMP_CONST_CORRECT // Limits -#if !defined MAX_PLAYER_ATTACHED_OBJECTS - #define MAX_PLAYER_ATTACHED_OBJECTS (10) +/** + * a_players + */ +#if defined MAX_PLAYER_TEXT_DRAWS + const PlayerText:__MAX_PLAYER_TEXT_DRAWS = MAX_PLAYER_TEXT_DRAWS; + #define __MAX_PLAYER_TEXT_DRAWS +#else + const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:256; + #define MAX_PLAYER_TEXT_DRAWS (PlayerText:256) #endif -#if !defined MAX_CHATBUBBLE_LENGTH - #define MAX_CHATBUBBLE_LENGTH (144) +/** + * a_players + */ +#if defined MAX_3DTEXT_PLAYER + const PlayerText3D:__MAX_3DTEXT_PLAYER = MAX_3DTEXT_PLAYER; + #define __MAX_3DTEXT_PLAYER +#else + const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:1024; + #define MAX_3DTEXT_PLAYER (PlayerText3D:1024) #endif -/// +/** + * a_players + */ +#if defined MAX_PLAYER_ATTACHED_OBJECTS + const __MAX_PLAYER_ATTACHED_OBJECTS = MAX_PLAYER_ATTACHED_OBJECTS; + #define __MAX_PLAYER_ATTACHED_OBJECTS +#else + const MAX_PLAYER_ATTACHED_OBJECTS = 10; + #define MAX_PLAYER_ATTACHED_OBJECTS 10 +#endif + +/** + * a_players + */ +#if defined MAX_CHATBUBBLE_LENGTH + const __MAX_CHATBUBBLE_LENGTH = MAX_CHATBUBBLE_LENGTH; + #define __MAX_CHATBUBBLE_LENGTH +#else + const MAX_CHATBUBBLE_LENGTH = 144; + #define MAX_CHATBUBBLE_LENGTH 144 +#endif + +// Invalids +/** + * a_npc + */ +const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; +#define INVALID_PLAYER_3DTEXT_ID (PlayerText3D:0xFFFF) + +/** + * a_samp + */ +const PlayerText:INVALID_PLAYER_TEXT_DRAW = PlayerText:0xFFFF; +#define INVALID_PLAYER_TEXT_DRAW (PlayerText:0xFFFF) + +// Checks +#if MAX_PLAYER_TEXT_DRAWS < PlayerText:1 || MAX_PLAYER_TEXT_DRAWS > PlayerText:256 + #error MAX_PLAYER_TEXT_DRAWS must be >= 1 and <= 256 +#endif + +#if MAX_3DTEXT_PLAYER < PlayerText3D:1 || MAX_3DTEXT_PLAYER > PlayerText3D:1024 + #error MAX_3DTEXT_PLAYER must be >= 1 and <= 1024 +#endif + +#if MAX_PLAYER_ATTACHED_OBJECTS < 0 || MAX_PLAYER_ATTACHED_OBJECTS > 10 + #error MAX_PLAYER_ATTACHED_OBJECTS must be >= 0 and <= 10 +#endif + +#if MAX_CHATBUBBLE_LENGTH < 1 || MAX_CHATBUBBLE_LENGTH > 144 + #error MAX_CHATBUBBLE_LENGTH must be >= 1 and <= 144 +#endif /** * a_players @@ -1006,7 +1072,7 @@ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); * * * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. - * This is defined in a_samp.inc as MAX_PLAYER_NAME. However, the client can + * This is defined in a_samp.inc as 24. However, the client can * only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected * and the player has to quit to choose a valid name. * The length of the player's name. 0 if player specified doesn't exist. @@ -3395,3 +3461,69 @@ native CreateExplosionForPlayer(playerid, Float:x, Float:y, Float:z, type, Float */ native SendClientCheck(playerid, type, memoryAddress, memoryOffset, byteCount); +/** + * a_samp + *

    Creates a 3D Text Label only for a specific player. + * The player which should see the newly created 3DText Label + * The text to display + * The text colour + * x Coordinate (or offset if attached) + * y Coordinate (or offset if attached) + * z Coordinate (or offset if attached) + * The distance where you are able to see the 3D Text Label + * The player you want to attach the 3D Text Label to. (optional=INVALID_PLAYER_ID) + * The vehicle you want to attach the 3D Text Label to. (optional=INVALID_VEHICLE_ID) + * Test the line-of-sight so this text can't be seen through walls (optional=0) + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * If is empty, the server/clients next to the text might crash! + * drawdistance seems to be a lot smaller when spectating. + * The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if + * the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. + */ +native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayerid = INVALID_PLAYER_ID, parentVehicleid = INVALID_VEHICLE_ID, bool:testLOS = false); + +/** + * a_samp + * Destroy a 3D text label that was created using CreatePlayer3DTextLabel. + * The ID of the player whose 3D text label to delete + * The ID of the player's 3D text label to delete + * + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * + * 1: The function executed successfully.
    + * 0: The function failed to execute. This means the label specified doesn't exist. + *
    + */ +native DeletePlayer3DTextLabel(playerid, PlayerText3D:textid); + +/** + * a_samp + * Updates a player 3D Text Label's text and colour. + * The ID of the player for which the 3D Text Label was created + * The 3D Text Label you want to update + * The colour the 3D Text Label should have from now on + * The new text which the 3D Text Label should have from now on + * + * + * + * + * + * + * + * This function was added in SA-MP 0.3a and will not work in earlier versions! + * If is empty, the server/clients next to the text might crash! + */ +native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const text[]); + diff --git a/a_samp.inc b/a_samp.inc index 7d850ed..e82a1d4 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -15,11 +15,71 @@ * */ +/// + // Ignores warning 217 for properly indented PAWNO code // It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8 #pragma tabsize 4 #define SAMP_CONST_CORRECT +/** + * + * Version examples: + *
      + *
    • 0.3.DL R1 - 03D010
    • + *
    • + *
    • 0.3.7 R3 - 037030
    • + *
    • 0.3.7 R2-2 - 037022
    • + *
    • 0.3.7 R1-2 - 037012
    • + *
    • 0.3.7 - 037000
    • + *
    • + *
    • 0.3z R4 - 030700
    • + *
    • 0.3z R3 - 030700
    • + *
    • 0.3z R2-1 - 030700
    • + *
    • 0.3z R1-2 - 030700
    • + *
    • 0.3z - 030700
    • + *
    • 0.3x R2 patch 1 - 030621
    • + *
    • 0.3x R2 - 030620
    • + *
    • 0.3x R1-2 - 030612
    • + *
    • 0.3x - 030600
    • + *
    • 0.3e - 030500
    • + *
    • 0.3d - 030400
    • + *
    • 0.3c - 030300
    • + *
    • 0.3b - 030200
    • + *
    • 0.3a - 030100
    • + *
    • + *
    • 0.2X - 02A000
    • + *
    • 0.2.2 R3 - 022300
    • + *
    + * Rough rules: + * + *

    + * Uses (roughtly) BCD. Special versions are denoted outside 0-9. + * + * 0.1.2c R4-5 + * | | || | | + * 0 1 23 4 5 + * = + * 0x012345 + * + * (assuming c is the third revision) + * + *

    + * 0.2X becomes 02A000 because it is basically 0.2.3, but not, while higher than + * 0.2.2 so can't be 020400 (for example). Also, its a capital letter, so doesn't + * use the revision method. + * + *

    + * P.S. Making a consistent scheme for SA:MP versions is REALLY hard. + * + *

    + * open.mp releases can use `A` as the first digit. + * + */ + +public const SAMP_INCLUDES_VERSION = 0x037030; +#pragma unused SAMP_INCLUDES_VERSION + // Optionally stricter tags. #if defined NO_TAGS #define __TAG(%0) _ @@ -119,17 +179,6 @@ #define MAX_TEXT_DRAWS (Text:2048) #endif -/** - * a_samp - */ -#if defined MAX_PLAYER_TEXT_DRAWS - const PlayerText:__MAX_PLAYER_TEXT_DRAWS = MAX_PLAYER_TEXT_DRAWS; - #define __MAX_PLAYER_TEXT_DRAWS -#else - const PlayerText:MAX_PLAYER_TEXT_DRAWS = PlayerText:256; - #define MAX_PLAYER_TEXT_DRAWS (PlayerText:256) -#endif - /** * a_samp */ @@ -152,17 +201,6 @@ #define MAX_3DTEXT_GLOBAL (Text3D:1024) #endif -/** - * a_samp - */ -#if defined MAX_3DTEXT_PLAYER - const PlayerText3D:__MAX_3DTEXT_PLAYER = MAX_3DTEXT_PLAYER; - #define __MAX_3DTEXT_PLAYER -#else - const PlayerText3D:MAX_3DTEXT_PLAYER = PlayerText3D:1024; - #define MAX_3DTEXT_PLAYER (PlayerText3D:1024) -#endif - /** * a_samp */ @@ -223,12 +261,6 @@ const Menu:INVALID_MENU = Menu:0xFF; const Text:INVALID_TEXT_DRAW = Text:0xFFFF; #define INVALID_TEXT_DRAW (Text:0xFFFF) -/** - * a_samp - */ -const PlayerText:INVALID_PLAYER_TEXT_DRAW = PlayerText:0xFFFF; -#define INVALID_PLAYER_TEXT_DRAW (PlayerText:0xFFFF) - /** * a_samp */ @@ -241,12 +273,6 @@ const INVALID_GANG_ZONE = 0xFFFFFFFF; const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; #define INVALID_3DTEXT_ID (Text3D:0xFFFF) -/** - * a_samp - */ -const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; -#define INVALID_PLAYER_3DTEXT_ID (PlayerText3D:0xFFFF) - /** * a_samp *

    States @@ -553,58 +579,6 @@ enum FORCE_SYNC:__FORCE_SYNC } static stock FORCE_SYNC:_@FORCE_SYNC() { return __FORCE_SYNC; } -// Limits -#if MAX_PLAYER_NAME < 3 || MAX_PLAYER_NAME > 24 - #error MAX_PLAYER_NAME must be >= 3 and <= 24 -#endif - -#if MAX_PLAYERS < 1 || MAX_PLAYERS > 1000 - #error MAX_PLAYERS must be >= 1 and <= 1000 -#endif - -#if MAX_VEHICLES < 1 || MAX_VEHICLES > 2000 - #error MAX_VEHICLES must be >= 1 and <= 2000 -#endif - -#if MAX_ACTORS < 1 || MAX_ACTORS > 1000 - #error MAX_ACTORS must be >= 1 and <= 1000 -#endif - -#if MAX_OBJECTS < 1 || MAX_OBJECTS > 2000 - #error MAX_OBJECTS must be >= 1 and <= 2000 -#endif - -#if MAX_GANG_ZONES < 1 || MAX_GANG_ZONES > 1024 - #error MAX_GANG_ZONES must be >= 1 and <= 1024 -#endif - -#if MAX_TEXT_DRAWS < Text:1 || MAX_TEXT_DRAWS > Text:2048 - #error MAX_TEXT_DRAWS must be >= 1 and <= 2048 -#endif - -#if MAX_PLAYER_TEXT_DRAWS < PlayerText:1 || MAX_PLAYER_TEXT_DRAWS > PlayerText:256 - #error MAX_PLAYER_TEXT_DRAWS must be >= 1 and <= 256 -#endif - -#if MAX_MENUS < Menu:1 || MAX_MENUS > Menu:128 - #error MAX_MENUS must be >= 1 and <= 128 -#endif - -#if MAX_3DTEXT_GLOBAL < Text3D:1 || MAX_3DTEXT_GLOBAL > Text3D:1024 - #error MAX_3DTEXT_GLOBAL must be >= 1 and <= 1024 -#endif - -#if MAX_3DTEXT_PLAYER < PlayerText3D:1 || MAX_3DTEXT_PLAYER > PlayerText3D:1024 - #error MAX_3DTEXT_PLAYER must be >= 1 and <= 1024 -#endif - -#if MAX_PICKUPS < 1 || MAX_PICKUPS > 4096 - #error MAX_PICKUPS must be >= 1 and <= 4096 -#endif - -public const SAMP_INCLUDES_VERSION = 0x037030; -#pragma unused SAMP_INCLUDES_VERSION - // Try many places to get the latest version. #tryinclude "..\pawn-stdlib\console" @@ -705,56 +679,46 @@ public const SAMP_INCLUDES_VERSION = 0x037030; #error cannot read from file: "a_http" #endif -/* - -Version examples: - -0.3.DL R1 - 03D010 - -0.3.7 R3 - 037030 -0.3.7 R2-2 - 037022 -0.3.7 R1-2 - 037012 -0.3.7 - 037000 - -0.3z R4 - 030700 -0.3z R3 - 030700 -0.3z R2-1 - 030700 -0.3z R1-2 - 030700 -0.3z - 030700 -0.3x R2 patch 1 - 030621 -0.3x R2 - 030620 -0.3x R1-2 - 030612 -0.3x - 030600 -0.3e - 030500 -0.3d - 030400 -0.3c - 030300 -0.3b - 030200 -0.3a - 030100 +// Checks +#if MAX_PLAYER_NAME < 3 || MAX_PLAYER_NAME > 24 + #error MAX_PLAYER_NAME must be >= 3 and <= 24 +#endif -0.2X - 02A000 -0.2.2 R3 - 022300 +#if MAX_PLAYERS < 1 || MAX_PLAYERS > 1000 + #error MAX_PLAYERS must be >= 1 and <= 1000 +#endif -Rough rules: +#if MAX_VEHICLES < 1 || MAX_VEHICLES > 2000 + #error MAX_VEHICLES must be >= 1 and <= 2000 +#endif -Uses (roughtly) BCD. Special versions are denoted outside 0-9. +#if MAX_ACTORS < 1 || MAX_ACTORS > 1000 + #error MAX_ACTORS must be >= 1 and <= 1000 +#endif -0.1.2c R4-5 -| | || | | -0 1 23 4 5 -= -0x012345 +#if MAX_OBJECTS < 1 || MAX_OBJECTS > 2000 + #error MAX_OBJECTS must be >= 1 and <= 2000 +#endif -(assuming c is the third revision) +#if MAX_GANG_ZONES < 1 || MAX_GANG_ZONES > 1024 + #error MAX_GANG_ZONES must be >= 1 and <= 1024 +#endif -0.2X becomes 02A000 because it is basically 0.2.3, but not, while higher than -0.2.2 so can't be 020400 (for example). Also, its a capital letter, so doesn't -use the revision method. +#if MAX_TEXT_DRAWS < Text:1 || MAX_TEXT_DRAWS > Text:2048 + #error MAX_TEXT_DRAWS must be >= 1 and <= 2048 +#endif -P.S. Making a consistent scheme for SA:MP versions is REALLY hard. +#if MAX_MENUS < Menu:1 || MAX_MENUS > Menu:128 + #error MAX_MENUS must be >= 1 and <= 128 +#endif -open.mp releases can use `A` as the first digit. +#if MAX_3DTEXT_GLOBAL < Text3D:1 || MAX_3DTEXT_GLOBAL > Text3D:1024 + #error MAX_3DTEXT_GLOBAL must be >= 1 and <= 1024 +#endif -*/ +#if MAX_PICKUPS < 1 || MAX_PICKUPS > 4096 + #error MAX_PICKUPS must be >= 1 and <= 4096 +#endif // -------------------------------------------------- // Natives @@ -3306,74 +3270,6 @@ native Attach3DTextLabelToVehicle(Text3D:textid, parentid, Float:offsetX, Float: */ native Update3DTextLabelText(Text3D:textid, colour, const text[]); -// Per-player 3D Text Labels - -/** - * a_samp - * Creates a 3D Text Label only for a specific player. - * The player which should see the newly created 3DText Label - * The text to display - * The text colour - * x Coordinate (or offset if attached) - * y Coordinate (or offset if attached) - * z Coordinate (or offset if attached) - * The distance where you are able to see the 3D Text Label - * The player you want to attach the 3D Text Label to. (optional=INVALID_PLAYER_ID) - * The vehicle you want to attach the 3D Text Label to. (optional=INVALID_VEHICLE_ID) - * Test the line-of-sight so this text can't be seen through walls (optional=0) - * - * - * - * - * - * - * - * This function was added in SA-MP 0.3a and will not work in earlier versions! - * If is empty, the server/clients next to the text might crash! - * drawdistance seems to be a lot smaller when spectating. - * The ID of the newly created Player 3D Text Label, or INVALID_3DTEXT_ID if - * the Player 3D Text Label limit (MAX_3DTEXT_PLAYER) was reached. - */ -native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayerid = INVALID_PLAYER_ID, parentVehicleid = INVALID_VEHICLE_ID, bool:testLOS = false); - -/** - * a_samp - * Destroy a 3D text label that was created using CreatePlayer3DTextLabel. - * The ID of the player whose 3D text label to delete - * The ID of the player's 3D text label to delete - * - * - * - * - * - * - * This function was added in SA-MP 0.3a and will not work in earlier versions! - * - * 1: The function executed successfully.
    - * 0: The function failed to execute. This means the label specified doesn't exist. - *
    - */ -native DeletePlayer3DTextLabel(playerid, PlayerText3D:textid); - -/** - * a_samp - * Updates a player 3D Text Label's text and colour. - * The ID of the player for which the 3D Text Label was created - * The 3D Text Label you want to update - * The colour the 3D Text Label should have from now on - * The new text which the 3D Text Label should have from now on - * - * - * - * - * - * - * - * This function was added in SA-MP 0.3a and will not work in earlier versions! - * If is empty, the server/clients next to the text might crash! - */ -native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const text[]); - /** * a_samp * Shows the player a synchronous (only one at a time) dialog box. From 22951822f54db09cfb5be6f3da2d53aa74afd620 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 12:02:19 +0000 Subject: [PATCH 075/104] Separate header comments. --- a_actor.inc | 2 ++ a_http.inc | 4 ++-- a_objects.inc | 4 ++-- a_sampdb.inc | 2 ++ a_vehicles.inc | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 53c5f8c..b215611 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -12,6 +12,8 @@ * */ +/// + #pragma tabsize 4 #define SAMP_CONST_CORRECT diff --git a/a_http.inc b/a_http.inc index d2bd361..9ab1395 100644 --- a/a_http.inc +++ b/a_http.inc @@ -12,6 +12,8 @@ * */ +/// + #pragma tabsize 4 #define SAMP_CONST_CORRECT @@ -19,8 +21,6 @@ // Defines // -------------------------------------------------- -/// - /** * a_http * HTTP request types diff --git a/a_objects.inc b/a_objects.inc index 6f4cd07..d4507cc 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -12,6 +12,8 @@ * */ +/// + #pragma tabsize 4 #define SAMP_CONST_CORRECT @@ -19,8 +21,6 @@ // Defines // -------------------------------------------------- -/// - /** * a_objects */ diff --git a/a_sampdb.inc b/a_sampdb.inc index 2a15acb..c590b04 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -12,6 +12,8 @@ * */ +/// + #pragma tabsize 4 #define SAMP_CONST_CORRECT diff --git a/a_vehicles.inc b/a_vehicles.inc index 64260bb..4e94ff8 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -12,6 +12,8 @@ * */ +/// + #pragma tabsize 4 #define SAMP_CONST_CORRECT @@ -19,8 +21,6 @@ // Defines // -------------------------------------------------- -/// - /** * a_vehicles */ From b0f9fe7c16ba7d4b55532de7f065fdf1de3da025 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 12:20:52 +0000 Subject: [PATCH 076/104] Move some defines to more appropriate files: *a_samp* and *a_players* share standard `playerid` callbacks. *a_samp* has the basic ones, *a_players* has the ones that respond to functions within it, and those that are for actions between two players. a_vehicles and a_objects have fairly obvious sets of callbacks. --- a_actor.inc | 81 +++++ a_http.inc | 9 + a_npc.inc | 61 ++-- a_objects.inc | 163 ++++++++++ a_players.inc | 292 ++++++++++++++++- a_samp.inc | 841 +------------------------------------------------ a_sampdb.inc | 10 + a_vehicles.inc | 312 ++++++++++++++++++ 8 files changed, 910 insertions(+), 859 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index b215611..4f7ba4a 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -17,6 +17,34 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +// -------------------------------------------------- +// Defines +// -------------------------------------------------- + +// Limits +/** + * a_actor + */ +#if defined MAX_ACTORS + const __MAX_ACTORS = MAX_ACTORS; + #define __MAX_ACTORS +#else + const MAX_ACTORS = 1000; + #define MAX_ACTORS 1000 +#endif + +// Invalids +/** + * a_actor + */ +const INVALID_ACTOR_ID = 0xFFFF; +#define INVALID_ACTOR_ID 0xFFFF + +// Checks +#if MAX_ACTORS < 1 || MAX_ACTORS > 1000 + #error MAX_ACTORS must be >= 1 and <= 1000 +#endif + /** * a_actor * Create a static 'actor' in the world. These 'actors' are like NPCs, however they have limited @@ -293,3 +321,56 @@ native bool:IsActorInvulnerable(actorid); */ native bool:IsValidActor(actorid); +/** + * This callback is called when a player gives damage to an actor. + * The ID of the player that gave damage + * The ID of the actor that received damage + * The amount of health/armour damaged_actorid has lost + * The reason that caused the damage + * The body part that was hit + * + * + * + * + * + * + * + * + * This callback was added in SA-MP 0.3.7 and will not work in earlier versions! + * This function does not get called if the actor is set invulnerable (WHICH IS BY DEFAULT). + * See SetActorInvulnerable. + * + * 1 - Callback will not be called in other filterscripts.
    + * 0 - Allows this callback to be called in other filterscripts.
    + * It is always called first in filterscripts so returning 1 there blocks other filterscripts + * from seeing it. + *
    + */ +forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart); + +/** + * This callback is called when an actor is streamed in by a player's client. + * The ID of the actor that has been streamed in for the player + * The ID of the player that streamed the actor in + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * This callback can also be called by NPC. + * It is always called first in filterscripts. + * This callback does not handle returns. + */ +forward OnActorStreamIn(actorid, forplayerid); + +/** + * This callback is called when an actor is streamed out by a player's client. + * The ID of the actor that has been streamed out for the player + * The ID of the player that streamed the actor out + * + * + * This function was added in SA-MP 0.3.7 and will not work in earlier versions! + * This callback can also be called by NPC. + * It is always called first in filterscripts. + * This callback does not handle returns. + */ +forward OnActorStreamOut(actorid, forplayerid); + diff --git a/a_http.inc b/a_http.inc index 9ab1395..cea66c4 100644 --- a/a_http.inc +++ b/a_http.inc @@ -21,6 +21,15 @@ // Defines // -------------------------------------------------- +// Limits + +// Invalids + +// Checks + +// Enums +/// + /** * a_http * HTTP request types diff --git a/a_npc.inc b/a_npc.inc index e6347e8..af1f76b 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -307,6 +307,38 @@ const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; #define INVALID_PLAYER_3DTEXT_ID (PlayerText3D:0xFFFF) +// Checks +#if MAX_PLAYER_NAME < 1 || MAX_PLAYER_NAME > 24 + #error MAX_PLAYER_NAME must be >= 1 and <= 24 +#endif + +#if MAX_PLAYERS < 1 || MAX_PLAYERS > 1000 + #error MAX_PLAYERS must be >= 1 and <= 1000 +#endif + +#if MAX_VEHICLES < 1 || MAX_VEHICLES > 2000 + #error MAX_VEHICLES must be >= 1 and <= 2000 +#endif + +#if MAX_OBJECTS < 1 || MAX_OBJECTS > 2000 + #error MAX_OBJECTS must be >= 1 and <= 2000 +#endif + +#if MAX_GANG_ZONES < 1 || MAX_GANG_ZONES > 1024 + #error MAX_GANG_ZONES must be >= 1 and <= 1024 +#endif + +#if MAX_TEXT_DRAWS < Text:1 || MAX_TEXT_DRAWS > Text:2048 + #error MAX_TEXT_DRAWS must be >= 1 and <= 2048 +#endif + +#if MAX_MENUS < Menu:1 || MAX_MENUS > Menu:128 + #error MAX_MENUS must be >= 1 and <= 128 +#endif + +// Enums +/// + /** * a_npc * States @@ -460,35 +492,6 @@ enum PLAYER_RECORDING_TYPE:__PLAYER_RECORDING_TYPE } static stock PLAYER_RECORDING_TYPE:_@PLAYER_RECORDING_TYPE() { return __PLAYER_RECORDING_TYPE; } -// Checks -#if MAX_PLAYER_NAME < 1 || MAX_PLAYER_NAME > 24 - #error MAX_PLAYER_NAME must be >= 1 and <= 24 -#endif - -#if MAX_PLAYERS < 1 || MAX_PLAYERS > 1000 - #error MAX_PLAYERS must be >= 1 and <= 1000 -#endif - -#if MAX_VEHICLES < 1 || MAX_VEHICLES > 2000 - #error MAX_VEHICLES must be >= 1 and <= 2000 -#endif - -#if MAX_OBJECTS < 1 || MAX_OBJECTS > 2000 - #error MAX_OBJECTS must be >= 1 and <= 2000 -#endif - -#if MAX_GANG_ZONES < 1 || MAX_GANG_ZONES > 1024 - #error MAX_GANG_ZONES must be >= 1 and <= 1024 -#endif - -#if MAX_TEXT_DRAWS < Text:1 || MAX_TEXT_DRAWS > Text:2048 - #error MAX_TEXT_DRAWS must be >= 1 and <= 2048 -#endif - -#if MAX_MENUS < Menu:1 || MAX_MENUS > Menu:128 - #error MAX_MENUS must be >= 1 and <= 128 -#endif - #include #include #include diff --git a/a_objects.inc b/a_objects.inc index d4507cc..52a4fdb 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -21,6 +21,46 @@ // Defines // -------------------------------------------------- +// Limits +/** + * a_objects + */ +#if defined MAX_OBJECTS + const __MAX_OBJECTS = MAX_OBJECTS; + #define __MAX_OBJECTS +#else + const MAX_OBJECTS = 2000; + #define MAX_OBJECTS 2000 +#endif + +// Invalids +/** + * a_objects + */ +const INVALID_OBJECT_ID = 0xFFFF; +#define INVALID_OBJECT_ID 0xFFFF + +// Checks +#if MAX_OBJECTS < 1 || MAX_OBJECTS > 2000 + #error MAX_OBJECTS must be >= 1 and <= 2000 +#endif + +// Enums +/// + +/** + * a_objects + */ +#define SELECT_OBJECT: __TAG(SELECT_OBJECT): +enum SELECT_OBJECT:__SELECT_OBJECT +{ + SELECT_OBJECT_GLOBAL_OBJECT = 1, + SELECT_OBJECT_PLAYER_OBJECT +} +static stock SELECT_OBJECT:_@SELECT_OBJECT() { return __SELECT_OBJECT; } + +/// + /** * a_objects */ @@ -832,3 +872,126 @@ native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialInd */ native SetObjectsDefaultCameraCol(bool:disable); +/** + * This callback is called when a player selects an object after SelectObject + * has been used. + * The ID of the player that selected an object + * The type of selection + * The ID of the selected object + * The model ID of the selected object + * The X position of the selected object + * The Y position of the selected object + * The Z position of the selected object + * + * This function was added in SA-MP 0.3e and will not work in earlier versions! + * + * 1 - Will prevent other scripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next script.
    + * It is always called first in filterscripts. + *
    + */ +#if !defined SELECT_OBJECT + #define SELECT_OBJECT: _: +#endif +forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Float:fX, Float:fY, Float:fZ); + +/** + * This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). + * The ID of the player that edited an object + * 0 if it is a global object or 1 if it is a + * playerobject + * The ID of the edited object + * The type of response + * The X offset for the object that was edited + * The Y offset for the object that was edited + * The Z offset for the object that was edited + * The X rotation for the object that was edited + * The Y rotation for the object that was edited + * The Z rotation for the object that was edited + * + * + * + * + * This callback was added in SA-MP 0.3e and will not work in earlier versions! + * When using EDIT_RESPONSE_UPDATE be aware that this callback will not be called + * when releasing an edit in progress resulting in the last update of EDIT_RESPONSE_UPDATE + * being out of sync of the objects current position. + * + * 1 - Will prevent other scripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next script.
    + * It is always called first in filterscripts. + *
    + */ +#if !defined EDIT_RESPONSE + #define EDIT_RESPONSE: _: +#endif +forward OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); + +/** + * This callback is called when a player ends attached object edition mode. + * The ID of the player that ended edition mode + * 0 if they cancelled (ESC) or 1 if they clicked + * the save icon + * The index of the attached object + * The model of the attached object that was edited + * The bone of the attached object that was edited + * The X offset for the attached object that was edited + * The Y offset for the attached object that was edited + * The Z offset for the attached object that was edited + * The X rotation for the attached object that was edited + * The Y rotation for the attached object that was edited + * The Z rotation for the attached object that was edited + * The X scale for the attached object that was edited + * The Y scale for the attached object that was edited + * The Z scale for the attached object that was edited + * + * + * This callback was added in SA-MP 0.3e and will not work in earlier versions! + * Editions should be discarded if response was 0 (cancelled). This must be + * done by storing the offsets etc. in an array BEFORE using EditAttachedObject. + * + * 1 - Will prevent other scripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next script.
    + * It is always called first in filterscripts. + *
    + */ +#if !defined EDIT_RESPONSE + #define EDIT_RESPONSE: _: +#endif +forward OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); + +/** + * This callback is called when an object is moved after MoveObject + * (when it stops moving). + * The ID of the object that was moved + * + * + * + * + * SetObjectPos does not work when used in this callback. To fix + * it, recreate the object. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ +forward OnObjectMoved(objectid); + +/** + * This callback is called when a player object is moved after MovePlayerObject + * (when it stops moving). + * The playerid the object is assigned to + * The ID of the player object that was moved + * + * + * + * + * This callback can also be called for NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ +forward OnPlayerObjectMoved(playerid, objectid); + diff --git a/a_players.inc b/a_players.inc index a2d0d24..797abf4 100644 --- a/a_players.inc +++ b/a_players.inc @@ -17,7 +17,33 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +// -------------------------------------------------- +// Defines +// -------------------------------------------------- + // Limits +/** + * a_players + */ +#if defined MAX_PLAYER_NAME + const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; + #define __MAX_PLAYER_NAME +#else + const MAX_PLAYER_NAME = 24; + #define MAX_PLAYER_NAME 24 +#endif + +/** + * a_players + */ +#if defined MAX_PLAYERS + const __MAX_PLAYERS = MAX_PLAYERS; + #define __MAX_PLAYERS +#else + const MAX_PLAYERS = 1000; + #define MAX_PLAYERS 1000 +#endif + /** * a_players */ @@ -64,18 +90,38 @@ // Invalids /** - * a_npc + * a_players */ const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; #define INVALID_PLAYER_3DTEXT_ID (PlayerText3D:0xFFFF) /** - * a_samp + * a_players */ const PlayerText:INVALID_PLAYER_TEXT_DRAW = PlayerText:0xFFFF; #define INVALID_PLAYER_TEXT_DRAW (PlayerText:0xFFFF) +/** + * a_players + */ +const NO_TEAM = 0xFF; +#define NO_TEAM 0xFF + +/** + * a_players + */ +const INVALID_PLAYER_ID = 0xFFFF; +#define INVALID_PLAYER_ID 0xFFFF + // Checks +#if MAX_PLAYER_NAME < 3 || MAX_PLAYER_NAME > 24 + #error MAX_PLAYER_NAME must be >= 3 and <= 24 +#endif + +#if MAX_PLAYERS < 1 || MAX_PLAYERS > 1000 + #error MAX_PLAYERS must be >= 1 and <= 1000 +#endif + #if MAX_PLAYER_TEXT_DRAWS < PlayerText:1 || MAX_PLAYER_TEXT_DRAWS > PlayerText:256 #error MAX_PLAYER_TEXT_DRAWS must be >= 1 and <= 256 #endif @@ -92,6 +138,67 @@ const PlayerText:INVALID_PLAYER_TEXT_DRAW = PlayerText:0xFFFF; #error MAX_CHATBUBBLE_LENGTH must be >= 1 and <= 144 #endif +// Enums +/// + +/** + * a_players + * States + */ +#define PLAYER_STATE: __TAG(PLAYER_STATE): +enum PLAYER_STATE:__PLAYER_STATE +{ + PLAYER_STATE_NONE, + PLAYER_STATE_ONFOOT, + PLAYER_STATE_DRIVER, + PLAYER_STATE_PASSENGER, + PLAYER_STATE_WASTED = 7, + PLAYER_STATE_SPAWNED, + PLAYER_STATE_SPECTATING +} +static stock PLAYER_STATE:_@PLAYER_STATE() { return __PLAYER_STATE; } + +/** + * a_players + * Used internally + */ +#pragma deprecated Used internally. +const PLAYER_STATE:PLAYER_STATE_EXIT_VEH = PLAYER_STATE:4; +#define PLAYER_STATE_EXIT_VEHICLE PLAYER_STATE_EXIT_VEH + +/** + * a_players + * Used internally + */ +#pragma deprecated Used internally. +const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; +#define PLAYER_STATE_ENTER_VEHICLE_DRIVER PLAYER_STATE_ENTER_VEHICLE_DRV + +/** + * a_players + * Used internally + */ +#pragma deprecated Used internally. +const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; +#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS + +/// + +/** + * a_players + * Marker modes used by ShowPlayerMarkers() + */ +#define PLAYER_MARKERS_MODE: __TAG(PLAYER_MARKERS_MODE): +enum PLAYER_MARKERS_MODE:__PLAYER_MARKERS_MODE +{ + PLAYER_MARKERS_MODE_OFF, + PLAYER_MARKERS_MODE_GLOBAL, + PLAYER_MARKERS_MODE_STREAMED +} +static stock PLAYER_MARKERS_MODE:_@PLAYER_MARKERS_MODE() { return __PLAYER_MARKERS_MODE; } + +/// + /** * a_players */ @@ -1072,7 +1179,7 @@ native GetPlayerKeys(playerid, &KEY:keys, &KEY:updown, &KEY:leftright); * * * A player's name can be up to 24 characters long (as of 0.3d R2) by using SetPlayerName. - * This is defined in a_samp.inc as 24. However, the client can + * This is defined as 24 by default. However, the client can * only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected * and the player has to quit to choose a valid name. * The length of the player's name. 0 if player specified doesn't exist. @@ -3462,7 +3569,7 @@ native CreateExplosionForPlayer(playerid, Float:x, Float:y, Float:z, type, Float native SendClientCheck(playerid, type, memoryAddress, memoryOffset, byteCount); /** - * a_samp + * a_players * Creates a 3D Text Label only for a specific player. * The player which should see the newly created 3DText Label * The text to display @@ -3490,7 +3597,7 @@ native SendClientCheck(playerid, type, memoryAddress, memoryOffset, byteCount); native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Float:x, Float:y, Float:z, Float:drawDistance, parentPlayerid = INVALID_PLAYER_ID, parentVehicleid = INVALID_VEHICLE_ID, bool:testLOS = false); /** - * a_samp + * a_players * Destroy a 3D text label that was created using CreatePlayer3DTextLabel. * The ID of the player whose 3D text label to delete * The ID of the player's 3D text label to delete @@ -3509,7 +3616,7 @@ native PlayerText3D:CreatePlayer3DTextLabel(playerid, const text[], colour, Floa native DeletePlayer3DTextLabel(playerid, PlayerText3D:textid); /** - * a_samp + * a_players * Updates a player 3D Text Label's text and colour. * The ID of the player for which the 3D Text Label was created * The 3D Text Label you want to update @@ -3527,3 +3634,176 @@ native DeletePlayer3DTextLabel(playerid, PlayerText3D:textid); */ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:textid, colour, const text[]); +/** + * This callback is called when a player clicks on a player-textdraw. It is not called when + * player cancels the select mode (ESC) - however, OnPlayerClickTextDraw + * is. + * The ID of the player that selected a textdraw + * The ID of the player-textdraw that the player selected + * + * + * + * This callback was added in SA-MP 0.3e and will not work in earlier versions! + * When a player presses ESC to cancel selecting a textdraw, OnPlayerClickTextDraw + * is called with a textdraw ID of INVALID_TEXT_DRAW. OnPlayerClickPlayerTextDraw + * won't be called also. + * + * Returning 1 in this callback will prevent it being called in other scripts. This + * should be used to signal that the textdraw on which they clicked was 'found' and no further processing + * is needed. You should return 0 if the textdraw on which they clicked wasn't found, + * just like in OnPlayerCommandText.
    + * It is always called first in filterscripts so returning 1 there also blocks other + * scripts from seeing it. + *
    + */ +forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); + +/** + * This callback is called when a player is streamed by some other player's client. + * The ID of the player who has been streamed + * The ID of the player that streamed the other player in + * + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ +forward OnPlayerStreamIn(playerid, forplayerid); + +/** + * This callback is called when a player is streamed out from some other player's client. + * The player who has been destreamed + * The player who has destreamed the other player + * + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ +forward OnPlayerStreamOut(playerid, forplayerid); + +/** + * This callback is called when a player takes damage. + * The ID of the player that took damage + * The ID of the player that caused the damage. INVALID_PLAYER_ID + * if self-inflicted + * The amount of damage the player took (health and armour combined) + * The ID of the weapon/reason + * for the damage + * The body part that was hit. (NOTE: This parameter was added in 0.3z. + * Leave it out if using an older version!) + * + * + * This callback was added in SA-MP 0.3d and will not work in earlier versions! + * GetPlayerHealth and GetPlayerArmour + * will return the old amounts of the player before this callback. + * + * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, + * 18).
    + * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, + * grenade)
    + * playerid is the only one who can call the callback.
    + * The amount is always the maximum damage the weaponid can do, even when the health left is less + * than that maximum damage. So when a player has 100.0 health and gets shot with a Desert + * Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All + * 3 shots will show an amount of 46.2, even though when the last shot hits, the player + * only has 7.6 health left. + *
    + * + * 1 - Callback will not be called in other filterscripts.
    + * 0 - Allows this callback to be called in other filterscripts.
    + * It is always called first in filterscripts so returning 1 there blocks other filterscripts + * from seeing it. + *
    + */ +forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart); + +/** + * This callback is called when a player gives damage to another player. + * The ID of the player that gave damage + * The ID of the player that received damage + * The amount of health/armour damagedid has lost (combined) + * The reason that caused the + * damage + * The body part that was hit. (NOTE: This parameter was added in 0.3z. + * Leave it out if using an older version!) + * + * This callback was added in SA-MP 0.3d and will not work in earlier versions! + * + * Keep in mind this function can be inaccurate in some cases.
    + * If you want to prevent certain players from damaging eachother, use SetPlayerTeam.
    + * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, + * 18)
    + * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, + * grenade)
    + * playerid is the only one who can call the callback.
    + * The amount is always the maximum damage the weaponid can do, even when the health left is less + * than that maximum damage. So when a player has 100.0 health and gets shot with a Desert + * Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All + * 3 shots will show an amount of 46.2, even though when the last shot hits, the player + * only has 7.6 health left. + *
    + * + * 1 - Callback will not be called in other filterscripts.
    + * 0 - Allows this callback to be called in other filterscripts.
    + * It is always called first in filterscripts so returning 1 there blocks other filterscripts + * from seeing it. + *
    + */ +forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart); + +/** + * Called when a player double-clicks on a player on the scoreboard. + * The ID of the player that clicked on a player on the scoreboard + * The ID of the player that was clicked on + * The source of the player's click + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * There is currently only one (0 - CLICK_SOURCE_SCOREBOARD). + * The existence of this argument suggests that more sources may be supported in the future. + * + * 1 - Will prevent other filterscripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts. + *
    + */ +#if !defined CLICK_SOURCE + #define CLICK_SOURCE: _: +#endif +forward OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source); + +/** + * This callback is called when a player dies, either by suicide or by being killed by another + * player. + * The ID of the player that died + * The ID of the player that killed the player who died, or INVALID_PLAYER_ID + * if there was none + * The ID of the reason for the + * player's death + * + * + * + * + * The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    + * The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    + * You do not need to check whether killerid is valid before using it in SendDeathMessage. + * INVALID_PLAYER_ID is a valid killerid ID parameter in that function.
    + * playerid is the only one who can call the callback. (good to know for anti fake death) + *
    + * + * 0 - Will prevent other filterscripts from receiving this callback.
    + * 1 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts. + *
    + */ +forward OnPlayerDeath(playerid, killerid, reason); + diff --git a/a_samp.inc b/a_samp.inc index e82a1d4..ff3bec1 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -102,61 +102,6 @@ public const SAMP_INCLUDES_VERSION = 0x037030; // -------------------------------------------------- // Limits -/** - * a_samp - */ -#if defined MAX_PLAYER_NAME - const __MAX_PLAYER_NAME = MAX_PLAYER_NAME; - #define __MAX_PLAYER_NAME -#else - const MAX_PLAYER_NAME = 24; - #define MAX_PLAYER_NAME 24 -#endif - -/** - * a_samp - */ -#if defined MAX_PLAYERS - const __MAX_PLAYERS = MAX_PLAYERS; - #define __MAX_PLAYERS -#else - const MAX_PLAYERS = 1000; - #define MAX_PLAYERS 1000 -#endif - -/** - * a_samp - */ -#if defined MAX_VEHICLES - const __MAX_VEHICLES = MAX_VEHICLES; - #define __MAX_VEHICLES -#else - const MAX_VEHICLES = 2000; - #define MAX_VEHICLES 2000 -#endif - -/** - * a_samp - */ -#if defined MAX_ACTORS - const __MAX_ACTORS = MAX_ACTORS; - #define __MAX_ACTORS -#else - const MAX_ACTORS = 1000; - #define MAX_ACTORS 1000 -#endif - -/** - * a_samp - */ -#if defined MAX_OBJECTS - const __MAX_OBJECTS = MAX_OBJECTS; - #define __MAX_OBJECTS -#else - const MAX_OBJECTS = 2000; - #define MAX_OBJECTS 2000 -#endif - /** * a_samp */ @@ -219,36 +164,6 @@ public const SAMP_INCLUDES_VERSION = 0x037030; const INVALID_TIMER = 0; #define INVALID_TIMER 0 -/** - * a_samp - */ -const NO_TEAM = 0xFF; -#define NO_TEAM 0xFF - -/** - * a_samp - */ -const INVALID_PLAYER_ID = 0xFFFF; -#define INVALID_PLAYER_ID 0xFFFF - -/** - * a_samp - */ -const INVALID_VEHICLE_ID = 0xFFFF; -#define INVALID_VEHICLE_ID 0xFFFF - -/** - * a_samp - */ -const INVALID_ACTOR_ID = 0xFFFF; -#define INVALID_ACTOR_ID 0xFFFF - -/** - * a_samp - */ -const INVALID_OBJECT_ID = 0xFFFF; -#define INVALID_OBJECT_ID 0xFFFF - /** * a_samp */ @@ -273,62 +188,28 @@ const INVALID_GANG_ZONE = 0xFFFFFFFF; const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; #define INVALID_3DTEXT_ID (Text3D:0xFFFF) -/** - * a_samp - * States - */ -#define PLAYER_STATE: __TAG(PLAYER_STATE): -enum PLAYER_STATE:__PLAYER_STATE -{ - PLAYER_STATE_NONE, - PLAYER_STATE_ONFOOT, - PLAYER_STATE_DRIVER, - PLAYER_STATE_PASSENGER, - PLAYER_STATE_WASTED = 7, - PLAYER_STATE_SPAWNED, - PLAYER_STATE_SPECTATING -} -static stock PLAYER_STATE:_@PLAYER_STATE() { return __PLAYER_STATE; } - -/** - * a_samp - * Used internally - */ -#pragma deprecated Used internally. -const PLAYER_STATE:PLAYER_STATE_EXIT_VEH = PLAYER_STATE:4; -#define PLAYER_STATE_EXIT_VEHICLE PLAYER_STATE_EXIT_VEH +// Checks +#if MAX_GANG_ZONES < 1 || MAX_GANG_ZONES > 1024 + #error MAX_GANG_ZONES must be >= 1 and <= 1024 +#endif -/** - * a_samp - * Used internally - */ -#pragma deprecated Used internally. -const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; -#define PLAYER_STATE_ENTER_VEHICLE_DRIVER PLAYER_STATE_ENTER_VEHICLE_DRV +#if MAX_TEXT_DRAWS < Text:1 || MAX_TEXT_DRAWS > Text:2048 + #error MAX_TEXT_DRAWS must be >= 1 and <= 2048 +#endif -/** - * a_samp - * Used internally - */ -#pragma deprecated Used internally. -const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; -#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS +#if MAX_MENUS < Menu:1 || MAX_MENUS > Menu:128 + #error MAX_MENUS must be >= 1 and <= 128 +#endif -/// +#if MAX_3DTEXT_GLOBAL < Text3D:1 || MAX_3DTEXT_GLOBAL > Text3D:1024 + #error MAX_3DTEXT_GLOBAL must be >= 1 and <= 1024 +#endif -/** - * a_samp - * Marker modes used by ShowPlayerMarkers() - */ -#define PLAYER_MARKERS_MODE: __TAG(PLAYER_MARKERS_MODE): -enum PLAYER_MARKERS_MODE:__PLAYER_MARKERS_MODE -{ - PLAYER_MARKERS_MODE_OFF, - PLAYER_MARKERS_MODE_GLOBAL, - PLAYER_MARKERS_MODE_STREAMED -} -static stock PLAYER_MARKERS_MODE:_@PLAYER_MARKERS_MODE() { return __PLAYER_MARKERS_MODE; } +#if MAX_PICKUPS < 1 || MAX_PICKUPS > 4096 + #error MAX_PICKUPS must be >= 1 and <= 4096 +#endif +// Enums /// /** @@ -538,19 +419,6 @@ static stock EDIT_RESPONSE:_@EDIT_RESPONSE() { return __EDIT_RESPONSE; } /// -/** - * a_samp - */ -#define SELECT_OBJECT: __TAG(SELECT_OBJECT): -enum SELECT_OBJECT:__SELECT_OBJECT -{ - SELECT_OBJECT_GLOBAL_OBJECT = 1, - SELECT_OBJECT_PLAYER_OBJECT -} -static stock SELECT_OBJECT:_@SELECT_OBJECT() { return __SELECT_OBJECT; } - -/// - /** * a_samp */ @@ -679,47 +547,6 @@ static stock FORCE_SYNC:_@FORCE_SYNC() { return __FORCE_SYNC; } #error cannot read from file: "a_http" #endif -// Checks -#if MAX_PLAYER_NAME < 3 || MAX_PLAYER_NAME > 24 - #error MAX_PLAYER_NAME must be >= 3 and <= 24 -#endif - -#if MAX_PLAYERS < 1 || MAX_PLAYERS > 1000 - #error MAX_PLAYERS must be >= 1 and <= 1000 -#endif - -#if MAX_VEHICLES < 1 || MAX_VEHICLES > 2000 - #error MAX_VEHICLES must be >= 1 and <= 2000 -#endif - -#if MAX_ACTORS < 1 || MAX_ACTORS > 1000 - #error MAX_ACTORS must be >= 1 and <= 1000 -#endif - -#if MAX_OBJECTS < 1 || MAX_OBJECTS > 2000 - #error MAX_OBJECTS must be >= 1 and <= 2000 -#endif - -#if MAX_GANG_ZONES < 1 || MAX_GANG_ZONES > 1024 - #error MAX_GANG_ZONES must be >= 1 and <= 1024 -#endif - -#if MAX_TEXT_DRAWS < Text:1 || MAX_TEXT_DRAWS > Text:2048 - #error MAX_TEXT_DRAWS must be >= 1 and <= 2048 -#endif - -#if MAX_MENUS < Menu:1 || MAX_MENUS > Menu:128 - #error MAX_MENUS must be >= 1 and <= 128 -#endif - -#if MAX_3DTEXT_GLOBAL < Text3D:1 || MAX_3DTEXT_GLOBAL > Text3D:1024 - #error MAX_3DTEXT_GLOBAL must be >= 1 and <= 1024 -#endif - -#if MAX_PICKUPS < 1 || MAX_PICKUPS > 4096 - #error MAX_PICKUPS must be >= 1 and <= 4096 -#endif - // -------------------------------------------------- // Natives // -------------------------------------------------- @@ -3441,66 +3268,6 @@ forward OnPlayerDisconnect(playerid, reason); */ forward OnPlayerSpawn(playerid); -/** - * This callback is called when a player dies, either by suicide or by being killed by another - * player. - * The ID of the player that died - * The ID of the player that killed the player who died, or INVALID_PLAYER_ID - * if there was none - * The ID of the reason for the - * player's death - * - * - * - * - * The reason will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
    - * The reason will return 51 from any weapon that creates an explosion (e.g. RPG, grenade)
    - * You do not need to check whether killerid is valid before using it in SendDeathMessage. - * INVALID_PLAYER_ID is a valid killerid ID parameter in that function.
    - * playerid is the only one who can call the callback. (good to know for anti fake death) - *
    - * - * 0 - Will prevent other filterscripts from receiving this callback.
    - * 1 - Indicates that this callback will be passed to the next filterscript.
    - * It is always called first in filterscripts. - *
    - */ -forward OnPlayerDeath(playerid, killerid, reason); - -/** - * This callback is called when a vehicle respawns. - * The ID of the vehicle that spawned - * - * - * - * - * - * 0 - Will prevent other filterscripts from receiving this callback.
    - * 1 - Indicates that this callback will be passed to the next filterscript.
    - * It is always called first in filterscripts. - *
    - */ -forward OnVehicleSpawn(vehicleid); - -/** - * This callback is called when a vehicle is destroyed - either by exploding or becoming submerged - * in water. - * The ID of the vehicle that was destroyed - * The ID of the player that reported (synced) the vehicle's destruction (name - * is misleading). Generally the driver or a passenger (if any) or the closest player - * - * - * This callback can also be called by NPC. - * This callback will also be called when a vehicle enters water, but the vehicle can be saved - * from destruction by teleportation or driving out (if only partially submerged). The callback won't - * be called a second time, and the vehicle may disappear when the driver exits, or after a short time. - * - * This callback does not handle returns.
    - * It is always called first in filterscripts. - *
    - */ -forward OnVehicleDeath(vehicleid, killerid); - /** * Called when a player sends a chat message. * The ID of the player who typed the text @@ -3553,47 +3320,6 @@ forward OnPlayerCommandText(playerid, cmdtext[]); */ forward OnPlayerRequestClass(playerid, classid); -/** - * This callback is called when a player starts to enter a vehicle, meaning the - * player is not in vehicle yet at the time this callback is called. - * ID of the player who attempts to enter a vehicle - * ID of the vehicle the player is attempting to enter - * 0 if entering as driver. 1 if entering as passenger - * - * - * - * - * This callback is called when a player BEGINS to enter a vehicle, not when they HAVE - * entered it. See OnPlayerStateChange. - * This callback is still called if the player is denied entry to the vehicle (e.g. it is - * locked or full). - * - * This callback does not handle returns.
    - * It is always called first in filterscripts. - *
    - */ -forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); - -/** - * This callback is called when a player starts to exit a vehicle. - * The ID of the player that is exiting a vehicle - * The ID of the vehicle the player is exiting - * - * - * - * - * Not called if the player falls off a bike or is removed from a vehicle by other means such - * as using SetPlayerPos. - * You must use OnPlayerStateChange and check if their old - * state is PLAYER_STATE_DRIVER or PLAYER_STATE_PASSENGER and their new - * state is PLAYER_STATE_ONFOOT. - * - * This callback does not handle returns.
    - * It is always called first in filterscripts. - *
    - */ -forward OnPlayerExitVehicle(playerid, vehicleid); - /** * This callback is called when a player changes state. For example, when a player changes * from being the driver of a vehicle to being on-foot. @@ -3753,40 +3479,6 @@ forward OnRconCommand(cmd[]); */ forward OnPlayerRequestSpawn(playerid); -/** - * This callback is called when an object is moved after MoveObject - * (when it stops moving). - * The ID of the object that was moved - * - * - * - * - * SetObjectPos does not work when used in this callback. To fix - * it, recreate the object. - * - * This callback does not handle returns.
    - * It is always called first in filterscripts. - *
    - */ -forward OnObjectMoved(objectid); - -/** - * This callback is called when a player object is moved after MovePlayerObject - * (when it stops moving). - * The playerid the object is assigned to - * The ID of the player object that was moved - * - * - * - * - * This callback can also be called for NPC. - * - * This callback does not handle returns.
    - * It is always called first in filterscripts. - *
    - */ -forward OnPlayerObjectMoved(playerid, objectid); - /** * Called when a player picks up a pickup created with CreatePickup. * The ID of the player that picked up the pickup @@ -3800,141 +3492,6 @@ forward OnPlayerObjectMoved(playerid, objectid); */ forward OnPlayerPickUpPickup(playerid, pickupid); -/** - * This callback is called when a vehicle is modded. - * The ID of the driver of the vehicle - * The ID of the vehicle which is modded - * The ID of the component which was added to the vehicle - * - * - * - * - * This callback is NOT called by AddVehicleComponent. - * - * Return 0 to desync the mod (or an invalid mod) from propagating and / or crashing - * players.
    - * It is always called first in gamemode so returning 0 there also blocks other filterscripts - * from seeing it. - *
    - */ -forward OnVehicleMod(playerid, vehicleid, componentid); - -/** - * This callback is called when a player enters or exits a mod shop. - * The ID of the player that entered or exited the modshop - * 1 if the player entered or 0 if they exited - * The interior ID of the modshop that the player is entering (or 0 if exiting) - * - * - * - * - * This callback was added in SA-MP 0.3a and will not work in earlier versions! - * Players collide when they get into the same mod shop. - * - * This callback does not handle returns.
    - * It is always called first in filterscripts. - *
    - */ -forward OnEnterExitModShop(playerid, enterexit, interiorid); - -/** - * Called when a player previews a vehicle paintjob inside a mod shop. Watch out, this callback - * is not called when the player buys the paintjob. - * The ID of the player that changed the paintjob of their vehicle - * The ID of the vehicle that had its paintjob changed - * The ID of the new paintjob - * - * - * - * - * This callback is not called by ChangeVehiclePaintjob. - * - * This callback does not handle returns. Returning 0 won't deny the paintjob change.
    - * It is always called first in gamemode so returning 0 there blocks other filterscripts - * from seeing it. - *
    - */ -forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); - -/** - * This callback is called when a player exits a mod shop, even if the colors weren't changed. - * Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. - * The ID of the player that is driving the vehicle - * The ID of the vehicle that was resprayed - * The color that the vehicle's primary color was changed to - * The color that the vehicle's secondary color was changed to - * - * - * - * - * - * Previewing a component inside a mod shop might call this callback. - * This callback is not called by ChangeVehicleColor. - * - * Returning 0 in this callback will deny the colour change. Returning 1 - * will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.
    - * It is always called first in gamemode so returning 0 there also blocks other filterscripts - * from seeing it. - *
    - */ -forward OnVehicleRespray(playerid, vehicleid, color1, color2); - -/** - * This callback is called when a vehicle element such as doors, tires, panels, or lights change - * their damage status. - * The ID of the vehicle that was changed its damage status - * The ID of the player who synced the change in the damage status (who had the - * car damaged or repaired) - * - * - * This callback was added in SA-MP 0.3a and will not work in earlier versions! - * This does not include vehicle health changes - * - * 1 - Will prevent other filterscripts from receiving this callback.
    - * 0 - Indicates that this callback will be passed to the next filterscript.
    - * It is always called first in filterscripts.
    - *
    - */ -forward OnVehicleDamageStatusUpdate(vehicleid, playerid); - -/** - * This callback is called when a player's client updates/syncs the position of a vehicle they're - * not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle - * that has no driver. - * The ID of the vehicle that's position was updated - * The ID of the player that sent a vehicle position sync update - * The ID of the seat if the player is a passenger. 0=not in vehicle, - * 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats - * The new X coordinate of the vehicle. This parameter was added in 0.3z. - * Leave it out if using an earlier version - * The new Y coordinate of the vehicle. This parameter was added in 0.3z. - * Leave it out if using an earlier version - * The new Z coordinate of the vehicle. This parameter was added in 0.3z. - * Leave it out if using an earlier version - * The new X velocity of the vehicle. This parameter was added in 0.3z R4. - * Leave it out if using an earlier version - * The new Y velocity of the vehicle. This parameter was added in 0.3z R4. - * Leave it out if using an earlier version - * The new Z velocity of the vehicle. This parameter was added in 0.3z R4. - * Leave it out if using an earlier version - * - * This callback was added in SA-MP 0.3c R3 and will not work in earlier versions! - * This callback is called very frequently per second per unoccupied vehicle. You should refrain - * from implementing intensive calculations or intensive file writing/reading operations in this callback. - * GetVehiclePos will return the old coordinates of the vehicle - * before this update. - * - * Returning 0 in this callback will stop the vehicle's position being synced to other - * players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.
    - * It is always called first in filterscripts so returning 0 there also blocks other - * scripts from seeing it. - *
    - */ -forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); - /** * This callback is called when a player selects an item from a menu (ShowMenuForPlayer). * The ID of the player that selected a menu item @@ -4061,97 +3618,6 @@ forward OnRconLoginAttempt(ip[], password[], success); */ forward OnPlayerUpdate(playerid); -/** - * This callback is called when a player is streamed by some other player's client. - * The ID of the player who has been streamed - * The ID of the player that streamed the other player in - * - * - * - * This callback was added in SA-MP 0.3a and will not work in earlier versions! - * This callback can also be called by NPC. - * - * This callback does not handle returns.
    - * It is always called first in filterscripts. - *
    - */ -forward OnPlayerStreamIn(playerid, forplayerid); - -/** - * This callback is called when a player is streamed out from some other player's client. - * The player who has been destreamed - * The player who has destreamed the other player - * - * - * - * This callback was added in SA-MP 0.3a and will not work in earlier versions! - * This callback can also be called by NPC. - * - * This callback does not handle returns.
    - * It is always called first in filterscripts. - *
    - */ -forward OnPlayerStreamOut(playerid, forplayerid); - -/** - * Called when a vehicle is streamed to a player's client. - * The ID of the vehicle that streamed in for the player - * The ID of the player who the vehicle streamed in for - * - * - * - * This callback was added in SA-MP 0.3a and will not work in earlier versions! - * This callback can also be called by NPC. - * - * This callback does not handle returns.
    - * It is always called first in filterscripts. - *
    - */ -forward OnVehicleStreamIn(vehicleid, forplayerid); - -/** - * This callback is called when a vehicle is streamed out for a player's client (it's so far - * away that they can't see it). - * The ID of the vehicle that streamed out - * The ID of the player who is no longer streaming the vehicle - * - * - * - * This callback was added in SA-MP 0.3a and will not work in earlier versions! - * This callback can also be called by NPC. - * - * This callback does not handle returns.
    - * It is always called first in filterscripts. - *
    - */ -forward OnVehicleStreamOut(vehicleid, forplayerid); - -/** - * This callback is called when an actor is streamed in by a player's client. - * The ID of the actor that has been streamed in for the player - * The ID of the player that streamed the actor in - * - * - * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This callback can also be called by NPC. - * It is always called first in filterscripts. - * This callback does not handle returns. - */ -forward OnActorStreamIn(actorid, forplayerid); - -/** - * This callback is called when an actor is streamed out by a player's client. - * The ID of the actor that has been streamed out for the player - * The ID of the player that streamed the actor out - * - * - * This function was added in SA-MP 0.3.7 and will not work in earlier versions! - * This callback can also be called by NPC. - * It is always called first in filterscripts. - * This callback does not handle returns. - */ -forward OnActorStreamOut(actorid, forplayerid); - /** * This callback is called when a player responds to a dialog shown using ShowPlayerDialog * by either clicking a button, pressing ENTER/ESC or double-clicking a list item (if using a list style @@ -4180,104 +3646,6 @@ forward OnActorStreamOut(actorid, forplayerid); */ forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]); -/** - * This callback is called when a player takes damage. - * The ID of the player that took damage - * The ID of the player that caused the damage. INVALID_PLAYER_ID - * if self-inflicted - * The amount of damage the player took (health and armour combined) - * The ID of the weapon/reason - * for the damage - * The body part that was hit. (NOTE: This parameter was added in 0.3z. - * Leave it out if using an older version!) - * - * - * This callback was added in SA-MP 0.3d and will not work in earlier versions! - * GetPlayerHealth and GetPlayerArmour - * will return the old amounts of the player before this callback. - * - * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, - * 18).
    - * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, - * grenade)
    - * playerid is the only one who can call the callback.
    - * The amount is always the maximum damage the weaponid can do, even when the health left is less - * than that maximum damage. So when a player has 100.0 health and gets shot with a Desert - * Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All - * 3 shots will show an amount of 46.2, even though when the last shot hits, the player - * only has 7.6 health left. - *
    - * - * 1 - Callback will not be called in other filterscripts.
    - * 0 - Allows this callback to be called in other filterscripts.
    - * It is always called first in filterscripts so returning 1 there blocks other filterscripts - * from seeing it. - *
    - */ -forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart); - -/** - * This callback is called when a player gives damage to another player. - * The ID of the player that gave damage - * The ID of the player that received damage - * The amount of health/armour damagedid has lost (combined) - * The reason that caused the - * damage - * The body part that was hit. (NOTE: This parameter was added in 0.3z. - * Leave it out if using an older version!) - * - * This callback was added in SA-MP 0.3d and will not work in earlier versions! - * - * Keep in mind this function can be inaccurate in some cases.
    - * If you want to prevent certain players from damaging eachother, use SetPlayerTeam.
    - * The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, - * 18)
    - * The weaponid will return 51 from any weapon that creates an explosion (e.g. RPG, - * grenade)
    - * playerid is the only one who can call the callback.
    - * The amount is always the maximum damage the weaponid can do, even when the health left is less - * than that maximum damage. So when a player has 100.0 health and gets shot with a Desert - * Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All - * 3 shots will show an amount of 46.2, even though when the last shot hits, the player - * only has 7.6 health left. - *
    - * - * 1 - Callback will not be called in other filterscripts.
    - * 0 - Allows this callback to be called in other filterscripts.
    - * It is always called first in filterscripts so returning 1 there blocks other filterscripts - * from seeing it. - *
    - */ -forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart); - -/** - * This callback is called when a player gives damage to an actor. - * The ID of the player that gave damage - * The ID of the actor that received damage - * The amount of health/armour damaged_actorid has lost - * The reason that caused the damage - * The body part that was hit - * - * - * - * - * - * - * - * - * This callback was added in SA-MP 0.3.7 and will not work in earlier versions! - * This function does not get called if the actor is set invulnerable (WHICH IS BY DEFAULT). - * See SetActorInvulnerable. - * - * 1 - Callback will not be called in other filterscripts.
    - * 0 - Allows this callback to be called in other filterscripts.
    - * It is always called first in filterscripts so returning 1 there blocks other filterscripts - * from seeing it. - *
    - */ -forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart); - /** * OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map * (by right-clicking). @@ -4324,30 +3692,6 @@ forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); */ forward OnPlayerClickTextDraw(playerid, Text:clickedid); -/** - * This callback is called when a player clicks on a player-textdraw. It is not called when - * player cancels the select mode (ESC) - however, OnPlayerClickTextDraw - * is. - * The ID of the player that selected a textdraw - * The ID of the player-textdraw that the player selected - * - * - * - * This callback was added in SA-MP 0.3e and will not work in earlier versions! - * When a player presses ESC to cancel selecting a textdraw, OnPlayerClickTextDraw - * is called with a textdraw ID of INVALID_TEXT_DRAW. OnPlayerClickPlayerTextDraw - * won't be called also. - * - * Returning 1 in this callback will prevent it being called in other scripts. This - * should be used to signal that the textdraw on which they clicked was 'found' and no further processing - * is needed. You should return 0 if the textdraw on which they clicked wasn't found, - * just like in OnPlayerCommandText.
    - * It is always called first in filterscripts so returning 1 there also blocks other - * scripts from seeing it. - *
    - */ -forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); - /** * This callback is called when an IP address attempts a connection to the server. To block * incoming connections, use BlockIpAddress. @@ -4368,48 +3712,6 @@ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); */ forward OnIncomingConnection(playerid, ip_address[], port); -/** - * This callback is called when a player sent a trailer update. - * The ID of the player who sent a trailer update - * The Trailer being updated - * - * - * - * - * - * This callback was added in SA-MP 0.3z R4 and will not work in earlier versions! - * This callback is called very frequently per second per trailer. You should refrain from - * implementing intensive calculations or intensive file writing/reading operations in this callback. - * - * - * 0 - Cancels any trailer updates from being sent to other players. Update is still - * sent to the updating player.
    - * 1 - Processes the trailer update as normal and synchronizes it between all players.
    - * It is always called first in filterscripts. - *
    - */ -forward OnTrailerUpdate(playerid, vehicleid); - -/** - * This callback is called when a vehicle's siren is toggled. - * The ID of the player that toggled the siren (driver) - * The ID of the vehicle of which the siren was toggled for - * 0 if siren was turned off, 1 if siren was turned - * on - * - * This callback was added in SA-MP 0.3.7 and will not work in earlier versions! - * This callback can also be called by NPC. - * This callback is only called when a vehicle's siren is toggled on or off, NOT when the alternate - * siren is in use (holding horn). - * - * 1 - Will prevent gamemode from receiving this callback.
    - * 0 - Indicates that this callback will be passed to the gamemode.
    - * It is always called first in filterscripts. - *
    - */ -forward OnVehicleSirenStateChange(playerid, vehicleid, newstate); - /** * This callback is called when a player finishes downloading custom models. For more information * on how to add custom models to your server, see the @@ -4428,115 +3730,6 @@ forward OnVehicleSirenStateChange(playerid, vehicleid, newstate); forward OnPlayerFinishedDownloading(playerid, virtualworld); forward OnPlayerRequestDownload(playerid, type, crc); -/** - * Called when a player double-clicks on a player on the scoreboard. - * The ID of the player that clicked on a player on the scoreboard - * The ID of the player that was clicked on - * The source of the player's click - * - * This callback was added in SA-MP 0.3a and will not work in earlier versions! - * There is currently only one (0 - CLICK_SOURCE_SCOREBOARD). - * The existence of this argument suggests that more sources may be supported in the future. - * - * 1 - Will prevent other filterscripts from receiving this callback.
    - * 0 - Indicates that this callback will be passed to the next filterscript.
    - * It is always called first in filterscripts. - *
    - */ -#if !defined CLICK_SOURCE - #define CLICK_SOURCE: _: -#endif -forward OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source); - -/** - *
    This callback is called when a player finishes editing an object (EditObject/EditPlayerObject). - * The ID of the player that edited an object - * 0 if it is a global object or 1 if it is a - * playerobject - * The ID of the edited object - * The type of response - * The X offset for the object that was edited - * The Y offset for the object that was edited - * The Z offset for the object that was edited - * The X rotation for the object that was edited - * The Y rotation for the object that was edited - * The Z rotation for the object that was edited - * - * - * - * - * This callback was added in SA-MP 0.3e and will not work in earlier versions! - * When using EDIT_RESPONSE_UPDATE be aware that this callback will not be called - * when releasing an edit in progress resulting in the last update of EDIT_RESPONSE_UPDATE - * being out of sync of the objects current position. - * - * 1 - Will prevent other scripts from receiving this callback.
    - * 0 - Indicates that this callback will be passed to the next script.
    - * It is always called first in filterscripts. - *
    - */ -#if !defined EDIT_RESPONSE - #define EDIT_RESPONSE: _: -#endif -forward OnPlayerEditObject(playerid, playerobject, objectid, EDIT_RESPONSE:response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ); - -/** - * This callback is called when a player ends attached object edition mode. - * The ID of the player that ended edition mode - * 0 if they cancelled (ESC) or 1 if they clicked - * the save icon - * The index of the attached object - * The model of the attached object that was edited - * The bone of the attached object that was edited - * The X offset for the attached object that was edited - * The Y offset for the attached object that was edited - * The Z offset for the attached object that was edited - * The X rotation for the attached object that was edited - * The Y rotation for the attached object that was edited - * The Z rotation for the attached object that was edited - * The X scale for the attached object that was edited - * The Y scale for the attached object that was edited - * The Z scale for the attached object that was edited - * - * - * This callback was added in SA-MP 0.3e and will not work in earlier versions! - * Editions should be discarded if response was 0 (cancelled). This must be - * done by storing the offsets etc. in an array BEFORE using EditAttachedObject. - * - * 1 - Will prevent other scripts from receiving this callback.
    - * 0 - Indicates that this callback will be passed to the next script.
    - * It is always called first in filterscripts. - *
    - */ -#if !defined EDIT_RESPONSE - #define EDIT_RESPONSE: _: -#endif -forward OnPlayerEditAttachedObject(playerid, EDIT_RESPONSE:response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ); - -/** - * This callback is called when a player selects an object after SelectObject - * has been used. - * The ID of the player that selected an object - * The type of selection - * The ID of the selected object - * The model ID of the selected object - * The X position of the selected object - * The Y position of the selected object - * The Z position of the selected object - * - * This function was added in SA-MP 0.3e and will not work in earlier versions! - * - * 1 - Will prevent other scripts from receiving this callback.
    - * 0 - Indicates that this callback will be passed to the next script.
    - * It is always called first in filterscripts. - *
    - */ -#if !defined SELECT_OBJECT - #define SELECT_OBJECT: _: -#endif -forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Float:fX, Float:fY, Float:fZ); - /** * This callback is called when a player fires a shot from a weapon. Only bullet weapons are * supported. Only passenger drive-by is supported (not driver drive-by, and not sea sparrow diff --git a/a_sampdb.inc b/a_sampdb.inc index c590b04..9c6976a 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -17,6 +17,16 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT +// -------------------------------------------------- +// Defines +// -------------------------------------------------- + +// Limits + +// Invalids + +// Checks + /** * a_sampdb * This function is used to open a connection to a SQLite database, which is inside the /scriptfiles diff --git a/a_vehicles.inc b/a_vehicles.inc index 4e94ff8..f5f45f2 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -21,6 +21,33 @@ // Defines // -------------------------------------------------- +// Limits +/** + * a_vehicles + */ +#if defined MAX_VEHICLES + const __MAX_VEHICLES = MAX_VEHICLES; + #define __MAX_VEHICLES +#else + const MAX_VEHICLES = 2000; + #define MAX_VEHICLES 2000 +#endif + +// Invalids +/** + * a_vehicles + */ +const INVALID_VEHICLE_ID = 0xFFFF; +#define INVALID_VEHICLE_ID 0xFFFF + +// Checks +#if MAX_VEHICLES < 1 || MAX_VEHICLES > 2000 + #error MAX_VEHICLES must be >= 1 and <= 2000 +#endif + +// Enums +/// + /** * a_vehicles */ @@ -988,3 +1015,288 @@ native GetVehicleVirtualWorld(vehicleid); */ native bool:IsValidVehicle(vehicleid); +/** + * This callback is called when a player sent a trailer update. + * The ID of the player who sent a trailer update + * The Trailer being updated + * + * + * + * + * + * This callback was added in SA-MP 0.3z R4 and will not work in earlier versions! + * This callback is called very frequently per second per trailer. You should refrain from + * implementing intensive calculations or intensive file writing/reading operations in this callback. + * + * + * 0 - Cancels any trailer updates from being sent to other players. Update is still + * sent to the updating player.
    + * 1 - Processes the trailer update as normal and synchronizes it between all players.
    + * It is always called first in filterscripts. + *
    + */ +forward OnTrailerUpdate(playerid, vehicleid); + +/** + * This callback is called when a vehicle's siren is toggled. + * The ID of the player that toggled the siren (driver) + * The ID of the vehicle of which the siren was toggled for + * 0 if siren was turned off, 1 if siren was turned + * on + * + * This callback was added in SA-MP 0.3.7 and will not work in earlier versions! + * This callback can also be called by NPC. + * This callback is only called when a vehicle's siren is toggled on or off, NOT when the alternate + * siren is in use (holding horn). + * + * 1 - Will prevent gamemode from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the gamemode.
    + * It is always called first in filterscripts. + *
    + */ +forward OnVehicleSirenStateChange(playerid, vehicleid, newstate); + +/** + * Called when a vehicle is streamed to a player's client. + * The ID of the vehicle that streamed in for the player + * The ID of the player who the vehicle streamed in for + * + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ +forward OnVehicleStreamIn(vehicleid, forplayerid); + +/** + * This callback is called when a vehicle is streamed out for a player's client (it's so far + * away that they can't see it). + * The ID of the vehicle that streamed out + * The ID of the player who is no longer streaming the vehicle + * + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * This callback can also be called by NPC. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ +forward OnVehicleStreamOut(vehicleid, forplayerid); + +/** + * This callback is called when a player starts to enter a vehicle, meaning the + * player is not in vehicle yet at the time this callback is called. + * ID of the player who attempts to enter a vehicle + * ID of the vehicle the player is attempting to enter + * 0 if entering as driver. 1 if entering as passenger + * + * + * + * + * This callback is called when a player BEGINS to enter a vehicle, not when they HAVE + * entered it. See OnPlayerStateChange. + * This callback is still called if the player is denied entry to the vehicle (e.g. it is + * locked or full). + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ +forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); + +/** + * This callback is called when a player starts to exit a vehicle. + * The ID of the player that is exiting a vehicle + * The ID of the vehicle the player is exiting + * + * + * + * + * Not called if the player falls off a bike or is removed from a vehicle by other means such + * as using SetPlayerPos. + * You must use OnPlayerStateChange and check if their old + * state is PLAYER_STATE_DRIVER or PLAYER_STATE_PASSENGER and their new + * state is PLAYER_STATE_ONFOOT. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ +forward OnPlayerExitVehicle(playerid, vehicleid); + +/** + * This callback is called when a vehicle respawns. + * The ID of the vehicle that spawned + * + * + * + * + * + * 0 - Will prevent other filterscripts from receiving this callback.
    + * 1 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts. + *
    + */ +forward OnVehicleSpawn(vehicleid); + +/** + * This callback is called when a vehicle is destroyed - either by exploding or becoming submerged + * in water. + * The ID of the vehicle that was destroyed + * The ID of the player that reported (synced) the vehicle's destruction (name + * is misleading). Generally the driver or a passenger (if any) or the closest player + * + * + * This callback can also be called by NPC. + * This callback will also be called when a vehicle enters water, but the vehicle can be saved + * from destruction by teleportation or driving out (if only partially submerged). The callback won't + * be called a second time, and the vehicle may disappear when the driver exits, or after a short time. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ +forward OnVehicleDeath(vehicleid, killerid); + +/** + * This callback is called when a vehicle is modded. + * The ID of the driver of the vehicle + * The ID of the vehicle which is modded + * The ID of the component which was added to the vehicle + * + * + * + * + * This callback is NOT called by AddVehicleComponent. + * + * Return 0 to desync the mod (or an invalid mod) from propagating and / or crashing + * players.
    + * It is always called first in gamemode so returning 0 there also blocks other filterscripts + * from seeing it. + *
    + */ +forward OnVehicleMod(playerid, vehicleid, componentid); + +/** + * This callback is called when a player enters or exits a mod shop. + * The ID of the player that entered or exited the modshop + * 1 if the player entered or 0 if they exited + * The interior ID of the modshop that the player is entering (or 0 if exiting) + * + * + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * Players collide when they get into the same mod shop. + * + * This callback does not handle returns.
    + * It is always called first in filterscripts. + *
    + */ +forward OnEnterExitModShop(playerid, enterexit, interiorid); + +/** + * Called when a player previews a vehicle paintjob inside a mod shop. Watch out, this callback + * is not called when the player buys the paintjob. + * The ID of the player that changed the paintjob of their vehicle + * The ID of the vehicle that had its paintjob changed + * The ID of the new paintjob + * + * + * + * + * This callback is not called by ChangeVehiclePaintjob. + * + * This callback does not handle returns. Returning 0 won't deny the paintjob change.
    + * It is always called first in gamemode so returning 0 there blocks other filterscripts + * from seeing it. + *
    + */ +forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); + +/** + * This callback is called when a player exits a mod shop, even if the colors weren't changed. + * Watch out, the name is ambiguous, Pay 'n' Spray shops don't call this callback. + * The ID of the player that is driving the vehicle + * The ID of the vehicle that was resprayed + * The color that the vehicle's primary color was changed to + * The color that the vehicle's secondary color was changed to + * + * + * + * + * + * Previewing a component inside a mod shop might call this callback. + * This callback is not called by ChangeVehicleColor. + * + * Returning 0 in this callback will deny the colour change. Returning 1 + * will allow it. This can be used to prevent hackers from changing vehicle colours using cheats.
    + * It is always called first in gamemode so returning 0 there also blocks other filterscripts + * from seeing it. + *
    + */ +forward OnVehicleRespray(playerid, vehicleid, color1, color2); + +/** + * This callback is called when a vehicle element such as doors, tires, panels, or lights change + * their damage status. + * The ID of the vehicle that was changed its damage status + * The ID of the player who synced the change in the damage status (who had the + * car damaged or repaired) + * + * + * This callback was added in SA-MP 0.3a and will not work in earlier versions! + * This does not include vehicle health changes + * + * 1 - Will prevent other filterscripts from receiving this callback.
    + * 0 - Indicates that this callback will be passed to the next filterscript.
    + * It is always called first in filterscripts.
    + *
    + */ +forward OnVehicleDamageStatusUpdate(vehicleid, playerid); + +/** + * This callback is called when a player's client updates/syncs the position of a vehicle they're + * not driving. This can happen outside of the vehicle or when the player is a passenger of a vehicle + * that has no driver. + * The ID of the vehicle that's position was updated + * The ID of the player that sent a vehicle position sync update + * The ID of the seat if the player is a passenger. 0=not in vehicle, + * 1=front passenger, 2=backleft 3=backright 4+ is for coach/bus etc. with many passenger seats + * The new X coordinate of the vehicle. This parameter was added in 0.3z. + * Leave it out if using an earlier version + * The new Y coordinate of the vehicle. This parameter was added in 0.3z. + * Leave it out if using an earlier version + * The new Z coordinate of the vehicle. This parameter was added in 0.3z. + * Leave it out if using an earlier version + * The new X velocity of the vehicle. This parameter was added in 0.3z R4. + * Leave it out if using an earlier version + * The new Y velocity of the vehicle. This parameter was added in 0.3z R4. + * Leave it out if using an earlier version + * The new Z velocity of the vehicle. This parameter was added in 0.3z R4. + * Leave it out if using an earlier version + * + * This callback was added in SA-MP 0.3c R3 and will not work in earlier versions! + * This callback is called very frequently per second per unoccupied vehicle. You should refrain + * from implementing intensive calculations or intensive file writing/reading operations in this callback. + * GetVehiclePos will return the old coordinates of the vehicle + * before this update. + * + * Returning 0 in this callback will stop the vehicle's position being synced to other + * players. Update is still sent to the updating player. Useful for combating vehicle teleport hacks.
    + * It is always called first in filterscripts so returning 0 there also blocks other + * scripts from seeing it. + *
    + */ +forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); + From 5b3d3a864490ecfae69a72cb2ad93c47606ee660 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 12:22:53 +0000 Subject: [PATCH 077/104] Change the include order to resolve some new inter-dependencies. --- a_samp.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index ff3bec1..bc482f7 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -499,17 +499,17 @@ static stock FORCE_SYNC:_@FORCE_SYNC() { return __FORCE_SYNC; } #error cannot read from file: "time" #endif -#tryinclude "a_actor" -#tryinclude "a_objects" +#tryinclude "a_vehicles" #tryinclude "a_players" +#tryinclude "a_objects" +#tryinclude "a_actor" #tryinclude "a_sampdb" -#tryinclude "a_vehicles" -#tryinclude -#tryinclude +#tryinclude #tryinclude +#tryinclude +#tryinclude #tryinclude -#tryinclude #if !defined _actor_included #error cannot read from file: "a_actor" From 72f39577e2e64dbdba08ed3840f37d79a87ed5e8 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 12:23:32 +0000 Subject: [PATCH 078/104] And match the checks. --- a_samp.inc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index bc482f7..aca85d5 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -511,30 +511,26 @@ static stock FORCE_SYNC:_@FORCE_SYNC() { return __FORCE_SYNC; } #tryinclude #tryinclude -#if !defined _actor_included - #error cannot read from file: "a_actor" +#if !defined _vehicles_included + #error cannot read from file: "a_vehicles" #endif -#if !defined _file_included - #error cannot read from file: "a_file" +#if !defined _players_included + #error cannot read from file: "a_players" #endif #if !defined _objects_included #error cannot read from file: "a_objects" #endif -#if !defined _players_included - #error cannot read from file: "a_players" +#if !defined _actor_included + #error cannot read from file: "a_actor" #endif #if !defined _sampdb_included #error cannot read from file: "a_sampdb" #endif -#if !defined _vehicles_included - #error cannot read from file: "a_vehicles" -#endif - // Special case. The old version didn't have `_http_included`. #tryinclude "a_http" #if !defined HTTP From e55f57a512af8a110ba33d13233a8c1bbe4d3475 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 12:30:11 +0000 Subject: [PATCH 079/104] Try fix old a_http includes even more. --- a_samp.inc | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index aca85d5..c83077f 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -500,45 +500,48 @@ static stock FORCE_SYNC:_@FORCE_SYNC() { return __FORCE_SYNC; } #endif #tryinclude "a_vehicles" -#tryinclude "a_players" -#tryinclude "a_objects" -#tryinclude "a_actor" -#tryinclude "a_sampdb" - #tryinclude -#tryinclude -#tryinclude -#tryinclude -#tryinclude - #if !defined _vehicles_included #error cannot read from file: "a_vehicles" #endif +#tryinclude "a_players" +#tryinclude #if !defined _players_included #error cannot read from file: "a_players" #endif +#tryinclude "a_objects" +#tryinclude #if !defined _objects_included #error cannot read from file: "a_objects" #endif +#tryinclude "a_actor" +#tryinclude #if !defined _actor_included #error cannot read from file: "a_actor" #endif +#tryinclude "a_sampdb" +#tryinclude #if !defined _sampdb_included #error cannot read from file: "a_sampdb" #endif // Special case. The old version didn't have `_http_included`. -#tryinclude "a_http" -#if !defined HTTP +#if !defined HTTP_ERROR_MALFORMED_RESPONSE + #tryinclude "a_http" +#endif +#if !defined HTTP_ERROR_MALFORMED_RESPONSE #tryinclude #endif -#if defined HTTP +#if defined HTTP_ERROR_MALFORMED_RESPONSE #define _http_included #define _inc_a_http + + // And try fix the old duplicate definition. + #define HTTP(index,%9type,%9url[],%9data[],%9callback[]); __HTTP(index, HTTP_METHOD:method, const url[], const data[], const callback[]) = HTTP; #else #error cannot read from file: "a_http" #endif From 3d89fb0a39d492ecb7bda20181f43ef223f81771 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 6 Mar 2022 15:07:45 +0000 Subject: [PATCH 080/104] Add `pawndoc="true"`. --- a_actor.inc | 12 +++++++++--- a_http.inc | 12 +++++++++--- a_npc.inc | 12 +++++++++--- a_objects.inc | 12 +++++++++--- a_players.inc | 12 +++++++++--- a_samp.inc | 12 +++++++++--- a_sampdb.inc | 12 +++++++++--- a_vehicles.inc | 12 +++++++++--- 8 files changed, 72 insertions(+), 24 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 4f7ba4a..d0211ce 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -6,9 +6,15 @@ /** * - * - * (c) Copyright 2015, SA-MP Team - * + * + * (c) Copyright 2015, SA-MP Team + * + * + * This library uses the enhanced pawndoc.xsl from + * pawn-lang/pawndoc. + * This XSL has features such as library and markdown support, and will not + * render this message when used. + * * */ diff --git a/a_http.inc b/a_http.inc index cea66c4..6eb3fde 100644 --- a/a_http.inc +++ b/a_http.inc @@ -6,9 +6,15 @@ /** * - * - * (c) Copyright 2010, SA-MP Team - * + * + * (c) Copyright 2010, SA-MP Team + * + * + * This library uses the enhanced pawndoc.xsl from + * pawn-lang/pawndoc. + * This XSL has features such as library and markdown support, and will not + * render this message when used. + * * */ diff --git a/a_npc.inc b/a_npc.inc index af1f76b..963cd8f 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -9,9 +9,15 @@ /** * - * - * (c) Copyright 2009, SA-MP Team - * + * + * (c) Copyright 2009, SA-MP Team + * + * + * This library uses the enhanced pawndoc.xsl from + * pawn-lang/pawndoc. + * This XSL has features such as library and markdown support, and will not + * render this message when used. + * * */ diff --git a/a_objects.inc b/a_objects.inc index 52a4fdb..91d2d5f 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -6,9 +6,15 @@ /** * - * - * (c) Copyright 2005-2015, SA-MP Team - * + * + * (c) Copyright 2005-2015, SA-MP Team + * + * + * This library uses the enhanced pawndoc.xsl from + * pawn-lang/pawndoc. + * This XSL has features such as library and markdown support, and will not + * render this message when used. + * * */ diff --git a/a_players.inc b/a_players.inc index 797abf4..33417f0 100644 --- a/a_players.inc +++ b/a_players.inc @@ -6,9 +6,15 @@ /** * - * - * (c) Copyright 2005-2017, SA-MP Team - * + * + * (c) Copyright 2005-2017, SA-MP Team + * + * + * This library uses the enhanced pawndoc.xsl from + * pawn-lang/pawndoc. + * This XSL has features such as library and markdown support, and will not + * render this message when used. + * * */ diff --git a/a_samp.inc b/a_samp.inc index c83077f..329b016 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -9,9 +9,15 @@ /** * - * - * (c) Copyright 2005-2017, SA-MP Team - * + * + * (c) Copyright 2005-2017, SA-MP Team + * + * + * This library uses the enhanced pawndoc.xsl from + * pawn-lang/pawndoc. + * This XSL has features such as library and markdown support, and will not + * render this message when used. + * * */ diff --git a/a_sampdb.inc b/a_sampdb.inc index 9c6976a..d8d43bf 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -6,9 +6,15 @@ /** * - * - * (c) Copyright 2015, SA-MP Team - * + * + * (c) Copyright 2015, SA-MP Team + * + * + * This library uses the enhanced pawndoc.xsl from + * pawn-lang/pawndoc. + * This XSL has features such as library and markdown support, and will not + * render this message when used. + * * */ diff --git a/a_vehicles.inc b/a_vehicles.inc index f5f45f2..81fb0ac 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -6,9 +6,15 @@ /** * - * - * (c) Copyright 2005-2012, SA-MP Team - * + * + * (c) Copyright 2005-2012, SA-MP Team + * + * + * This library uses the enhanced pawndoc.xsl from + * pawn-lang/pawndoc. + * This XSL has features such as library and markdown support, and will not + * render this message when used. + * * */ From 61501d22ee5a947f60d9b109ebfcaa0036af1456 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Mon, 7 Mar 2022 01:46:38 +0000 Subject: [PATCH 081/104] Remove `#define HTTP`. --- a_samp.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 329b016..ffe5ad0 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -546,8 +546,8 @@ static stock FORCE_SYNC:_@FORCE_SYNC() { return __FORCE_SYNC; } #define _http_included #define _inc_a_http - // And try fix the old duplicate definition. - #define HTTP(index,%9type,%9url[],%9data[],%9callback[]); __HTTP(index, HTTP_METHOD:method, const url[], const data[], const callback[]) = HTTP; + //// And try fix the old duplicate definition. + //#define HTTP(index,%9type,%9url[],%9data[],%9callback[]); __HTTP(index, HTTP_METHOD:method, const url[], const data[], const callback[]) = HTTP; #else #error cannot read from file: "a_http" #endif From 5ec4cb38854018ec7604849173a098e6d81d8955 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Mon, 7 Mar 2022 01:52:15 +0000 Subject: [PATCH 082/104] Move some comments that seemed to cause an issue. --- a_actor.inc | 4 ++-- a_http.inc | 4 ++-- a_npc.inc | 10 +++++----- a_objects.inc | 4 ++-- a_players.inc | 4 ++-- a_samp.inc | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index d0211ce..84baf57 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -18,11 +18,11 @@ * */ -/// - #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// + // -------------------------------------------------- // Defines // -------------------------------------------------- diff --git a/a_http.inc b/a_http.inc index 6eb3fde..78f4677 100644 --- a/a_http.inc +++ b/a_http.inc @@ -18,11 +18,11 @@ * */ -/// - #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// + // -------------------------------------------------- // Defines // -------------------------------------------------- diff --git a/a_npc.inc b/a_npc.inc index 963cd8f..2ac9aba 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -21,6 +21,11 @@ * */ +// Ignores warning 217 for properly indented PAWNO code +// It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8 +#pragma tabsize 4 +#define SAMP_CONST_CORRECT + /// /** @@ -81,11 +86,6 @@ public const SAMP_INCLUDES_VERSION = 0x037030; #pragma unused SAMP_INCLUDES_VERSION -// Ignores warning 217 for properly indented PAWNO code -// It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8 -#pragma tabsize 4 -#define SAMP_CONST_CORRECT - // Optionally stricter tags. #if defined NO_TAGS #define __TAG(%0) _ diff --git a/a_objects.inc b/a_objects.inc index 91d2d5f..7a5b87c 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -18,11 +18,11 @@ * */ -/// - #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// + // -------------------------------------------------- // Defines // -------------------------------------------------- diff --git a/a_players.inc b/a_players.inc index 33417f0..e91d36e 100644 --- a/a_players.inc +++ b/a_players.inc @@ -18,11 +18,11 @@ * */ -/// - #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// + // -------------------------------------------------- // Defines // -------------------------------------------------- diff --git a/a_samp.inc b/a_samp.inc index ffe5ad0..60786fb 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -21,13 +21,13 @@ * */ -/// - // Ignores warning 217 for properly indented PAWNO code // It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8 #pragma tabsize 4 #define SAMP_CONST_CORRECT +/// + /** * * Version examples: From eff8bfd73f1bb532d7c8dc6b7d81ab5034a4579b Mon Sep 17 00:00:00 2001 From: Y_Less Date: Mon, 7 Mar 2022 11:10:36 +0000 Subject: [PATCH 083/104] Remove empty pawndoc blocks. --- a_actor.inc | 2 +- a_http.inc | 2 +- a_npc.inc | 10 +++++----- a_objects.inc | 8 ++++---- a_players.inc | 26 +++++++++++++------------- a_samp.inc | 24 ++++++++++++------------ a_sampdb.inc | 2 +- a_vehicles.inc | 2 +- 8 files changed, 38 insertions(+), 38 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 84baf57..65e127f 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -21,7 +21,7 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// +///

    // -------------------------------------------------- // Defines diff --git a/a_http.inc b/a_http.inc index 78f4677..1e833d9 100644 --- a/a_http.inc +++ b/a_http.inc @@ -21,7 +21,7 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// +///

    // -------------------------------------------------- // Defines diff --git a/a_npc.inc b/a_npc.inc index 2ac9aba..ac7fcb6 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -26,7 +26,7 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// +///

    /** * @@ -343,7 +343,7 @@ const PlayerText3D:INVALID_PLAYER_3DTEXT_ID = PlayerText3D:0xFFFF; #endif // Enums -/// +///

    /** * a_npc @@ -386,7 +386,7 @@ const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; #define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS -/// +///

    /** * a_npc @@ -448,7 +448,7 @@ enum WEAPON:__WEAPON } static stock WEAPON:_@WEAPON() { return __WEAPON; } -/// +///

    /** * a_npc @@ -484,7 +484,7 @@ enum KEY:__KEY (<<= 1) } static stock KEY:_@KEY() { return __KEY; } -/// +///

    /** * a_npc diff --git a/a_objects.inc b/a_objects.inc index 7a5b87c..2976ea8 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -21,7 +21,7 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// +///

    // -------------------------------------------------- // Defines @@ -52,7 +52,7 @@ const INVALID_OBJECT_ID = 0xFFFF; #endif // Enums -/// +///

    /** * a_objects @@ -65,7 +65,7 @@ enum SELECT_OBJECT:__SELECT_OBJECT } static stock SELECT_OBJECT:_@SELECT_OBJECT() { return __SELECT_OBJECT; } -/// +///

    /** * a_objects @@ -90,7 +90,7 @@ enum OBJECT_MATERIAL_SIZE:__OBJECT_MATERIAL_SIZE (+= 10) } static stock OBJECT_MATERIAL_SIZE:_@OBJECT_MATERIAL_SIZE() { return __OBJECT_MATERIAL_SIZE; } -/// +///

    /** * a_objects diff --git a/a_players.inc b/a_players.inc index e91d36e..5919388 100644 --- a/a_players.inc +++ b/a_players.inc @@ -21,7 +21,7 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// +///

    // -------------------------------------------------- // Defines @@ -145,7 +145,7 @@ const INVALID_PLAYER_ID = 0xFFFF; #endif // Enums -/// +///

    /** * a_players @@ -188,7 +188,7 @@ const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_DRV = PLAYER_STATE:5; const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; #define PLAYER_STATE_ENTER_VEHICLE_PASSENGER PLAYER_STATE_ENTER_VEHICLE_PASS -/// +///

    /** * a_players @@ -203,7 +203,7 @@ enum PLAYER_MARKERS_MODE:__PLAYER_MARKERS_MODE } static stock PLAYER_MARKERS_MODE:_@PLAYER_MARKERS_MODE() { return __PLAYER_MARKERS_MODE; } -/// +///

    /** * a_players @@ -234,7 +234,7 @@ enum SPECIAL_ACTION:__SPECIAL_ACTION } static stock SPECIAL_ACTION:_@SPECIAL_ACTION() { return __SPECIAL_ACTION; } -/// +///

    /** * a_players @@ -251,7 +251,7 @@ enum FIGHT_STYLE:__FIGHT_STYLE } static stock FIGHT_STYLE:_@FIGHT_STYLE() { return __FIGHT_STYLE; } -/// +///

    /** * a_players @@ -273,7 +273,7 @@ enum WEAPONSKILL:__WEAPONSKILL } static stock WEAPONSKILL:_@WEAPONSKILL() { return __WEAPONSKILL; } -/// +///

    /** * a_players @@ -289,7 +289,7 @@ enum WEAPONSTATE:__WEAPONSTATE } static stock WEAPONSTATE:_@WEAPONSTATE() { return __WEAPONSTATE; } -/// +///

    /** * a_players @@ -305,7 +305,7 @@ enum PLAYER_VARTYPE:__PLAYER_VARTYPE } static stock PLAYER_VARTYPE:_@PLAYER_VARTYPE() { return __PLAYER_VARTYPE; } -/// +///

    /** * a_players @@ -320,7 +320,7 @@ enum MAPICON:__MAPICON } static stock MAPICON:_@MAPICON() { return __MAPICON; } -/// +///

    /** * a_players @@ -333,7 +333,7 @@ enum CAM_MOVE:__CAMERA } static stock CAMERA_MOVE:_@CAMERA_MOVE() { return __CAMERA_MOVE; } -/// +///

    /** * a_players @@ -359,7 +359,7 @@ enum CAM_MODE:__CAM_MODE } static stock CAM_MODE:_@CAM_MODE() { return __CAM_MODE; } -/// +///

    /** * a_players @@ -374,7 +374,7 @@ enum SPECTATE_MODE:__SPECTATE_MODE } static stock SPECTATE_MODE:_@SPECTATE_MODE() { return __SPECTATE_MODE; } -/// +///

    /** * a_players diff --git a/a_samp.inc b/a_samp.inc index 60786fb..676db46 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -26,7 +26,7 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -/// +///

    /** * @@ -216,7 +216,7 @@ const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; #endif // Enums -/// +///

    /** * a_samp @@ -278,7 +278,7 @@ enum WEAPON:__WEAPON } static stock WEAPON:_@WEAPON() { return __WEAPON; } -/// +///

    /** * a_samp @@ -314,7 +314,7 @@ enum KEY:__KEY (<<= 1) } static stock KEY:_@KEY() { return __KEY; } -/// +///

    /** * a_samp @@ -332,7 +332,7 @@ enum DIALOG_STYLE:__DIALOG_STYLE } static stock DIALOG_STYLE:_@DIALOG_STYLE() { return __DIALOG_STYLE; } -/// +///

    /** * a_samp @@ -350,7 +350,7 @@ enum TEXT_DRAW_FONT:__TEXT_DRAW_FONT } static stock TEXT_DRAW_FONT:_@TEXT_DRAW_FONT() { return __TEXT_DRAW_FONT; } -/// +///

    /** * a_samp @@ -366,7 +366,7 @@ enum TEXT_DRAW_ALIGN:__TEXT_DRAW_ALIGN } static stock TEXT_DRAW_ALIGN:_@TEXT_DRAW_ALIGN() { return __TEXT_DRAW_ALIGN; } -/// +///

    /** * a_samp @@ -382,7 +382,7 @@ enum SERVER_VARTYPE:__SERVER_VARTYPE } static stock SERVER_VARTYPE:_@SERVER_VARTYPE() { return __SERVER_VARTYPE; } -/// +///

    /** * a_samp @@ -397,7 +397,7 @@ enum DOWNLOAD_REQUEST:__DOWNLOAD_REQUEST } static stock DOWNLOAD_REQUEST:_@DOWNLOAD_REQUEST() { return __DOWNLOAD_REQUEST; } -/// +///

    /** * a_samp @@ -409,7 +409,7 @@ enum CLICK_SOURCE:__CLICK_SOURCE } static stock CLICK_SOURCE:_@CLICK_SOURCE() { return __CLICK_SOURCE; } -/// +///

    /** * a_samp @@ -423,7 +423,7 @@ enum EDIT_RESPONSE:__EDIT_RESPONSE } static stock EDIT_RESPONSE:_@EDIT_RESPONSE() { return __EDIT_RESPONSE; } -/// +///

    /** * a_samp @@ -439,7 +439,7 @@ enum BULLET_HIT_TYPE:__BULLET_HIT_TYPE } static stock BULLET_HIT_TYPE:_@BULLET_HIT_TYPE() { return __BULLET_HIT_TYPE; } -/// +///

    /** * a_samp diff --git a/a_sampdb.inc b/a_sampdb.inc index d8d43bf..39515b7 100644 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -18,7 +18,7 @@ * */ -/// +///

    #pragma tabsize 4 #define SAMP_CONST_CORRECT diff --git a/a_vehicles.inc b/a_vehicles.inc index 81fb0ac..303704d 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -18,7 +18,7 @@ * */ -/// +///

    #pragma tabsize 4 #define SAMP_CONST_CORRECT From bfb8b6f59e58931a8eaf109e1b7f5c9d78701db2 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Mon, 14 Mar 2022 23:06:26 +0000 Subject: [PATCH 084/104] `RACECP_TYPE:` --- a_players.inc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/a_players.inc b/a_players.inc index 5919388..346cc19 100644 --- a/a_players.inc +++ b/a_players.inc @@ -361,6 +361,26 @@ static stock CAM_MODE:_@CAM_MODE() { return __CAM_MODE; } ///

    +/** + * a_players + */ +#define RACECP_TYPE: __TAG(RACECP_TYPE): +enum RACECP_TYPE:__RACECP_TYPE +{ + RACECP_TYPE_GROUND_NORMAL = 0, + RACECP_TYPE_GROUND_FINISH = 1, + RACECP_TYPE_GROUND_EMPTY = 2, + RACECP_TYPE_AIR_NORMAL = 3, + RACECP_TYPE_AIR_FINISH = 4, + RACECP_TYPE_AIR_ROTATING = 5, + RACECP_TYPE_AIR_STROBING = 6, + RACECP_TYPE_AIR_SWINGING = 7, + RACECP_TYPE_AIR_BOBBING = 8 +} +static stock RACECP_TYPE:_@RACECP_TYPE() { return __RACECP_TYPE; } + +///

    + /** * a_players *

    Spectating @@ -2856,7 +2876,7 @@ native DisablePlayerCheckpoint(playerid); * 0: The function failed to execute. This means the player specified does not exist. * */ -native SetPlayerRaceCheckpoint(playerid, type, Float:centerX, Float:centerY, Float:centerZ, Float:nextX, Float:nextY, Float:nextZ, Float:size); +native SetPlayerRaceCheckpoint(playerid, RACECP_TYPE:type, Float:centerX, Float:centerY, Float:centerZ, Float:nextX, Float:nextY, Float:nextZ, Float:size); /** * a_players From 045fd54bb9bad2d2ba4df117702ac5913395d15f Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 15 Mar 2022 17:19:32 +0000 Subject: [PATCH 085/104] Rename (simplify) the checkpoint tag. --- a_players.inc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/a_players.inc b/a_players.inc index 346cc19..07ef4ca 100644 --- a/a_players.inc +++ b/a_players.inc @@ -364,20 +364,20 @@ static stock CAM_MODE:_@CAM_MODE() { return __CAM_MODE; } /** * a_players */ -#define RACECP_TYPE: __TAG(RACECP_TYPE): -enum RACECP_TYPE:__RACECP_TYPE +#define CP_TYPE: __TAG(CP_TYPE): +enum CP_TYPE:__CP_TYPE { - RACECP_TYPE_GROUND_NORMAL = 0, - RACECP_TYPE_GROUND_FINISH = 1, - RACECP_TYPE_GROUND_EMPTY = 2, - RACECP_TYPE_AIR_NORMAL = 3, - RACECP_TYPE_AIR_FINISH = 4, - RACECP_TYPE_AIR_ROTATING = 5, - RACECP_TYPE_AIR_STROBING = 6, - RACECP_TYPE_AIR_SWINGING = 7, - RACECP_TYPE_AIR_BOBBING = 8 + CP_TYPE_GROUND_NORMAL = 0, + CP_TYPE_GROUND_FINISH = 1, + CP_TYPE_GROUND_EMPTY = 2, + CP_TYPE_AIR_NORMAL = 3, + CP_TYPE_AIR_FINISH = 4, + CP_TYPE_AIR_ROTATING = 5, + CP_TYPE_AIR_STROBING = 6, + CP_TYPE_AIR_SWINGING = 7, + CP_TYPE_AIR_BOBBING = 8 } -static stock RACECP_TYPE:_@RACECP_TYPE() { return __RACECP_TYPE; } +static stock CP_TYPE:_@CP_TYPE() { return __CP_TYPE; } ///

    @@ -2876,7 +2876,7 @@ native DisablePlayerCheckpoint(playerid); * 0: The function failed to execute. This means the player specified does not exist. * */ -native SetPlayerRaceCheckpoint(playerid, RACECP_TYPE:type, Float:centerX, Float:centerY, Float:centerZ, Float:nextX, Float:nextY, Float:nextZ, Float:size); +native SetPlayerRaceCheckpoint(playerid, CP_TYPE:type, Float:centerX, Float:centerY, Float:centerZ, Float:nextX, Float:nextY, Float:nextZ, Float:size); /** * a_players From aafb808aae9fac123901f8c71dafe3b9ac94d2a3 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Wed, 16 Mar 2022 16:40:18 +0000 Subject: [PATCH 086/104] Some more `bool:` return tags. --- a_samp.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 676db46..e5018cc 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -2320,7 +2320,7 @@ native Menu:CreateMenu(const title[], columns, Float:x, Float:y, Float:col1width * * 1 if the destroying was successful, otherwise 0. */ -native DestroyMenu(Menu:menuid); +native bool:DestroyMenu(Menu:menuid); /** * a_samp @@ -2362,7 +2362,7 @@ native AddMenuItem(Menu:menuid, column, const text[]); * The 13th object of a menu would replace the header of the column which is correctly set with this * function. */ -native SetMenuColumnHeader(Menu:menuid, column, const heading[]); +native bool:SetMenuColumnHeader(Menu:menuid, column, const heading[]); /** * a_samp @@ -2381,7 +2381,7 @@ native SetMenuColumnHeader(Menu:menuid, column, const heading[]); * 0: The function failed to execute. Menu and/or player doesn't exist. * */ -native ShowMenuForPlayer(Menu:menuid, playerid); +native bool:ShowMenuForPlayer(Menu:menuid, playerid); /** * a_samp @@ -2398,7 +2398,7 @@ native ShowMenuForPlayer(Menu:menuid, playerid); * 0: The function failed to execute. * */ -native HideMenuForPlayer(Menu:menuid, playerid); +native bool:HideMenuForPlayer(Menu:menuid, playerid); /** * a_samp @@ -2419,7 +2419,7 @@ native bool:IsValidMenu(Menu:menuid); * * Crashes when passed an invalid menu ID. */ -native DisableMenu(Menu:menuid); +native bool:DisableMenu(Menu:menuid); /** * a_samp @@ -2440,7 +2440,7 @@ native DisableMenu(Menu:menuid); * This function always returns 1, even if the function fails. If an invalid * row is specified, nothing will happen. If an invalid menu ID is specified, the server will crash. */ -native DisableMenuRow(Menu:menuid, row); +native bool:DisableMenuRow(Menu:menuid, row); /** * a_samp From 2b6b0932a2ce89f1e6a26e2ac63bc77d7d3aeee1 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Wed, 16 Mar 2022 16:45:39 +0000 Subject: [PATCH 087/104] Actor `bool:` returns. --- a_actor.inc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/a_actor.inc b/a_actor.inc index 65e127f..252b695 100644 --- a/a_actor.inc +++ b/a_actor.inc @@ -108,7 +108,7 @@ native CreateActor(modelid, Float:x, Float:y, Float:z, Float:angle); * 0: The function failed to execute. The actor with the ID specified does not exist. * */ -native DestroyActor(actorid); +native bool:DestroyActor(actorid); /** * a_actor @@ -137,7 +137,7 @@ native bool:IsActorStreamedIn(actorid, playerid); * 0: The function failed to execute. The actor specified does not exist. * */ -native SetActorVirtualWorld(actorid, virtualWorld); +native bool:SetActorVirtualWorld(actorid, virtualWorld); /** * a_actor @@ -176,7 +176,7 @@ native GetActorVirtualWorld(actorid); * 0: The function failed to execute. The actor specified does not exist. * */ -native ApplyActorAnimation(actorid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); +native bool:ApplyActorAnimation(actorid, const animationLibrary[], const animationName[], Float:delta, bool:loop, bool:lockX, bool:lockY, bool:freeze, time); /** * a_actor @@ -190,7 +190,7 @@ native ApplyActorAnimation(actorid, const animationLibrary[], const animationNam * 0: The function failed to execute. The actor specified does not exist. * */ -native ClearActorAnimations(actorid); +native bool:ClearActorAnimations(actorid); /** * a_actor @@ -209,7 +209,7 @@ native ClearActorAnimations(actorid); * 0: The function failed to execute. The actor specified does not exist. * */ -native SetActorPos(actorid, Float:x, Float:y, Float:z); +native bool:SetActorPos(actorid, Float:x, Float:y, Float:z); /** * a_actor @@ -228,7 +228,7 @@ native SetActorPos(actorid, Float:x, Float:y, Float:z); * 0: The function failed to execute. The actor specified does not exist.
    * */ -native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); +native bool:GetActorPos(actorid, &Float:x, &Float:y, &Float:z); /** * a_actor @@ -246,7 +246,7 @@ native GetActorPos(actorid, &Float:x, &Float:y, &Float:z); * 0: The function failed to execute. The actor specified does not exist. * */ -native SetActorFacingAngle(actorid, Float:angle); +native bool:SetActorFacingAngle(actorid, Float:angle); /** * a_actor @@ -262,7 +262,7 @@ native SetActorFacingAngle(actorid, Float:angle); * 0: The function failed to execute. The actor specified does not exist. * */ -native GetActorFacingAngle(actorid, &Float:angle); +native bool:GetActorFacingAngle(actorid, &Float:angle); /** * a_actor @@ -275,7 +275,7 @@ native GetActorFacingAngle(actorid, &Float:angle); * 0 on failure (i.e. actor is not created). * */ -native SetActorHealth(actorid, Float:health); +native bool:SetActorHealth(actorid, Float:health); /** * a_actor @@ -288,7 +288,7 @@ native SetActorHealth(actorid, Float:health); * 0 - failure (i.e. actor is not created).
    * */ -native GetActorHealth(actorid, &Float:health); +native bool:GetActorHealth(actorid, &Float:health); /** * a_actor @@ -304,7 +304,7 @@ native GetActorHealth(actorid, &Float:health); * 0 - Failure (i.e. Actor is not created). * */ -native SetActorInvulnerable(actorid, bool:invulnerable = true); +native bool:SetActorInvulnerable(actorid, bool:invulnerable = true); /** * a_actor From 819876e4351e45beb3aae6532659c0f16d5b2d61 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Thu, 17 Mar 2022 09:13:53 +0000 Subject: [PATCH 088/104] a_vehicle tags. --- a_vehicles.inc | 65 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/a_vehicles.inc b/a_vehicles.inc index 303704d..41a94de 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -60,6 +60,7 @@ const INVALID_VEHICLE_ID = 0xFFFF; #define CARMODTYPE: __TAG(CARMODTYPE): enum CARMODTYPE:__CARMODTYPE { + CARMODTYPE_NONE = -1, CARMODTYPE_SPOILER, CARMODTYPE_HOOD, CARMODTYPE_ROOF, @@ -159,7 +160,7 @@ native CreateVehicle(modelid, Float:x, Float:y, Float:z, Float:rotation, colour1 * 0: The function failed to execute. The vehicle does not exist. * */ -native DestroyVehicle(vehicleid); +native bool:DestroyVehicle(vehicleid); /** * a_vehicles @@ -196,7 +197,7 @@ native bool:IsVehicleStreamedIn(vehicleid, playerid); * 0: The function failed to execute. The vehicle specified does not exist. * */ -native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); +native bool:GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); /** * a_vehicles @@ -214,7 +215,7 @@ native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z); * 0: The function failed to execute. The vehicle specified does not exist. * */ -native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); +native bool:SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); /** * a_vehicles @@ -231,7 +232,7 @@ native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z); * 0: The function failed to execute. This means the vehicle does not exist. * */ -native GetVehicleZAngle(vehicleid, &Float:angle); +native bool:GetVehicleZAngle(vehicleid, &Float:angle); /** * a_vehicles @@ -267,7 +268,7 @@ native GetVehicleZAngle(vehicleid, &Float:angle); * 0: The function failed to execute. This means the vehicle specified does not exist. * */ -native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z); +native bool:GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z); /** * a_vehicles @@ -299,7 +300,7 @@ native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z); * 0: The function failed to execute. The vehicle specified does not exist. * */ -native SetVehicleZAngle(vehicleid, Float:angle); +native bool:SetVehicleZAngle(vehicleid, Float:angle); /** * a_vehicles @@ -321,7 +322,7 @@ native SetVehicleZAngle(vehicleid, Float:angle); * 0: The function failed to execute. The player and/or vehicle specified do not exist. * */ -native SetVehicleParamsForPlayer(vehicleid, playerid, objective, doors); +native bool:SetVehicleParamsForPlayer(vehicleid, playerid, objective, doors); /** * a_vehicles @@ -365,7 +366,7 @@ native ManualVehicleEngineAndLights(); * 0: The function failed to execute. This means the vehicle does not exist. * */ -native SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS:engine, VEHICLE_PARAMS:lights, VEHICLE_PARAMS:alarm, VEHICLE_PARAMS:doors, VEHICLE_PARAMS:bonnet, VEHICLE_PARAMS:boot, VEHICLE_PARAMS:objective); +native bool:SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS:engine, VEHICLE_PARAMS:lights, VEHICLE_PARAMS:alarm, VEHICLE_PARAMS:doors, VEHICLE_PARAMS:bonnet, VEHICLE_PARAMS:boot, VEHICLE_PARAMS:objective); /** * a_vehicles @@ -383,7 +384,7 @@ native SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS:engine, VEHICLE_PARAMS:light * If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 * ('unset'). */ -native GetVehicleParamsEx(vehicleid, &VEHICLE_PARAMS:engine, &VEHICLE_PARAMS:lights, &VEHICLE_PARAMS:alarm, &VEHICLE_PARAMS:doors, &VEHICLE_PARAMS:bonnet, &VEHICLE_PARAMS:boot, &VEHICLE_PARAMS:objective); +native bool:GetVehicleParamsEx(vehicleid, &VEHICLE_PARAMS:engine, &VEHICLE_PARAMS:lights, &VEHICLE_PARAMS:alarm, &VEHICLE_PARAMS:doors, &VEHICLE_PARAMS:bonnet, &VEHICLE_PARAMS:boot, &VEHICLE_PARAMS:objective); /** * a_vehicles @@ -393,7 +394,7 @@ native GetVehicleParamsEx(vehicleid, &VEHICLE_PARAMS:engine, &VEHICLE_PARAMS:lig * This function was added in SA-MP 0.3c R3 and will not work in earlier versions! * -1 if unset (off), 0 if off, 1 if on */ -native GetVehicleParamsSirenState(vehicleid); +native VEHICLE_PARAMS:GetVehicleParamsSirenState(vehicleid); /** * a_vehicles @@ -413,7 +414,7 @@ native GetVehicleParamsSirenState(vehicleid); * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * 1 is open, 0 is closed */ -native SetVehicleParamsCarDoors(vehicleid, frontLeft, frontRight, rearLeft, rearRight); +native bool:SetVehicleParamsCarDoors(vehicleid, frontLeft, frontRight, rearLeft, rearRight); /** * a_vehicles @@ -430,7 +431,7 @@ native SetVehicleParamsCarDoors(vehicleid, frontLeft, frontRight, rearLeft, rear * The values returned in each variable are as follows: -1 if not set, 0 * if closed, 1 if open. */ -native GetVehicleParamsCarDoors(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); +native bool:GetVehicleParamsCarDoors(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); /** * a_vehicles @@ -449,7 +450,7 @@ native GetVehicleParamsCarDoors(vehicleid, &frontLeft, &frontRight, &rearLeft, & * * This function was added in SA-MP 0.3.7 and will not work in earlier versions! */ -native SetVehicleParamsCarWindows(vehicleid, frontLeft, frontRight, rearLeft, rearRight); +native bool:SetVehicleParamsCarWindows(vehicleid, frontLeft, frontRight, rearLeft, rearRight); /** * a_vehicles @@ -467,7 +468,7 @@ native SetVehicleParamsCarWindows(vehicleid, frontLeft, frontRight, rearLeft, re * if closed, 1 if open. * The vehicle's windows state is stored in the specified variables. */ -native GetVehicleParamsCarWindows(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); +native bool:GetVehicleParamsCarWindows(vehicleid, &frontLeft, &frontRight, &rearLeft, &rearRight); /** * a_vehicles @@ -480,7 +481,7 @@ native GetVehicleParamsCarWindows(vehicleid, &frontLeft, &frontRight, &rearLeft, * 0: The function failed to execute. The vehicle does not exist. * */ -native SetVehicleToRespawn(vehicleid); +native bool:SetVehicleToRespawn(vehicleid); /** * a_vehicles @@ -496,7 +497,7 @@ native SetVehicleToRespawn(vehicleid); * 0: The function failed to execute. This means the vehicle does not exist.
    * */ -native LinkVehicleToInterior(vehicleid, interiorid); +native bool:LinkVehicleToInterior(vehicleid, interiorid); /** * a_vehicles @@ -520,7 +521,7 @@ native LinkVehicleToInterior(vehicleid, interiorid); * * */ -native AddVehicleComponent(vehicleid, componentid); +native bool:AddVehicleComponent(vehicleid, componentid); /** * a_vehicles @@ -534,7 +535,7 @@ native AddVehicleComponent(vehicleid, componentid); * * */ -native RemoveVehicleComponent(vehicleid, componentid); +native bool:RemoveVehicleComponent(vehicleid, componentid); /** * a_vehicles @@ -554,7 +555,7 @@ native RemoveVehicleComponent(vehicleid, componentid); * 0: The function failed to execute. The vehicle does not exist. * */ -native ChangeVehicleColor(vehicleid, colour1, colour2); +native bool:ChangeVehicleColor(vehicleid, colour1, colour2); /** * a_vehicles @@ -571,7 +572,7 @@ native ChangeVehicleColor(vehicleid, colour1, colour2); * This function always returns 1 (success), even if the vehicle passed is not * created. */ -native ChangeVehiclePaintjob(vehicleid, paintjobid); +native bool:ChangeVehiclePaintjob(vehicleid, paintjobid); /** * a_vehicles @@ -600,7 +601,7 @@ native ChangeVehiclePaintjob(vehicleid, paintjobid); * 0: The function failed to execute. This means the vehicle does not exist. * */ -native SetVehicleHealth(vehicleid, Float:health); +native bool:SetVehicleHealth(vehicleid, Float:health); /** * a_vehicles @@ -627,7 +628,7 @@ native SetVehicleHealth(vehicleid, Float:health); * 0 - failure (invalid vehicle ID).
    * */ -native GetVehicleHealth(vehicleid, &Float:health); +native bool:GetVehicleHealth(vehicleid, &Float:health); /** * a_vehicles @@ -642,7 +643,7 @@ native GetVehicleHealth(vehicleid, &Float:health); * This function always returns 1, even if neither of the vehicle IDs passed * are valid. */ -native AttachTrailerToVehicle(trailerid, vehicleid); +native bool:AttachTrailerToVehicle(trailerid, vehicleid); /** * a_vehicles @@ -652,7 +653,7 @@ native AttachTrailerToVehicle(trailerid, vehicleid); * * */ -native DetachTrailerFromVehicle(vehicleid); +native bool:DetachTrailerFromVehicle(vehicleid); /** * a_vehicles @@ -706,7 +707,7 @@ native GetVehicleTrailer(vehicleid); * 0: The function failed to execute. The vehicle does not exist.
    * */ -native SetVehicleNumberPlate(vehicleid, const numberPlate[]); +native bool:SetVehicleNumberPlate(vehicleid, const numberPlate[]); /** * a_vehicles @@ -799,7 +800,7 @@ native CARMODTYPE:GetVehicleComponentType(component); // Find CARMODTYPE_* for c * 0: The function failed to execute. This means the vehicle specified does not exist. * */ -native RepairVehicle(vehicleid); // Repairs the damage model and resets the health +native bool:RepairVehicle(vehicleid); // Repairs the damage model and resets the health /** * a_vehicles @@ -820,7 +821,7 @@ native RepairVehicle(vehicleid); // Repairs the damage model and resets the heal * /> * */ -native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); +native bool:GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); /** * a_vehicles @@ -836,7 +837,7 @@ native GetVehicleVelocity(vehicleid, &Float:x, &Float:y, &Float:z); * 0: The function failed to execute. The vehicle does not exist. * */ -native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); +native bool:SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); /** * a_vehicles @@ -854,7 +855,7 @@ native SetVehicleVelocity(vehicleid, Float:x, Float:y, Float:z); * 0: The function failed to execute. The vehicle does not exist. * */ -native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); +native bool:SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); /** * a_vehicles @@ -907,7 +908,7 @@ native SetVehicleAngularVelocity(vehicleid, Float:x, Float:y, Float:z); * 0: The function failed to execute. This means the vehicle specified does not exist. * */ -native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); +native bool:GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); /** * a_vehicles @@ -957,7 +958,7 @@ native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires); * * */ -native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); +native bool:UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); /** * a_vehicles @@ -999,7 +1000,7 @@ native GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO:infotype, &Float:x, * * */ -native SetVehicleVirtualWorld(vehicleid, virtualWorld); +native bool:SetVehicleVirtualWorld(vehicleid, virtualWorld); /** * a_vehicles From 570867e65e5fb22f869ecd934a6dafb88c91941a Mon Sep 17 00:00:00 2001 From: Y_Less Date: Thu, 17 Mar 2022 14:40:50 +0000 Subject: [PATCH 089/104] Another tag. --- a_vehicles.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a_vehicles.inc b/a_vehicles.inc index 41a94de..66c01f3 100644 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -987,7 +987,7 @@ native bool:UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires); * * */ -native GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO:infotype, &Float:x, &Float:y, &Float:z); +native bool:GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO:infotype, &Float:x, &Float:y, &Float:z); // Virtual Worlds From 92f733a4a807c02208a083f76d96d69f58444411 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Fri, 18 Mar 2022 19:56:14 +0000 Subject: [PATCH 090/104] Make `GetServerVar...` functions aliases for `GetConsoleVar...`. --- a_samp.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index e5018cc..52c50c4 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -1981,7 +1981,7 @@ native UnBlockIpAddress(const ipAddress[]); * a string or doesn't exist. */ #pragma deprecated Use `GetConsoleVarAsString`. -native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); +native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)) = GetConsoleVarAsString; /** * a_samp @@ -1996,7 +1996,7 @@ native GetServerVarAsString(const cvar[], buffer[], len = sizeof (buffer)); * integer or doesn't exist. */ #pragma deprecated Use `GetConsoleVarAsInt`. -native GetServerVarAsInt(const cvar[]); +native GetServerVarAsInt(const cvar[]) = GetConsoleVarAsInt; /** * a_samp @@ -2011,7 +2011,7 @@ native GetServerVarAsInt(const cvar[]); * is not a boolean or doesn't exist. */ #pragma deprecated Use `GetConsoleVarAsBool`. -native bool:GetServerVarAsBool(const cvar[]); +native bool:GetServerVarAsBool(const cvar[]) = GetConsoleVarAsBool; // These are the same 3 functions as above although they avoid the name ambiguity/conflict with the SVar system. /** From 2f9dbd3f0ca40213fb8dde2a78ad20ac97b326e4 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 3 Apr 2022 01:03:25 +0100 Subject: [PATCH 091/104] `__OPEN_MP_VERSION` --- a_npc.inc | 20 ++++++++++++++++++-- a_samp.inc | 20 ++++++++++++++++++-- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index ac7fcb6..55da4d2 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -83,8 +83,24 @@ * */ -public const SAMP_INCLUDES_VERSION = 0x037030; -#pragma unused SAMP_INCLUDES_VERSION +public const __SAMP_INCLUDES_VERSION = 0x037030; +#pragma unused __SAMP_INCLUDES_VERSION + +/** + * + * If running on SA:MP this will remain 0, open.mp will set it. + * open.mp versions look like: + * + * 01.04.02.0544 + * + * Thus they are encoded here as: + * + * (major << 28) | (minor << 21) | (patch << 14) | (prerel) + * + * + */ +public const __OPEN_MP_VERSION = 0; +#pragma unused __OPEN_MP_VERSION // Optionally stricter tags. #if defined NO_TAGS diff --git a/a_samp.inc b/a_samp.inc index 52c50c4..1966577 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -83,8 +83,24 @@ * */ -public const SAMP_INCLUDES_VERSION = 0x037030; -#pragma unused SAMP_INCLUDES_VERSION +public const __SAMP_INCLUDES_VERSION = 0x037030; +#pragma unused __SAMP_INCLUDES_VERSION + +/** + * + * If running on SA:MP this will remain 0, open.mp will set it. + * open.mp versions look like: + * + * 01.04.02.0544 + * + * Thus they are encoded here as: + * + * (major << 28) | (minor << 21) | (patch << 14) | (prerel) + * + * + */ +public const __OPEN_MP_VERSION = 0; +#pragma unused __OPEN_MP_VERSION // Optionally stricter tags. #if defined NO_TAGS From 98d71607e025bcfe390216658b61b2c815baf8e2 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Fri, 8 Apr 2022 16:24:19 +0100 Subject: [PATCH 092/104] More `bool:` return tags. --- a_samp.inc | 60 +++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 1966577..5e8bb14 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -691,7 +691,7 @@ native format(output[], len = sizeof (output), const format[], {Float, _}:...); * 0: The function failed to execute. The player is not connected. * */ -native SendClientMessage(playerid, colour, const message[]); +native bool:SendClientMessage(playerid, colour, const message[]); /** * a_samp @@ -705,7 +705,7 @@ native SendClientMessage(playerid, colour, const message[]); * It will result in crashes otherwise. * This function always returns 1. */ -native SendClientMessageToAll(colour, const message[]); +native void:SendClientMessageToAll(colour, const message[]); /** * a_samp @@ -722,7 +722,7 @@ native SendClientMessageToAll(colour, const message[]); * Avoid using format specifiers in your messages without formatting the string that is sent. * It will result in crashes otherwise. */ -native SendPlayerMessageToPlayer(playerid, senderid, const message[]); +native bool:SendPlayerMessageToPlayer(playerid, senderid, const message[]); /** * a_samp @@ -736,7 +736,7 @@ native SendPlayerMessageToPlayer(playerid, senderid, const message[]); * Avoid using format specifiers in your messages without formatting the string that is sent. * It will result in crashes otherwise. */ -native SendPlayerMessageToAll(senderid, const message[]); +native bool:SendPlayerMessageToAll(senderid, const message[]); /** * a_samp @@ -757,7 +757,7 @@ native SendPlayerMessageToAll(senderid, const message[]); * is invalid, a generic skull-and-crossbones icon is shown. being invalid (INVALID_PLAYER_ID) is valid. */ -native SendDeathMessage(killer, killee, weapon); +native bool:SendDeathMessage(killer, killee, weapon); /** * a_samp @@ -775,7 +775,7 @@ native SendDeathMessage(killer, killee, weapon); * 0: The function failed to execute. * */ -native SendDeathMessageToPlayer(playerid, killer, killee, weapon); +native bool:SendDeathMessageToPlayer(playerid, killer, killee, weapon); /** * a_samp @@ -787,7 +787,7 @@ native SendDeathMessageToPlayer(playerid, killer, killee, weapon); * * This function always returns 1. */ -native GameTextForAll(const string[], time, style); +native void:GameTextForAll(const string[], time, style); /** * a_samp @@ -806,7 +806,7 @@ native GameTextForAll(const string[], time, style); * is not connected. * */ -native GameTextForPlayer(playerid, const string[], time, style); +native bool:GameTextForPlayer(playerid, const string[], time, style); /** * a_samp @@ -876,7 +876,7 @@ native SetTimerEx(const functionName[], interval, bool:repeating, const format[] * * This function always returns 0. */ -native KillTimer(timerid); +native void:KillTimer(timerid); /** * a_samp @@ -1013,6 +1013,7 @@ native Float:atan2(Float:y, Float:x); * The highest playerid currently in use on the server or 0 if there are no connected * players. */ +#pragma deprecated This function is fundamentally broken. native GetPlayerPoolSize(); /** @@ -1023,6 +1024,7 @@ native GetPlayerPoolSize(); * The highest vehicleid currently in use on the server or 0 if there are no * created vehicles. */ +#pragma deprecated This function is fundamentally broken. native GetVehiclePoolSize(); /** @@ -1034,6 +1036,7 @@ native GetVehiclePoolSize(); * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * The highest actorid created on the server or 0 if there are no created actors. */ +#pragma deprecated This function is fundamentally broken. native GetActorPoolSize(); // Hash @@ -1074,7 +1077,7 @@ native SHA256_PassHash(const password[], const salt[], output[], size = sizeof ( * 0: The function failed to execute. The variable name is null or over 40 characters. * */ -native SetSVarInt(const svar[], value); +native bool:SetSVarInt(const svar[], value); /** * a_samp @@ -1109,7 +1112,7 @@ native GetSVarInt(const svar[]); * 0: The function failed to execute. The variable name is null or over 40 characters. * */ -native SetSVarString(const svar[], const value[]); +native bool:SetSVarString(const svar[], const value[]); /** * a_samp @@ -1145,7 +1148,7 @@ native GetSVarString(const svar[], output[], len = sizeof (output)); * 0: The function failed to execute. The variable name is null or over 40 characters. * */ -native SetSVarFloat(const svar[], Float:value); +native bool:SetSVarFloat(const svar[], Float:value); /** * a_samp @@ -1180,7 +1183,7 @@ native Float:GetSVarFloat(const svar[]); * 0: The function failed to execute. There is no variable set with the given name. * */ -native DeleteSVar(const svar[]); +native bool:DeleteSVar(const svar[]); /** * a_samp @@ -1485,7 +1488,7 @@ native CreatePickup(model, type, Float:x, Float:y, Float:z, virtualWorld = 0); * * */ -native DestroyPickup(pickup); +native bool:DestroyPickup(pickup); /** * a_samp @@ -1497,7 +1500,7 @@ native DestroyPickup(pickup); * This function can only be used in OnGameModeInit. For other * times, see ShowPlayerNameTagForPlayer. */ -native ShowNameTags(bool:show); +native void:ShowNameTags(bool:show); /** * a_samp @@ -1520,14 +1523,14 @@ native ShowNameTags(bool:show); * It is also possible to set a player's colour to a colour that has full transparency (no * alpha value). This makes it possible to show markers on a per-player basis. */ -native ShowPlayerMarkers(PLAYER_MARKERS_MODE:mode); +native void:ShowPlayerMarkers(PLAYER_MARKERS_MODE:mode); /** * a_samp *

    Ends the current gamemode. * */ -native GameModeExit(); +native void:GameModeExit(); /** * a_samp @@ -1540,7 +1543,7 @@ native GameModeExit(); * This function is only relevant for players that do not use a passing clock - see * TogglePlayerClock. */ -native SetWorldTime(hour); +native void:SetWorldTime(hour); /** * a_samp @@ -1556,7 +1559,7 @@ native SetWorldTime(hour); * 0: The function failed to execute. The weapon specified does not exist. * */ -native GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); +native bool:GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); /** * a_samp @@ -1566,7 +1569,7 @@ native GetWeaponName(WEAPON:weaponid, weapon[], len = sizeof (weapon)); * OnVehicleDamageStatusUpdate.
    */ #pragma deprecated Use `OnVehicleDamageStatusUpdate`. -native EnableTirePopping(bool:enable); // deprecated function +native void:EnableTirePopping(bool:enable); // deprecated function /** * a_samp @@ -1575,7 +1578,7 @@ native EnableTirePopping(bool:enable); // deprecated function * * This function was added in SA-MP 0.3x and will not work in earlier versions! */ -native EnableVehicleFriendlyFire(); +native void:EnableVehicleFriendlyFire(); /** * a_samp @@ -1588,7 +1591,7 @@ native EnableVehicleFriendlyFire(); * */ #pragma deprecated Use `OnPlayerInteriorChange`. -native AllowInteriorWeapons(bool:allow); +native void:AllowInteriorWeapons(bool:allow); /** * a_samp @@ -1599,7 +1602,7 @@ native AllowInteriorWeapons(bool:allow); * If TogglePlayerClock is enabled, weather will slowly change * over time, instead of changing instantly. */ -native SetWeather(weatherid); +native void:SetWeather(weatherid); /** * a_samp @@ -1620,7 +1623,7 @@ native Float:GetGravity(); * This function always returns 1, even when it fails to execute if the gravity * is out of the limits (lower than -50.0 or higher than +50.0). */ -native SetGravity(Float:gravity); +native void:SetGravity(Float:gravity); /** * a_samp @@ -1632,7 +1635,7 @@ native SetGravity(Float:gravity); * */ #pragma deprecated Use `OnPlayerClickMap`. -native AllowAdminTeleport(bool:allow); +native void:AllowAdminTeleport(bool:allow); /** * a_samp @@ -1642,7 +1645,7 @@ native AllowAdminTeleport(bool:allow); * */ #pragma deprecated Use `CreatePickup`. -native SetDeathDropAmount(amount); +native void:SetDeathDropAmount(amount); /** * a_samp @@ -1658,7 +1661,7 @@ native SetDeathDropAmount(amount); * This function always returns 1, even when the explosion type and/or radius * values are invalid. */ -native CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); +native void:CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); /** * a_samp @@ -1668,6 +1671,7 @@ native CreateExplosion(Float:x, Float:y, Float:z, type, Float:radius); * A toggle option for whether or not you'd like zone names on or off * This function was removed in SA-MP 0.3. This was due to crashes it caused. */ +#pragma deprecated Show names manually. native EnableZoneNames(bool:enable); /** @@ -3142,7 +3146,7 @@ native Update3DTextLabelText(Text3D:textid, colour, const text[]); * 0: The function failed to execute. This means the player is not connected.
    * */ -native ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE:style, const caption[], const info[], const button1[], const button2[]); +native bool:ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE:style, const caption[], const info[], const button1[], const button2[]); /** * a_samp From bcd211b727e29ee9e621b1c4e1d8495aa43f17c4 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Mon, 11 Apr 2022 19:35:21 +0100 Subject: [PATCH 093/104] More tags --- a_objects.inc | 6 +++--- a_players.inc | 2 +- a_samp.inc | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/a_objects.inc b/a_objects.inc index 2976ea8..df1bf62 100644 --- a/a_objects.inc +++ b/a_objects.inc @@ -175,7 +175,7 @@ native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotX, Float:rotY, * it; they will remain stationary at the position the vehicle disappeared and be reattached to the * next vehicle to claim the vehicle ID that the objects were attached to. */ -native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +native bool:AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /** * a_objects @@ -209,7 +209,7 @@ native AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, F * />) exists. * */ -native AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); +native bool:AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ, bool:syncRotation = true); /** * a_objects @@ -229,7 +229,7 @@ native AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Fl * * This function always returns 0. */ -native AttachObjectToPlayer(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); +native void:AttachObjectToPlayer(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotX, Float:rotY, Float:rotZ); /** * a_objects diff --git a/a_players.inc b/a_players.inc index 07ef4ca..e0376e6 100644 --- a/a_players.inc +++ b/a_players.inc @@ -439,7 +439,7 @@ static stock PLAYER_RECORDING_TYPE:_@PLAYER_RECORDING_TYPE() { return __PLAYER_R * * */ -native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); +native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, WEAPON:weapon1, ammo1, WEAPON:weapon2, ammo2, WEAPON:weapon3, ammo3); /** * a_players diff --git a/a_samp.inc b/a_samp.inc index 5e8bb14..a1ecef3 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -1013,7 +1013,7 @@ native Float:atan2(Float:y, Float:x); * The highest playerid currently in use on the server or 0 if there are no connected * players. */ -#pragma deprecated This function is fundamentally broken. +#pragma deprecated This function is fundamentally broken. See: https://open.mp/docs/scripting/functions/GetPlayerPoolSize native GetPlayerPoolSize(); /** @@ -1024,7 +1024,7 @@ native GetPlayerPoolSize(); * The highest vehicleid currently in use on the server or 0 if there are no * created vehicles. */ -#pragma deprecated This function is fundamentally broken. +#pragma deprecated This function is fundamentally broken. See: https://open.mp/docs/scripting/functions/GetVehiclePoolSize native GetVehiclePoolSize(); /** @@ -1036,7 +1036,7 @@ native GetVehiclePoolSize(); * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * The highest actorid created on the server or 0 if there are no created actors. */ -#pragma deprecated This function is fundamentally broken. +#pragma deprecated This function is fundamentally broken. See: https://open.mp/docs/scripting/functions/GetActorPoolSize native GetActorPoolSize(); // Hash @@ -1288,7 +1288,7 @@ native SetTeamCount(count); * * */ -native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); +native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, WEAPON:weapon1, ammo1, WEAPON:weapon2, ammo2, WEAPON:weapon3, ammo3); /** * a_samp @@ -1325,7 +1325,7 @@ native AddPlayerClass(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:a * * */ -native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3); +native AddPlayerClassEx(teamid, modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, WEAPON:weapon1, ammo1, WEAPON:weapon2, ammo2, WEAPON:weapon3, ammo3); /** * a_samp From f058247ff469ed246f6fd1df7e11502ee44baba0 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 25 Jun 2022 02:28:50 +0200 Subject: [PATCH 094/104] Unfortunately callbacks can't have their parameter names changed, so we are stuck with `color` in `OnClientMessage`. --- a_npc.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index 55da4d2..2fdeb98 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -1073,12 +1073,12 @@ forward OnNPCExitVehicle(); * href="#SendClientMessage">SendClientMessage function is sent towards the NPC. This callback * won't be called when someone says something. For a version of this with player text, see * OnPlayerText.
    - * The colour the ClientMessage is + * The colour the ClientMessage is * The actual message * * This NPC callback was added in SA-MP 0.3a and will not work in earlier versions! */ -forward OnClientMessage(colour, text[]); +forward OnClientMessage(color, text[]); /** * Just as the player version of the callback, this callback is called when any player dies. From e10ff997906c80b0dbf224c6075483dcd31a837f Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 25 Jun 2022 02:30:08 +0200 Subject: [PATCH 095/104] Remove accidental comments from warnings. --- a_samp.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index a1ecef3..2e935f9 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -1013,7 +1013,7 @@ native Float:atan2(Float:y, Float:x); * The highest playerid currently in use on the server or 0 if there are no connected * players. */ -#pragma deprecated This function is fundamentally broken. See: https://open.mp/docs/scripting/functions/GetPlayerPoolSize +#pragma deprecated This function is fundamentally broken. See: open.mp/docs/scripting/functions/GetPlayerPoolSize native GetPlayerPoolSize(); /** @@ -1024,7 +1024,7 @@ native GetPlayerPoolSize(); * The highest vehicleid currently in use on the server or 0 if there are no * created vehicles. */ -#pragma deprecated This function is fundamentally broken. See: https://open.mp/docs/scripting/functions/GetVehiclePoolSize +#pragma deprecated This function is fundamentally broken. See: open.mp/docs/scripting/functions/GetVehiclePoolSize native GetVehiclePoolSize(); /** @@ -1036,7 +1036,7 @@ native GetVehiclePoolSize(); * This function was added in SA-MP 0.3.7 and will not work in earlier versions! * The highest actorid created on the server or 0 if there are no created actors. */ -#pragma deprecated This function is fundamentally broken. See: https://open.mp/docs/scripting/functions/GetActorPoolSize +#pragma deprecated This function is fundamentally broken. See: open.mp/docs/scripting/functions/GetActorPoolSize native GetActorPoolSize(); // Hash From 0bf3fc8efe7ba57371055c39ae6db4c58fd304a1 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 7 Aug 2022 13:47:41 +0100 Subject: [PATCH 096/104] Switch strong/weak tag prefixes to `T_`/`t_` - they're less widely used as a prefix. --- a_samp.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 2e935f9..4448f9c 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -106,9 +106,9 @@ public const __OPEN_MP_VERSION = 0; #if defined NO_TAGS #define __TAG(%0) _ #elseif defined STRONG_TAGS - #define __TAG(%0) E_%0 + #define __TAG(%0) T_%0 #else // if defined WEAK_TAGS - #define __TAG(%0) e_%0 + #define __TAG(%0) t_%0 #define WEAK_TAGS #endif #if defined MORE_TAGS From f2d13fdf38e1463d68ca49c4bf628d0034b33728 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 7 Aug 2022 13:49:29 +0100 Subject: [PATCH 097/104] Move something. --- a_samp.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a_samp.inc b/a_samp.inc index 4448f9c..2da4d0a 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -21,13 +21,13 @@ * */ +///

    + // Ignores warning 217 for properly indented PAWNO code // It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8 #pragma tabsize 4 #define SAMP_CONST_CORRECT -///

    - /** * * Version examples: From 7b10fd3ae9670c805c176265562ce4885da6d87c Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 7 Aug 2022 14:51:11 +0100 Subject: [PATCH 098/104] `OnPlayerRequestDownload` tag. --- README.md | 9 +++++++++ a_samp.inc | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 97614b1..0b4be73 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,15 @@ forward OnPlayerWeaponShot(playerid, weaponid, BULLET_HIT_TYPE:hittype, hitid, F forward OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys); ``` +* `OnPlayerRequestDownload` + +```pawn +#if !defined DOWNLOAD_REQUEST + #define DOWNLOAD_REQUEST: _: +#endif +forward OnPlayerRequestDownload(playerid, DOWNLOAD_REQUEST:type, crc); +``` + ## How Do Versions Work? ### Versions are represented by [Git Tags](https://help.github.com/articles/working-with-tags/) diff --git a/a_samp.inc b/a_samp.inc index 2da4d0a..0f24ea3 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -3753,7 +3753,13 @@ forward OnIncomingConnection(playerid, ip_address[], port); * This callback does not handle returns. */ forward OnPlayerFinishedDownloading(playerid, virtualworld); -forward OnPlayerRequestDownload(playerid, type, crc); + +/** + */ +#if !defined DOWNLOAD_REQUEST + #define DOWNLOAD_REQUEST: _: +#endif +forward OnPlayerRequestDownload(playerid, DOWNLOAD_REQUEST:type, crc); /** *

    This callback is called when a player fires a shot from a weapon. Only bullet weapons are From ceefd222530a9a0e5846e4a9e006bb32383fed3d Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 4 Sep 2022 01:24:47 +0100 Subject: [PATCH 099/104] Back-port weapon slots. --- a_npc.inc | 121 +++++++++++++++++++++++++++++++++-------------------- a_samp.inc | 121 +++++++++++++++++++++++++++++++++-------------------- 2 files changed, 152 insertions(+), 90 deletions(-) diff --git a/a_npc.inc b/a_npc.inc index 2fdeb98..f83680a 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -411,59 +411,90 @@ const PLAYER_STATE:PLAYER_STATE_ENTER_VEHICLE_PASS = PLAYER_STATE:6; #define WEAPON: __TAG(WEAPON): enum WEAPON:__WEAPON { - WEAPON_FIST, - WEAPON_BRASSKNUCKLE, - WEAPON_GOLFCLUB, - WEAPON_NITESTICK, + WEAPON_UNKNOWN = -1, + WEAPON_FIST = 0, + WEAPON_BRASSKNUCKLE = 1, + WEAPON_GOLFCLUB = 2, + WEAPON_NITESTICK = 3, WEAPON_NIGHTSTICK = WEAPON_NITESTICK, - WEAPON_KNIFE, - WEAPON_BAT, - WEAPON_SHOVEL, - WEAPON_POOLSTICK, - WEAPON_KATANA, - WEAPON_CHAINSAW, - WEAPON_DILDO, - WEAPON_DILDO2, - WEAPON_VIBRATOR, - WEAPON_VIBRATOR2, - WEAPON_FLOWER, - WEAPON_CANE, - WEAPON_GRENADE, - WEAPON_TEARGAS, - WEAPON_MOLTOV, + WEAPON_KNIFE = 4, + WEAPON_BAT = 5, + WEAPON_SHOVEL = 6, + WEAPON_POOLSTICK = 7, + WEAPON_KATANA = 8, + WEAPON_CHAINSAW = 9, + WEAPON_DILDO = 10, + WEAPON_DILDO2 = 11, + WEAPON_VIBRATOR = 12, + WEAPON_VIBRATOR2 = 13, + WEAPON_FLOWER = 14, + WEAPON_CANE = 15, + WEAPON_GRENADE = 16, + WEAPON_TEARGAS = 17, + WEAPON_MOLTOV = 18, WEAPON_MOLOTOV = WEAPON_MOLTOV, WEAPON_COLT45 = 22, - WEAPON_SILENCED, - WEAPON_DEAGLE, - WEAPON_SHOTGUN, - WEAPON_SAWEDOFF, - WEAPON_SHOTGSPA, - WEAPON_UZI, - WEAPON_MP5, - WEAPON_AK47, - WEAPON_M4, - WEAPON_TEC9, - WEAPON_RIFLE, - WEAPON_SNIPER, - WEAPON_ROCKETLAUNCHER, - WEAPON_HEATSEEKER, - WEAPON_FLAMETHROWER, - WEAPON_MINIGUN, - WEAPON_SATCHEL, - WEAPON_BOMB, - WEAPON_SPRAYCAN, - WEAPON_FIREEXTINGUISHER, - WEAPON_CAMERA, - WEAPON_NIGHT_VISION_GOGGLES, - WEAPON_THERMAL_GOGGLES, - WEAPON_PARACHUTE, + WEAPON_SILENCED = 23, + WEAPON_DEAGLE = 24, + WEAPON_SHOTGUN = 25, + WEAPON_SAWEDOFF = 26, + WEAPON_SHOTGSPA = 27, + WEAPON_UZI = 28, + WEAPON_MP5 = 29, + WEAPON_AK47 = 30, + WEAPON_M4 = 31, + WEAPON_TEC9 = 32, + WEAPON_RIFLE = 33, + WEAPON_SNIPER = 34, + WEAPON_ROCKETLAUNCHER = 35, + WEAPON_HEATSEEKER = 36, + WEAPON_FLAMETHROWER = 37, + WEAPON_MINIGUN = 38, + WEAPON_SATCHEL = 39, + WEAPON_BOMB = 40, + WEAPON_SPRAYCAN = 41, + WEAPON_FIREEXTINGUISHER = 42, + WEAPON_CAMERA = 43, + WEAPON_NIGHT_VISION_GOGGLES = 44, + WEAPON_THERMAL_GOGGLES = 45, + WEAPON_PARACHUTE = 46, WEAPON_VEHICLE = 49, WEAPON_DROWN = 53, - WEAPON_COLLISION, - WEAPON_SPLAT = WEAPON_COLLISION, + WEAPON_COLLISION = 54, + WEAPON_SPLAT = WEAPON_COLLISION } static stock WEAPON:_@WEAPON() { return __WEAPON; } +#define MAX_WEAPONS __WEAPON + +///

    + +/** + * a_npc + *

    Weapon Slots + */ +#define WEAPON_SLOT: __TAG(WEAPON_SLOT): +enum WEAPON_SLOT:__WEAPON_SLOT +{ + WEAPON_SLOT_UNKNOWN = -1, + WEAPON_SLOT_UNARMED = 0, + WEAPON_SLOT_MELEE = 1, + WEAPON_SLOT_PISTOL = 2, + WEAPON_SLOT_SHOTGUN = 3, + WEAPON_SLOT_MACHINE_GUN = 4, + WEAPON_SLOT_ASSAULT_RIFLE = 5, + WEAPON_SLOT_LONG_RIFLE = 6, + WEAPON_SLOT_ARTILLERY = 7, + WEAPON_SLOT_EXPLOSIVES = 8, + WEAPON_SLOT_EQUIPMENT = 9, + WEAPON_SLOT_GIFT = 10, + WEAPON_SLOT_GADGET = 11, + WEAPON_SLOT_DETONATOR = 12 +} +static stock WEAPON_SLOT:_@WEAPON_SLOT() { return __WEAPON_SLOT; } + +#define MAX_WEAPON_SLOTS __WEAPON_SLOT + ///

    /** diff --git a/a_samp.inc b/a_samp.inc index 0f24ea3..fd280a2 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -241,59 +241,90 @@ const Text3D:INVALID_3DTEXT_ID = Text3D:0xFFFF; #define WEAPON: __TAG(WEAPON): enum WEAPON:__WEAPON { - WEAPON_FIST, - WEAPON_BRASSKNUCKLE, - WEAPON_GOLFCLUB, - WEAPON_NITESTICK, + WEAPON_UNKNOWN = -1, + WEAPON_FIST = 0, + WEAPON_BRASSKNUCKLE = 1, + WEAPON_GOLFCLUB = 2, + WEAPON_NITESTICK = 3, WEAPON_NIGHTSTICK = WEAPON_NITESTICK, - WEAPON_KNIFE, - WEAPON_BAT, - WEAPON_SHOVEL, - WEAPON_POOLSTICK, - WEAPON_KATANA, - WEAPON_CHAINSAW, - WEAPON_DILDO, - WEAPON_DILDO2, - WEAPON_VIBRATOR, - WEAPON_VIBRATOR2, - WEAPON_FLOWER, - WEAPON_CANE, - WEAPON_GRENADE, - WEAPON_TEARGAS, - WEAPON_MOLTOV, + WEAPON_KNIFE = 4, + WEAPON_BAT = 5, + WEAPON_SHOVEL = 6, + WEAPON_POOLSTICK = 7, + WEAPON_KATANA = 8, + WEAPON_CHAINSAW = 9, + WEAPON_DILDO = 10, + WEAPON_DILDO2 = 11, + WEAPON_VIBRATOR = 12, + WEAPON_VIBRATOR2 = 13, + WEAPON_FLOWER = 14, + WEAPON_CANE = 15, + WEAPON_GRENADE = 16, + WEAPON_TEARGAS = 17, + WEAPON_MOLTOV = 18, WEAPON_MOLOTOV = WEAPON_MOLTOV, WEAPON_COLT45 = 22, - WEAPON_SILENCED, - WEAPON_DEAGLE, - WEAPON_SHOTGUN, - WEAPON_SAWEDOFF, - WEAPON_SHOTGSPA, - WEAPON_UZI, - WEAPON_MP5, - WEAPON_AK47, - WEAPON_M4, - WEAPON_TEC9, - WEAPON_RIFLE, - WEAPON_SNIPER, - WEAPON_ROCKETLAUNCHER, - WEAPON_HEATSEEKER, - WEAPON_FLAMETHROWER, - WEAPON_MINIGUN, - WEAPON_SATCHEL, - WEAPON_BOMB, - WEAPON_SPRAYCAN, - WEAPON_FIREEXTINGUISHER, - WEAPON_CAMERA, - WEAPON_NIGHT_VISION_GOGGLES, - WEAPON_THERMAL_GOGGLES, - WEAPON_PARACHUTE, + WEAPON_SILENCED = 23, + WEAPON_DEAGLE = 24, + WEAPON_SHOTGUN = 25, + WEAPON_SAWEDOFF = 26, + WEAPON_SHOTGSPA = 27, + WEAPON_UZI = 28, + WEAPON_MP5 = 29, + WEAPON_AK47 = 30, + WEAPON_M4 = 31, + WEAPON_TEC9 = 32, + WEAPON_RIFLE = 33, + WEAPON_SNIPER = 34, + WEAPON_ROCKETLAUNCHER = 35, + WEAPON_HEATSEEKER = 36, + WEAPON_FLAMETHROWER = 37, + WEAPON_MINIGUN = 38, + WEAPON_SATCHEL = 39, + WEAPON_BOMB = 40, + WEAPON_SPRAYCAN = 41, + WEAPON_FIREEXTINGUISHER = 42, + WEAPON_CAMERA = 43, + WEAPON_NIGHT_VISION_GOGGLES = 44, + WEAPON_THERMAL_GOGGLES = 45, + WEAPON_PARACHUTE = 46, WEAPON_VEHICLE = 49, WEAPON_DROWN = 53, - WEAPON_COLLISION, - WEAPON_SPLAT = WEAPON_COLLISION, + WEAPON_COLLISION = 54, + WEAPON_SPLAT = WEAPON_COLLISION } static stock WEAPON:_@WEAPON() { return __WEAPON; } +#define MAX_WEAPONS __WEAPON + +///

    + +/** + * a_npc + *

    Weapon Slots + */ +#define WEAPON_SLOT: __TAG(WEAPON_SLOT): +enum WEAPON_SLOT:__WEAPON_SLOT +{ + WEAPON_SLOT_UNKNOWN = -1, + WEAPON_SLOT_UNARMED = 0, + WEAPON_SLOT_MELEE = 1, + WEAPON_SLOT_PISTOL = 2, + WEAPON_SLOT_SHOTGUN = 3, + WEAPON_SLOT_MACHINE_GUN = 4, + WEAPON_SLOT_ASSAULT_RIFLE = 5, + WEAPON_SLOT_LONG_RIFLE = 6, + WEAPON_SLOT_ARTILLERY = 7, + WEAPON_SLOT_EXPLOSIVES = 8, + WEAPON_SLOT_EQUIPMENT = 9, + WEAPON_SLOT_GIFT = 10, + WEAPON_SLOT_GADGET = 11, + WEAPON_SLOT_DETONATOR = 12 +} +static stock WEAPON_SLOT:_@WEAPON_SLOT() { return __WEAPON_SLOT; } + +#define MAX_WEAPON_SLOTS __WEAPON_SLOT + ///

    /** From 81ba7130cfd624f0a7ff6cee3818f7268e11b57e Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 4 Sep 2022 01:26:55 +0100 Subject: [PATCH 100/104] Use weapon slots. --- a_players.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a_players.inc b/a_players.inc index e0376e6..784f805 100644 --- a/a_players.inc +++ b/a_players.inc @@ -1035,7 +1035,7 @@ native SetPlayerArmedWeapon(playerid, WEAPON:weaponid); * slot specified is invalid (valid is 0-12). * */ -native GetPlayerWeaponData(playerid, slot, &WEAPON:weapons, &ammo); +native GetPlayerWeaponData(playerid, WEAPON_SLOT:slot, &WEAPON:weapons, &ammo); /** * a_players From cf49dbebdb606b04f4706ca6386400c4fe7eabf7 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 4 Sep 2022 01:43:38 +0100 Subject: [PATCH 101/104] More documentation. --- README.md | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 214 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0b4be73..26aa883 100644 --- a/README.md +++ b/README.md @@ -15,20 +15,82 @@ standard library stored here on GitHub too. This means there doesn't need to be any special-case code written for the standard library, it can just be a package like all others. -## Tags +## Const-Correctness -The latest version of the SA:MP includes introduce many more tags to functions and callbacks. These -are useful in the long run, but slightly annoying to upgrade to. There are three symbols: -`NO_TAGS`, `WEAK_TAGS`, and `STRONG_TAGS`; that you can define before including ``, each one -enabling progressively more checks: +Some functions, like `SendRconCommand`, take strings; some functions, like `GetPlayerName`, modify strings. These are different operations with different considerations. Consider the following code: + +```pawn +GetPlayerName(playerid, "Bob"); +``` + +This code doesn't make any sense. "Bob" is a string literal, you can't store someone's name in to the word `"Bob"`, it would be like trying to do: + +```pawn +"Bob" = GetPlayerName(playerid); +``` + +`"Bob"` is a *constant*, it is a value fixed by the compiler that can't be modified at runtime. `GetPlayerName` modifies its values at runtime, so cannot take a constant only a variable. For this reason it is declared as: + +```pawn +native GetPlayerName(playerid, name[], size = sizeof (name)); +``` + +But what of `SendRconCommand`? The following *is* valid: + +```pawn +SendRconCommand("loadfs objects"); +``` + +`SendRconCommand` does not return a string, it doesn't modify the value passed in. If it were declared in the same way as `GetPlayerName` it would have to take a variable that could be modified: + +```pawn +native SendRconCommand(cmd[]); +new cmd[] = "loadfs objects"; +// `cmd` must be modifiable because `SendRconCommand` doesn't say it won't. +SendRconCommand(cmd); +``` + +This is cumbersome and pointless. Again, we know that `SendRconCommand` cannot change the data given, so we tell the compiler this as well. Anything between `""`s is a *constant*, so make `SendRconCommand` accept them with `const`: + +```pawn +native SendRconCommand(const cmd[]); +// Allowed again because we know this call won't modify the string. +SendRconCommand("loadfs objects"); +``` + +This is called *const correctness* - using `const` when data will not be modified, and not using `const` when the parameter will be modified. This is mainly only useful for strings and arrays (differentiated in the includes by the use of a `string:` tag) as they are pass-by-reference, but when in doubt use the rules on normal numbers as well. + +Functions that are `const` can also take variables which may be modified. `const` means the function promises not modify the variable (`GetPlayerName` in the SA:MP includes incorrectly used `const` and broke this promise), but that doesn't mean you can't pass varaibles that don't mind being modified - there's no such thing as a variable that *must* be modified: + +```pawn +native SendRconCommand(const string:cmd[]); +new cmd[32]; +format(cmd, _, "loadfs %s", scriptName); +// `cmd` is allowed to be modified, but `SendRconCommand` won't do so. +SendRconCommand(cmd); +``` + +As a side note, the following code is now also a warning: + +```pawn +Func(const &var) +{ + printf("%d", var); +} +``` + +`const` means a variable can't be modified, while `&` means it can. Since modifiying a normal variable is the only reason to pass it by reference adding `const` to the declaration is, as with all warnings, probably a mistake. + +## More Tags + +The latest version of the SA:MP includes introduce many more tags to functions and callbacks. These are useful in the long run, but slightly annoying to upgrade to. There are three symbols: `NO_TAGS`, `WEAK_TAGS`, and `STRONG_TAGS`; that you can define before including ``, each one enabling progressively more checks: ```pawn #define STRONG_TAGS #include ``` -To encourage some adoption, the default is `WEAK_TAGS`. Most old code uses will simply give a -warning when the wrong tag is found: +To encourage some adoption, the default is `WEAK_TAGS`. Most old code uses will simply give a warning when the wrong tag is found: ```pawn // Gives a warning: @@ -38,19 +100,63 @@ SetPlayerControllable(playerid, 1); SetPlayerControllable(playerid, true); ``` -However, there's a problem - callbacks give an error: +Generally arameters that only accept a limited range of values (for example, object attachment bones) are now all enumerations so that passing invalid values gives a warning: ```pawn -forward OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate); +TextDrawAlignment(textid, TEXT_DRAW_ALIGN_LEFT); // Fine +TextDrawFont(textid, 7); // Warning +``` + +Functions that take or return just `true`/`false` all have `bool:` tags. More functions than might be expected return booleans; most player functions return `true` when they succeed and `false` when the player is not connected, sometimes skipping the need for `IsPlayerConnected`: + +```pawn +new Float:x, Float:y, Float:z; +// If the player is connected get their position. +if (GetPlayerPos(playerid, x, y, z)) +{ + // Timer repeats are on or off, so booleans. + SetTimer("TimerFunc", 1000, false); +} +``` + +In cases where there were existing defines already for valid values (like `OBJECT_MATERIAL_SIZE_512x64`) these names have been reused for the enumerations and thus tagged. Therefore code that already made use of the defines will continue to operate correctly, and code that wishes to remain backwards-compatible can start using the names in place of (usually) bare numbers (so always put `OBJECT_MATERIAL_TEXT_ALIGN_LEFT` instead of `0`). + +For parameters the default is to make these new tags *weak*, meaning that you get warnings when passing untagged values to tagged parameters, but not the other way around. This applies to function returns so saving a tag result in an untagged variable will not give a warning. This second group can also be upgraded by specifying the use of *strong* tags instead: + +```pawn +#define STRONG_TAGS +#include +``` + +Alternatively, if you really hate help: + +```pawn +#define NO_TAGS +#include +``` + +The only breaking change introduced by these new tags are on callbacks. For some reason tag mismatch warnings in function prototypes are an error, not a warning (probably because of code generation issues related to overloaded operators). The best way to deal with these is to ensure that the `public` part of the callback will compile regardless of tag settings by falling back to `_:` when none is specified: + +```pawn +#if !defined SELECT_OBJECT + #define SELECT_OBJECT: _: +#endif +forward OnPlayerSelectObject(playerid, SELECT_OBJECT:type, objectid, modelid, Float:fX, Float:fY, Float:fZ); +``` -public OnPlayerStateChange(playerid, newstate, oldstate) +See lower down for a full list of all updated callbacks. This is the main problem change, but it is important to note that the following code will work with any include, with or without the new tags: + +```pawn +#if !defined CLICK_SOURCE + #define CLICK_SOURCE: _: +#endif +public OnPlayerClickPlayer(playerid, clickedplayerid, CLICK_SOURCE:source) { + return 1; } ``` -This gives an error, when it should be fine. Fixing it in a mode is easy - just use the correct -tags on the variables in the callbacks. Fixing it in a generic library needs a few extra lines to -define a default tag when one isn't found (i.e. the user isn't using the improved includes): +Thus writing backwards-compatible code remains possible. Forward for ALS as normal: ```pawn #if !defined PLAYER_STATE @@ -62,10 +168,58 @@ public OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstat return Hooked_OnPlayerStateChange(playerid, newstate, oldstate); } -// Don't forget to use ALS as normal. forward Hooked_OnPlayerStateChange(playerid, PLAYER_STATE:newstate, PLAYER_STATE:oldstate); ``` +### Tag Warning Example + +```pawn +if (GetPVarType(playerid, "MY_DATA") == 1) +{ + printf("Found an int"); +} +``` + +This code is correct, and will give the correct answer, so why add warnings? + +```pawn +switch (GetPVarType(playerid, "MY_DATA")) +{ +case 0: + printf("Unknown type"); +case 1: + printf("Found an int"); +case 2: + printf("Found a float"); +case 3: + printf("Found a string"); +case 4: + printf("Found a boolean"); +} +``` + +This code is subtly wrong, take a moment to try and work out how - the compiler will not help you. + +It could take a lot of testing and debugging to find the problem here without a lot of familiarity with the functions in question, fortunately the a_samp includes now return a `VARTYPE:` tag from `GetPVarType` and this code will give tag-mismatch warnings. Once we try and fix the warnings using the defined constants the mistakes become instantly obvious: + +```pawn +switch (GetPVarType(playerid, "MY_DATA")) +{ +case VARTYPE_NONE: + printf("Unknown type"); +case VARTYPE_INT: + printf("Found an int"); +case VARTYPE_STRING: + printf("Found a float"); +case VARTYPE_FLOAT: + printf("Found a string"); +case VARTYPE_BOOL: + printf("Found a boolean"); +} +``` + +The string/float mixup still needs some manual review, but it is now far more obvious that those two are the wrong way around. In fact there's a good chance that the person updating the code would have used them the correct way round without even realising that they have now fixed a prior bug. The `VARTYPE_BOOL:` line will give an error that the symbol doesn't exist because there is no type `4`. The old code quite happily compiled without issues and had an impossible branch. The effects aren't serious in this example, but they could be. But, again, the old code will still compile and run. More warnings help to highlight issues, they do not introduce new ones. + ### Complete List * `OnPlayerStateChange` @@ -140,6 +294,52 @@ forward OnPlayerKeyStateChange(playerid, KEY:newkeys, KEY:oldkeys); forward OnPlayerRequestDownload(playerid, DOWNLOAD_REQUEST:type, crc); ``` +### Streamer Plugin + +There is a PR to extend these improved checks to the streamer plugin as well: https://github.com/samp-incognito/samp-streamer-plugin/pull/435 This PR includes more information on the tags. + +* `Streamer_OnItemStreamIn` + +```pawn +#if !defined STREAMER_TYPE + #define STREAMER_TYPE: _: +#endif +public Streamer_OnItemStreamIn(STREAMER_TYPE:type, STREAMER_ALL_TAGS:id, forplayerid) +{ +} +``` + +* `Streamer_OnItemStreamOut` + +```pawn +#if !defined STREAMER_TYPE + #define STREAMER_TYPE: _: +#endif +public Streamer_OnItemStreamOut(STREAMER_TYPE:type, STREAMER_ALL_TAGS:id, forplayerid) +{ +} +``` + +### Upgrade Tool + +Y_Less has been working on a tool to make porting code easier, here: + +https://github.com/openmultiplayer/upgrade + +This can scan all pawn files (`.inc`, `.p`, `.pawn`, `.pwn`) in a directory and search for function calls that look like the ones in these includes with new tags. It will find hook declarations following a standard `Lib_Native` naming scheme where `Native` is one known to have been enhanced, and thus upgrade these hooks automatically. It will also find many calls to the upgraded natives using bare numbers, so for example: + +```pawn +SetTimer("MyFunction", 1000, 0); +``` + +Will be found and replaced by: + +```pawn +SetTimer("MyFunction", 1000, false); +``` + +See the readme with the tool for more information, including adding your own upgrades, and checking output before applying the changes (always make backups first). + ## How Do Versions Work? ### Versions are represented by [Git Tags](https://help.github.com/articles/working-with-tags/) From ae3989f938b2e72c55074957f0bc16a12afb88c0 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 4 Sep 2022 01:58:32 +0100 Subject: [PATCH 102/104] Typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 26aa883..bf11516 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ SetPlayerControllable(playerid, 1); SetPlayerControllable(playerid, true); ``` -Generally arameters that only accept a limited range of values (for example, object attachment bones) are now all enumerations so that passing invalid values gives a warning: +Generally parameters that only accept a limited range of values (for example, object attachment bones) are now all enumerations so that passing invalid values gives a warning: ```pawn TextDrawAlignment(textid, TEXT_DRAW_ALIGN_LEFT); // Fine From c2c58d03e0ad2436350a53e7d955a5832f65b607 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sun, 4 Sep 2022 01:59:15 +0100 Subject: [PATCH 103/104] `PLAYER_VARTYPE_` --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bf11516..225d421 100644 --- a/README.md +++ b/README.md @@ -205,15 +205,15 @@ It could take a lot of testing and debugging to find the problem here without a ```pawn switch (GetPVarType(playerid, "MY_DATA")) { -case VARTYPE_NONE: +case PLAYER_VARTYPE_NONE: printf("Unknown type"); -case VARTYPE_INT: +case PLAYER_VARTYPE_INT: printf("Found an int"); -case VARTYPE_STRING: +case PLAYER_VARTYPE_STRING: printf("Found a float"); -case VARTYPE_FLOAT: +case PLAYER_VARTYPE_FLOAT: printf("Found a string"); -case VARTYPE_BOOL: +case PLAYER_VARTYPE_BOOL: printf("Found a boolean"); } ``` From 8b76202ded1518c9a40e68225ea69f836bc9d31a Mon Sep 17 00:00:00 2001 From: Y_Less Date: Tue, 8 Nov 2022 23:33:31 +0000 Subject: [PATCH 104/104] Prefer `

    ` --- a_http.inc | 2 +- a_npc.inc | 8 ++++---- a_samp.inc | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/a_http.inc b/a_http.inc index 1e833d9..4ed1ecc 100644 --- a/a_http.inc +++ b/a_http.inc @@ -21,7 +21,7 @@ #pragma tabsize 4 #define SAMP_CONST_CORRECT -///

    +///

    // -------------------------------------------------- // Defines diff --git a/a_npc.inc b/a_npc.inc index f83680a..03593de 100644 --- a/a_npc.inc +++ b/a_npc.inc @@ -59,7 +59,7 @@ * * Rough rules: * - *

    + *

    * Uses (roughtly) BCD. Special versions are denoted outside 0-9. * * 0.1.2c R4-5 @@ -70,15 +70,15 @@ * * (assuming c is the third revision) * - *

    + *

    * 0.2X becomes 02A000 because it is basically 0.2.3, but not, while higher than * 0.2.2 so can't be 020400 (for example). Also, its a capital letter, so doesn't * use the revision method. * - *

    + *

    * P.S. Making a consistent scheme for SA:MP versions is REALLY hard. * - *

    + *

    * open.mp releases can use `A` as the first digit. * */ diff --git a/a_samp.inc b/a_samp.inc index fd280a2..9369622 100644 --- a/a_samp.inc +++ b/a_samp.inc @@ -59,7 +59,7 @@ * * Rough rules: * - *

    + *

    * Uses (roughtly) BCD. Special versions are denoted outside 0-9. * * 0.1.2c R4-5 @@ -70,15 +70,15 @@ * * (assuming c is the third revision) * - *

    + *

    * 0.2X becomes 02A000 because it is basically 0.2.3, but not, while higher than * 0.2.2 so can't be 020400 (for example). Also, its a capital letter, so doesn't * use the revision method. * - *

    + *

    * P.S. Making a consistent scheme for SA:MP versions is REALLY hard. * - *

    + *

    * open.mp releases can use `A` as the first digit. * */