(vehicleid, &Float:z_angle)
vehicleid
The ID of the vehicle to get the Z angle of.
&Float:z_angle
A float variable in which to store the Z rotation, passed by reference.
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/vehrot", true) == 0)
{
new currentveh;
new Float:z_rot;
new message[40];
currentveh = GetPlayerVehicleID(playerid);
GetVehicleZAngle(currentveh, z_rot);
format(message, sizeof(message), "The current vehicle rotation is: %.0f", z_rot);
SendClientMessage(playerid, 0xFFFFFFFF, message);
return 1;
}
return 0;
}
The following functions may be useful, as they are related to this function in one way or another.