TastyDonut Posted April 18, 2022 Share Posted April 18, 2022 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
Administrators Tut Posted April 18, 2022 Administrators Share Posted April 18, 2022 Welcome to the forums! I've moved this thread into the Scripting section where it's best suited 1 Link to comment
Mkl Posted April 18, 2022 Share Posted April 18, 2022 (edited) 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 April 18, 2022 by Mkl 1 Link to comment
TastyDonut Posted April 18, 2022 Author Share Posted April 18, 2022 I will check that tomorrow and send you a feedback :)) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now