mirror of
https://github.com/BeamMP/Docs.git
synced 2026-10-22 08:17:44 +00:00
continue GetPositionRaw error handling
This commit is contained in:
1 parent
315c8d1f20
commit
a00e8dc567
1 file changed
+8
-4
@@ -451,11 +451,15 @@ local player_id = 4
|
||||
local vehicle_id = 0
|
||||
|
||||
local raw_pos, error = MP.GetPositionRaw(player_id, vehicle_id)
|
||||
local x, y, z = table.unpack(raw_pos["pos"])
|
||||
if error = "" then
|
||||
local x, y, z = table.unpack(raw_pos["pos"])
|
||||
|
||||
print("X:", x)
|
||||
print("Y:", y)
|
||||
print("Z:", z)
|
||||
print("X:", x)
|
||||
print("Y:", y)
|
||||
print("Z:", z)
|
||||
else
|
||||
print(error)
|
||||
end
|
||||
```
|
||||
Output:
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user