- Documentation
- Server functions
- getPedAttachedVehicle
Function
getPedAttachedVehicle
Returns the vehicle the ped is riding on, plus its offset and rotation.
Syntax
vehicle, float, float, float, float getPedAttachedVehicle(ped ped)Arguments
pedped- An NPC or a player.
Returns
The vehicle, x, y, z, rotation; false if the ped is not riding.
Example
local veh = getPedAttachedVehicle(player)
if veh then outputChatBox("Jedziesz na " .. getVehicleName(veh), player) end