SA-MP Forums Archive
face look at (help) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: face look at (help) (/showthread.php?tid=550619)



face look at (help) - danish007 - 13.12.2014

how can i make that if i wave a BOT he look at my player?


Re: face look at (help) - Mic_H - 14.12.2014

PHP код:
CMD:wave(playerid, params[])
{
//if your script is /wave [ID], then check if the ID is bot. = Better here
    
if(targetid==NPC/*&&They are close to eachother*/)
    {
        new 
Float:FA;
        
GetPlayerFacingAngle(playerid, FA);
        
SetPlayerFacingAngle(targetid, FA+180.0);
        
format(msg, sizeof(msg), "%s and %s had a moment. They will get married soon", PlayerName(playerid), PlayerName(targetid));
        
SendClientMessageToAll(COLOR_SEXY, msg);
        
ApplyAnimation(targetid, ......);
    }
}