SA-MP Forums Archive
How to make /admins in dialog? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make /admins in dialog? (/showthread.php?tid=326521)



How to make /admins in dialog? - GAMER_PS2 - 17.03.2012

I am using sscanf & zcmd and when i do /admins and even if others are admin , my name is only displayed can any one give me the code plz?


Re: How to make /admins in dialog? - Laronic - 17.03.2012

pawn Code:
COMMAND:admins(playerid, params[])
{
    new count = 1, name[24], string[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerAdmin(i))
        {
            GetPlayerName(i, name, sizeof(name));
            format(string, sizeof(string), "%s%s \n", string, name);
            count ++;
        }
    }
   
    if(count != 1)
    {
        ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "Online Admins", string, "OK", "");
    }
    else ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "[!] Online Admins", "No online admins", "OK", "");
}



Re: How to make /admins in dialog? - GAMER_PS2 - 18.03.2012

Quote:
Originally Posted by CyberGhost
View Post
pawn Code:
COMMAND:admins(playerid, params[])
{
    new count = 1, name[24], string[128];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerAdmin(i))
        {
            GetPlayerName(i, name, sizeof(name));
            format(string, sizeof(string), "%s%s", string, name);
            count ++;
        }
    }
   
    if(count != 1)
    {
        ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "Online Admins", string, "OK", "");
    }
    else ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "[!] Online Admins", "No online admins", "OK", "");
}
Thks +1 Rep


Re: How to make /admins in dialog? - Alexy_Dramon - 18.03.2012

working 999999/10
it's helped me to


AW: How to make /admins in dialog? - Tigerkiller - 18.03.2012

for me too but how can i make it so when i choose an admin. there pops up another window like pm. and when i press pm, there is a input dialog and if i enter a text, it sends the admin the pm


Re: AW: How to make /admins in dialog? - park4bmx - 18.03.2012

Quote:
Originally Posted by Tigerkiller
View Post
for me too but how can i make it so when i choose an admin. there pops up another window like pm. and when i press pm, there is a input dialog and if i enter a text, it sends the admin the pm
That cannot be done in MSGBOX type becose you cannot click the players name so use a listbox
And u can see how I done it in my Reg. System


Re: How to make /admins in dialog? - Gamer_007 - 06.07.2012

it also helped me added rep +1