Needing Help in Pawn! FilterScript.
#1

deleted
Reply
#2

I thought the ping and the admins command were already in there . I could re send you them?. Honestly, you're better off:

pawn Код:
#include <ladmin>
at the top of your GM
then use ZCMD. loads easier then its just:

pawn Код:
C:test(playerid,params[])
{
    if(IsPlayerLuxAdminLevel(playerid,1)) // check the include, this is a stock in one of them ( i think)
    {
            //stick your code here :)
    }
    else return 0; // returns an error message to the player below level 1
    return 1;
}
Reply
#3

Yes, the /ping and /admins cmds were already there. I didn't say I added them, though.

"I'm just editing some features like adding more cmds into the script" means I edited many cmds and added a few more cmds (if the cmds was added by me, why should I ask for help lol?). And btw, can you explain clearlier? Since the one I show you is the orginal script of LuxAdmin - it works on the orginal script of LAS but when I edited some features above it, errors occured.
Reply
#4

Correct me if i'm wrong, you wanted the above level 5 admins off the list right?

clicky
Reply
#5

pawn Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
        new count = 0;
        new string[128];
        new ChangeColor;
                SendClientMessage(playerid, green, " ");
        SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
                SendClientMessage(playerid, green, " ");
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                        if (IsPlayerConnected(i))
                        {
                                if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
                                                switch(AccInfo[i][Level])
                                                {
                                                        case 1: {
                                                        AdmRank = "Trial Moderator";
                                                        ChangeColor = Color_Trial_Moderator;
                                                        }
                                                        case 2: {
                                                        AdmRank = "Moderator";
                                                        ChangeColor = Color_Moderator;
                                                        }
                                                        case 3: {
                                                        AdmRank = "Administrator";
                                                        ChangeColor = Color_Administrator;
                                                        }
                                                        case 4: {
                                                        AdmRank = "Head Administrator";
                                                        ChangeColor = Color_Head_Administrator;
                                                        }
                                                        case 5: {
                                                        AdmRank = "Owner";
                                                        ChangeColor = Color_Owner;
                                                        }
                                                }
                                        }
                                        switch(AccInfo[i][OnDuty])
                                        {
                                                case 0: AdmDuty = "Playing!";
                                                case 1: AdmDuty = "On Duty!";
                                        }
                                        format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
                                        SendClientMessage(playerid, ChangeColor, string);
                                        count++;
                                }
                        }
                }
                if (count == 0)
                {
                SendClientMessage(playerid,red,"No admin online in the list");
                SendClientMessage(playerid, green, " _______________________________________");
                }
                return 1;

}
You were doing mistake here
pawn Код:
if (count == 0)
                {//You were not adding brace because here if has two statements
                SendClientMessage(playerid,red,"No admin online in the list");
                SendClientMessage(playerid, green, " _______________________________________");
                }
Reply
#6

Quote:
Originally Posted by DobbysGamertag
Посмотреть сообщение
Correct me if i'm wrong, you wanted the above level 5 admins off the list right?

clicky
Thanks for helping but not really, I wanted all admins (except the ones that used /hide) to be visible on the list.

However, it works now. Thanks to Gamer also.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)