Check if there are 2 aimers?
#1

I got lubys function

pawn Код:
stock IsPlayerAiming(playerid, aimid)
{
// Luby's function.
new Float:X1, Float:Y1, Float:Z1, Float:X2, Float:Y2, Float:Z2;
GetPlayerPos(playerid, X1, Y1, Z1);
GetPlayerPos(aimid, X2, Y2, Z2);
new Float:Distance = floatsqroot(floatpower(floatabs(X1-X2), 2) + floatpower(floatabs(Y1-Y2), 2));
if(Distance < 100)
{
new Float:A;
GetPlayerFacingAngle(playerid, A);
X1 += (Distance * floatsin(-A, degrees));
Y1 += (Distance * floatcos(-A, degrees));
Distance = floatsqroot(floatpower(floatabs(X1-X2), 2) + floatpower(floatabs(Y1-Y2), 2));
if(Distance <= 2.0)
{
return true;
}
}
return false;
}
How could i check if there are 2 aimers at one player?

edit: check my below posts
Reply


Messages In This Thread
Check if there are more than 1 aimers? - by 0ne - 08.06.2011, 18:55
Re: Check if there are 2 aimers? - by Mauzen - 08.06.2011, 18:57
Re: Check if there are 2 aimers? - by 0ne - 08.06.2011, 19:03
Re: Check if there are 2 aimers? - by 0ne - 09.06.2011, 08:52
Re: Check if there are 2 aimers? - by 0ne - 11.06.2011, 12:04

Forum Jump:


Users browsing this thread: 2 Guest(s)