Name show or not show
#1

Hi all!

My problem is all player see other player name, but should not!

Код:
public Names(playerid)
{
    if(spawnnolt[playerid] == 1)
	{
	    new Float:posx, Float:posy, Float:posz;
	    GetPlayerPos(playerid, posx, posy, posz);

		for(new i; i < MAX_PLAYERS; i++)
		{
		    if(IsPlayerConnected(i) && i != playerid)
			{
			    if(IsPlayerInRangeOfPoint(i, 50, posx, posy, posz))
			    {
						new query[70], line[70];
						format(query, sizeof(query), "SELECT * FROM Friends WHERE Friend = '%s' AND Who = '%s'",Nev(i), Nev(playerid));
						mysql_query(query);
					    mysql_store_result();
					    mysql_fetch_row(line);
						if(mysql_num_rows() != 0)
						{
						    ShowPlayerNameTagForPlayer(playerid, i, true);
						    printf("%s see %s ", Nev(playerid) , Nev(i));
						}
						else
						{
						    ShowPlayerNameTagForPlayer(playerid, i, false);
						    printf("%s don't see %s -t!", Nev(playerid) , Nev(i));
						}
						mysql_free_result();
			    }
			}
		}
	}
	return 1;
}
What is that problem?

Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)