Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete issues. #33

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _open_mp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public const __OPEN_MP_VERSION = 0;
#elseif defined STRONG_TAGS
#define __TAG(%0) T_%0
#if __pawn_build >= 11
#define OPEN_MP_TAGS {LANDING_GEAR_STATE, T_CONNECTION_STATUS, T_CP_TYPE, T_WEAPON, T_PLAYER_MARKERS_MODE, T_DIALOG_STYLE, T_HTTP_METHOD, T_HTTP_ERROR, T_DOWNLOAD_REQUEST, T_SELECT_OBJECT, T_OBJECT_MATERIAL_SIZE, T_OBJECT_MATERIAL_TEXT_ALIGN, T_EDIT_RESPONSE, T_PLAYER_STATE, T_SPECIAL_ACTION, T_FIGHT_STYLE, T_WEAPONSKILL, T_WEAPONSTATE, T_KEY, T_CAM_MODE, T_MAPICON, T_SPECTATE_MODE, T_PLAYER_RECORDING_TYPE, T_FORCE_SYNC, T_CLICK_SOURCE, T_BULLET_HIT_TYPE, T_TEXT_DRAW_FONT, T_TEXT_DRAW_ALIGN, T_VARTYPE, T_CARMODTYPE, T_VEHICLE_MODEL_INFO, T_VEHICLE_PANEL_STATUS, T_VEHICLE_DOOR_STATUS, T_VEHICLE_LIGHT_STATUS, T_VEHICLE_TYRE_STATUS, T_WEAPON_SLOT, Bit, Bitmap, XML, XMLEntry, Group, INI, Language, Style, DB, DBResult, Menu, Text, PlayerText, Text3D, PlayerText3D, File, Float, CUSTOM_TAG_TYPES, _}
#define OPEN_MP_TAGS {LANDING_GEAR_STATE, T_CONNECTION_STATUS, T_CP_TYPE, T_WEAPON, T_PLAYER_MARKERS_MODE, T_DIALOG_STYLE, T_HTTP_METHOD, T_HTTP_ERROR, T_DOWNLOAD_REQUEST, T_SELECT_OBJECT, T_OBJECT_MATERIAL_SIZE, T_OBJECT_MATERIAL_TEXT_ALIGN, T_EDIT_RESPONSE, T_PLAYER_STATE, T_SPECIAL_ACTION, T_FIGHT_STYLE, T_WEAPONSKILL, T_WEAPONSTATE, T_KEY, T_CAM_MODE, T_MAPICON, T_SPECTATE_MODE, T_SPECTATE_TYPE, T_PLAYER_RECORDING_TYPE, T_FORCE_SYNC, T_CLICK_SOURCE, T_BULLET_HIT_TYPE, T_ANIMATION_FLAGS, T_TEXT_DRAW_FONT, T_TEXT_DRAW_ALIGN, T_VARTYPE, T_CARMODTYPE, T_VEHICLE_MODEL_INFO, T_VEHICLE_PANEL_STATUS, T_VEHICLE_DOOR_STATUS, T_VEHICLE_LIGHT_STATUS, T_VEHICLE_TYRE_STATUS, T_WEAPON_SLOT, Bit, Bitmap, XML, XMLEntry, Group, INI, Language, Style, DB, DBResult, Menu, Text, PlayerText, Text3D, PlayerText3D, File, Float, CUSTOM_TAG_TYPES, _}
#else
#define OPEN_MP_TAGS {T_WEAPON, Text, PlayerText, Text3D, PlayerText3D, File, Float, CUSTOM_TAG_TYPES, _}
#endif
Expand Down
13 changes: 7 additions & 6 deletions omp_object.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1106,12 +1106,6 @@ native bool:SetPlayerObjectMoveSpeed(playerid, objectid, Float:speed);
*/
native Float:GetPlayerObjectMoveSpeed(playerid, objectid);

/**
* <library>omp_object</library>
* <summary></summary>
*/
native Float:GetPlayerObjectTarget(playerid, objectid, &Float:targetX = 0.0, &Float:targetY = 0.0, &Float:targetZ = 0.0);

/**
* <library>omp_object</library>
* <summary></summary>
Expand Down Expand Up @@ -1484,6 +1478,13 @@ native bool:CancelEdit(playerid) = EndObjectEditing;
#pragma deprecated Use `GetObjectMovingTargetPos`
native bool:GetObjectTarget(objectid, &Float:targetX = 0.0, &Float:targetY = 0.0, &Float:targetZ = 0.0) = GetObjectMovingTargetPos;

/**
* <library>omp_object</library>
* <summary></summary>
*/
#pragma deprecated Use `GetPlayerObjectMovingTargetPos`
native Float:GetPlayerObjectTarget(playerid, objectid, &Float:targetX = 0.0, &Float:targetY = 0.0, &Float:targetZ = 0.0) = GetPlayerObjectMovingTargetPos;

