Detect if a player drives Forwards or Backwards
#1

Hello,
Im gonna make a shifing system for my server, so i need a function like this. How i can detect if a player drives forwards or backwards??
Greetzz,
sean5874
Reply
#2

Check his keys!!
Reply
#3

try comparing GetVehicleZAngle with the direction hes moving.

check his coords every second, then calculate the direction hes going and convert it into map angle then compare with vehicleZangle. It will always be either the same or 180 degrees difference.
Reply
#4

oke nvm my post, his is waaay better
Reply
#5

Lol, that sounds a little difficult , how to do it?

Quote:

Check his keys!!

Are there ids for the W and the S key to check on??
Reply
#6

I think GetPlayerKeys is for up, down, left and right arrows. Not sure
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)