Help About My Commands is something wrong ?
#1

pawn Code:
CMD:admins(playerid, params[])
{
    if(pInfo[playerid][pHour] >= 1)
    {
        new adminstring[128];
        new AdminDuty[128];
        if(IsPlayerConnected(playerid))
        {
            for (new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                switch(pInfo[i][pAdminDuty])
                {
                    case 0: AdminDuty = "Playing!";
                    case 1: AdminDuty = "OnDuty!";
                }
                if(pInfo[i][pAdminLevel] > 0)
                {
                    format(adminstring, sizeof(adminstring),"%s%s %s\n", adminstring, GetAdminName(i), PlayerName(i));
                }
             }
         }
         ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online admins",adminstring,"Close","");
         }
         else return SendClientMessage(playerid,-1,""chat" No admins online");
     }
     else return SendClientMessage(playerid,-1,""chat" You cannot view admins online (You need 1 hours IG time)");
    return 1;
}

Is called Lost Idefintifi

can anyone help and see what wrong s?
Reply
#2

Quickly whipped this up
give it a go
pawn Code:
CMD:admins(playerid, params[])
{
    new adminstring[128];
    new AdminDuty[128];
    new totadmins = 0;

    if(pInfo[playerid][pHour] >= 1)
    {
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(pInfo[i][pAdminLevel] > 0)
                {
                    switch(pInfo[i][pAdminDuty])
                    {
                        case 0: AdminDuty = "Playing!";
                        case 1: AdminDuty = "OnDuty!";
                    }
                    format(adminstring, sizeof(adminstring),"%s%s %s\n", adminstring, GetAdminName(i), PlayerName(i));
                    totadmins++;
                }
            }
        }
    }
    else return SendClientMessage(playerid,-1,""chat" You cannot view admins online (You need 1 hours IG time)");
    if(totadmins == 0) return SendClientMessage(playerid,-1,""chat" No Admins Online");
   
    ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online admins",adminstring,"Close","");
    return 1;
}
Reply
#3

hey check my last post at The SaveStats thing i have a problem that you said
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)