Try this:
pawn Код:
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.");
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle.");
}
return 1;
And if you use ZCMD:
pawn Код:
CMD:flip(player, params[])
{
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.");
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle.");
}
return 1;