Hi,
I imagine you can begin that way :
1 - create a command associated to your function that'll do the job : -> addCommandHandler("foodtruck", theFunction)
2 - Inside your function, check if the player is in a vehicle -> getPedOccupiedVehicle ( thePlayer ) return vehicle element or isPlayerInVehicle(thePlayer)
3 - If the vehicle exist, check if the player has the driver seat -> getPedOccupiedVehicleSeat( thePlayer ) return int 0 for driver
4 - Then, take vehice's position-> getElementPosition(theVehicle) return 3 int x, y, z
5 - Finally, create a marker aside the vehicle by using vehicle's position -> like createMarker(x+5, y+5, z)