[HELP] Place / Admins in Dialog
#5

Quote:
Originally Posted by xRuffles
Посмотреть сообщение
Well as I'm Newbie What you do not understand this much explaining to me how you would help me make the Code?
I won't make you the code as you'll just simply copy and paste my code and learn nothing. If you create the original code, I'm pretty sure you can do it. What you need to do is to create a string that contains all the admins' name, ID and their level. Then you can simply pass the string to the dialog code. You can have a look here to learn how to create and process a dialog: https://sampwiki.blast.hk/wiki/OnDialogResponse

Quote:
Originally Posted by Gamer_007
Посмотреть сообщение
pawn Код:
if(!strcmp(cmdtext, "/admins", true))
{
new count=0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)){
if(admin[i]){
new str[256];
new pname[24];
GetPlayerName(i, pname, 24);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
if(pAdmin[i] == 1){
format(str,sizeof(str),"{21E000}%s (%d) :: {21E000}[Tutor]", pname,i);
}
if(pAdmin[i] == 2){
format(str,sizeof(str),"{3838FF}%s (%d) :: {3838FF}[Administrador]", pname,i);
}
if(pAdmin[i] == 3){
format(str,sizeof(str),"{E5FF00}%s (%d) :: {E5FF00}[Administrador Senior]", pname,i);
}
if(pAdmin[i] == 4){
format(str,sizeof(str),"{7418FF}%s (%d) :: {7418FF}[Sub-Dono]", pname,i);
}
if(pAdmin[i] == 5){
format(str,sizeof(str),"{F80018}%s (%d) :: {F80018}[Dono]", pname,i);
}
ShowPlayerDialog(playerid,16, DIALOG_STYLE_MSGBOX, "{FF0000}Online Admins:",str, "OK", "Cancel");
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid, Vermelho, "(ERRO) Nгo hб administradores online no momento");
}
return 1;
}
Try this.It may work
I'm sure this will go wrong as you haven't concatenate the string and show the whole string at once. This code will result in showing only one admin per dialog, but not all.
Reply


Messages In This Thread
[HELP] Place / Admins in Dialog - by xRuffles - 24.02.2013, 18:40
Re: [HELP] Place / Admins in Dialog - by leong124 - 24.02.2013, 19:04
Re: [HELP] Place / Admins in Dialog - by xRuffles - 25.02.2013, 09:22
Re: [HELP] Place / Admins in Dialog - by Gamer_007 - 25.02.2013, 09:26
Re: [HELP] Place / Admins in Dialog - by leong124 - 25.02.2013, 12:06
Re: [HELP] Place / Admins in Dialog - by xRuffles - 26.02.2013, 12:46
Re: [HELP] Place / Admins in Dialog - by leong124 - 26.02.2013, 15:51
Re: [HELP] Place / Admins in Dialog - by xRuffles - 27.02.2013, 14:13
Re: [HELP] Place / Admins in Dialog - by mittukuttan - 27.02.2013, 14:21
Re: [HELP] Place / Admins in Dialog - by leong124 - 27.02.2013, 18:02

Forum Jump:


Users browsing this thread: 1 Guest(s)