Detect if player is standing in front of car's trunk
#1

Hey,
I know this is possible because I have seen it before, but I have no idea how..
So, how to detect if the played is standing front of car's trunk (For RP - loading/unloading stuff)?
Reply
#2

I really am guessing here, but you could GetVehicleZAngle and then GetPlayerFacingAngle to see if the angle's are matching? Really, a guess.
Reply
#3

Use GetVehiclePos.. and make it able to use the trunk command only when the player is "x" meters behind the car.
Reply
#4

Alright, got it. Thanks and credits to 'MP2'
http://forum.sa-mp.com/showpost.php?...18&postcount=7
Reply
#5

Thanks. ^^
Reply
#6

I actually made a function yesterday to get any coordinates using offsets from other coordinates, I shall post it later. One probably exists already (and is undoubtfully better) but I can't seem to find one.

You're welcome ^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)