From 008c0a8ba618d51d489800a4e1fe2976932d239d Mon Sep 17 00:00:00 2001 From: Adib Date: Mon, 15 Jan 2024 18:51:39 +0330 Subject: [PATCH] Add "Related Resources" to the bottom of the relevant docs and a bunch of changes (#832) * update callbacks/OnPlayerClickPlayer.md * update callbacks/OnPlayerDeath.md * update callbacks/OnPlayerEditObject.md * update callbacks/OnPlayerGiveDamage.md * update callbacks/OnPlayerGiveDamageActor.md * update callbacks/OnPlayerSelectObject.md * update callbacks/OnPlayerStateChange.md * update callbacks/OnPlayerTakeDamage.md * update callbacks/OnPlayerWeaponShot.md * update AddStaticPickup.md * update AddStaticVehicle.md * update AddStaticVehicleEx.md * update AddVehicleComponent.md * update ChangeVehicleColor.md * update ChangeVehicleColours.md * update ChangeVehiclePaintjob.md * update CreatePickup.md * update CreatePlayerPickup.md * update CreatePlayerTextDraw.md * update CreateVehicle.md * update floatcos.md * update floatround.md * update floatsin.md * update floattan.md * update GameTextForAll.md * update GameTextForPlayer.md * update GetPlayerCameraMode.md * update GetPlayerFightingStyle.md * update GetPlayerKeys.md * update GetPlayerSkillLevel.md * update GetPlayerSkin.md * update GetPlayerSpecialAction.md * update GetPlayerState.md * update GetPlayerWeaponState.md * update GetPlayerWeather.md * update GetPVarType.md * update GetSVarType.md * update GetVehicleColours.md * update GetVehicleComponentInSlot.md * update GetVehicleDamageStatus.md * update GetVehicleHealth.md * update GetVehicleModelInfo.md * update GetWeather.md * update GivePlayerWeapon.md * update InterpolateCameraLookAt.md * update InterpolateCameraPos.md * update LinkVehicleToInterior.md * update NetStats_ConnectionStatus.md * update PlayCrimeReportForPlayer.md * update PlayerPlaySound.md * update PlayerSpectatePlayer.md * update PlayerSpectateVehicle.md * update RemoveVehicleComponent.md * update SendDeathMessage.md * update SetObjectMaterialText.md * update SetPlayerAttachedObject.md * update SetPlayerCameraLookAt.md * update SetPlayerColor.md * update SetPlayerFightingStyle.md * update SetPlayerInterior.md * update SetPlayerMapIcon.md * update SetPlayerShopName.md * update SetPlayerSkin.md * update SetPlayerSpecialAction.md * update SetPlayerWeather.md * update SetVehicleHealth.md * update SetWeather.md * update ShowPlayerDialog.md * update ShowPlayerMarkers.md * update StartRecordingPlayerData.md * update TextDrawCreate.md * update UpdateVehicleDamageStatus.md * update resources/animations.md * update resources/callbacks-sequence.md * update resources/colorslist.md * update resources/constants.md * update resources/glossary.md * update resources/landinggearstate.md * update resources/mapicons.md * update resources/mapiconstyles.md * update resources/objecteditionresponsetypes.md * update resources/pvartypes.md * update resources/svartypes.md * update resources/textdraws.md * update resources/weaponskills.md --- .../callbacks/OnPlayerClickPlayer.md | 4 ++ docs/scripting/callbacks/OnPlayerDeath.md | 4 ++ .../scripting/callbacks/OnPlayerEditObject.md | 4 ++ .../scripting/callbacks/OnPlayerGiveDamage.md | 4 ++ .../callbacks/OnPlayerGiveDamageActor.md | 4 ++ .../callbacks/OnPlayerSelectObject.md | 4 ++ .../callbacks/OnPlayerStateChange.md | 4 ++ .../scripting/callbacks/OnPlayerTakeDamage.md | 4 ++ .../scripting/callbacks/OnPlayerWeaponShot.md | 4 ++ docs/scripting/functions/AddStaticPickup.md | 4 ++ docs/scripting/functions/AddStaticVehicle.md | 7 ++- .../scripting/functions/AddStaticVehicleEx.md | 7 ++- .../functions/AddVehicleComponent.md | 7 +++ .../scripting/functions/ChangeVehicleColor.md | 5 ++ .../functions/ChangeVehicleColours.md | 5 ++ .../functions/ChangeVehiclePaintjob.md | 4 ++ docs/scripting/functions/CreatePickup.md | 5 ++ .../scripting/functions/CreatePlayerPickup.md | 5 ++ .../functions/CreatePlayerTextDraw.md | 26 +++++++++++ docs/scripting/functions/CreateVehicle.md | 7 ++- docs/scripting/functions/GameTextForAll.md | 4 ++ docs/scripting/functions/GameTextForPlayer.md | 4 ++ docs/scripting/functions/GetPVarType.md | 4 ++ .../functions/GetPlayerCameraMode.md | 4 ++ .../functions/GetPlayerFightingStyle.md | 4 ++ docs/scripting/functions/GetPlayerKeys.md | 4 ++ .../functions/GetPlayerSkillLevel.md | 4 +- docs/scripting/functions/GetPlayerSkin.md | 4 ++ .../functions/GetPlayerSpecialAction.md | 4 ++ docs/scripting/functions/GetPlayerState.md | 7 +++ .../functions/GetPlayerWeaponState.md | 4 ++ docs/scripting/functions/GetPlayerWeather.md | 6 ++- docs/scripting/functions/GetSVarType.md | 4 ++ docs/scripting/functions/GetVehicleColours.md | 4 ++ .../functions/GetVehicleComponentInSlot.md | 7 +++ .../functions/GetVehicleDamageStatus.md | 7 +++ docs/scripting/functions/GetVehicleHealth.md | 8 +++- .../functions/GetVehicleModelInfo.md | 4 ++ docs/scripting/functions/GetWeather.md | 6 ++- docs/scripting/functions/GivePlayerWeapon.md | 4 ++ .../functions/InterpolateCameraLookAt.md | 4 ++ .../functions/InterpolateCameraPos.md | 4 ++ .../functions/LinkVehicleToInterior.md | 4 ++ .../functions/NetStats_ConnectionStatus.md | 7 +++ .../functions/PlayCrimeReportForPlayer.md | 4 ++ docs/scripting/functions/PlayerPlaySound.md | 4 ++ .../functions/PlayerSpectatePlayer.md | 4 ++ .../functions/PlayerSpectateVehicle.md | 4 ++ .../functions/RemoveVehicleComponent.md | 15 ++++-- docs/scripting/functions/SendDeathMessage.md | 7 +++ .../functions/SetObjectMaterialText.md | 5 ++ .../functions/SetPlayerAttachedObject.md | 4 ++ .../functions/SetPlayerCameraLookAt.md | 4 ++ docs/scripting/functions/SetPlayerColor.md | 4 ++ .../functions/SetPlayerFightingStyle.md | 4 ++ docs/scripting/functions/SetPlayerInterior.md | 4 ++ docs/scripting/functions/SetPlayerMapIcon.md | 21 +++++---- docs/scripting/functions/SetPlayerShopName.md | 4 ++ docs/scripting/functions/SetPlayerSkin.md | 4 ++ .../functions/SetPlayerSpecialAction.md | 4 ++ docs/scripting/functions/SetPlayerWeather.md | 4 ++ docs/scripting/functions/SetVehicleHealth.md | 9 +++- docs/scripting/functions/SetWeather.md | 4 ++ docs/scripting/functions/ShowPlayerDialog.md | 5 ++ docs/scripting/functions/ShowPlayerMarkers.md | 10 ++-- .../functions/StartRecordingPlayerData.md | 4 ++ docs/scripting/functions/TextDrawCreate.md | 24 ++++++++++ .../functions/UpdateVehicleDamageStatus.md | 7 +++ docs/scripting/functions/floatcos.md | 4 ++ docs/scripting/functions/floatround.md | 4 ++ docs/scripting/functions/floatsin.md | 4 ++ docs/scripting/functions/floattan.md | 4 ++ docs/scripting/resources/animations.md | 6 +++ .../scripting/resources/callbacks-sequence.md | 9 +++- docs/scripting/resources/colorslist.md | 2 +- docs/scripting/resources/constants.md | 16 +++++++ docs/scripting/resources/glossary.md | 27 +++++------ docs/scripting/resources/landinggearstate.md | 6 +++ docs/scripting/resources/mapicons.md | 10 ++-- docs/scripting/resources/mapiconstyles.md | 2 +- .../resources/objecteditionresponsetypes.md | 12 ++--- docs/scripting/resources/pvartypes.md | 10 ++-- docs/scripting/resources/svartypes.md | 4 +- docs/scripting/resources/textdraws.md | 46 +++++++++++++++++++ docs/scripting/resources/weaponskills.md | 26 +++++------ 85 files changed, 519 insertions(+), 70 deletions(-) diff --git a/docs/scripting/callbacks/OnPlayerClickPlayer.md b/docs/scripting/callbacks/OnPlayerClickPlayer.md index 70d2e7fde..7c69cf6b1 100644 --- a/docs/scripting/callbacks/OnPlayerClickPlayer.md +++ b/docs/scripting/callbacks/OnPlayerClickPlayer.md @@ -49,3 +49,7 @@ There is currently only one 'source' (0 - CLICK_SOURCE_SCOREBOARD). The existenc The following callbacks might be useful, as they're related to this callback in one way or another. - [OnPlayerClickTextDraw](OnPlayerClickTextDraw): This callback is called when a player clicks on a textdraw. + +## Related Resources + +- [Click Sources](../resources/clicksources) diff --git a/docs/scripting/callbacks/OnPlayerDeath.md b/docs/scripting/callbacks/OnPlayerDeath.md index 2155a539c..e3531015e 100644 --- a/docs/scripting/callbacks/OnPlayerDeath.md +++ b/docs/scripting/callbacks/OnPlayerDeath.md @@ -70,3 +70,7 @@ The following functions might be useful, as they're related to this callback in - [SendDeathMessage](../functions/SendDeathMessage): Add a kill to the death list. - [SetPlayerHealth](../functions/SetPlayerHealth): Set a player's health. + +## Related Resources + +- [Weapon IDs](../resources/weaponids) diff --git a/docs/scripting/callbacks/OnPlayerEditObject.md b/docs/scripting/callbacks/OnPlayerEditObject.md index 3aef10701..0dd7cc496 100644 --- a/docs/scripting/callbacks/OnPlayerEditObject.md +++ b/docs/scripting/callbacks/OnPlayerEditObject.md @@ -100,3 +100,7 @@ The following functions might be useful, as they're related to this callback in - [CreateObject](../functions/CreateObject): Create an object. - [DestroyObject](../functions/DestroyObject): Destroy an object. - [MoveObject](../functions/MoveObject): Move an object. + +## Related Resources + +- [Object Edition Response Types](../resources/objecteditionresponsetypes) diff --git a/docs/scripting/callbacks/OnPlayerGiveDamage.md b/docs/scripting/callbacks/OnPlayerGiveDamage.md index d46d3c862..ac53f1c9c 100644 --- a/docs/scripting/callbacks/OnPlayerGiveDamage.md +++ b/docs/scripting/callbacks/OnPlayerGiveDamage.md @@ -57,3 +57,7 @@ The following callbacks might be useful, as they're related to this callback in - [OnPlayerTakeDamage](OnPlayerTakeDamage): This callback is called when a player takes damage. - [OnPlayerWeaponShot](OnPlayerWeaponShot): This callback is called when a player fires a weapon. + +## Related Resources + +- [Body Parts](../resources/bodyparts) diff --git a/docs/scripting/callbacks/OnPlayerGiveDamageActor.md b/docs/scripting/callbacks/OnPlayerGiveDamageActor.md index 9f96b34c3..71511a02d 100644 --- a/docs/scripting/callbacks/OnPlayerGiveDamageActor.md +++ b/docs/scripting/callbacks/OnPlayerGiveDamageActor.md @@ -67,3 +67,7 @@ The following functions might be useful, as they're related to this callback in - [GetActorHealth](../functions/GetActorHealth): Gets the health of an actor. - [IsActorInvulnerable](../functions/IsActorInvulnerable): Check if actor is invulnerable. - [IsValidActor](../functions/IsValidActor): Check if actor id is valid. + +## Related Resources + +- [Body Parts](../resources/bodyparts) diff --git a/docs/scripting/callbacks/OnPlayerSelectObject.md b/docs/scripting/callbacks/OnPlayerSelectObject.md index 346249d6a..fb29bb9fa 100644 --- a/docs/scripting/callbacks/OnPlayerSelectObject.md +++ b/docs/scripting/callbacks/OnPlayerSelectObject.md @@ -52,3 +52,7 @@ public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:f The following functions might be useful, as they're related to this callback in one way or another. - [BeginObjectSelecting](../functions/BeginObjectSelecting): Select an object. + +## Related Resources + +- [Select Object Types](../resources/selectobjecttypes) diff --git a/docs/scripting/callbacks/OnPlayerStateChange.md b/docs/scripting/callbacks/OnPlayerStateChange.md index f9c78bf1e..0a560a285 100644 --- a/docs/scripting/callbacks/OnPlayerStateChange.md +++ b/docs/scripting/callbacks/OnPlayerStateChange.md @@ -51,3 +51,7 @@ The following functions might be useful, as they're related to this callback in - [GetPlayerState](../functions/GetPlayerState): Get a player's current state. - [GetPlayerSpecialAction](../functions/GetPlayerSpecialAction): Get a player's current special action. - [SetPlayerSpecialAction](../functions/SetPlayerSpecialAction): Set a player's special action. + +## Related Resources + +- [Player States](../resources/playerstates) diff --git a/docs/scripting/callbacks/OnPlayerTakeDamage.md b/docs/scripting/callbacks/OnPlayerTakeDamage.md index d8f44d50b..41227f513 100644 --- a/docs/scripting/callbacks/OnPlayerTakeDamage.md +++ b/docs/scripting/callbacks/OnPlayerTakeDamage.md @@ -80,3 +80,7 @@ The following callbacks might be useful, as they're related to this callback in - [OnPlayerGiveDamage](OnPlayerGiveDamage): This callback is called when a player gives damage. - [OnPlayerWeaponShot](OnPlayerWeaponShot): This callback is called when a player fires a weapon. + +## Related Resources + +- [Body Parts](../resources/bodyparts) diff --git a/docs/scripting/callbacks/OnPlayerWeaponShot.md b/docs/scripting/callbacks/OnPlayerWeaponShot.md index 247771298..1275f5e92 100644 --- a/docs/scripting/callbacks/OnPlayerWeaponShot.md +++ b/docs/scripting/callbacks/OnPlayerWeaponShot.md @@ -74,3 +74,7 @@ The following callbacks might be useful, as they're related to this callback in The following functions might be useful, as they're related to this callback in one way or another. - [GetPlayerLastShotVectors](../functions/GetPlayerLastShotVectors): Retrieves the vector of the last shot a player fired. + +## Related Resources + +- [Bullet Hit Types](../resources/bullethittypes) diff --git a/docs/scripting/functions/AddStaticPickup.md b/docs/scripting/functions/AddStaticPickup.md index c880fe114..93f50ad91 100644 --- a/docs/scripting/functions/AddStaticPickup.md +++ b/docs/scripting/functions/AddStaticPickup.md @@ -50,3 +50,7 @@ This function doesn't return a pickup ID that you can use in, for example, OnPla - [CreatePickup](CreatePickup): Create a pickup. - [DestroyPickup](DestroyPickup): Destroy a pickup. + +## Related Resources + +- [Pickup IDs](../resources/pickupids) diff --git a/docs/scripting/functions/AddStaticVehicle.md b/docs/scripting/functions/AddStaticVehicle.md index cf38fbe38..54356166f 100644 --- a/docs/scripting/functions/AddStaticVehicle.md +++ b/docs/scripting/functions/AddStaticVehicle.md @@ -10,7 +10,7 @@ Adds a 'static' vehicle (models are pre-loaded for players) to the gamemode. | Name | Description | | ---------------------------------------- | -------------------------------------- | -| modelid | The Model ID for the vehicle. | +| modelid | The [Model ID](../resources/vehicleid) for the vehicle. | | Float:spawn_X | The X-coordinate for the vehicle. | | Float:spawn_Y | The Y-coordinate for the vehicle. | | Float:spawn_Z | The Z-coordinate for the vehicle. | @@ -53,3 +53,8 @@ public OnGameModeInit() - [OnVehicleSpawn](../callbacks/OnVehicleSpawn): Called when a vehicle respawns. - [OnVehicleSirenStateChange](../callbacks/OnVehicleSirenStateChange): Called when a vehicle's siren is toggled on/off. + +## Related Resources + +- [Vehicle Models](../resources/vehicleid): Comprehensive list of all vehicle models available in game. +- [Vehicle Colour IDs](../resources/vehiclecolorid): List of all vehicle colour IDs. diff --git a/docs/scripting/functions/AddStaticVehicleEx.md b/docs/scripting/functions/AddStaticVehicleEx.md index 273de7356..63e7d8a38 100644 --- a/docs/scripting/functions/AddStaticVehicleEx.md +++ b/docs/scripting/functions/AddStaticVehicleEx.md @@ -10,7 +10,7 @@ Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Diff | Name | Description | | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| modelid | The Model ID for the vehicle. | +| modelid | The [Model ID](../resources/vehicleid) for the vehicle. | | Float:spawn_X | The X-coordinate for the vehicle. | | Float:spawn_Y | The Y-coordinate for the vehicle. | | Float:spawn_Z | The Z-coordinate for the vehicle. | @@ -55,3 +55,8 @@ public OnGameModeInit() - [OnVehicleSpawn](../callbacks/OnVehicleSpawn): Called when a vehicle respawns. - [OnVehicleSirenStateChange](../callbacks/OnVehicleSirenStateChange): Called when a vehicle's siren is toggled on/off. + +## Related Resources + +- [Vehicle Models](../resources/vehicleid): Comprehensive list of all vehicle models available in game. +- [Vehicle Colour IDs](../resources/vehiclecolorid): List of all vehicle colour IDs. diff --git a/docs/scripting/functions/AddVehicleComponent.md b/docs/scripting/functions/AddVehicleComponent.md index eef57bb84..8fda532b4 100644 --- a/docs/scripting/functions/AddVehicleComponent.md +++ b/docs/scripting/functions/AddVehicleComponent.md @@ -57,5 +57,12 @@ Using an invalid component ID crashes the player's game. There are no internal c - [RemoveVehicleComponent](RemoveVehicleComponent): Remove a component from a vehicle. - [GetVehicleComponentInSlot](GetVehicleComponentInSlot): Check what components a vehicle has. - [GetVehicleComponentType](GetVehicleComponentType): Check the type of component via the ID. + +## Related Callbacks + - [OnVehicleMod](../callbacks/OnVehicleMod): Called when a vehicle is modded. - [OnEnterExitModShop](../callbacks/OnEnterExitModShop): Called when a vehicle enters or exits a mod shop. + +## Related Resources + +- [Car Component IDs](../resources/carcomponentid) diff --git a/docs/scripting/functions/ChangeVehicleColor.md b/docs/scripting/functions/ChangeVehicleColor.md index b508792d2..5b476e0a6 100644 --- a/docs/scripting/functions/ChangeVehicleColor.md +++ b/docs/scripting/functions/ChangeVehicleColor.md @@ -80,3 +80,8 @@ Some vehicles have only a primary color and some can not have the color changed ## Related Callbacks - [OnVehicleRespray](../callbacks/OnVehicleRespray): Called when a vehicle is resprayed. + +## Related Resources + +- [Vehicle Color IDs](../resources/vehiclecolorid) +- [Original Car Colors](../resources/original-car-colors) diff --git a/docs/scripting/functions/ChangeVehicleColours.md b/docs/scripting/functions/ChangeVehicleColours.md index 79cc1dd49..682bec580 100644 --- a/docs/scripting/functions/ChangeVehicleColours.md +++ b/docs/scripting/functions/ChangeVehicleColours.md @@ -82,3 +82,8 @@ Some vehicles have only a primary color and some can not have the color changed ## Related Callbacks - [OnVehicleRespray](../callbacks/OnVehicleRespray): Called when a vehicle is resprayed. + +## Related Resources + +- [Vehicle Colour IDs](../resources/vehiclecolorid) +- [Original Car Colors](../resources/original-car-colors) diff --git a/docs/scripting/functions/ChangeVehiclePaintjob.md b/docs/scripting/functions/ChangeVehiclePaintjob.md index 54cd95484..9accc52c6 100644 --- a/docs/scripting/functions/ChangeVehiclePaintjob.md +++ b/docs/scripting/functions/ChangeVehiclePaintjob.md @@ -39,3 +39,7 @@ ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), rand); // changes the paintj ## Related Callbacks - [OnVehiclePaintjob](../callbacks/OnVehiclePaintjob): Called when a vehicle's paintjob is changed. + +## Related Resources + +- [Vehicle Paintjob IDs](../resources/paintjobs) diff --git a/docs/scripting/functions/CreatePickup.md b/docs/scripting/functions/CreatePickup.md index cfd402dac..b1f637dfa 100644 --- a/docs/scripting/functions/CreatePickup.md +++ b/docs/scripting/functions/CreatePickup.md @@ -80,3 +80,8 @@ The following callbacks might be useful, as they're related to this function. - [OnPlayerPickUpPickup](../callbacks/OnPlayerPickUpPickup): Called when a player picks up a pickup. - [OnPickupStreamIn](../callbacks/OnPickupStreamIn): Called when a pickup enters the visual range of a player. - [OnPickupStreamOut](../callbacks/OnPickupStreamOut): Called when a pickup leaves the visual range of a player. + +## Related Resources + +- [Pickup IDs](../resources/pickupids) +- [Pickup Types](../resources/pickuptypes) diff --git a/docs/scripting/functions/CreatePlayerPickup.md b/docs/scripting/functions/CreatePlayerPickup.md index c22b46c42..600440fc8 100644 --- a/docs/scripting/functions/CreatePlayerPickup.md +++ b/docs/scripting/functions/CreatePlayerPickup.md @@ -71,3 +71,8 @@ The following callbacks might be useful, as they're related to this function. - [OnPlayerPickUpPlayerPickup](../callbacks/OnPlayerPickUpPlayerPickup): Called when a player picks up a player-pickup. - [OnPlayerPickupStreamIn](../callbacks/OnPlayerPickupStreamIn): Called when a player-pickup enters the visual range of the player. - [OnPlayerPickupStreamOut](../callbacks/OnPlayerPickupStreamOut): Called when a player-pickup leaves the visual range of the player. + +## Related Resources + +- [Pickup IDs](../resources/pickupids) +- [Pickup Types](../resources/pickuptypes) diff --git a/docs/scripting/functions/CreatePlayerTextDraw.md b/docs/scripting/functions/CreatePlayerTextDraw.md index 80c791ddd..f9f7f1e9c 100644 --- a/docs/scripting/functions/CreatePlayerTextDraw.md +++ b/docs/scripting/functions/CreatePlayerTextDraw.md @@ -72,3 +72,29 @@ Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ Doesn't work beyond - [PlayerTextDrawHide](PlayerTextDrawHide): Hide a player-textdraw. - [IsPlayerTextDrawVisible](IsPlayerTextDrawVisible): Checks if a player-textdraw is shown for the player. - [IsValidPlayerTextDraw](IsValidPlayerTextDraw): Checks if a player-textdraw is valid. +- [PlayerTextDrawBackgroundColour](PlayerTextDrawBackgroundColour): Adjust the background colour of a player-textdraw. +- [PlayerTextDrawBoxColour](PlayerTextDrawBoxColour): Sets the colour of a textdraw's box (PlayerTextDrawUseBox ). +- [PlayerTextDrawColour](PlayerTextDrawColour): Sets the text colour of a player-textdraw. +- [PlayerTextDrawGetAlignment](PlayerTextDrawGetAlignment): Gets the text alignment of a player-textdraw. +- [PlayerTextDrawGetBackgroundColour](PlayerTextDrawGetBackgroundColour): Gets the background colour of a player-textdraw. +- [PlayerTextDrawGetBoxColour](PlayerTextDrawGetBoxColour): Gets the box colour of a player-textdraw. +- [PlayerTextDrawGetColour](PlayerTextDrawGetColour): Gets the text colour of a player-textdraw. +- [PlayerTextDrawGetFont](PlayerTextDrawGetFont): Gets the text font of a player-textdraw. +- [PlayerTextDrawGetLetterSize](PlayerTextDrawGetLetterSize): Gets the width and height of the letters. +- [PlayerTextDrawGetOutline](PlayerTextDrawGetOutline): Get the outline size on a player-textdraw. +- [PlayerTextDrawGetPos](PlayerTextDrawGetPos): Gets the position of a player-textdraw. +- [PlayerTextDrawGetPreviewModel](PlayerTextDrawGetPreviewModel): Gets the preview model of a 3D preview player-textdraw. +- [PlayerTextDrawGetPreviewRot](PlayerTextDrawGetPreviewRot): Gets the rotation and zoom of a 3D model preview player-textdraw. +- [PlayerTextDrawGetPreviewVehicleColours](PlayerTextDrawGetPreviewVehicleColours): Gets the preview vehicle colors of a 3D preview player-textdraw. +- [PlayerTextDrawGetShadow](PlayerTextDrawGetShadow): Get the shadow size on a player-textdraw. +- [PlayerTextDrawGetString](PlayerTextDrawGetString): Gets the text of a player-textdraw. +- [PlayerTextDrawGetTextSize](PlayerTextDrawGetTextSize): Gets the X axis and Y axis of the player-textdraw text size. +- [PlayerTextDrawIsBox](PlayerTextDrawIsBox): Checks if a player-textdraw is box. +- [PlayerTextDrawIsProportional](PlayerTextDrawIsProportional): Checks if a player-textdraw is proportional. +- [PlayerTextDrawIsSelectable](PlayerTextDrawIsSelectable): Checks if a player-textdraw is selectable. +- [PlayerTextDrawSetPos](PlayerTextDrawSetPos): Sets the position of a player-textdraw. +- [PlayerTextDrawSetPreviewVehicleColours](PlayerTextDrawSetPreviewVehicleColours): Set the color of a vehicle in a player-textdraw model preview (if a vehicle is shown). + +## Related Resources + +- [TextDraw Sprites](../resources/textdrawsprites) diff --git a/docs/scripting/functions/CreateVehicle.md b/docs/scripting/functions/CreateVehicle.md index 3aceb92b4..7b589d180 100644 --- a/docs/scripting/functions/CreateVehicle.md +++ b/docs/scripting/functions/CreateVehicle.md @@ -10,7 +10,7 @@ Creates a vehicle in the world. Can be used in place of AddStaticVehicleEx at an | Name | Description | | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| vehicletype | The model for the vehicle. | +| [vehicletype](../resources/vehicleid) | The model for the vehicle. | | Float:X | The X coordinate for the vehicle. | | Float:Y | The Y coordinate for the vehicle. | | Float:Z | The Z coordinate for the vehicle. | @@ -64,3 +64,8 @@ Trains can only be added with AddStaticVehicle and AddStaticVehicleEx. - [OnVehicleSpawn](../callbacks/OnVehicleSpawn): Called when a vehicle respawns. - [OnVehicleSirenStateChange](../callbacks/OnVehicleSirenStateChange): Called when a vehicle's siren is toggled on/off. + +## Related Resources + +- [Vehicle Models](../resources/vehicleid): Comprehensive list of all vehicle models available in game. +- [Vehicle Colour IDs](../resources/vehiclecolorid): List of all vehicle colour IDs. diff --git a/docs/scripting/functions/GameTextForAll.md b/docs/scripting/functions/GameTextForAll.md index 7edcf0f66..beca524f0 100644 --- a/docs/scripting/functions/GameTextForAll.md +++ b/docs/scripting/functions/GameTextForAll.md @@ -54,3 +54,7 @@ Do note that the players may crash because of odd number of tilde (~) symbols us - [GameTextForPlayer](GameTextForPlayer): Display gametext to a player. - [HideGameTextForPlayer](HideGameTextForPlayer): Stop showing a gametext style to a player. - [TextDrawShowForAll](TextDrawShowForAll): Show a textdraw for all players. + +## Related Resources + +- [GameText Styles](../resources/gametextstyles) diff --git a/docs/scripting/functions/GameTextForPlayer.md b/docs/scripting/functions/GameTextForPlayer.md index df7119a68..06551e873 100644 --- a/docs/scripting/functions/GameTextForPlayer.md +++ b/docs/scripting/functions/GameTextForPlayer.md @@ -58,3 +58,7 @@ Also, a blank space at end of the string may result in faliure. For example: `"H - [GetGameText](GetGameText): Gets all the information on the given game text style. - [HasGameText](HasGameText): Does the player currently have text in the given gametext style displayed? - [TextDrawShowForAll](TextDrawShowForAll): Show a textdraw for all players. + +## Related Resources + +- [GameText Styles](../resources/gametextstyles) diff --git a/docs/scripting/functions/GetPVarType.md b/docs/scripting/functions/GetPVarType.md index 092602cbb..474c98012 100644 --- a/docs/scripting/functions/GetPVarType.md +++ b/docs/scripting/functions/GetPVarType.md @@ -57,3 +57,7 @@ stock PrintPVar(playerid, varname[]) - [SetPVarFloat](SetPVarFloat): Set a float for a player variable. - [GetPVarFloat](GetPVarFloat): Get the previously set float from a player variable. - [DeletePVar](DeletePVar): Delete a player variable. + +## Related Resources + +- [Player Variable Types](../resources/pvartypes) diff --git a/docs/scripting/functions/GetPlayerCameraMode.md b/docs/scripting/functions/GetPlayerCameraMode.md index 7cd7c78d1..f883aa5f4 100644 --- a/docs/scripting/functions/GetPlayerCameraMode.md +++ b/docs/scripting/functions/GetPlayerCameraMode.md @@ -41,3 +41,7 @@ public OnPlayerText(playerid, text[]) - [SetPlayerCameraPos](SetPlayerCameraPos): Set a player's camera position. - [SetPlayerCameraLookAt](SetPlayerCameraLookAt): Set where a player's camera should face. - [SetCameraBehindPlayer](SetCameraBehindPlayer): Set a player's camera behind them. + +## Related Resources + +- [Camera Modes](../resources/cameramodes) diff --git a/docs/scripting/functions/GetPlayerFightingStyle.md b/docs/scripting/functions/GetPlayerFightingStyle.md index 697385e95..24f9081c0 100644 --- a/docs/scripting/functions/GetPlayerFightingStyle.md +++ b/docs/scripting/functions/GetPlayerFightingStyle.md @@ -30,3 +30,7 @@ if (GetPlayerFightingStyle(playerid) == FIGHT_STYLE_NORMAL) ## Related Functions - [SetPlayerFightingStyle](SetPlayerFightingStyle): Set a player's fighting style. + +## Related Resources + +- [Fighting Styles](../resources/fightingstyles) diff --git a/docs/scripting/functions/GetPlayerKeys.md b/docs/scripting/functions/GetPlayerKeys.md index c9a27f1a6..5e5dbb215 100644 --- a/docs/scripting/functions/GetPlayerKeys.md +++ b/docs/scripting/functions/GetPlayerKeys.md @@ -57,3 +57,7 @@ public OnPlayerUpdate(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. ::: + +## Related Resources + +- [Keys](../resources/keys) diff --git a/docs/scripting/functions/GetPlayerSkillLevel.md b/docs/scripting/functions/GetPlayerSkillLevel.md index 4475bf10d..cf7357f8e 100644 --- a/docs/scripting/functions/GetPlayerSkillLevel.md +++ b/docs/scripting/functions/GetPlayerSkillLevel.md @@ -40,7 +40,9 @@ The skill parameter is NOT the weapon ID, it is the skill type. Click [here](../ ::: # Related Functions + - [SetPlayerSkillLevel](SetPlayerSkillLevel): Set the skill level of a certain weapon type for a player. # Related Information -- [Weapon Skills](../resources/weaponskills#skill-levels): List of weapon skills that are used to set player's skill level. \ No newline at end of file + +- [Weapon Skills](../resources/weaponskills): List of weapon skills that are used to set player's skill level. diff --git a/docs/scripting/functions/GetPlayerSkin.md b/docs/scripting/functions/GetPlayerSkin.md index ec7b37d3e..03fad90ba 100644 --- a/docs/scripting/functions/GetPlayerSkin.md +++ b/docs/scripting/functions/GetPlayerSkin.md @@ -33,3 +33,7 @@ Returns the new skin after [SetSpawnInfo](SetSpawnInfo) is called but before the ## Related Functions - [SetPlayerSkin](SetPlayerSkin): Set a player's skin. + +## Related Resources + +- [Skin IDs](../resources/skins) diff --git a/docs/scripting/functions/GetPlayerSpecialAction.md b/docs/scripting/functions/GetPlayerSpecialAction.md index db12400d0..65c775241 100644 --- a/docs/scripting/functions/GetPlayerSpecialAction.md +++ b/docs/scripting/functions/GetPlayerSpecialAction.md @@ -34,3 +34,7 @@ public OnPlayerUpdate(playerid) - [SetPlayerSpecialAction](SetPlayerSpecialAction): Set a player's special action. - [GetPlayerState](GetPlayerState): Get a player's current state. + +## Related Resources + +- [Special Action IDs](../resources/specialactions) diff --git a/docs/scripting/functions/GetPlayerState.md b/docs/scripting/functions/GetPlayerState.md index 44f78ef3d..3a28442cf 100644 --- a/docs/scripting/functions/GetPlayerState.md +++ b/docs/scripting/functions/GetPlayerState.md @@ -36,4 +36,11 @@ public OnPlayerDeath(playerid, killerid, reason) - [GetPlayerSpecialAction](GetPlayerSpecialAction): Get a player's current special action. - [SetPlayerSpecialAction](SetPlayerSpecialAction): Set a player's special action. + +## Related Callbacks + - [OnPlayerStateChange](../callbacks/OnPlayerStateChange): Called when a player changes state. + +## Related Resources + +- [Player States](../resources/playerstates) diff --git a/docs/scripting/functions/GetPlayerWeaponState.md b/docs/scripting/functions/GetPlayerWeaponState.md index c5820f3e0..2fe59c0ca 100644 --- a/docs/scripting/functions/GetPlayerWeaponState.md +++ b/docs/scripting/functions/GetPlayerWeaponState.md @@ -31,3 +31,7 @@ public OnPlayerSpawn(playerid) ## Related Functions - [GivePlayerWeapon](GivePlayerWeapon): Give a player a weapon. + +## Related Resources + +- [Weapon States](../resources/weaponstates) diff --git a/docs/scripting/functions/GetPlayerWeather.md b/docs/scripting/functions/GetPlayerWeather.md index fdbb60dd8..7d98c9efa 100644 --- a/docs/scripting/functions/GetPlayerWeather.md +++ b/docs/scripting/functions/GetPlayerWeather.md @@ -30,4 +30,8 @@ printf("Player weather: %d", GetPlayerWeather(playerid)); ## Related Functions - [SetPlayerWeather](SetPlayerWeather): Set a player's weather. -- [SetWeather](SetWeather): Set the world weather for all players. \ No newline at end of file +- [SetWeather](SetWeather): Set the world weather for all players. + +## Related Resources + +- [Weather IDs](../resources/weatherid) diff --git a/docs/scripting/functions/GetSVarType.md b/docs/scripting/functions/GetSVarType.md index 3bc342315..bcf8e3eb7 100644 --- a/docs/scripting/functions/GetSVarType.md +++ b/docs/scripting/functions/GetSVarType.md @@ -56,3 +56,7 @@ stock PrintSVar(varname[]) - [SetSVarFloat](SetSVarFloat): Set a float for a server variable. - [GetSVarFloat](GetSVarFloat): Get the previously set float from a server variable. - [DeleteSVar](DeleteSVar): Delete a server variable. + +## Related Resources + +- [Server Variable Types](../resources/svartypes) diff --git a/docs/scripting/functions/GetVehicleColours.md b/docs/scripting/functions/GetVehicleColours.md index 1b07f5dbb..b65e7bf8a 100644 --- a/docs/scripting/functions/GetVehicleColours.md +++ b/docs/scripting/functions/GetVehicleColours.md @@ -39,3 +39,7 @@ public OnGameModeInit() ## Related Functions - [ChangeVehicleColours](ChangeVehicleColours): Change a vehicle's primary and secondary colors. + +## Related Resources + +- [Vehicle Colour IDs](../resources/vehiclecolorid) diff --git a/docs/scripting/functions/GetVehicleComponentInSlot.md b/docs/scripting/functions/GetVehicleComponentInSlot.md index d512bedb1..3cd33519c 100644 --- a/docs/scripting/functions/GetVehicleComponentInSlot.md +++ b/docs/scripting/functions/GetVehicleComponentInSlot.md @@ -49,5 +49,12 @@ Known Bug(s): Doesn't work for CARMODTYPE_STEREO. Both front bull bars and front - [AddVehicleComponent](AddVehicleComponent): Add a component to a vehicle. - [GetVehicleComponentType](GetVehicleComponentType): Check the type of component via the ID. + +## Related Callbacks + - [OnVehicleMod](../callbacks/OnVehicleMod): Called when a vehicle is modded. - [OnEnterExitModShop](../callbacks/OnEnterExitModShop): Called when a vehicle enters or exits a mod shop. + +## Related Resources + +- [Vehicle Component Slots](../resources/Componentslots) diff --git a/docs/scripting/functions/GetVehicleDamageStatus.md b/docs/scripting/functions/GetVehicleDamageStatus.md index 2305f38e3..084ef7d18 100644 --- a/docs/scripting/functions/GetVehicleDamageStatus.md +++ b/docs/scripting/functions/GetVehicleDamageStatus.md @@ -45,4 +45,11 @@ printf("Vehicle Status: [Panels]: %d - [Doors]: %d - [Lights]: %d - [Tires]: %d" - [SetVehicleHealth](SetVehicleHealth): Set the health of a vehicle. - [GetVehicleHealth](GetVehicleHealth): Check the health of a vehicle. - [RepairVehicle](RepairVehicle): Fully repair a vehicle. + +## Related Callbacks + - [OnVehicleDamageStatusUpdate](../callbacks/OnVehicleDamageStatusUpdate): Called when a vehicle's damage state changes. + +## Related Resources + +- [Damage Status](../resources/damagestatus) diff --git a/docs/scripting/functions/GetVehicleHealth.md b/docs/scripting/functions/GetVehicleHealth.md index 46af36736..bf5884668 100644 --- a/docs/scripting/functions/GetVehicleHealth.md +++ b/docs/scripting/functions/GetVehicleHealth.md @@ -32,12 +32,12 @@ if (strcmp(cmdtext, "/repair", true) == 0) GetVehicleHealth(playerVehicleId, vehicleHealth); - if (vehicleHealth > 500) + if (vehicleHealth > 500.0) { return SendClientMessage(playerid, COLOR_RED, "Vehicle doesn't need repairing!"); } - SetVehicleHealth(playerVehicleId, 1000); + SetVehicleHealth(playerVehicleId, 1000.0); SendClientMessage(playerid, COLOR_GREEN, "Vehicle repaired!"); } ``` @@ -61,3 +61,7 @@ A vehicle catches on fire when its health is below 250. It will explode a few se - [SetVehicleHealth](SetVehicleHealth): Set the health of a vehicle. - [GetPlayerHealth](GetPlayerHealth): Find out how much health a player has. - [GetPlayerArmour](GetPlayerArmour): Find out how much armour a player has. + +## Related Resources + +- [Vehicle Health Values](../resources/vehiclehealth) diff --git a/docs/scripting/functions/GetVehicleModelInfo.md b/docs/scripting/functions/GetVehicleModelInfo.md index b84c43ecf..d2d4b3aa8 100644 --- a/docs/scripting/functions/GetVehicleModelInfo.md +++ b/docs/scripting/functions/GetVehicleModelInfo.md @@ -36,3 +36,7 @@ printf("The infernus is %.1fm wide, %.1fm long and %.1fm high", X, Y, Z); ## Related Functions - [GetVehicleModel](GetVehicleModel): Get the model id of a vehicle. + +## Related Resources + +- [Vehicle Information Types](../resources/vehicleinformationtypes) diff --git a/docs/scripting/functions/GetWeather.md b/docs/scripting/functions/GetWeather.md index e55d185b8..def317f05 100644 --- a/docs/scripting/functions/GetWeather.md +++ b/docs/scripting/functions/GetWeather.md @@ -23,4 +23,8 @@ printf("Current world weather: %d", GetWeather()); - [SetWeather](SetWeather): Set the world weather for all players. - [GetPlayerWeather](GetPlayerWeather): Get a player's weather. -- [SetPlayerWeather](SetPlayerWeather): Set a player's weather. \ No newline at end of file +- [SetPlayerWeather](SetPlayerWeather): Set a player's weather. + +## Related Resources + +- [Weather IDs](../resources/weatherid) diff --git a/docs/scripting/functions/GivePlayerWeapon.md b/docs/scripting/functions/GivePlayerWeapon.md index 30b62b6f2..dc44cc0fc 100644 --- a/docs/scripting/functions/GivePlayerWeapon.md +++ b/docs/scripting/functions/GivePlayerWeapon.md @@ -30,3 +30,7 @@ GivePlayerWeapon(playerid, 26, 64); // Give playerid a sawn-off shotgun with 64 - [SetPlayerArmedWeapon](SetPlayerArmedWeapon): Set a player's armed weapon. - [GetPlayerWeapon](GetPlayerWeapon): Check what weapon a player is currently holding. + +## Related Resources + +- [Weapon IDs](../resources/weaponids) diff --git a/docs/scripting/functions/InterpolateCameraLookAt.md b/docs/scripting/functions/InterpolateCameraLookAt.md index 71bb329e3..04758815b 100644 --- a/docs/scripting/functions/InterpolateCameraLookAt.md +++ b/docs/scripting/functions/InterpolateCameraLookAt.md @@ -57,3 +57,7 @@ Use TogglePlayerSpectating to make objects stream in for the player while the ca - [InterpolateCameraPos](InterpolateCameraPos): Move a player's camera from one location to another. - [SetPlayerCameraLookAt](SetPlayerCameraLookAt): Set where a player's camera should face. - [SetPlayerCameraPos](SetPlayerCameraPos): Set a player's camera position. + +## Related Resources + +- [Camera Cut Styles](../resources/cameracutstyles) diff --git a/docs/scripting/functions/InterpolateCameraPos.md b/docs/scripting/functions/InterpolateCameraPos.md index 475c92619..126e2d15c 100644 --- a/docs/scripting/functions/InterpolateCameraPos.md +++ b/docs/scripting/functions/InterpolateCameraPos.md @@ -55,3 +55,7 @@ Use TogglePlayerSpectating to make objects stream in for the player while the ca - [InterpolateCameraLookAt](InterpolateCameraLookAt): Move a player's camera view from one location to another. - [SetPlayerCameraPos](SetPlayerCameraPos): Set a player's camera position. - [SetPlayerCameraLookAt](SetPlayerCameraLookAt): Set where a player's camera should face. + +## Related Resources + +- [Camera Cut Styles](../resources/cameracutstyles) diff --git a/docs/scripting/functions/LinkVehicleToInterior.md b/docs/scripting/functions/LinkVehicleToInterior.md index 72afd40b2..ef34fbdd6 100644 --- a/docs/scripting/functions/LinkVehicleToInterior.md +++ b/docs/scripting/functions/LinkVehicleToInterior.md @@ -34,3 +34,7 @@ public OnGameModeInit() - [GetVehicleInterior](GetVehicleInterior): Get the interior id of a vehicle. - [SetVehicleVirtualWorld](SetVehicleVirtualWorld): Set the virtual world of a vehicle. - [SetPlayerInterior](SetPlayerInterior): Set a player's interior. + +## Related Resources + +- [Interior IDs](../resources/interiorids) diff --git a/docs/scripting/functions/NetStats_ConnectionStatus.md b/docs/scripting/functions/NetStats_ConnectionStatus.md index fcfd46e71..0e2bee8cc 100644 --- a/docs/scripting/functions/NetStats_ConnectionStatus.md +++ b/docs/scripting/functions/NetStats_ConnectionStatus.md @@ -46,5 +46,12 @@ public OnPlayerCommandText(playerid,cmdtext[]) - [NetStats_PacketLossPercent](NetStats_PacketLossPercent): Get a player's packet loss percent. - [NetStats_GetIpPort](NetStats_GetIpPort): Get a player's IP and port. - [IsPlayerConnected](IsPlayerConnected): Check if a player is connected to the server. + +## Related Callbacks + - [OnPlayerConnect](../callbacks/OnPlayerConnect): Called when a player connects to the server. - [OnPlayerDisconnect](../callbacks/OnPlayerDisconnect): Called when a player leaves the server. + +## Related Resources + +- [Connection Status](../resources/connectionstatus) diff --git a/docs/scripting/functions/PlayCrimeReportForPlayer.md b/docs/scripting/functions/PlayCrimeReportForPlayer.md index e12d4b781..fb7801d76 100644 --- a/docs/scripting/functions/PlayCrimeReportForPlayer.md +++ b/docs/scripting/functions/PlayCrimeReportForPlayer.md @@ -40,3 +40,7 @@ public OnPlayerCommandText(playerid, cmdtext[]) ## Related Functions - [PlayerPlaySound](PlayerPlaySound): Play a sound for a player. + +## Related Resources + +- [Crime IDs](../resources/crimelist) diff --git a/docs/scripting/functions/PlayerPlaySound.md b/docs/scripting/functions/PlayerPlaySound.md index 8b0d1dd65..9e3b7704d 100644 --- a/docs/scripting/functions/PlayerPlaySound.md +++ b/docs/scripting/functions/PlayerPlaySound.md @@ -44,3 +44,7 @@ Only use the coordinates if you want the sound to be played at a certain positio - [PlayCrimeReportForPlayer](PlayCrimeReportForPlayer): Play a crime report for a player. - [PlayAudioStreamForPlayer](PlayAudioStreamForPlayer): Plays a audio stream for a player. - [StopAudioStreamForPlayer](StopAudioStreamForPlayer): Stops the current audio stream for a player. + +## Related Resources + +- [Sound IDs](../resources/sound-ids) diff --git a/docs/scripting/functions/PlayerSpectatePlayer.md b/docs/scripting/functions/PlayerSpectatePlayer.md index c81e1acaa..c769eb717 100644 --- a/docs/scripting/functions/PlayerSpectatePlayer.md +++ b/docs/scripting/functions/PlayerSpectatePlayer.md @@ -45,3 +45,7 @@ Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpect - [TogglePlayerSpectating](TogglePlayerSpectating): Start or stop spectating. - [GetPlayerSpectateID](GetPlayerSpectateID): Gets the ID of the player or vehicle the player is spectating (watching). - [GetPlayerSpectateType](GetPlayerSpectateType): Gets the player's spectate type. + +## Related Resources + +- [Spectate Modes](../resources/spectatemodes) diff --git a/docs/scripting/functions/PlayerSpectateVehicle.md b/docs/scripting/functions/PlayerSpectateVehicle.md index 95337f7f3..23f845624 100644 --- a/docs/scripting/functions/PlayerSpectateVehicle.md +++ b/docs/scripting/functions/PlayerSpectateVehicle.md @@ -41,3 +41,7 @@ Order is CRITICAL! Ensure that you use TogglePlayerSpectating before PlayerSpect - [TogglePlayerSpectating](TogglePlayerSpectating): Start or stop spectating. - [GetPlayerSpectateID](GetPlayerSpectateID): Gets the ID of the player or vehicle the player is spectating (watching). - [GetPlayerSpectateType](GetPlayerSpectateType): Gets the player's spectate type. + +## Related Resources + +- [Spectate Modes](../resources/spectatemodes) diff --git a/docs/scripting/functions/RemoveVehicleComponent.md b/docs/scripting/functions/RemoveVehicleComponent.md index 39bd2811b..690677478 100644 --- a/docs/scripting/functions/RemoveVehicleComponent.md +++ b/docs/scripting/functions/RemoveVehicleComponent.md @@ -8,10 +8,10 @@ tags: ["vehicle"] Remove a component from a vehicle. -| Name | Description | -| ----------- | ------------------------------ | -| vehicleid | ID of the vehicle. | -| componentid | ID of the component to remove. | +| Name | Description | +|--------------------------------------------|--------------------------------| +| vehicleid | ID of the vehicle. | +| [componentid](../resources/carcomponentid) | ID of the component to remove. | ## Returns @@ -31,5 +31,12 @@ RemoveVehicleComponent(1, 1010); - [AddVehicleComponent](AddVehicleComponent): Add a component to a vehicle. - [GetVehicleComponentInSlot](GetVehicleComponentInSlot): Check what components a vehicle has. - [GetVehicleComponentType](GetVehicleComponentType): Check the type of component via the ID. + +## Related Callbacks + - [OnVehicleMod](../callbacks/OnVehicleMod): Called when a vehicle is modded. - [OnEnterExitModShop](../callbacks/OnEnterExitModShop): Called when a vehicle enters or exits a mod shop. + +## Related Resources + +- [Car Component IDs](../resources/carcomponentid) diff --git a/docs/scripting/functions/SendDeathMessage.md b/docs/scripting/functions/SendDeathMessage.md index f4d9c3d3d..325c44af3 100644 --- a/docs/scripting/functions/SendDeathMessage.md +++ b/docs/scripting/functions/SendDeathMessage.md @@ -39,4 +39,11 @@ Death messages can be cleared by using a valid player ID for 'playerid' that is ## Related Functions - [SendDeathMessageToPlayer](SendDeathMessageToPlayer): Add a kill to the death list for a player. + +## Related Callbacks + - [OnPlayerDeath](../callbacks/OnPlayerDeath): Called when a player dies. + +## Related Resources + +- [Weapon IDs and Death Reasons](../resources/weaponids) diff --git a/docs/scripting/functions/SetObjectMaterialText.md b/docs/scripting/functions/SetObjectMaterialText.md index b3111c52a..5e2de1998 100644 --- a/docs/scripting/functions/SetObjectMaterialText.md +++ b/docs/scripting/functions/SetObjectMaterialText.md @@ -64,3 +64,8 @@ Text does not update after 16 calls against the same object. - Ultimate Creator by Nexius - SetObjectMaterialText Editor by RIDE2DAY - Fusez's Map Editor by RedFusion + +## Related Resources + +- [Material Text Sizes](../resources/materialtextsizes) +- [Material Text Alignments](../resources/materialtextalignment) diff --git a/docs/scripting/functions/SetPlayerAttachedObject.md b/docs/scripting/functions/SetPlayerAttachedObject.md index c270ef919..283db8512 100644 --- a/docs/scripting/functions/SetPlayerAttachedObject.md +++ b/docs/scripting/functions/SetPlayerAttachedObject.md @@ -66,3 +66,7 @@ In version 0.3d and onwards, 10 objects can be attached to a single player (inde - [IsPlayerAttachedObjectSlotUsed](IsPlayerAttachedObjectSlotUsed): Check whether an object is attached to a player in a specified index - [GetPlayerAttachedObject](GetPlayerAttachedObject): Gets the player attachment object data by index. - [EditAttachedObject](EditAttachedObject): Edit an attached object. + +## Related Resources + +- [Bone IDs](../resources/boneid) diff --git a/docs/scripting/functions/SetPlayerCameraLookAt.md b/docs/scripting/functions/SetPlayerCameraLookAt.md index 53528fdee..4720c7c17 100644 --- a/docs/scripting/functions/SetPlayerCameraLookAt.md +++ b/docs/scripting/functions/SetPlayerCameraLookAt.md @@ -43,3 +43,7 @@ Using the camera functions directly after enabling spectator mode doesn't work. - [SetCameraBehindPlayer](SetCameraBehindPlayer): Set a player's camera behind them. - [GetPlayerCameraPos](GetPlayerCameraPos): Find out where the player's camera is. - [GetPlayerCameraFrontVector](GetPlayerCameraFrontVector): Get the player's camera front vector + +## Related Resources + +- [Camera Cut Styles](../resources/cameracutstyles) diff --git a/docs/scripting/functions/SetPlayerColor.md b/docs/scripting/functions/SetPlayerColor.md index 209f83531..33b9ca611 100644 --- a/docs/scripting/functions/SetPlayerColor.md +++ b/docs/scripting/functions/SetPlayerColor.md @@ -40,3 +40,7 @@ This function will change player's color for everyone, even if player's color wa - [SetPlayerMarkerForPlayer](SetPlayerMarkerForPlayer): Set a player's marker. - [GetPlayerColor](GetPlayerColor): Check the color of a player. - [ChangeVehicleColor](ChangeVehicleColor): Set the color of a vehicle. + +## Related Resources + +- [Color List](../resources/colorslist) diff --git a/docs/scripting/functions/SetPlayerFightingStyle.md b/docs/scripting/functions/SetPlayerFightingStyle.md index 9f3daf2a4..32dfe884f 100644 --- a/docs/scripting/functions/SetPlayerFightingStyle.md +++ b/docs/scripting/functions/SetPlayerFightingStyle.md @@ -41,3 +41,7 @@ This does not affect normal fist attacks - only special/secondary attacks (aim + ## Related Functions - [GetPlayerFightingStyle](scripting/functions/GetPlayerFightingStyle): Get a player's fighting style. + +## Related Resources + +- [Fighting Styles](../resources/fightingstyles) diff --git a/docs/scripting/functions/SetPlayerInterior.md b/docs/scripting/functions/SetPlayerInterior.md index 2cd80347b..865de9fdb 100644 --- a/docs/scripting/functions/SetPlayerInterior.md +++ b/docs/scripting/functions/SetPlayerInterior.md @@ -31,3 +31,7 @@ SetPlayerInterior(playerid, 0); - [GetPlayerInterior](GetPlayerInterior): Get the current interior of a player. - [LinkVehicleToInterior](LinkVehicleToInterior): Change the interior that a vehicle is seen in. - [OnPlayerInteriorChange](../callbacks/OnPlayerInteriorChange): Called when a player changes interior. + +## Related Resources + +- [Interior IDs](../resources/interiorids) diff --git a/docs/scripting/functions/SetPlayerMapIcon.md b/docs/scripting/functions/SetPlayerMapIcon.md index 167140121..e3d8589fa 100644 --- a/docs/scripting/functions/SetPlayerMapIcon.md +++ b/docs/scripting/functions/SetPlayerMapIcon.md @@ -11,24 +11,24 @@ Place an icon/marker on a player's map. Can be used to mark locations such as ba | Name | Description | | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | playerid | The ID of the player to set the map icon for. | -| iconid | 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](/docs/scripting/functions/RemovePlayerMapIcon). | +| iconid | 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](RemovePlayerMapIcon). | | Float:x | The X coordinate to place the map icon at. | | Float:y | The Y coordinate to place the map icon at. | | Float:z | The Z coordinate to place the map icon at. | -| markertype | The [icon](/docs/scripting/resources/mapicons) to set. | +| markertype | The [icon](../resources/mapicons) to set. | | color | The color of the icon, as an integer or hex in RGBA color format. This should only be used with the square icon (ID: 0). | -| style | The [style](/docs/scripting/resources/mapiconstyles) of icon. | +| style | The [style](../resources/mapiconstyles) of icon. | ## Returns -1: The function executed successfully. +`true` - The function executed successfully. -0: The function failed to execute. Player is not connected. +`false` - The function failed to execute. Player is not connected. ## Examples ```c -public OnPlayerConnect( playerid ) +public OnPlayerConnect(playerid) { // This example demonstrates how to create a dollar-icon on top of a 24/7 located // in Las Venturas. This way new players know where to go with their money! @@ -52,5 +52,10 @@ You can only have 100 map icons! Marker type 1 (![](/images/mapIcons/icon1.gif)) ## Related Functions -- [RemovePlayerMapIcon](/docs/scripting/functions/RemovePlayerMapIcon): Remove a map icon for a player. -- [SetPlayerMarkerForPlayer](/docs/scripting/functions/SetPlayerMarkerForPlayer): Set a player's marker. +- [RemovePlayerMapIcon](RemovePlayerMapIcon): Remove a map icon for a player. +- [SetPlayerMarkerForPlayer](SetPlayerMarkerForPlayer): Set a player's marker. + +## Related Resources + +- [Map Icons](../resources/mapicons): A list of map icons. +- [Map Icon Styles](../resources/mapiconstyles): A list of map icon styles. diff --git a/docs/scripting/functions/SetPlayerShopName.md b/docs/scripting/functions/SetPlayerShopName.md index c3a61d766..4d6cf2430 100644 --- a/docs/scripting/functions/SetPlayerShopName.md +++ b/docs/scripting/functions/SetPlayerShopName.md @@ -48,3 +48,7 @@ This function does not support casino scripts. - [DisableInteriorEnterExits](DisableInteriorEnterExits): Disable the yellow door markers. - [SetPlayerInterior](SetPlayerInterior): Set a player's interior. + +## Related Resources + +- [Shop Names](../resources/shopnames) diff --git a/docs/scripting/functions/SetPlayerSkin.md b/docs/scripting/functions/SetPlayerSkin.md index cba7c58fb..d2b0f8f72 100644 --- a/docs/scripting/functions/SetPlayerSkin.md +++ b/docs/scripting/functions/SetPlayerSkin.md @@ -95,3 +95,7 @@ Known Bug(s): If a player's skin is set when they are crouching, in a vehicle, o - [GetPlayerSkin](GetPlayerSkin): Get a player's current skin. - [SetSpawnInfo](SetSpawnInfo): Set the spawn setting for a player. + +## Related Resources + +- [Skin IDs](../resources/skins) diff --git a/docs/scripting/functions/SetPlayerSpecialAction.md b/docs/scripting/functions/SetPlayerSpecialAction.md index 936e944aa..a4e915737 100644 --- a/docs/scripting/functions/SetPlayerSpecialAction.md +++ b/docs/scripting/functions/SetPlayerSpecialAction.md @@ -41,3 +41,7 @@ Removing jetpacks from players by setting their special action to 0 causes the s - [GetPlayerSpecialAction](GetPlayerSpecialAction): Get a player's current special action. - [ApplyAnimation](ApplyAnimation): Apply an animation to a player. + +## Related Resources + +- [Special Action IDs](../resources/specialactions) diff --git a/docs/scripting/functions/SetPlayerWeather.md b/docs/scripting/functions/SetPlayerWeather.md index b4fed3446..795aedfed 100644 --- a/docs/scripting/functions/SetPlayerWeather.md +++ b/docs/scripting/functions/SetPlayerWeather.md @@ -44,3 +44,7 @@ If TogglePlayerClock is enabled, weather will slowly change over time, instead o - [GetPlayerWeather](GetPlayerWeather): Get a player's weather. - [SetWeather](SetWeather): Set the global weather. - [SetGravity](SetGravity): Set the global gravity. + +## Related Resources + +- [Weather IDs](../resources/weatherid) diff --git a/docs/scripting/functions/SetVehicleHealth.md b/docs/scripting/functions/SetVehicleHealth.md index f84283d81..3f9f493d5 100644 --- a/docs/scripting/functions/SetVehicleHealth.md +++ b/docs/scripting/functions/SetVehicleHealth.md @@ -27,7 +27,7 @@ if (strcmp("/fixengine", cmdtext, true) == 0) new vehicleid = GetPlayerVehicleID(playerid); - SetVehicleHealth(vehicleid, 1000); + SetVehicleHealth(vehicleid, 1000.0); SendClientMessage(playerid, COLOUR_WHITE, "The vehicles engine has been fully repaired."); return 1; } @@ -46,4 +46,11 @@ Full vehicle health is 1000. Higher values are possible. For more information on - [GetVehicleHealth](GetVehicleHealth): Check the health of a vehicle. - [RepairVehicle](RepairVehicle): Fully repair a vehicle. - [SetPlayerHealth](SetPlayerHealth): Set a player's health. + +## Related Callbacks + - [OnVehicleDeath](../callbacks/OnVehicleDeath): Called when a vehicle is destroyed. + +## Related Resources + +- [Vehicle Health Values](../resources/vehiclehealth) diff --git a/docs/scripting/functions/SetWeather.md b/docs/scripting/functions/SetWeather.md index 922749799..708a716b6 100644 --- a/docs/scripting/functions/SetWeather.md +++ b/docs/scripting/functions/SetWeather.md @@ -39,3 +39,7 @@ If TogglePlayerClock is enabled, weather will slowly change over time, instead o - [GetWeather](GetWeather): Get the current world weather. - [SetPlayerWeather](SetPlayerWeather): Set a player's weather. - [SetGravity](SetGravity): Set the global gravity. + +## Related Resources + +- [Weather IDs](../resources/weatherid) diff --git a/docs/scripting/functions/ShowPlayerDialog.md b/docs/scripting/functions/ShowPlayerDialog.md index 9f9d0920b..8869f7747 100644 --- a/docs/scripting/functions/ShowPlayerDialog.md +++ b/docs/scripting/functions/ShowPlayerDialog.md @@ -90,3 +90,8 @@ Use color embedding for multiple colors in the text. Using -1 as dialogid closes ## Related Callbacks - [OnDialogResponse](../callbacks/OnDialogResponse): Called when a player responds to a dialog. + +## Related Resources + +- [Dialog Style](../resources/dialogstyles) +- [Escape Codes](../resources/escapecodes) diff --git a/docs/scripting/functions/ShowPlayerMarkers.md b/docs/scripting/functions/ShowPlayerMarkers.md index b3d3f1db3..292d48776 100644 --- a/docs/scripting/functions/ShowPlayerMarkers.md +++ b/docs/scripting/functions/ShowPlayerMarkers.md @@ -8,9 +8,9 @@ tags: ["player"] Toggles player markers (blips on the radar). Must be used when the server starts (OnGameModeInit). For other times, see SetPlayerMarkerForPlayer. -| Name | Description | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------- | -| mode | The [mode](#marker-modes) to use for markers. They can be streamed, meaning they are only visible to nearby players. See table below. | +| Name | Description | +|------|---------------------------------------------------------------------------------------------------------------------------------| +| mode | The [mode](../resources/markermodes) to use for markers. They can be streamed, meaning they are only visible to nearby players. | ## Returns @@ -48,3 +48,7 @@ It is also possible to set a player's color to a color that has full transparenc - [LimitPlayerMarkerRadius](LimitPlayerMarkerRadius): Limit the player marker radius. - [ShowNameTags](ShowNameTags): Set nametags on or off. - [SetPlayerColor](SetPlayerColor): Set a player's color. + +## Related Resources + +- [Marker Modes](../resources/markermodes) diff --git a/docs/scripting/functions/StartRecordingPlayerData.md b/docs/scripting/functions/StartRecordingPlayerData.md index 0ec19d486..0125ca617 100644 --- a/docs/scripting/functions/StartRecordingPlayerData.md +++ b/docs/scripting/functions/StartRecordingPlayerData.md @@ -41,3 +41,7 @@ if (!strcmp("/recordme", cmdtext)) ## Related Functions - [StopRecordingPlayerData](StopRecordingPlayerData): Stops recording player data. + +## Related Resources + +- [Record Types](../resources/recordtypes) diff --git a/docs/scripting/functions/TextDrawCreate.md b/docs/scripting/functions/TextDrawCreate.md index 9e737d892..57b4a84f2 100644 --- a/docs/scripting/functions/TextDrawCreate.md +++ b/docs/scripting/functions/TextDrawCreate.md @@ -76,3 +76,27 @@ Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ don't work beyond 25 - [TextDrawHideForAll](TextDrawHideForAll): Hide a textdraw for all players. - [IsTextDrawVisibleForPlayer](IsTextDrawVisibleForPlayer): Checks if a textdraw is shown for the player. - [IsValidTextDraw](IsValidTextDraw): Checks if a textdraw is valid. +- [TextDrawGetAlignment](TextDrawGetAlignment): Gets the text alignment of a textdraw. +- [TextDrawGetBackgroundColour](TextDrawGetBackgroundColour): Gets the background colour of a textdraw. +- [TextDrawGetBoxColour](TextDrawGetBoxColour): Gets the box colour of a textdraw. +- [TextDrawGetColour](TextDrawGetColour): Gets the text colour of a textdraw. +- [TextDrawGetFont](TextDrawGetFont): Gets the text font of a textdraw. +- [TextDrawGetLetterSize](TextDrawGetLetterSize): Gets the width and height of the letters. +- [TextDrawGetOutline](TextDrawGetOutline): Gets the thickness of a textdraw's text's outline. +- [TextDrawGetPos](TextDrawGetPos): Gets the position of a textdraw. +- [TextDrawGetPreviewModel](TextDrawGetPreviewModel): Gets the preview model of a 3D preview textdraw. +- [TextDrawGetPreviewRot](TextDrawGetPreviewRot): Gets the rotation and zoom of a 3D model preview textdraw. +- [TextDrawGetPreviewVehCol](TextDrawGetPreviewVehCol): Gets the preview vehicle colors of a 3D preview textdraw. +- [TextDrawGetPreviewVehicleColours](TextDrawGetPreviewVehicleColours): Gets the preview vehicle colours of a 3D preview textdraw. +- [TextDrawGetShadow](TextDrawGetShadow): Gets the size of a textdraw's text's shadow. +- [TextDrawGetString](TextDrawGetString): Gets the text of a textdraw. +- [TextDrawGetTextSize](TextDrawGetTextSize): Gets the X axis and Y axis of the textdraw. +- [TextDrawIsBox](TextDrawIsBox): Checks if a textdraw is box. +- [TextDrawIsProportional](TextDrawIsProportional): Checks if a textdraw is proportional. +- [TextDrawIsSelectable](TextDrawIsSelectable): Checks if a textdraw is selectable. +- [TextDrawSetPos](TextDrawSetPos): Sets the position of a textdraw. +- [TextDrawSetStringForPlayer](TextDrawSetStringForPlayer): Changes the text on a textdraw for a specific player. + +## Related Resources + +- [TextDraw Sprites](../resources/textdrawsprites) diff --git a/docs/scripting/functions/UpdateVehicleDamageStatus.md b/docs/scripting/functions/UpdateVehicleDamageStatus.md index d206ca27e..5ac4c54ba 100644 --- a/docs/scripting/functions/UpdateVehicleDamageStatus.md +++ b/docs/scripting/functions/UpdateVehicleDamageStatus.md @@ -43,4 +43,11 @@ UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, 15); // Setting tire - [GetVehicleHealth](GetVehicleHealth): Check the health of a vehicle. - [RepairVehicle](RepairVehicle): Fully repair a vehicle. - [GetVehicleDamageStatus](GetVehicleDamageStatus): Get the vehicle damage state for each part individually. + +## Related Callbacks + - [OnVehicleDamageStatusUpdate](../callbacks/OnVehicleDamageStatusUpdate): Called when a vehicle's damage state changes. + +## Related Resources + +- [Damage Status](../resources/damagestatus) diff --git a/docs/scripting/functions/floatcos.md b/docs/scripting/functions/floatcos.md index 1cc2a151a..afd5bc568 100644 --- a/docs/scripting/functions/floatcos.md +++ b/docs/scripting/functions/floatcos.md @@ -42,3 +42,7 @@ GTA/SA-MP use degrees for angles in most circumstances, for example [GetPlayerFa - [floatsin](floatsin): Get the sine from a specific angle. - [floattan](floattan): Get the tangent from a specific angle. + +## Related Resources + +- [Angle Modes](../resources/anglemodes): SI unit constants for measuring angles. diff --git a/docs/scripting/functions/floatround.md b/docs/scripting/functions/floatround.md index 61fea1c23..87d9bce73 100644 --- a/docs/scripting/functions/floatround.md +++ b/docs/scripting/functions/floatround.md @@ -29,3 +29,7 @@ floatround(3.3, floatround_ceil); - [float](float): Convert an integer to a float. - [floatstr](floatstr): Convert an string to a float. + +## Related Resources + +- [Floatround Modes](../resources/floatroundmodes) diff --git a/docs/scripting/functions/floatsin.md b/docs/scripting/functions/floatsin.md index 6d254cb6e..b41231ae0 100644 --- a/docs/scripting/functions/floatsin.md +++ b/docs/scripting/functions/floatsin.md @@ -50,3 +50,7 @@ GTA/SA-MP use degrees for angles in most circumstances, for example [GetPlayerFa - [floattan](floattan): Get the tangent from a specific angle. - [floatcos](floatcos): Get the cosine from a specific angle. + +## Related Resources + +- [Angle Modes](../resources/anglemodes): SI unit constants for measuring angles. diff --git a/docs/scripting/functions/floattan.md b/docs/scripting/functions/floattan.md index bcbcb030c..7ba06063e 100644 --- a/docs/scripting/functions/floattan.md +++ b/docs/scripting/functions/floattan.md @@ -42,3 +42,7 @@ GTA/SA-MP use degrees for angles in most circumstances, for example [GetPlayerFa - [floatsin](floatsin): Get the sine from a specific angle. - [floatcos](floatcos): Get the cosine from a specific angle. + +## Related Resources + +- [Angle Modes](../resources/anglemodes): SI unit constants for measuring angles. diff --git a/docs/scripting/resources/animations.md b/docs/scripting/resources/animations.md index ce6ffa235..bf800b440 100644 --- a/docs/scripting/resources/animations.md +++ b/docs/scripting/resources/animations.md @@ -6,6 +6,12 @@ tags: [] :::note +These animations are used by [ApplyAnimation](../functions/ApplyAnimation) function. + +::: + +:::note + Please note that some of the listed animations may not be useable in SA-MP. ::: diff --git a/docs/scripting/resources/callbacks-sequence.md b/docs/scripting/resources/callbacks-sequence.md index 9dbbabac2..1fe642a50 100644 --- a/docs/scripting/resources/callbacks-sequence.md +++ b/docs/scripting/resources/callbacks-sequence.md @@ -1,10 +1,10 @@ --- title: Callbacks Sequence -description: A list of callbacks available in SA-MP and its call sequence +description: A list of callbacks available in SA-MP/open.mp and its call sequence tags: [] --- -Below is a list of callbacks available in SA-MP and its call sequence. Tickbox represent called first. +Below is a list of callbacks available in SA-MP/open.mp and its call sequence. Tickbox represent called first. | Callback | FilterScript | GameMode | |-------------------------------------------------------------------------|--------------|----------| @@ -44,6 +44,11 @@ Below is a list of callbacks available in SA-MP and its call sequence. Tickbox r | [OnPlayerLeaveRaceCheckpoint](../callbacks/OnPlayerLeaveRaceCheckpoint) | ✅ | | | [OnPlayerObjectMoved](../callbacks/OnPlayerObjectMoved) | ✅ | | | [OnPlayerPickUpPickup](../callbacks/OnPlayerPickUpPickup) | | ✅ | +| [OnPickupStreamIn](../callbacks/OnPickupStreamIn) | ✅ | | +| [OnPickupStreamOut](../callbacks/OnPickupStreamOut) | ✅ | | +| [OnPlayerPickUpPlayerPickup](../callbacks/OnPlayerPickUpPlayerPickup) | | ✅ | +| [OnPlayerPickupStreamIn](../callbacks/OnPlayerPickupStreamIn) | ✅ | | +| [OnPlayerPickupStreamOut](../callbacks/OnPlayerPickupStreamOut) | ✅ | | | [OnPlayerRequestClass](../callbacks/OnPlayerRequestClass) | ✅ | | | [OnPlayerRequestDownload](../callbacks/OnPlayerRequestDownload) | ✅ | | | [OnPlayerRequestSpawn](../callbacks/OnPlayerRequestSpawn) | ✅ | | diff --git a/docs/scripting/resources/colorslist.md b/docs/scripting/resources/colorslist.md index d3d6e4720..394bb5441 100644 --- a/docs/scripting/resources/colorslist.md +++ b/docs/scripting/resources/colorslist.md @@ -10,7 +10,7 @@ Colors in SA-MP are generally represented in hexadecimal notation (though intege _RR_ is the red part of the color, _GG_ the green and _BB_ the blue. _AA_ is the alpha value. If FF is used there, the color will display without transparency and if 00 is used, it will be invisible. -For the Hex code for these colors, go to the [Hex colors](../resources/hex-colors) page. +For the Hex code for these colors, go to the [Hex colors](hexcolors) page. --- diff --git a/docs/scripting/resources/constants.md b/docs/scripting/resources/constants.md index d95363de6..bc7058553 100644 --- a/docs/scripting/resources/constants.md +++ b/docs/scripting/resources/constants.md @@ -43,6 +43,7 @@ tags: [] | Value | Weapon | Constant | | ----- | ------------------ | ----------------------- | +| 0 | Fist | WEAPON_FIST | | 1 | Brass Knuckles | WEAPON_BRASSKNUCKLE | | 2 | Golf Club | WEAPON_GOLFCLUB | | 3 | Nite stick | WEAPON_NITESTICK | @@ -135,9 +136,24 @@ tags: [] | Value | Constant | | ----- | ------------------------------ | +| 0 | TEXT_DRAW_FONT_0 | +| 1 | TEXT_DRAW_FONT_1 | +| 2 | TEXT_DRAW_FONT_2 | +| 3 | TEXT_DRAW_FONT_3 | | 4 | TEXT_DRAW_FONT_SPRITE_DRAW | | 5 | TEXT_DRAW_FONT_MODEL_PREVIEW | +## TextDraw Fonts (From open.mp) + +| Value | Constant | +|-------|--------------------------------| +| 0 | TEXT_DRAW_FONT_BECKETT_REGULAR | +| 1 | TEXT_DRAW_FONT_AHARONI_BOLD | +| 2 | TEXT_DRAW_FONT_BANK_GOTHIC | +| 3 | TEXT_DRAW_FONT_PRICEDOWN | +| 4 | TEXT_DRAW_FONT_SPRITE | +| 5 | TEXT_DRAW_FONT_PREVIEW | + ## SVar Enumeration | Value | Constant | diff --git a/docs/scripting/resources/glossary.md b/docs/scripting/resources/glossary.md index fbe989c75..3c78fa22c 100644 --- a/docs/scripting/resources/glossary.md +++ b/docs/scripting/resources/glossary.md @@ -5,16 +5,17 @@ tags: [] sidebar_label: Glossary --- -| Word | Meaning | -| ------------- | ------------------------------------------------------------------------------------------------------- | -| PAWN | The scripting language used to make SA:MP scripts | -| Gamemodes | The main script that runs on a server | -| Filterscripts | Scripts that run alongside gamemodes | -| Plugins | Extra functions/capabilites added through a .dll (Windows) or .so (Linux) file | -| Include | Pieces of script placed in .inc files to be included in Filterscripts/Gamemodes using `#include ` | -| Pawno | The script editor most people use for PAWN | -| Pawncc | The compiler that compiles .pwn to .amx | -| Masterlist | The server SA:MP stores its data on such as the Internet list | -| Deathmatch | A contest where players try to kill each other to win | -| Roleplay | A gamemode type where players acting like in real life | -| Reallife | A gamemode type which is based on real life but players do not need to act like in real life | +| Word | Meaning | +|---------------------------------------------------|---------------------------------------------------------------------------------------------------------| +| PAWN | The scripting language used to make SA:MP scripts | +| Gamemodes | The main script that runs on a server | +| Filterscripts | Scripts that run alongside gamemodes | +| Plugins | Extra functions/capabilites added through a .dll (Windows) or .so (Linux) file | +| Include | Pieces of script placed in .inc files to be included in Filterscripts/Gamemodes using `#include ` | +| Pawno | The script editor most people use for PAWN | +| [Qawno](https://github.com/openmultiplayer/qawno) | The script editor most people use for PAWN | +| Pawncc | The compiler that compiles .pwn to .amx | +| Masterlist | The server SA:MP stores its data on such as the Internet list | +| Deathmatch | A contest where players try to kill each other to win | +| Roleplay | A gamemode type where players acting like in real life | +| Reallife | A gamemode type which is based on real life but players do not need to act like in real life | diff --git a/docs/scripting/resources/landinggearstate.md b/docs/scripting/resources/landinggearstate.md index c767223c7..4311a8876 100644 --- a/docs/scripting/resources/landinggearstate.md +++ b/docs/scripting/resources/landinggearstate.md @@ -3,6 +3,12 @@ title: Vehicle Landing Gear States description: Vehicle Landing Gear States --- +:::note + +Vehicle landing gear states used by [GetVehicleLandingGearState](../functions/GetVehicleLandingGearState) and [GetPlayerLandingGearState](../functions/GetPlayerLandingGearState) functions. + +::: + | Definition | ID | |-------------------------|----| | LANDING_GEAR_STATE_DOWN | 0 | diff --git a/docs/scripting/resources/mapicons.md b/docs/scripting/resources/mapicons.md index 999302329..a094006f0 100644 --- a/docs/scripting/resources/mapicons.md +++ b/docs/scripting/resources/mapicons.md @@ -3,6 +3,12 @@ title: Map Icons description: A list of Map Icons. --- +:::info + +This page has a list of all map icons which can be used by [SetPlayerMapIcon](../functions/SetPlayerMapIcon) function. + +::: + | ID | Icon | Name | Notes | | --- | -------------------------------- | --------------------------------- | ---------------------------------------------------------------- | | 0 | ![](/images/mapIcons/icon0.gif) | Colored Square/Triangle (Dynamic) | Can be used in any colour. Used for Single Player objectives. Displays as triangle when the marker isn't at the same ground level with a player | @@ -69,7 +75,3 @@ description: A list of Map Icons. | 61 | ![](/images/mapIcons/icon61.gif) | San Fierro Rifa | | | 62 | ![](/images/mapIcons/icon62.gif) | Grove Street Families | | | 63 | ![](/images/mapIcons/icon63.gif) | Pay 'n' Spray | | - -## Related Functions - -- [SetPlayerMapIcon](/docs/scripting/functions/SetPlayerMapIcon): Create a mapicon for a player. diff --git a/docs/scripting/resources/mapiconstyles.md b/docs/scripting/resources/mapiconstyles.md index ffba855bf..ec96b5e5b 100644 --- a/docs/scripting/resources/mapiconstyles.md +++ b/docs/scripting/resources/mapiconstyles.md @@ -5,7 +5,7 @@ description: A list of Map Icons :::info -This page has a list of all map icon styles which can be used by [SetPlayerMapIcon](/docs/scripting/functions/SetPlayerMapIcon). +This page has a list of all map icon styles which can be used by [SetPlayerMapIcon](../functions/SetPlayerMapIcon) function. ::: diff --git a/docs/scripting/resources/objecteditionresponsetypes.md b/docs/scripting/resources/objecteditionresponsetypes.md index 8fd510ae8..4fc17d948 100644 --- a/docs/scripting/resources/objecteditionresponsetypes.md +++ b/docs/scripting/resources/objecteditionresponsetypes.md @@ -4,12 +4,12 @@ title: Object Edition Response Types :::info -Here you can find all of the object edition response types used by [OnPlayerEditObject](../callbacks/OnPlayerEditObject) and [OnPlayerEditAttachedObject](../callbacks/OnPlayerEditAttachedObject). +Here you can find all of the object edition response types used by [OnPlayerEditObject](../callbacks/OnPlayerEditObject). ::: -| Value | Definition | Description | -| ------ | --------- | ------------ | -| 1 | EDIT_RESPONSE_CANCEL | The player cancelled any modifications by pressing ESC | -| 2 | EDIT_RESPONSE_FINAL | The player considers the changes as final and pressed on Save | -| 3 | EDIT_RESPONSE_UPDATE | The player simply moved the object (edition did not stop at all) | +| Value | Definition | Description | +|-------|----------------------|------------------------------------------------------------------| +| 1 | EDIT_RESPONSE_CANCEL | The player cancelled any modifications by pressing ESC | +| 2 | EDIT_RESPONSE_FINAL | The player considers the changes as final and pressed on Save | +| 3 | EDIT_RESPONSE_UPDATE | The player simply moved the object (edition did not stop at all) | diff --git a/docs/scripting/resources/pvartypes.md b/docs/scripting/resources/pvartypes.md index 3c5e19c6b..58f16cb51 100644 --- a/docs/scripting/resources/pvartypes.md +++ b/docs/scripting/resources/pvartypes.md @@ -8,9 +8,9 @@ Types of player variables (also called pvar types) used in [Per-player variable ::: -| ID | Definition | -| ------- | ----------- | -| 0 | PLAYER_VARTYPE_NONE | -| 1 | PLAYER_VARTYPE_INT | +| ID | Definition | +|----|-----------------------| +| 0 | PLAYER_VARTYPE_NONE | +| 1 | PLAYER_VARTYPE_INT | | 2 | PLAYER_VARTYPE_STRING | -| 3 | PLAYER_VARTYPE_FLOAT | +| 3 | PLAYER_VARTYPE_FLOAT | diff --git a/docs/scripting/resources/svartypes.md b/docs/scripting/resources/svartypes.md index 0adf96db2..ceb52f3a4 100644 --- a/docs/scripting/resources/svartypes.md +++ b/docs/scripting/resources/svartypes.md @@ -4,7 +4,9 @@ title: "Svar Types" :::info -Types of server variables (also called svar types) used by [GetSVarType](../functions/GetSVarType). +Types of server variables (also called svar types) used by [GetSVarType](../functions/GetSVarType) function. + +See also: [Server variable system](../../tutorials/servervariablesystem) ::: diff --git a/docs/scripting/resources/textdraws.md b/docs/scripting/resources/textdraws.md index 294e578e6..adec488f4 100644 --- a/docs/scripting/resources/textdraws.md +++ b/docs/scripting/resources/textdraws.md @@ -34,6 +34,28 @@ Global textdraws can be created, then shown to all players. There is a [limit](. - [TextDrawHideForPlayer](../functions/TextDrawHideForPlayer): Hide a textdraw for a certain player. - [TextDrawShowForAll](../functions/TextDrawShowForAll): Show a textdraw for all players. - [TextDrawHideForAll](../functions/TextDrawHideForAll): Hide a textdraw for all players. +- [IsTextDrawVisibleForPlayer](../functions/IsTextDrawVisibleForPlayer): Checks if a textdraw is shown for the player. +- [IsValidTextDraw](../functions/IsValidTextDraw): Checks if a textdraw is valid. +- [TextDrawGetAlignment](../functions/TextDrawGetAlignment): Gets the text alignment of a textdraw. +- [TextDrawGetBackgroundColour](../functions/TextDrawGetBackgroundColour): Gets the background colour of a textdraw. +- [TextDrawGetBoxColour](../functions/TextDrawGetBoxColour): Gets the box colour of a textdraw. +- [TextDrawGetColour](../functions/TextDrawGetColour): Gets the text colour of a textdraw. +- [TextDrawGetFont](../functions/TextDrawGetFont): Gets the text font of a textdraw. +- [TextDrawGetLetterSize](../functions/TextDrawGetLetterSize): Gets the width and height of the letters. +- [TextDrawGetOutline](../functions/TextDrawGetOutline): Gets the thickness of a textdraw's text's outline. +- [TextDrawGetPos](../functions/TextDrawGetPos): Gets the position of a textdraw. +- [TextDrawGetPreviewModel](../functions/TextDrawGetPreviewModel): Gets the preview model of a 3D preview textdraw. +- [TextDrawGetPreviewRot](../functions/TextDrawGetPreviewRot): Gets the rotation and zoom of a 3D model preview textdraw. +- [TextDrawGetPreviewVehCol](../functions/TextDrawGetPreviewVehCol): Gets the preview vehicle colors of a 3D preview textdraw. +- [TextDrawGetPreviewVehicleColours](../functions/TextDrawGetPreviewVehicleColours): Gets the preview vehicle colours of a 3D preview textdraw. +- [TextDrawGetShadow](../functions/TextDrawGetShadow): Gets the size of a textdraw's text's shadow. +- [TextDrawGetString](../functions/TextDrawGetString): Gets the text of a textdraw. +- [TextDrawGetTextSize](../functions/TextDrawGetTextSize): Gets the X axis and Y axis of the textdraw. +- [TextDrawIsBox](../functions/TextDrawIsBox): Checks if a textdraw is box. +- [TextDrawIsProportional](../functions/TextDrawIsProportional): Checks if a textdraw is proportional. +- [TextDrawIsSelectable](../functions/TextDrawIsSelectable): Checks if a textdraw is selectable. +- [TextDrawSetPos](../functions/TextDrawSetPos): Sets the position of a textdraw. +- [TextDrawSetStringForPlayer](../functions/TextDrawSetStringForPlayer): Changes the text on a textdraw for a specific player. --- @@ -57,6 +79,30 @@ Player-textdraws are only created for one specific player. Up to 256 textdraws c - [PlayerTextDrawSetString](../functions/PlayerTextDrawSetString): Set the text of a player-textdraw. - [PlayerTextDrawShow](../functions/PlayerTextDrawShow): Show a player-textdraw. - [PlayerTextDrawHide](../functions/PlayerTextDrawHide): Hide a player-textdraw. +- [IsPlayerTextDrawVisible](../functions/IsPlayerTextDrawVisible): Checks if a player-textdraw is shown for the player. +- [IsValidPlayerTextDraw](../functions/IsValidPlayerTextDraw): Checks if a player-textdraw is valid. +- [PlayerTextDrawBackgroundColour](../functions/PlayerTextDrawBackgroundColour): Adjust the background colour of a player-textdraw. +- [PlayerTextDrawBoxColour](../functions/PlayerTextDrawBoxColour): Sets the colour of a textdraw's box (PlayerTextDrawUseBox ). +- [PlayerTextDrawColour](../functions/PlayerTextDrawColour): Sets the text colour of a player-textdraw. +- [PlayerTextDrawGetAlignment](../functions/PlayerTextDrawGetAlignment): Gets the text alignment of a player-textdraw. +- [PlayerTextDrawGetBackgroundColour](../functions/PlayerTextDrawGetBackgroundColour): Gets the background colour of a player-textdraw. +- [PlayerTextDrawGetBoxColour](../functions/PlayerTextDrawGetBoxColour): Gets the box colour of a player-textdraw. +- [PlayerTextDrawGetColour](../functions/PlayerTextDrawGetColour): Gets the text colour of a player-textdraw. +- [PlayerTextDrawGetFont](../functions/PlayerTextDrawGetFont): Gets the text font of a player-textdraw. +- [PlayerTextDrawGetLetterSize](../functions/PlayerTextDrawGetLetterSize): Gets the width and height of the letters. +- [PlayerTextDrawGetOutline](../functions/PlayerTextDrawGetOutline): Get the outline size on a player-textdraw. +- [PlayerTextDrawGetPos](../functions/PlayerTextDrawGetPos): Gets the position of a player-textdraw. +- [PlayerTextDrawGetPreviewModel](../functions/PlayerTextDrawGetPreviewModel): Gets the preview model of a 3D preview player-textdraw. +- [PlayerTextDrawGetPreviewRot](../functions/PlayerTextDrawGetPreviewRot): Gets the rotation and zoom of a 3D model preview player-textdraw. +- [PlayerTextDrawGetPreviewVehicleColours](../functions/PlayerTextDrawGetPreviewVehicleColours): Gets the preview vehicle colors of a 3D preview player-textdraw. +- [PlayerTextDrawGetShadow](../functions/PlayerTextDrawGetShadow): Get the shadow size on a player-textdraw. +- [PlayerTextDrawGetString](../functions/PlayerTextDrawGetString): Gets the text of a player-textdraw. +- [PlayerTextDrawGetTextSize](../functions/PlayerTextDrawGetTextSize): Gets the X axis and Y axis of the player-textdraw text size. +- [PlayerTextDrawIsBox](../functions/PlayerTextDrawIsBox): Checks if a player-textdraw is box. +- [PlayerTextDrawIsProportional](../functions/PlayerTextDrawIsProportional): Checks if a player-textdraw is proportional. +- [PlayerTextDrawIsSelectable](../functions/PlayerTextDrawIsSelectable): Checks if a player-textdraw is selectable. +- [PlayerTextDrawSetPos](../functions/PlayerTextDrawSetPos): Sets the position of a player-textdraw. +- [PlayerTextDrawSetPreviewVehicleColours](../functions/PlayerTextDrawSetPreviewVehicleColours): Set the color of a vehicle in a player-textdraw model preview (if a vehicle is shown). --- diff --git a/docs/scripting/resources/weaponskills.md b/docs/scripting/resources/weaponskills.md index 3a16b8355..300b1a0ef 100644 --- a/docs/scripting/resources/weaponskills.md +++ b/docs/scripting/resources/weaponskills.md @@ -5,25 +5,25 @@ description: Weapon skill values to be used with SetPlayerSkillLevel. ## Description -The table below contains a list of valid weapon skill types used by [SetPlayerSkillLevel](../functions/SetPlayerSkillLevel) function. +The table below contains a list of valid weapon skill types used by [SetPlayerSkillLevel](../functions/SetPlayerSkillLevel) and [GetPlayerSkillLevel](../functions/GetPlayerSkillLevel). --- - + ## Skill Types -| Value | Definition | -| ----- | ---------- | -| 0 | WEAPONSKILL_PISTOL | +| Value | Definition | +|-------|-----------------------------| +| 0 | WEAPONSKILL_PISTOL | | 1 | WEAPONSKILL_PISTOL_SILENCED | -| 2 | WEAPONSKILL_DESERT_EAGLE | -| 3 | WEAPONSKILL_SHOTGUN | +| 2 | WEAPONSKILL_DESERT_EAGLE | +| 3 | WEAPONSKILL_SHOTGUN | | 4 | WEAPONSKILL_SAWNOFF_SHOTGUN | -| 5 | WEAPONSKILL_SPAS12_SHOTGUN | -| 6 | WEAPONSKILL_MICRO_UZI | -| 7 | WEAPONSKILL_MP5 | -| 8 | WEAPONSKILL_AK47 | -| 9 | WEAPONSKILL_M4 | -| 10 | WEAPONSKILL_SNIPERRIFLE | +| 5 | WEAPONSKILL_SPAS12_SHOTGUN | +| 6 | WEAPONSKILL_MICRO_UZI | +| 7 | WEAPONSKILL_MP5 | +| 8 | WEAPONSKILL_AK47 | +| 9 | WEAPONSKILL_M4 | +| 10 | WEAPONSKILL_SNIPERRIFLE | ---