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
#2

pawn Код:
new count;
for(new i = 0; i < MAX_PLAYERS; i ++)
{
    if(IsPlayerAiming(i, aimid)) count ++;
}
Like this?
Reply
#3

Well kind of, you see i want to check if there are more than 1 aimer and then if there are like 4, i could use some define like: multiplayerid which is those 4 players, but that multiplayerid would check later each player in that define a tickcount of all of those aimers, i cannot think of this way , i know its possible because i done it one time but after a scripting break i dont remember how and i got my all scripts deleted
Reply
#4

Any help please? Might be a better explanation:

If there are more than 1 aimer i want to define all of them to a 1var/string or something to check all of their tickcount by using only one line or something like that.
Reply
#5

Bump,help please. this is very important to me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)