/**
* <library>omp_object</library>
* <summary>Allows camera collisions with newly created objects to be disabled by default.</summary>
Expand Down
138 changes: 136 additions & 2 deletions omp_player.inc
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,26 @@ static stock SPECTATE_MODE:_@SPECTATE_MODE() { return __SPECTATE_MODE; }
#define SPECTATE_MODE_FIXED (SPECTATE_MODE:2)
#define SPECTATE_MODE_SIDE (SPECTATE_MODE:3)

/// <p/>
/**
* <library>omp_player</library>
* <summary>Spectating types</summary>
*/
#define SPECTATE_TYPE: __TAG(SPECTATE_TYPE):
enum SPECTATE_TYPE:__SPECTATE_TYPE
{
UNKNOWN_SPECTATE_TYPE = -1,
SPECTATE_TYPE_NONE = 0,
SPECTATE_TYPE_VEHICLE,
SPECTATE_TYPE_PLAYER
}
static stock SPECTATE_TYPE:_@SPECTATE_TYPE() { return __SPECTATE_TYPE; }

#define UNKNOWN_SPECTATE_TYPE (SPECTATE_TYPE:-1)
#define SPECTATE_TYPE_NONE (SPECTATE_TYPE:0)
#define SPECTATE_TYPE_VEHICLE (SPECTATE_TYPE:1)
#define SPECTATE_TYPE_PLAYER (SPECTATE_TYPE:2)

/// <p/>
/**
* <library>omp_player</library>
Expand Down Expand Up @@ -563,6 +583,27 @@ static stock BULLET_HIT_TYPE:_@BULLET_HIT_TYPE() { return __BULLET_HIT_TYPE; }
#define BULLET_HIT_TYPE_OBJECT (BULLET_HIT_TYPE:3)
#define BULLET_HIT_TYPE_PLAYER_OBJECT (BULLET_HIT_TYPE:4)

/// <p/>
/**
* <library>omp_player</library>
*/
#define ANIMATION_FLAGS: __TAG(ANIMATION_FLAGS):
enum ANIMATION_FLAGS:ANIMATION_FLAGS
{
UNKNOWN_ANIMATION_FLAG = -1,
ANIMATION_FLAG_FREEZE = 0b0000000000100,
ANIMATION_FLAG_LOOP = 0b0000100000000,
ANIMATION_FLAG_LOCK_Y = 0b0001000000000,
ANIMATION_FLAG_LOCK_X = 0b0010000000000
}
static stock ANIMATION_FLAGS:_@ANIMATION_FLAGS() { return ANIMATION_FLAGS; }

#define UNKNOWN_ANIMATION_FLAG (ANIMATION_FLAGS:-1)
#define ANIMATION_FLAG_FREEZE (ANIMATION_FLAGS:0b0000000000100)
#define ANIMATION_FLAG_LOOP (ANIMATION_FLAGS:0b0000100000000)
#define ANIMATION_FLAG_LOCK_Y (ANIMATION_FLAGS:0b0001000000000)
#define ANIMATION_FLAG_LOCK_X (ANIMATION_FLAGS:0b0010000000000)

/*

888b 88 88
Expand Down Expand Up @@ -2773,41 +2814,134 @@ native Float:GetPlayerCameraZoom(playerid);

/**
* <library>omp_player</library>
* <summary>Check if the player camera target is enabled.</summary>
* <param name="playerid">The ID of the player to check the camera target is enabled</param>
* <seealso name="EnablePlayerCameraTarget" />
* <returns>
* <b><c>1</c></b>: Is camera target enable.<br />
* <b><c>0</c></b>: Is camera target not enable or the player specified does not exist.
* </returns>
*/
native bool:IsPlayerCameraTargetEnabled(playerid);

/**
* <library>omp_player</library>
* <summary>Toggle player's widescreen.</summary>
* <param name="playerid">The ID of the player to check the camera target is enabled</param>
* <param name="enable">Enable or disable toggle player widescreen</param>
* <seealso name="IsPlayerWidescreenToggled" />
* <returns>
* <b><c>1</c></b>: The function was executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. The player specified does not exist.
* </returns>
*/
native bool:TogglePlayerWidescreen(playerid, bool:wide);
native bool:TogglePlayerWidescreen(playerid, bool:enable);

/**
* <library>omp_player</library>
* <summary>Checks if the player widescreen is ON or OFF.</summary>
* <param name="playerid">The ID of the player to check</param>
* <seealso name="TogglePlayerWidescreen" />
* <returns>
* <b><c>1</c></b>: The player widescreen is ON<br />
* <b><c>0</c></b>: The player widescreen is OFF or the player specified does not exist.
* </returns>
*/
native bool:IsPlayerWidescreenToggled(playerid);

