SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 29/06/2019, 01:34 AM   #1
Japis
Big Clucker
 
Join Date: Mar 2017
Posts: 150
Reputation: 0
Default /Admins no Dialog Tablist Headers

Fala galera, a ideia é a seguinte

Seriam as colunas:
Code:
Nome Cargo Status
o problema é que se eu adicionar junto ao format, o loop faz floodar a coluna "Nome\t Cargo\t Status" interferindo na estrutura da lista. Se alguém puder me ajudar a adicionar essa coluna por fora das informações da String seria maravilhoso.

Code:
    CMD:admins(playerid)
{
    new string[561];
    string[0] = '\0';
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] != 0)
        {
			format(string,sizeof(string),"Nome\tCargo\tStatus\n %s%s\t %s \t %s\n",string, Nome(i),GetPlayerAdminRank(i), GetPlayerAdminRankAfk(i));
		}
}
    ShowPlayerDialog(playerid,DIALOG_STAFFS,DIALOG_STYLE_TABLIST_HEADERS,"Adms Online",string,"Close","");
    return true;
}
Japis is offline   Reply With Quote
Old 29/06/2019, 02:24 AM   #2
1sbedx
Huge Clucker
 
Join Date: Dec 2015
Posts: 268
Reputation: 38
Default Re: /Admins no Dialog Tablist Headers

PHP Code:
CMD:admins(playerid) {
  new 
string[128] = "Nome\tCargo\tStatus";

  for (new 
0MAX_PLAYERSi++) {
    if(
IsPlayerConnected(i) && PlayerInfo[i][pAdmin] != 0) {
      
format(stringsizeof(string), "%s\n%s\t%s\t%s"stringNome(i), GetPlayerAdminRank(i), GetPlayerAdminRankAfk(i));
    }
  }
  
ShowPlayerDialog(playeridDIALOG_STAFFSDIALOG_STYLE_TABLIST_HEADERS"Adms Online"string"Close""");
  return 
true;

__________________
Estou desenvolvendo por dinheiro, qualquer dúvida entre em contato para negociação.
1sbedx is online now   Reply With Quote
Old 29/06/2019, 03:08 PM   #3
Japis
Big Clucker
 
Join Date: Mar 2017
Posts: 150
Reputation: 0
Default Re: /Admins no Dialog Tablist Headers

Muito obrigado mano, eficaz funcionando perfeitamente obg
Japis is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Dialog Tablist Headers Luiiiz Português/Portuguese 2 22/06/2018 08:02 PM
dialog tablist headers wallen Scripting Help 6 27/03/2018 09:00 PM
[Ajuda] Bug com DIALOG TABLIST HEADERS ThiagoScottish Português/Portuguese 2 27/03/2018 04:17 PM
Tablist Headers dionisak0s Scripting Help 2 04/01/2016 11:15 AM
Tablist Headers Help dionisak0s Scripting Help 6 10/10/2015 12:00 PM


All times are GMT. The time now is 10:31 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.