Replace a car without moving, change speed, change the angle
#2

You could retreive all the values from the current car and apply them to the next.
pawn Код:
new VID = GetPlayerVehicleID(playerid), Float:Xpos[2], Float:Ypos[2], Float:Zpos[2], Float:Angle;
GetVehiclePos(VID, Xpos[0], Ypos[0], Zpos[0]);
GetVehicleVelocity(VID, Xpos[1], Ypos[1], Zpos[1]);
GetVehicleZAngle(VID, Angle);
DestroyVehicle(VID);
VID = CreateVehicle(/*ModelID*/, Xpos[0], Ypos[1], Zpos[2], Angle, 0, 0, 99999999999);
PutPlayerInVehicle(playerid, VID, 0);
SetVehicleVelocity(VID, Xpos[1], Ypos[1], Zpos[2]);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)