Skip to content

Commit

Permalink
Proper brackets on defines.
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Less committed Oct 3, 2018
1 parent acae069 commit 9b0d55a
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 146 deletions.
18 changes: 9 additions & 9 deletions a_http.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
#define SAMP_CONST_CORRECT

// HTTP requests
#define HTTP_GET 1
#define HTTP_POST 2
#define HTTP_HEAD 3
#define HTTP_GET (1)
#define HTTP_POST (2)
#define HTTP_HEAD (3)

// HTTP error response codes
// These codes compliment ordinary HTTP response codes returned in 'response_code'
// (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
#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)

/// <summary>Sends a threaded HTTP request.</summary>
/// <param name="index">ID used to differentiate requests that are sent to the same callback (useful for playerids)</param>
Expand Down
6 changes: 3 additions & 3 deletions a_npc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ native GetPlayerName(playerid, name[], len);
/// <returns><b><c>1</c></b> if the player is connected, <b><c>0</c></b> if not.</returns>
native IsPlayerConnected(playerid);

#define PLAYER_RECORDING_TYPE_NONE 0
#define PLAYER_RECORDING_TYPE_DRIVER 1
#define PLAYER_RECORDING_TYPE_ONFOOT 2
#define PLAYER_RECORDING_TYPE_NONE (0)
#define PLAYER_RECORDING_TYPE_DRIVER (1)
#define PLAYER_RECORDING_TYPE_ONFOOT (2)

/// <summary>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.</summary>
/// <param name="playbacktype">The type of recording to be loaded</param>
Expand Down
36 changes: 18 additions & 18 deletions a_objects.inc
Original file line number Diff line number Diff line change
Expand Up @@ -481,24 +481,24 @@ native IsPlayerObjectMoving(playerid, objectid);
/// <remarks><b>This function was removed in SA-MP 0.3.</b></remarks>
native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);

#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
#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)


/// <summary>Replace the texture of an object with the texture from another model in the game.</summary>
Expand Down
126 changes: 63 additions & 63 deletions a_players.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,51 @@

#define SAMP_CONST_CORRECT

#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

#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

#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
#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)

#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)

#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)

// Player

