19.05.2009, 06:12
You also need to use sine and cosine to get a position in front of the player. There are lots of functions for this though.
Just us the player's facing angle for direction. You can also look at the debug FS for reference.
pawn Код:
stock GetXYInDirectionOfPosition(Float:direction, &Float:x, &Float:y, Float:dist)
{
x += (dist * floatsin(-direction, degrees));
y += (dist * floatcos(-direction, degrees));
}