[BOT]How to make an Actor look at me? - 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: [BOT]How to make an Actor look at me? (
/showthread.php?tid=595295)
[BOT]How to make an Actor look at me? -
xXmAn40100Xx - 01.12.2015
Hello, It's a little system that I want to do is when I make this command the actor should look at me.
pawn Код:
CMD:styles(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 769.8349, 13.1127, 1000.7004))//LS Gym
{
new Float:a1;
GetPlayerFacingAngle(playerid, a1);//i dunno
SetActorFacingAngle(boxeractor1, -a1);//i dunno
ClearActorAnimations(boxeractor1)
PlayerPlaySound(playerid, 4800, 0.0, 0.0, 0.0);//
ShowPlayerDialog(playerid, DIALOG_FIGHTSTYLES, DIALOG_STYLE_TABLIST_HEADERS, "{00CCFF}Estilos de lucha", "Style\tRequired Level\nDelete actual fighting style\t-\Boxing\t1\nKung Fu\t2\nStreet\t3\nFighter\t8", "Accept", "Cancel");
}
else SendClientMessage(playerid, Orange, "You're not in the gym.");
return 1;
}
Re: [BOT]How to make an Actor look at me? -
Jefff - 01.12.2015
Change and try
https://sampforum.blast.hk/showthread.php?tid=562204
Re: [BOT]How to make an Actor look at me? -
jamesbond007 - 01.12.2015
its funny how more than half the threads are replied by giving a link to another thread... If Only people searched before they posted.
People have been scripting for years.. almost certainly someone asked the same question already
Re: [BOT]How to make an Actor look at me? -
AbyssMorgan - 01.12.2015
https://github.com/AbyssMorgan/ADM/b...SAM/3DTryg.inc
GetRotationFor2Point2D
Point 1 - actor
Point 2 - player
Point 1 > look > point 2