[Include] [INC] a_angles
#30

Quote:
Originally Posted by Dirkon
Посмотреть сообщение
I don't really get it.. I'm trying to do, that when player looks at other player and presses middle mouse button and then at targets position create explosion. I'm doing it like this:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED( KEY_LOOK_BEHIND ))
{
if(IsPlayerFacingPlayer(playerid, targetid, 15.0))
{
new Float: x, Float: y, Float: z;
GetPlayerPos(targetid, x, y, z);
CreateExplosion(x, y, z, 12, 10);
}
}
return 1;
}

What's wrong?
sorry for bad english.
Yea thats not going to work, might I suggest finding the Function GetClosestPlayer and GetDistanceToPlayer your going to have to find the targetid.....you can use those functions to do so and then you can check if playerid is facing the targetid.
Reply


Messages In This Thread
[INC] a_angles - by Tannz0rz - 30.10.2009, 01:04
Re: [INC] a_angles - by yom - 30.10.2009, 01:31
Re: [INC] a_angles - by Tannz0rz - 30.10.2009, 01:40
Re: [INC] a_angles - by Chaprnks - 30.10.2009, 03:27
Re: [INC] a_angles - by Tannz0rz - 30.10.2009, 14:45
Re: [INC] a_angles - by R370 - 30.10.2009, 17:34
Re: [INC] a_angles - by Tannz0rz - 30.10.2009, 18:45
Re: [INC] a_angles - by Sergei - 30.10.2009, 18:48
Re: [INC] a_angles - by NeRoSiS - 30.10.2009, 19:04
Re: [INC] a_angles - by Sergei - 30.10.2009, 19:07
Re: [INC] a_angles - by Tannz0rz - 30.10.2009, 19:24
Re: [INC] a_angles - by NeRoSiS - 30.10.2009, 19:27
Re: [INC] a_angles - by Toney - 16.11.2009, 08:56
Re: [INC] a_angles - by cyber_punk - 16.11.2009, 12:46
Re: [INC] a_angles - by FreshKilla - 01.12.2009, 23:40
Re: [INC] a_angles - by IamNotKoolllll - 01.12.2009, 23:57
Re: [INC] a_angles - by mprofitt - 02.12.2009, 00:16
Re: [INC] a_angles - by Kurence - 12.12.2009, 08:56
Re: [INC] a_angles - by _[HuN]_Epsilon_ - 06.01.2010, 13:48
Re: [INC] a_angles - by Coicatak - 06.02.2010, 15:39
Re: [INC] a_angles - by acade - 25.02.2010, 20:04
Re: [INC] a_angles - by M0R0JR - 10.10.2010, 16:29
Re: [INC] a_angles - by JulietaZ - 10.10.2010, 17:25
Re: [INC] a_angles - by Mauzen - 10.10.2010, 17:47
Re: [INC] a_angles - by M0R0JR - 10.10.2010, 18:21
Re: [INC] a_angles - by Dirkon - 26.12.2010, 17:34
Re: [INC] a_angles - by cyber_punk - 26.12.2010, 22:57
Re: [INC] a_angles - by justsomeguy - 27.12.2010, 00:33
Re: [INC] a_angles - by Dirkon - 27.12.2010, 09:37
Re: [INC] a_angles - by cyber_punk - 27.12.2010, 19:42
Re: [INC] a_angles - by yanir3 - 28.05.2013, 12:19

Forum Jump:


Users browsing this thread: 1 Guest(s)