SetFakePausemapPlayerPositionThisFrame
DocsSetFakePausemapPlayerPositionThisFrame(x, y)Description
Overrides the position of the main player blip for the current frame.
Parameters
| Name | Type | Description |
|---|---|---|
x | float | X coord of the position. |
y | float | Y coord of the position. |
Quick Snippet: Get Coordinatesxy
xyAdd this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)Returns
voidThis native does not return a value.
Examples
Official
-- Function to check if player is using the map
local function IsPlayerUsingPausemap()
return IsPauseMenuActive() and GetNumberOfReferencesOfScriptWithNameHash(`pausemenu_map`) > 0
end
Citizen.CreateThread(function()
while true do
Wait(0) -- Not using Wait will cause the game to hang.
if IsPlayerUsingPausemap() and not IsPausemapInInteriorMode() then -- Make sure the player using the map and the map has switched view
SetFakePausemapPlayerPositionThisFrame(0.0, 0.0) -- Override position
end
end
end)