[Assistance needed] - Failed to loop through players.
#1

Hi. For some reason, i have failed with a loop through players.
This following code stops at ID:0 and won't continue to search for other players.

The idea is, that it should search for any players, who are in the same virtual world and in range of house location X,Y,Z.

Код:
	for(new i = 0; i<APPROX_PLAYERS; i++)
		{
		if( (GetPlayerVirtualWorld(i) == houselocW) && (IsPlayerInRangeOfPoint(i, 20, houselocX, houselocY, houselocZ)) )
		    {
			SendClientMessage(i, COLOR_YELLOW, "( I ) Riiing.. riing.");
			SendClientMessage(playerid, COLOR_YELLOW, "( I ) Biip.. biip.");
			return 1;
			}else{
			SendClientMessage(playerid, COLOR_YELLOW, "( I ) No answer");
			return 1;
			}
	    }
I will be very grateful if anyone can find the mistake i've made.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)