Turning Cmds
#6

Quote:
Originally Posted by KoczkaHUN
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if (!strcmp("scoreboard", cmdtext[1], true, 10))
  {
    new string[2048], strline[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
      if (!IsPlayerConnected(i)) continue;
      format(strline, sizeof(strline), "%s                   \t           %d\n", PlayerName(i), GetPlayerScore(i));
      strcat(string, strline);
    }
    ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_MSGBOX, "     {FF0000}Name                                          Score", string, "Okai", "");
    return 1;
  }
  return 0;
}

stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
Not sure, but I think 2048 is WAY too big.
Reply


Messages In This Thread
Turning Cmds - by 0_o - 05.06.2011, 16:52
Re: Turning Cmds - by KoczkaHUN - 05.06.2011, 17:02
Re: Turning Cmds - by Laronic - 05.06.2011, 17:05
Re: Turning Cmds - by 0_o - 05.06.2011, 17:05
Re: Turning Cmds - by KoczkaHUN - 05.06.2011, 17:13
Re: Turning Cmds - by Mean - 05.06.2011, 17:16
Re: Turning Cmds - by 0_o - 05.06.2011, 17:18
Re: Turning Cmds - by KoczkaHUN - 05.06.2011, 17:20
Re: Turning Cmds - by KoczkaHUN - 05.06.2011, 17:22
Re: Turning Cmds - by 0_o - 05.06.2011, 17:32

Forum Jump:


Users browsing this thread: 1 Guest(s)