rendered paste bodystock GetAheadCoords(Float:Fx, Float:Fy, Float:Fangle, direction, Float:units)
{
switch (direction)
{
case FORWARD:
{
upx = Fx - floatsin(Fangle * PI / 180) * units;
upy = Fy + floatcos(Fangle * PI / 180) * units;
return 1;
}
case BACK:
{
upx = Fx + floatsin((Fangle) * PI / 180) * units;
upy = Fy - floatcos((Fangle) * PI / 180) * units;
return 1;
}
case LEFT:
{
upx = Fx - floatsin((Fangle) * PI / 180) * units;
upy = Fy - floatcos((Fangle) * PI / 180) * units;
}
case RIGHT:
{
upx = Fx + floatsin((Fangle) * PI / 180) * units;
upy = Fy + floatcos((Fangle) * PI / 180) * units;
}
default:
return 1;
}
return 1;
}