Nearest Hospital Spawn Upon Death
#2

Try changing the loop to something like this (note that I didn't test this):

pawn Код:
new closestspawn = -1;
for(new i = 0; i < sizeof(spawndist); i++)
{
    if(closestspawn == -1 && spawndist[i] < distance)
    {
        closestspawn = i;
        continue;
    }
    else if(closestspawn != -1 && closestspawn != i)
    {
        if(spawndist[i] < spawndist[closestspawn])
        {
            closestspawn = i;
            continue;
        }
        else continue;
    }
}
Reply


Messages In This Thread
Nearest Hospital Spawn Upon Death - by marley - 17.07.2016, 00:18
Re: Nearest Hospital Spawn Upon Death - by DTV - 17.07.2016, 01:11
Re: Nearest Hospital Spawn Upon Death - by marley - 17.07.2016, 02:29
Re: Nearest Hospital Spawn Upon Death - by DTV - 17.07.2016, 03:08
Re: Nearest Hospital Spawn Upon Death - by [cS]Owain - 17.07.2016, 05:17
Re: Nearest Hospital Spawn Upon Death - by oMa37 - 17.07.2016, 05:34
Re: Nearest Hospital Spawn Upon Death - by marley - 17.07.2016, 17:43

Forum Jump:


Users browsing this thread: 3 Guest(s)