How to create /admins
#1

I don't really get it because it always gives me errors, can someone make it for me??
Reply
#2

What do you mean by /admins ? What this commnd will do ?

May be show your codes that you tried :
Reply
#3

You can check on the filterscript section or script your and if there are errors please show us the errors
Reply
#4

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", "");
}
Reply
#5

pawn Код:
CMD:admins(playerid, params[])
{
new name[MAX_PLAYER_NAME], string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i);
{
if(IsPlayerAdmin(i);
{
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string),"%s", name);
SendClientMessage(playerid, -1, string);
}
}
}
return 1;
}
I think you need this right?
Reply
#6

i useing that system
pawn Код:
dcmd_admins(playerid, params[])
{
#pragma unused params
new pname[MAX_PLAYER_NAME];
new string[128];
new admins = 0;
new admtext[64];
SendClientMessage(playerid,COLOR_BLUE,"-----------------------Administrators Online-------------------------");
for(new i = 0; i < MAX_PLAYERS; i++){
if (IsPlayerConnected(i)){
if(AdminLevel[playerid] >= 1) { admtext = "Moderator"; }
if(AdminLevel[playerid] >= 2) { admtext = "Global Moderator"; }
if(AdminLevel[playerid] >= 3) { admtext = "Administrator"; }
if(AdminLevel[playerid] >= 4) { admtext = "Operative Administrator"; }
if(AdminLevel[playerid] >= 5) { admtext = "Head Administrator"; }
if(AdminLevel[playerid] >= 6) { admtext = "Junior Administrator"; }
if(AdminLevel[playerid] >= 1336) { admtext = "Tester/Developer"; }
if(AdminLevel[playerid] >= 1337) { admtext = "Trusted Admin"; }
if(AdminLevel[playerid] >= 1338) { admtext = "Server Owner"; }
GetPlayerName(i, pname, 24);
format(string,sizeof string,"%s - %s", pname,admtext);
SendClientMessage(playerid,-1,string);
admins++;
}
}
if(admins == 0){
SendClientMessage(playerid, COLOR_WHITE, "Currently there are no admins online.");
}
return 1;//This Command is for SAN FIERRO COPS AND ROBBERS
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)