- Регистрация
- 2 Мар 2012
- Сообщения
- 77
- Лучшие ответы
- 0
- Репутация
- 5
Команда:
Code
Функция получения имени:
Code
Не откажусь от "+"
Code
PHP:
if (strcmp(cmd, "/leaders", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new listitems[1024];
strins(listitems, "ID\Имя\t\t\Фракция\n____________________________________________________________________ strlen(listitems), 114);
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLeader] > 0)// && PlayerInfo[i][pAdmin] < 10
{
format(listitems, sizeof(listitems), "[%d] \t [%s] \t [%s]",i, oGetPlayerName(i), GetLeader(i));
strins(listitems, string, strlen(listitems), strlen(string));
}
}
}
strins(listitems, "\n______________________________________________________________________\n", strlen(listitems), 65);
ShowPlayerDialog(playerid,1234,DIALOG_STYLE_MSGBOX,"{FFFF00}:: {FFFFFF}Лидеры онлайн {FFFF00}::",listitems,"Ок","Cancel");
}
return 1;
}
Code
PHP:
stock oGetPlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
return name;
}
Не откажусь от "+"