09.07.2013, 09:10
Hi guys!
I have a little problem with my vehicles velocity. So, the problem is here - i'm starting drive with stafford (for example), i'm driving and when i enter in 2nd cp i need to change my car who save the last car speed. Like i go foward with 100 km/h, enter in CP, automatically change my car to hustler and i'm continue driving with 100 km/h. What can be the problem?
Heres the code:
Hope, u understand what i'm asking..
I have a little problem with my vehicles velocity. So, the problem is here - i'm starting drive with stafford (for example), i'm driving and when i enter in 2nd cp i need to change my car who save the last car speed. Like i go foward with 100 km/h, enter in CP, automatically change my car to hustler and i'm continue driving with 100 km/h. What can be the problem?
Heres the code:
Код:
if(score == 2) { GetPlayerPos(playerid, Tempx1, Tempy1, Tempz1); GetPlayerFacingAngle(playerid, Tempr); GetVehiclePos(PlayerCar[playerid], Tempx1, Tempy1, Tempz1); GetVehicleZAngle(PlayerCar[playerid], Tempr); GetVehicleVelocity(PlayerCar[playerid], Velocity[0], Velocity[1], Velocity[2]); Car1[playerid] = CreateVehicle(545, Tempx1, Tempy1, Tempz1, Tempr, -1, -1, -1); SetVehiclePos(Car1[playerid], Tempx1, Tempy1, Tempz1); SetVehicleZAngle(Car1[playerid], Tempr); SetVehicleVelocity(Car1[playerid], Velocity[0], Velocity[1], Velocity[2]); PutPlayerInVehicle(playerid, Car1[playerid], 0); DestroyVehicle(PlayerCar[playerid]); }
