getVehicleDummyPosition | Multi Theft Auto: Wiki Skip to content

getVehicleDummyPosition

Client-side
Server-side
Shared
Needs checking

This function was partially migrated from the old wiki. Please review manually:

  • Missing section: Allowed Dummies

Pair: setVehicleDummyPosition

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns the position of the dummy for the given vehicle.

Syntax

getVehicleDummyPosition ( )

Code Examples

client

This is a command to get the position of the player's vehicle dummy position specified as an argument.

function getDummyPosition (commandName, dummy)
if not dummy then
return false
end
local veh = getPedOccupiedVehicle (localPlayer)
if not veh then
outputChatBox ("You should be in a vehicle to use this command", 255, 25, 25)
return false
end
local x, y, z = getVehicleDummyPosition (veh, dummy)
outputChatBox ("X: "..x..", Y: "..y..", Z: "..z, 0, 255, 0)
end
addCommandHandler ("getdummy", getDummyPosition)

See Also

Vehicle Functions