Save a vehicule position
#1

Hello,

I'd like to have vehicules position always up to date in my database (mysql), for now i'm updating it when a player exits the car, but if he deco without exiting, or if he falls of his bike, the last position is not saved ...
With Callback could uptade the position frequently without overloading the server ?

Thanks,

(sorry for my bad english )
Reply
#2

You need to use OnPlayerStateChange
pawn Код:
if(oldstate == PLAYER_STATE_DRIVER) {
    // your saving code
}
That will also works if you fall of a bike
Reply
#3

Thanks, i think about updating it when a player deconect (of course i'll check if he is in a vehicule before ).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)