My command and function's not working.
#2

Код:
if (strcmp("/playing", cmdtext, true, 10) == 0)
{
  new name[MAX_PLAYER_NAME], string[256], gametype[256];
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    if(IsPlayerConnected(i))
    {
      GetPlayerName(i, name, sizeof(name));
      gametype = GetPlayerGameType(i);
      format(string, sizeof(string), "Name: %s | Playing: %s", name, gametype);
      SendClientMessage(playerid, COLOR_WHITE, string);
    }
  }
  return 1;
}
Try this, you forget to check is player from your loop connected
Reply


Messages In This Thread
My command and function's not working. - by jameskmonger - 27.03.2010, 13:59
Re: My command and function's not working. - by Norck - 27.03.2010, 19:56

Forum Jump:


Users browsing this thread: 1 Guest(s)