SetMyFacingAngle
Jump to navigation
Jump to search
Description:
Sets the facing angle of an NPC
Parameters:
(angle)
angle : The new angle (in radians) for the NPC.
Return Values:
This function does not return any specific values.
Example
function OnPlayerText(playerid, message)
{
if(message=="lookatme")
{
local pos=GetPlayerPos(playerid);local mypos=GetMyPos();
local angle=atan2(-(pos.x-mypos.x),pos.y-mypos.y)
SetMyFacingAngle(angle);
}
}Related Functions
The following functions may be helpful as they relate to this function in one way or another.