16.03.2013, 11:06
Hello, so I would like to press /enter and whatever the angle or position is, it would move the player straight forward the set distance. Can anyone help me?
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
SetPlayerPos(playerid, x-(DISTANCE_TO_MOVE*floatsin(a, degrees)), y+(DISTANCE_TO_MOVE*floatcos(a, degrees)), z);
pawn Код:
|