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(playeridparams[])
{
//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(playeridFA);
        
SetPlayerFacingAngle(targetidFA+180.0);
        
format(msgsizeof(msg), "%s and %s had a moment. They will get married soon"PlayerName(playerid), PlayerName(targetid));
        
SendClientMessageToAll(COLOR_SEXYmsg);
        
ApplyAnimation(targetid, ......);
    }