Cmds not working
#1

i use the cmd ingame it says i am not admin here is it;
pawn Код:
if(strcmp(cmd, "/reloadhouses", true) == 0)
    {
        if(PInfo[playerid][AdminLevel] == 5)
        {
            for(new i=0;i<MAX_HOUSES;i++)
            {
                ReloadHouse(i);
            }
            SendClientMessage(playerid, COLOR_WHITE, "You have reloaded all houses.");
            AdminLog(playerid, "/reloadhouses", "Reloaded Houses", "Houses");
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_ERROR, "You are not an administrator !");
            return 1;
        }
    }
i Removed This part maybe that will make it work but it didn't
pawn Код:
if(strcmp(cmd, "/reloadhouses", true) == 0)
    {
        if(PInfo[playerid][AdminLevel] == 2)
        {
            for(new i=0;i<MAX_HOUSES;i++)
            {
                ReloadHouse(i);
            }
            SendClientMessage(playerid, COLOR_WHITE, "You have reloaded all houses.");
            AdminLog(playerid, "/reloadhouses", "Reloaded Houses", "Houses");
            return 1;
            }
    }
What did i do wrong?
Reply
#2

ahmmm.... try return 1; at the end??

and what errors or warning you get?
Reply
#3

i didnt get any warning or Error Weird eh
Reply
#4

It could be because you only set it as if he's level 2 he can use it, not lower or higher, or lvl 5 same..
You need if(PInfo[playerid][AdminLevel] <= 2) or just < 2
Reply
#5

I did Also if you are Level 6 or 5 u can do all the cmds i dont understand
Reply
#6

Well now if you did <= 2 that means that any rank that's 2 or higher can use that command, do the same on the one with level 5, hope you get it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)