Expand Down Expand Up @@ -911,7 +911,7 @@ native GetPlayerLastShotVectors(playerid, &Float:fOriginX, &Float:fOriginY, &Flo

// Attached to bone objects

#define MAX_PLAYER_ATTACHED_OBJECTS 10 // This is the number of attached indexes available ie 10 = 0-9
#define MAX_PLAYER_ATTACHED_OBJECTS (10) // This is the number of attached indexes available ie 10 = 0-9


/// <summary>Attach an object to a specific bone on a player.</summary>
Expand Down Expand Up @@ -1557,10 +1557,10 @@ native Float:GetPVarFloat(playerid, const varname[]);
native DeletePVar(playerid, const varname[]);

// PVar enumeration
#define PLAYER_VARTYPE_NONE 0
#define PLAYER_VARTYPE_INT 1
#define PLAYER_VARTYPE_STRING 2
#define PLAYER_VARTYPE_FLOAT 3
#define PLAYER_VARTYPE_NONE (0)
#define PLAYER_VARTYPE_INT (1)
#define PLAYER_VARTYPE_STRING (2)
#define PLAYER_VARTYPE_FLOAT (3)


/// <summary>Each PVar (player-variable) has its own unique identification number for lookup, this function returns the highest ID set for a player.</summary>
Expand Down Expand Up @@ -1603,7 +1603,7 @@ native GetPVarNameAtIndex(playerid, index, ret_varname[], ret_len);
/// <returns>Returns the type of the PVar. See table below.</returns>
native GetPVarType(playerid, const varname[]);

#define MAX_CHATBUBBLE_LENGTH 144
#define MAX_CHATBUBBLE_LENGTH (144)

/// <summary>Creates a chat bubble above a player's name tag.</summary>
/// <param name="playerid">The player which should have the chat bubble</param>
Expand Down Expand Up @@ -1955,10 +1955,10 @@ native SetPlayerMarkerForPlayer(playerid, showplayerid, color);
/// <remarks><a href="#ShowNameTags">ShowNameTags</a> must be set to <b><c>1</c></b> to be able to show name tags with ShowPlayerNameTagForPlayer, that means that in order to be effective you need to <c>ShowPlayerNameTagForPlayer(forplayerid, playerid, 0)</c> ahead of time(<a href="#OnPlayerStreamIn">OnPlayerStreamIn</a> is a good spot).</remarks>
native ShowPlayerNameTagForPlayer(playerid, showplayerid, show);

#define MAPICON_LOCAL 0 // displays in the player's local are
#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 MAPICON_LOCAL (0) // displays in the player's local are
#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


/// <summary>Place an icon/marker on a player's map. Can be used to mark locations such as banks and hospitals to players.</summary>
Expand Down Expand Up @@ -2026,8 +2026,8 @@ native AllowPlayerTeleport(playerid, allow);
/// </returns>
native SetPlayerCameraPos(playerid,Float:x, Float:y, Float:z);

#define CAMERA_CUT 2
#define CAMERA_MOVE 1
#define CAMERA_CUT (2)
#define CAMERA_MOVE (1)


/// <summary>Set the direction a player's camera looks at. Generally meant to be used in combination with <a href="#SetPlayerCameraPos">SetPlayerCameraPos</a>.</summary>
Expand Down Expand Up @@ -2318,9 +2318,9 @@ native EnableStuntBonusForPlayer(playerid, enable);
native EnableStuntBonusForAll(enable);

// Spectating
#define SPECTATE_MODE_NORMAL 1
#define SPECTATE_MODE_FIXED 2
#define SPECTATE_MODE_SIDE 3
#define SPECTATE_MODE_NORMAL (1)
#define SPECTATE_MODE_FIXED (2)
#define SPECTATE_MODE_SIDE (3)


/// <summary>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 <a href="#PlayerSpectatePlayer">PlayerSpectatePlayer</a> or <a href="#PlayerSpectateVehicle">PlayerSpectateVehicle</a> needs to be used.</summary>
Expand Down Expand Up @@ -2374,9 +2374,9 @@ native PlayerSpectatePlayer(playerid, targetplayerid, mode = SPECTATE_MODE_NORMA
native PlayerSpectateVehicle(playerid, targetvehicleid, mode = SPECTATE_MODE_NORMAL);

// Recording for NPC playback
#define PLAYER_RECORDING_TYPE_NONE 0
#define PLAYER_RECORDING_TYPE_DRIVER 1
#define PLAYER_RECORDING_TYPE_ONFOOT 2
#define PLAYER_RECORDING_TYPE_NONE (0)
#define PLAYER_RECORDING_TYPE_DRIVER (1)
#define PLAYER_RECORDING_TYPE_ONFOOT (2)


/// <summary>Starts recording a player's movements to a file, which can then be reproduced by an NPC.</summary>
Expand Down
52 changes: 26 additions & 26 deletions a_samp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -485,10 +485,10 @@ native Float:GetSVarFloat(const varname[]);
native DeleteSVar(const varname[]);

// SVar enumeration
#define SERVER_VARTYPE_NONE 0
#define SERVER_VARTYPE_INT 1
#define SERVER_VARTYPE_STRING 2
#define SERVER_VARTYPE_FLOAT 3
#define SERVER_VARTYPE_NONE (0)
#define SERVER_VARTYPE_INT (1)
#define SERVER_VARTYPE_STRING (2)
#define SERVER_VARTYPE_FLOAT (3)


/// <summary>Each SVar (server-variable) has its own unique identification number for lookup, this function returns the highest ID.</summary>
Expand Down Expand Up @@ -889,9 +889,9 @@ native ConnectNPC(const name[], const script[]);
native IsPlayerNPC(playerid);

// Artwork/NetModels
#define DOWNLOAD_REQUEST_EMPTY 0
#define DOWNLOAD_REQUEST_MODEL_FILE 1
#define DOWNLOAD_REQUEST_TEXTURE_FILE 2
#define DOWNLOAD_REQUEST_EMPTY (0)
#define DOWNLOAD_REQUEST_MODEL_FILE (1)
#define DOWNLOAD_REQUEST_TEXTURE_FILE (2)

native AddCharModel(baseid, newid, const dffname[], const txdname[]);
native AddSimpleModel(virtualworld, baseid, newid, const dffname[], const txdname[]);
Expand Down Expand Up @@ -1406,8 +1406,8 @@ native DisableMenuRow(Menu:menuid, row);
native Menu:GetPlayerMenu(playerid);

// 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)


/// <summary>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.</summary>
Expand Down Expand Up @@ -1918,12 +1918,12 @@ native DeletePlayer3DTextLabel(playerid, PlayerText3D:id);
native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:id, color, const text[]);

// 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
#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)


/// <summary>Shows the player a synchronous (only one at a time) dialog box.</summary>
Expand Down Expand Up @@ -2884,7 +2884,7 @@ forward OnVehicleSirenStateChange(playerid, vehicleid, newstate);
forward OnPlayerFinishedDownloading(playerid, virtualworld);
forward OnPlayerRequestDownload(playerid, type, crc);

#define CLICK_SOURCE_SCOREBOARD 0
#define CLICK_SOURCE_SCOREBOARD (0)

/// <summary>Called when a player double-clicks on a player on the scoreboard.</summary>
/// <param name="playerid">The ID of the player that clicked on a player on the scoreboard</param>
Expand All @@ -2900,9 +2900,9 @@ forward OnPlayerRequestDownload(playerid, type, crc);
/// </returns>
forward OnPlayerClickPlayer(playerid, clickedplayerid, source);

#define EDIT_RESPONSE_CANCEL 0
#define EDIT_RESPONSE_FINAL 1
#define EDIT_RESPONSE_UPDATE 2
#define EDIT_RESPONSE_CANCEL (0)
#define EDIT_RESPONSE_FINAL (1)
#define EDIT_RESPONSE_UPDATE (2)


/// <summary>This callback is called when a player finishes editing an object (<a href="#EditObject">EditObject</a>/<a href="#EditPlayerObject">EditPlayerObject</a>).</summary>
Expand Down Expand Up @@ -2960,8 +2960,8 @@ Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ,
Float:fRotX, Float:fRotY, Float:fRotZ,
Float:fScaleX, Float:fScaleY, Float:fScaleZ );

#define SELECT_OBJECT_GLOBAL_OBJECT 1
#define SELECT_OBJECT_PLAYER_OBJECT 2
#define SELECT_OBJECT_GLOBAL_OBJECT (1)
#define SELECT_OBJECT_PLAYER_OBJECT (2)


/// <summary>This callback is called when a player selects an object after <a href="#SelectObject">SelectObject</a> has been used.</summary>
Expand All @@ -2981,11 +2981,11 @@ Float:fScaleX, Float:fScaleY, Float:fScaleZ );
/// </returns>
forward OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ);

#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
#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)


/// <summary>This callback is called when a player fires a shot from a weapon. Only bullet weapons are supported. Only <b>passenger</b> drive-by is supported (not driver drive-by, and not sea sparrow / hunter shots).</summary>
Expand Down
Loading

0 comments on commit 9b0d55a

Please sign in to comment.