List of levels
#1

I want to make a command which should show the admins in a particular level.

Suppose, in my server total 5 admin levels and i want to make a cmd like /adminlvl1
So that it will show the admins of level 1.I'm using mysql r6
Reply
#2

so do you mean something like this? just a example

pawn Код:
if (strcmp(cmd, "/adminlvl1", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_DBLUE, "~Level 1 Admins~");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pAdmin]==1)
                    {
                        GetPlayerName(i, sendername, sizeof(sendername));
                        format(string, 256, "%s", sendername, PlayerInfo[i][pAdmin]);
                        SendClientMessage(playerid, COLOR_YELLOW, string);
                    }
                }
            }
        }
        return 1;
    }
Reply
#3

I mean offline admins on the list.
Reply
#4

What sort of saving system do you use?
Reply
#5

Quote:
Originally Posted by RedFusion
Посмотреть сообщение
What sort of saving system do you use?
MySQL R6
Reply
#6

And what's the name of your database, tables and columns?
Reply
#7

Quote:
Originally Posted by RedFusion
Посмотреть сообщение
And what's the name of your database, tables and columns?
I'm currently use like this

#define SQL_HOST "localhost"
#define SQL_USER "root"
#define SQL_PASS ""
#define SQL_DB "pdata"


Can you give me the code ? so that i will set those information
Reply
#8

That's no tables or columns, i don't even know MySQL but i thought someone else maybe could help you if the required information is on here. Like columns, tables, and so on
Reply
#9

I don't know your table name and the fields, but I'm going to give you an example. You can do the rest by yourself, since I never used R6, only R7+.

pawn Код:
"SELECT name FROM users WHERE admin = 1"
Reply
#10

But whats the whole code related to this? can ya show me?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)