Jump to content

Question about marker


TastyDonut

Recommended Posts

Hi!
Do any of you have any idea how to solve my problem?
Well, I want to make a food truck system and the first problem
I encountered is that I don't know how to create a marker so that it is positioned relative to the side of the vehicle.
Suppose the marker appears temporarily on a command when the player is sitting as a food truck driver.


Thanks in advance for any idea! :))
Link to comment

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)

Edited by Mkl
  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...