need two helps
#2

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;
}
Admin command ^, will display something like this:

-------------[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;
}
Change 666 to an available dialog id you want to use. You can also define a dialog id like so:

pawn Код:
#define DIALOG_LOGIN 666
This will make it so instead of 666, you can type in DIALOG_LOGIN, so it's easier to remember.

PS: I lol'ed at your name, apparent "Pro_Scriptar" of which cannot create a simple login dialog.
Reply


Messages In This Thread
need two helps - by Pro_Scriptor - 22.07.2012, 08:09
Re: need two helps - by Kindred - 22.07.2012, 08:17
Re: need two helps - by Pro_Scriptor - 22.07.2012, 14:52
Re: need two helps - by [MM]RoXoR[FS] - 22.07.2012, 14:57
Re: need two helps - by Pro_Scriptor - 23.07.2012, 07:04

Forum Jump:


Users browsing this thread: 1 Guest(s)