22.07.2012, 08:17
pawn Код:
CMD:admins(playerid, params[])
{
if(!IsPlayerConnected(playerid)) return 1;
new string[128], name[24];
SendClientMessage(playerid, -1, "-------------[Admins]-------------");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pAdmin] >= 1)
{
format(string, sizeof(string), "%s (ID: %i) - Admin Level %i", GetPlayerName(i, name, sizeof(name)), i, PlayerInfo[i][Admin]);
SendClientMessage(playerid, -1, string); //Change -1 to the color code or color define you have, unless you want it to be a random color.
}
}
SendClientMessage(playerid, -1, "----------------------------------");
return 1;
}
-------------[Admins]-------------
Name (ID: 0) - Admin Level 1
----------------------------------
Will edit with the other thing you needed.
EDIT: Here for the login dialog:
pawn Код:
ShowPlayerDialog(playerid, 666, DIALOG_STYLE_INPUT, "Login", "Please type in your desired password below!", "Continue", "Cancel");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 666:
{
if(!response) return Kick(playerid);
new inputpass[64];
inputpass = inputtext;
Encrypt(inputpass);
OnPlayerLogin(playerid,inputpass);
}
}
return 0;
}
pawn Код:
#define DIALOG_LOGIN 666
PS: I lol'ed at your name, apparent "Pro_Scriptar" of which cannot create a simple login dialog.