/**
* <library>omp_player</library>
* <summary>Get the ID of the player or vehicle the player is spectating.</summary>
* <param name="playerid">The ID of the player to check</param>
* <seealso name="PlayerSpectatePlayer" />
* <seealso name="PlayerSpectateVehicle" />
* <seealso name="TogglePlayerSpectating" />
* <seealso name="GetPlayerSpectateType" />
* <returns>ID of the player or vehicle.</returns>
*/
native GetPlayerSpectateID(playerid);

/**
* <library>omp_player</library>
* <summary>Get the player spectate type.</summary>
* <param name="playerid">The ID of the player to get spectate type of</param>
* <seealso name="PlayerSpectatePlayer" />
* <seealso name="PlayerSpectateVehicle" />
* <seealso name="TogglePlayerSpectating" />
* <seealso name="GetPlayerSpectateID" />
* <returns>The spectate type as integer.</returns>
*/
native SPECTATE_TYPE:GetPlayerSpectateType(playerid);

/**
* <library>omp_player</library>
* <summary>Get the player animation flags.</summary>
* <param name="playerid">The ID of the player to get animation flags of</param>
* <seealso name="ApplyAnimation" />
* <returns>The player animation flags as integer.</returns>
*/
native GetPlayerAnimFlags(playerid);

/**
* <library>omp_player</library>
* <summary>Get the player animation flags.</summary>
* <param name="playerid">The ID of the player to get animation flags of</param>
* <seealso name="ApplyAnimation" />
* <returns>The player animation flags as integer.</returns>
*/
native ANIMATION_FLAGS:GetPlayerAnimationFlags(playerid);

/**
* <library>omp_player</library>
* <summary>Check if the player is in driveby mode.</summary>
* <param name="playerid">The ID of the player to check is in driveby mode of</param>
* <returns>
* <b><c>1</c></b>: The player is in driveby mode.<br />
* <b><c>0</c></b>: The player is not in driveby mode or the player specified does not exist.
* </returns>
*/
native bool:IsPlayerInDriveByMode(playerid);

/**
* <library>omp_player</library>
* <summary>Check if the player special action is cuffed.</summary>
* <param name="playerid">The ID of the player to check is cuffed</param>
* <returns>
* <b><c>1</c></b>: The player is cuffed.<br />
* <b><c>0</c></b>: The player is not cuffed or the player specified does not exist.
* </returns>
*/
native GetPlayerSpectateType(playerid);
native bool:IsPlayerCuffed(playerid);

/**
* <library>omp_player</library>
* <summary>Get the player ZAim (related to the camera and aiming).</summary>
* <param name="playerid">The ID of the player to get of</param>
* <seealso name="GetPlayerCameraPos" />
* <returns>The player ZAim as float.</returns>
*/
native Float:GetPlayerZAim(playerid);

/**
* <library>omp_player</library>
* <summary>Get an array variable of the IDs of the current players on the server.</summary>
* <param name="players">An array into which to store the player IDs, passed by reference</param>
* <param name="size">The length of the string that should be stored</param>
* <seealso name="GetVehicles" />
* <seealso name="GetActors" />
* <returns>The <b><c>0</c></b> if there are no players on the server.</returns>
*/
native GetPlayers(players[], size = sizeof (players));

/**
* <library>omp_player</library>
* <summary>Check if the player is using the official SA-MP client.</summary>
* <param name="playerid">The ID of the player to check of</param>
* <seealso name="SendClientCheck" />
* <returns>
* <b><c>1</c></b>: The player is using official client.<br />
* <b><c>0</c></b>: The player is not using official client or the player specified does not exist.
* </returns>
*/
native bool:IsPlayerUsingOfficialClient(playerid);

Expand Down
15 changes: 15 additions & 0 deletions omp_vehicle.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,11 @@ native bool:IsVehicleSirenEnabled(vehicleid);
*/
native bool:GetVehicleMatrix(vehicleid, &Float:rightX, &Float:rightY, &Float:rightZ, &Float:upX, &Float:upY, &Float:upZ, &Float:atX, &Float:atY, &Float:atZ);

/**
* <library>omp_vehicle</library>
*/
native GetVehicleMaxPassengers(modelid);

/**
* <library>omp_vehicle</library>
*/
Expand All @@ -1570,6 +1575,16 @@ native GetVehicleModelCount(modelid);
*/
native GetVehicleModelsUsed();

/**
* <library>omp_vehicle</library>
*/
native CountVehicleOccupants(vehicleid);

/**
* <library>omp_vehicle</library>
*/
native GetVehicleOccupant(vehicleid, seatid);

/**
* <library>omp_vehicle</library>
*/
Expand Down