Posts: 249
Threads: 26
Joined: Jan 2011
Reputation:
0
if(strcmp(cmdtext, "/flip", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new currentveh;
new Float:angle;
currentveh = GetPlayerVehicleID(playerid);
GetVehicleZAngle(currentveh, angle);
SetVehicleZAngle(currentveh, angle);
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been flipped.");
RepairVehicle(tmpcar);
return 1;
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are not in any vehicle!");
return 1;
}
}
return 0;
}
Posts: 1,745
Threads: 252
Joined: Dec 2011
Reputation:
0
didnt explain bu didnt rly need to i understand! thanks +rep
Posts: 2,856
Threads: 6
Joined: Jun 2007
Reputation:
0
The truth is that the function SetVehicleZAngle sets the vehicle x (pitch) and y (roll) to 0.0 and the z (yaw) angle to the value passed
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
The velocity isn't stopped when using SetVehicleZAngle, so restoring the velocity is un-necessary. You never used SetVehicleVelocity anyway.