SA-MP Forums Archive
/afklist whats wrong - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /afklist whats wrong (/showthread.php?tid=119843)



/afklist whats wrong - ArTisT - 09.01.2010

Код:
	if (strcmp("/afklist", cmdtext, true, 10) == 0)
	{
			new PName[MAX_PLAYER_NAME];
			SendClientMessage(playerid, 0xAA3333AA, "Afk Players:");
  for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				  if(AFK[playerid] == 1)
				  {
						GetPlayerName(playerid, PName, sizeof(PName));
						format(string, 256, "Player: %s", PName);
						SendClientMessage(playerid, 0xFFFFFFAA, string);
					}
				}
			}
  		return 1;
	}
If I'm alone at the server it works if not when i type /afklist i see my name 2 times and the other person can see nothing


Re: /afklist whats wrong - SiJ - 09.01.2010

Quote:
Originally Posted by ArTisT
Код:
	if (strcmp("/afklist", cmdtext, true, 10) == 0)
	{
			new PName[MAX_PLAYER_NAME];
			SendClientMessage(playerid, 0xAA3333AA, "Afk Players:");
 for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				  if(AFK[i] == 1)
				  {
						GetPlayerName(i, PName, sizeof(PName));
						format(string, 256, "Player: %s", PName);
						SendClientMessage(playerid, 0xFFFFFFAA, string);
					}
				}
			}
  		return 1;
	}
If I'm alone at the server it works if not when i type /afklist i see my name 2 times and the other person can see nothing



Re: /afklist whats wrong - ArTisT - 09.01.2010

Thanks