Getclosest issue
#4

Hmm alright but heres another issue Im having with it, it keeps searching for that player I think.

Whats wrong with this code then

pawn Код:
public CheckPlayersInRangeOfAA(playerid)
{
    new
        near = GetClosestPlayerToPlayer(playerid),
        Float:NearPos[3],
        Float:x,Float:y,Float:z,
        string[128];
       
    if(pInfo[playerid][Team] != pInfo[near][Team]) /* If their teams dont match, aka not same team*/
    {
        GetPlayerPos(near,NearPos[0],NearPos[1],NearPos[2]); /* Getting that player position that we are going to shoot */
        if(IsPlayerInRangeOfPoint(playerid,200,x,y,z)) /* Checking if playerid is in of Near */
        {
            GetPlayerPos(playerid,x,y,z); /* Getting player positions to create object that we are going to move*/
            AAC = CreateObject(18647,x,y,z,0,0,0,0); /* Creating the object */

            SetObjectToFaceCords(AAC, NearPos[0],NearPos[1],NearPos[2]); /* Setting the object to face other player*/
            MoveObject(AAC,NearPos[0],NearPos[1],NearPos[2],100); /* moving the object */
           
            format(string,sizeof(string),"Send a rocket towards %s",GetName(near));
        }

    }
    return true;
}
It keeps making the infinite loop or something
Reply


Messages In This Thread
Getclosest issue - by TwinkiDaBoss - 01.08.2015, 14:27
AW: Getclosest issue - by Macronix - 01.08.2015, 14:45
Re: Getclosest issue - by Vince - 01.08.2015, 14:46
Re: Getclosest issue - by TwinkiDaBoss - 01.08.2015, 15:15
Re: Getclosest issue - by xVIP3Rx - 01.08.2015, 15:31
Re: Getclosest issue - by TwinkiDaBoss - 01.08.2015, 15:36
Re: Getclosest issue - by xVIP3Rx - 01.08.2015, 15:40
Re: Getclosest issue - by TwinkiDaBoss - 01.08.2015, 15:55
Re: Getclosest issue - by xVIP3Rx - 01.08.2015, 15:57
Re: Getclosest issue - by TwinkiDaBoss - 01.08.2015, 15:59

Forum Jump:


Users browsing this thread: 2 Guest(s)