Skip to content

Commit

Permalink
Fix some natives images and other things
Browse files Browse the repository at this point in the history
  • Loading branch information
NeenGame committed Aug 24, 2024
1 parent 331a50c commit 0a0d931
Show file tree
Hide file tree
Showing 67 changed files with 186 additions and 137 deletions.
2 changes: 1 addition & 1 deletion CAM/InvalidateIdleCam.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Resets the idle camera timer. Calling that in a loop once every few seconds is e

## Examples
```lua
Citizen.CreateThread(function()
CreateThread(function()
while true do
InvalidateIdleCam()
InvalidateVehicleIdleCam()
Expand Down
2 changes: 1 addition & 1 deletion CAM/InvalidateVehicleIdleCam.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Resets the vehicle idle camera timer. Calling this in a loop will disable the id

## Examples
```lua
Citizen.CreateThread(function()
CreateThread(function()
while true do
InvalidateIdleCam()
InvalidateVehicleIdleCam()
Expand Down
2 changes: 1 addition & 1 deletion CAM/SetCamDofStrength.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ CreateThread(function()
while DoesCamExist(camera) do
-- Use DoF effect (needs to be called every tick)
SetUseHiDof()
Citizen.Wait(0)
Wait(0)
end
end)
```
2 changes: 0 additions & 2 deletions CAM/SetCamSplineSmoothingStyle.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ Using 1-3 will result in misalignment from the passed durations for the spline n

Graph below demonstrates interpolation between 0-1000 and back 10 times.

![](https://i.imgur.com/cixWh7m.png)

## Parameters
* **cam**: The DEFAULT_SPLINE_CAMERA to apply the smoothing to
* **smoothingStyle**: 0 to 3, 0 no additional smoothing, 1 smooth lead-in, 2 smooth lead-out, 3 smooth lead-in & lead-out
2 changes: 1 addition & 1 deletion ENTITY/RemoveModelHide.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ local playerPedCoords = GetEntityCoords(PlayerPedId())
-- Hides all entities with the hash "1437508529" within 1.0 gta units.
CreateModelHide(playerPedCoords, 1.0, 1437508529, true)
Citizen.Wait(2500)
Wait(2500)
-- This will make all hidden entities with the hash "1437508529" within 1.0 gta units visible.
RemoveModelHide(playerPedCoords, 1.0, 1437508529, false)
Expand Down
4 changes: 2 additions & 2 deletions ENTITY/SetEntityRotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RegisterCommand('360', function()
local currentYaw = yaw
-- Loop to adjust the rotation in steps
for i = 1, steps do
Citizen.Wait(20) -- Increases the delay between each adjustment to make the animation slower
Wait(20) -- Increases the delay between each adjustment to make the animation slower
currentYaw = currentYaw + (360 / steps) -- Increments the rotation
if currentYaw >= finalYaw then
currentYaw = finalYaw
Expand All @@ -55,6 +55,6 @@ RegisterCommand('360', function()
end
end
-- Execute the rotation in a coroutine to not block the main thread
Citizen.CreateThread(doRotation)
CreateThread(doRotation)
end, false)
```
4 changes: 2 additions & 2 deletions GRAPHICS/DrawBinkMovie.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ Must be called each frame, will play at specified position on screen when called
## Examples
```lua
Citizen.CreateThread(function()
CreateThread(function()
local binkint = SetBinkMovie("casino_trailer") -- BINK movie, list can be found at https://gist.github.com/ItsJunction/8046f28c29ea8ff2821e9e4f933f595f
SetBinkMovieTime(binkint, 0.0) -- Seeks to 0%, just incase of errors.
while (GetBinkMovieTime(binkint) < 100.0) do
print(math.floor(GetBinkMovieTime(binkint) * 100)/100 .. "%") -- Prints current playtime (as percentage).
PlayBinkMovie(binkint)
DrawBinkMovie(binkint, 0.5, 0.5, 1.0, 1.0, 0.0, 255, 255, 255, 255) -- This example draws and plays in fullscreen in the center (no matter the resolution).
Citizen.Wait(0)
Wait(0)
end
end)
```
2 changes: 1 addition & 1 deletion GRAPHICS/DrawSpotLight.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Parameters:
* brightness - the brightness of the light
* roundness - "smoothness" of the circle edge
* radius - the radius size of the spotlight
* falloff - the falloff size of the light's edge (example: www.i.imgur.com/DemAWeO.jpg)
* falloff - the falloff size of the light's edge
Example in C# (spotlight aims at the closest vehicle):
Vector3 myPos = Game.Player.Character.Position;
Vehicle nearest = World.GetClosestVehicle(myPos , 1000f);
Expand Down
2 changes: 1 addition & 1 deletion GRAPHICS/EnableClownBloodVfx.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (STREAMING::HAS_NAMED_PTFX_ASSET_LOADED("scr_rcbarry2"))
```lua
RequestNamedPtfxAsset("scr_rcbarry2") -- Request the PTFX
while not HasNamedPtfxAssetLoaded("scr_rcbarry2") do
Citizen.Wait(0)
Wait(0)
end
EnableClownBloodVfx(true) -- Enable the clown PTFX
```
4 changes: 2 additions & 2 deletions GRAPHICS/GetScaleformMovieMethodReturnValueString.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Returns a string in the same way `GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_INT` r
```lua
local a = RequestScaleformMovie("translate") --scaleform gfx
while not HasScaleformMovieLoaded(a) do
Citizen.Wait(0)
Wait(0)
end
BeginScaleformMovieMethod(a,"EnglishToChinese") --call function
ScaleformMovieMethodAddParamPlayerNameString("Good") --input
Expand All @@ -33,6 +33,6 @@ while true do
print(c)
break
end
Citizen.Wait(0)
Wait(0)
end
```
6 changes: 3 additions & 3 deletions GRAPHICS/N_0x2d3b147afad49de0.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ NativeDB Introduced: v1290
```lua
-- drawing the game area for penetrator arcade game
Citizen.CreateThread(function()
CreateThread(function()
RequestStreamedTextureDict("MPArcadeDegenatron", false)
while not HasStreamedTextureDictLoaded("MPArcadeDegenatron") do Citizen.Wait(1) end
while not HasStreamedTextureDictLoaded("MPArcadeDegenatron") do Wait(1) end
while true do
N_0x2d3b147afad49de0("MPArcadeDegenatron", "penetrator_scene_frame", 0.5, 0.5, 0.4, 0.6, 0.0, 255, 0, 0, 255, 0)
Citizen.Wait(1)
Wait(1)
end
end)
```
4 changes: 2 additions & 2 deletions GRAPHICS/SetBinkMovie.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Creates an integer (usually 1) for a BINK movie to be called with other natives.
## Examples
```lua
Citizen.CreateThread(function()
CreateThread(function()
local binkint = SetBinkMovie("casino_trailer")
SetBinkMovieTime(binkint, 0.0) -- Seeks to 0%
while (GetBinkMovieTime(binkint) < 100.0) do -- Very Basic Idea That Works?
print(math.floor(GetBinkMovieTime(binkint) * 100)/100 .. "%") -- Prints current playtime (as percentage).
PlayBinkMovie(binkint)
DrawBinkMovie(binkint, 0.5, 0.5, 1.0, 1.0, 0.0, 255, 255, 255, 255) -- This example draws and plays in Fullscreen and in the center of screen (no matter the resolution).
Citizen.Wait(0)
Wait(0)
end
end)
```
4 changes: 2 additions & 2 deletions GRAPHICS/SetDisablePetrolDecalsIgnitingThisFrame.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Prevents gas / petrol decals (aka gas / petrol trails and puddles) to be ignited

## Examples
```lua
Citizen.CreateThread(function()
CreateThread(function()
while true do
SetDisablePetrolDecalsIgnitingThisFrame()
Citizen.Wait(0)
Wait(0)
end
end)
```
2 changes: 1 addition & 1 deletion GRAPHICS/TerraingridActivate.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ aliases: ["0xA356990E161C9E65"]
void TERRAINGRID_ACTIVATE(BOOL toggle);
```
This native enables/disables the gold putting grid display (https://i.imgur.com/TC6cku6.png).
This native enables/disables the gold putting grid display.
This requires these two natives to be called as well to configure the grid: [`TERRAINGRID_SET_PARAMS`](#_0x1C4FC5752BCD8E48) and [`TERRAINGRID_SET_COLOURS`](#_0x5CE62918F8D703C7).
Expand Down
17 changes: 13 additions & 4 deletions GRAPHICS/TerraingridSetColours.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ void TERRAINGRID_SET_COLOURS(int lowR, int lowG, int lowB, int lowAlpha, int R,
This native is used along with these two natives: [`TERRAINGRID_ACTIVATE`](#_0xA356990E161C9E65) and [`TERRAINGRID_SET_PARAMS`](#_0x1C4FC5752BCD8E48).
This native sets the colors for the golf putting grid. the 'min...' values are for the lower areas that the grid covers, the 'max...' values are for the higher areas that the grid covers, all remaining values are for the 'normal' ground height.
All those natives combined they will output something like this: https://i.imgur.com/TC6cku6.png
Old description:
Only called in golf and golf_mp
Expand All @@ -35,13 +34,23 @@ GRAPHICS::_0x5CE62918F8D703C7(255, 0, 0, 64, 255, 255, 255, 5, 255, 255, 0, 64);
## Examples
```cs
N_0xa356990e161c9e65(true); // toggle on/off
TerraingridActivate(true); // toggle on/off
// this native configures the location, size, rotation, normal height, and the difference ratio between min, normal and max.
N_0x1c4fc5752bcd8e48(-1114.121f, 220.789f, 63.78f, -1f, 0.85f, 0f, 15f, 15f, -1f, 20f, 40f, 63.78f, 0.2f);
TerraingridSetParams(-1114.121f, 220.789f, 63.78f, -1f, 0.85f, 0f, 15f, 15f, -1f, 20f, 40f, 63.78f, 0.2f);
// This native defines the colors (and alpha/opacity levels) for min, normal and max heights.
// (in this case: red for lower, white for normal, yellow for higher)
N_0x5ce62918f8d703c7(255, 0, 0, 64, 255, 255, 255, 5, 255, 255, 0, 64);
TerraingridSetColours(255, 0, 0, 64, 255, 255, 255, 5, 255, 255, 0, 64);
```

```lua
TerraingridActivate(true) -- toggle on/off

-- this native configures the location, size, rotation, normal height, and the difference ratio between min, normal and max.
TerraingridSetParams(-1114.121, 220.789, 63.78, -1, 0.85, 0, 15, 15, -1, 20, 40, 63.78, 0.2);

-- This native defines the colors (and alpha/opacity levels) for min, normal and max heights.
-- (in this case: red for lower, white for normal, yellow for higher)
TerraingridSetColours(255, 0, 0, 64, 255, 255, 255, 5, 255, 255, 0, 64);
```
17 changes: 12 additions & 5 deletions GRAPHICS/TerraingridSetParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ This native is used along with these two natives: [`TERRAINGRID_ACTIVATE`](#_0xA
This native configures the location, size, rotation, normal height, and the difference ratio between min, normal and max.
All those natives combined they will output something like this: https://i.imgur.com/TC6cku6.png
## Parameters
* **x**: Grid center x coord.
* **y**: Grid center y coord.
Expand All @@ -32,14 +30,23 @@ All those natives combined they will output something like this: https://i.imgur
## Examples
```cs
N_0xa356990e161c9e65(true); // toggle on/off
TerraingridActivate(true); // toggle on/off
// this native configures the location, size, rotation, normal height, and the difference ratio between min, normal and max.
N_0x1c4fc5752bcd8e48(-1114.121f, 220.789f, 63.78f, -1f, 0.85f, 0f, 15f, 15f, -1f, 20f, 40f, 63.78f, 0.2f);
TerraingridSetParams(-1114.121f, 220.789f, 63.78f, -1f, 0.85f, 0f, 15f, 15f, -1f, 20f, 40f, 63.78f, 0.2f);
// This native defines the colors (and alpha/opacity levels) for min, normal and max heights.
// (in this case: red for lower, white for normal, yellow for higher)
N_0x5ce62918f8d703c7(255, 0, 0, 64, 255, 255, 255, 5, 255, 255, 0, 64);
TerraingridSetColours(255, 0, 0, 64, 255, 255, 255, 5, 255, 255, 0, 64);
```

```lua
TerraingridActivate(true) -- toggle on/off

-- this native configures the location, size, rotation, normal height, and the difference ratio between min, normal and max.
TerraingridSetParams(-1114.121, 220.789, 63.78, -1, 0.85, 0, 15, 15, -1, 20, 40, 63.78, 0.2);

-- This native defines the colors (and alpha/opacity levels) for min, normal and max heights.
-- (in this case: red for lower, white for normal, yellow for higher)
TerraingridSetColours(255, 0, 0, 64, 255, 255, 255, 5, 255, 255, 0, 64);
```
4 changes: 2 additions & 2 deletions HUD/AddBlipForArea.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ It is recommended to use [SET_BLIP_ROTATION](#_0xF87683CDF73C3F6E) and [SET_BLIP
By default, the blip will show as a _regular_ blip with the specified color/sprite if it is outside of the minimap view.
Example image:
![minimap](https://i.imgur.com/qLbXWcQ.png)
![big map](https://i.imgur.com/0j7O7Rh.png)
![minimap](https://r2.fivemanage.com/qFztShHCe1bhCDvTI4vxv/Screenshot%202024-08-24%20095352.png)
![big map](https://r2.fivemanage.com/qFztShHCe1bhCDvTI4vxv/Screenshot%202024-08-24%20095301.png)
(Native name is _likely_ to actually be ADD_BLIP_FOR_AREA, but due to the usual reasons this can't be confirmed)
Expand Down
4 changes: 2 additions & 2 deletions HUD/AddBlipForEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Create a blip that by default is red (enemy), you can use [SET_BLIP_AS_FRIENDLY]
Can be used for objects, vehicles and peds.
Example of enemy:
![enemy](https://i.imgur.com/fl78svv.png)
![enemy](https://r2.fivemanage.com/qFztShHCe1bhCDvTI4vxv/Screenshot%202024-08-24%20095909.png)
Example of friend:
![friend](https://i.imgur.com/Q16ho5d.png)
![friend](https://fivemanage.com/dashboard/fivem-things/images/5f54sb6siLNqGIpo9t2pC)
## Parameters
* **entity**: The entity handle to create the blip.
Expand Down
2 changes: 1 addition & 1 deletion HUD/AddBlipForRadius.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Blip ADD_BLIP_FOR_RADIUS(float posX, float posY, float posZ, float radius);
Create a blip with a radius for the specified coordinates (it doesnt create the blip sprite, so you need to use [AddBlipCoords](#_0xC6F43D0E))
Example image:
![example](https://i.imgur.com/9hQl3DB.png)
![example](https://r2.fivemanage.com/qFztShHCe1bhCDvTI4vxv/Screenshot%202024-08-24%20100417.png)
## Parameters
* **posX**: The x position of the blip (you can also send a vector3 instead of the bulk coordinates)
Expand Down
2 changes: 1 addition & 1 deletion HUD/AllowPauseMenuWhenDeadThisFrame.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Allows opening the pause menu this frame, when the player is dead.

## Examples
```lua
Citizen.CreateThread(function()
CreateThread(function()
while true do
N_0xcc3fdded67bcfc63()
Wait(0)
Expand Down
2 changes: 1 addition & 1 deletion HUD/DisplayHudWhenDeadThisFrame.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Enables drawing some hud components, such as help labels, this frame, when the p

## Examples
```lua
Citizen.CreateThread(function()
CreateThread(function()
while true do
N_0x7669f9e39dc17063()
Wait(0)
Expand Down
1 change: 0 additions & 1 deletion HUD/DisplayPlayerNameTagsOnBlips.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ void DISPLAY_PLAYER_NAME_TAGS_ON_BLIPS(BOOL toggle);
Toggles whether or not name labels are shown on the expanded minimap next to player blips, like in GTA:O.
Doesn't need to be called every frame.
Preview: https://i.imgur.com/DfqKWfJ.png
Make sure to call SET_BLIP_CATEGORY with index 7 for this to work on the desired blip.
## Parameters
Expand Down
6 changes: 3 additions & 3 deletions HUD/EndTextCommandThefeedPostAward.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int END_TEXT_COMMAND_THEFEED_POST_AWARD(char* textureDict, char* textureName, in
Shows an "award" notification above the minimap, lua example result:
![](https://i.imgur.com/e2DNaKX.png)
![Image](https://r2.fivemanage.com/qFztShHCe1bhCDvTI4vxv/image_2024-08-24_111337272.png)
Expand All @@ -34,11 +34,11 @@ The notification handle.
## Examples
```lua
Citizen.CreateThread(function()
CreateThread(function()
-- Get the ped headshot image.
local handle = RegisterPedheadshot(PlayerPedId())
while not IsPedheadshotReady(handle) or not IsPedheadshotValid(handle) do
Citizen.Wait(0)
Wait(0)
end
local txd = GetPedheadshotTxdString(handle)
Expand Down
6 changes: 3 additions & 3 deletions HUD/EndTextCommandThefeedPostMessagetext.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Texture dictionary and texture name parameters are usually the same exact value.
Example result:
![](https://i.imgur.com/LviutDl.png)
![Image](https://r2.fivemanage.com/qFztShHCe1bhCDvTI4vxv/image_2024-08-24_111233888.png)
Old description with list of possible icons and texture names:
Expand Down Expand Up @@ -49,11 +49,11 @@ The notification handle.
## Examples
```lua
Citizen.CreateThread(function()
CreateThread(function()
-- Get the ped headshot image.
local handle = RegisterPedheadshot(PlayerPedId())
while not IsPedheadshotReady(handle) or not IsPedheadshotValid(handle) do
Citizen.Wait(0)
Wait(0)
end
local txd = GetPedheadshotTxdString(handle)
Expand Down
18 changes: 10 additions & 8 deletions HUD/EndTextCommandThefeedPostMessagetextTu.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@ aliases: ["0x1E6611149DB3DB6B","_SET_NOTIFICATION_MESSAGE_4"]
int END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_TU(char* picTxd, char* picTxn, BOOL flash, int iconType, char* nameStr, char* subtitleStr, float durationMultiplier);
```
Example, only occurrence in the scripts:
```
v_8 = UI::END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_TU("CHAR_SOCIAL_CLUB", "CHAR_SOCIAL_CLUB", 0, 0, &v_9, "", a_5);
```
Example result:
![](https://i.imgur.com/YrN4Bcm.png)
![Image](https://r2.fivemanage.com/qFztShHCe1bhCDvTI4vxv/Screenshot%202024-08-24%20110820.png)
## Parameters
* **picTxd**:
Expand All @@ -29,3 +22,12 @@ Example result:
* **durationMultiplier**: 1.0 is normal, 2.0 is twice as long, and 0.5 is half its normal display time.
## Return value
## Examples
```lua
BeginTextCommandThefeedPost("jamyfafi")
AddTextComponentSubstringPlayerName("Message")
EndTextCommandThefeedPostMessagetextTu("CHAR_SOCIAL_CLUB", "CHAR_SOCIAL_CLUB", false, 0, GetPlayerName(PlayerId()), "Hello", 1.0)
EndTextCommandThefeedPostTicker(false, true)
```
1 change: 0 additions & 1 deletion HUD/EndTextCommandThefeedPostReplayInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ type range: 0 - 2
if you set type to 1, button accepts "~INPUT_SOMETHING~"
example:
HUD::_0xDD6CB2CCE7C2735C(1, "~INPUT_TALK~", "Who you trynna get crazy with, ese? Don't you know I'm LOCO?!");
- imgur.com/UPy0Ial
Examples from the scripts:
l_D1[1/*1*/]=HUD::_DD6CB2CCE7C2735C(1,"~INPUT_REPLAY_START_STOP_RECORDING~","");
l_D1[2/*1*/]=HUD::_DD6CB2CCE7C2735C(1,"~INPUT_SAVE_REPLAY_CLIP~","");
Expand Down
Loading

0 comments on commit 0a0d931

Please sign in to comment.