05.07.2011, 22:15
Anyone know why this code works?
Because, from what I understood, the vehicle should be in the same angle, but this is not what happens.
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/flip", true) == 0)
{
new currentveh;
new Float:angle;
currentveh = GetPlayerVehicleID(playerid);
GetVehicleZAngle(currentveh, angle);
SetVehicleZAngle(currentveh, angle);
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been flipped.");
return 1;
}
return 0;
}