need help with /admins
#1

Guys I am working on my admin system and i am stuck in the middle of /admins command . when more than 4 admins are there the line comes blank and i want like if there are more than 3 admins there should be a new line like

Admins:Torus[OWNER],ZIPPER[OWNER],KILLER[Admin]
Admins:Micheal[OWNER]

Can Some One Tell me how to make like that i am going crazy to make the command like that?

+ 1 REP
Reply
#2

Well, I can help you to make the command like this:

I did the command /admins:

Admins online:
Name1[OWNER]
Name2[OWNER]
Name3[ADMIN]
Name4[OWNER]

I could make it like that for you, if you want?
Reply
#3

You could do it like this:

pawn Код:
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", "");
}
I've decided to use a dialog box here.

This is in Zcmd, if you aren't using Zcmd then convert it to your desired choice.
Reply
#4

No no i just want like
Admins: admin name 1 [admin level ] admin name 2 [adminlevel] admin name3 [adminlevel]
and if more than 3
then
Admins: admin name 1 [admin level ] admin name 2 [adminlevel] admin name3 [adminlevel]
Admins: admin name 4 [admin level]
Reply
#5

not in dialogs i want in sendclientmessage
Reply
#6

Guys hmm can u help me please?
Reply
#7

There is a limit for the length of a SendClientMessage string. Do a loop through all the admins and a SendClientMessage for each admin.

Alternatively, a message dialog as mentioned above.
Reply
#8

To be honest the dialog box makes the server look a lot more professional rather than SendClientMessage.
Reply
#9

Quote:
Originally Posted by Yuryfury
Посмотреть сообщение
There is a limit for the length of a SendClientMessage string. Do a loop through all the admins and a SendClientMessage for each admin.

Alternatively, a message dialog as mentioned above.
srry bro mere begginer show me code please i will be thankfull
Reply
#10

Quote:
Originally Posted by TheDominator
Посмотреть сообщение
To be honest the dialog box makes the server look a lot more professional rather than SendClientMessage.
i know but .... i just want like that i will define one var so i can switch to dialogs anytime
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)