Help me with /admins command
#1

Hello !

I was just wondering about my error happening there. So, i decided to show it here.

Код:
CMD:admins(playerid,params[])
{
    #pragma unused params
    new count = 0;
    new string[128];
    new AdmRank[128];
    new AdmDuty[128];
    new ChangeColor;
    SendClientMessage(playerid, green, " ");
    SendClientMessage(playerid, green, "{5EFF00}___________ |- Online Admins -| ___________");
    SendClientMessage(playerid, green, " ");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            if(PlayerInfo[i][Level] >= 1 && PlayerInfo[i][Hide] == 0)
            {
                if(IsPlayerAdmin(i))
                  {
                      AdmRank = "RCON Administrator";
                      ChangeColor = red;
                  }
                else
                {
                    switch(PlayerInfo[i][Level])
                    {
                        case 1: {
                            AdmRank = "Trial Moderator";
                            ChangeColor = COLOR_ORANGE;
                        }
                        case 2: {
                            AdmRank = "Junior Moderator";
                            ChangeColor = COLOR_GREEN1;
                        }
                        case 3: {
                            AdmRank = "Super Moderator";
                            ChangeColor = COLOR_YELLOW;
                        }
                        case 4: {
                            AdmRank = "Administrator";
                            ChangeColor = green;
                        }
                        case 5: {
                            AdmRank = "Supreme Administrator";
                            ChangeColor = COLOR_WHITE;
                        }
                        case 6: {
                            AdmRank = "Expert Administrator";
                            ChangeColor = COLOR_ROYALBLUE;
                        }
                        case 7: {
                            AdmRank = "Delta Administrator";
                            ChangeColor = red;
                        }
                        case 8: {
                            AdmRank = "Alfa Administrator";
                            ChangeColor = red;
                        }
                    }
                }
                switch(PlayerInfo[i][OnDuty])
                {
                    case 0: AdmDuty = "Playing!";
                    case 1: AdmDuty = "Off Duty!";
                    case 2: AdmDuty = "AFK!";
                }
                if(PlayerInfo[i][OnDuty] == 0 || PlayerInfo[i][OnDuty] == 2) {
                    format(string, 128, "Level: %d - %s (Id:%i) | %s |  {FF0000}%s",PlayerInfo[i][Level], GetName(i),i,AdmRank,AdmDuty);
                    SendClientMessage(playerid, ChangeColor, string);
                    count++;
                }
                if(PlayerInfo[i][OnDuty] == 1) {
                    format(string, 128, "Level: %d - %s (Id:%i) | %s | {5EFF00}%s",PlayerInfo[i][Level], GetName(i),i,AdmRank,AdmDuty);
                    SendClientMessage(playerid, ChangeColor, string);
                    count++;
                }
            }
        }
    }
    if (count == 0)
    SendClientMessage(playerid,red,"No admin online in the list");
    SendClientMessage(playerid, green, "{5EFF00}________________________________________");
    SendClientMessage(playerid, red, " ");
    return 1;
}

stock GetName(playerid)
{
    new name[24]; GetPlayerName(playerid, name, 24);
    return name;
}
The error

Код:
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\samp037_svr_R2-1-1_win32\gamemodes\NFTDM[3z].pwn(2104) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
The 2104 line:

Код:
new name[24]; GetPlayerName(playerid, name, 24);
Hope you help me
Reply


Messages In This Thread
Help me with /admins command - by Knowinne - 22.10.2016, 16:55
Re: Help me with /admins command - by IceBilizard - 22.10.2016, 17:03
Re: Help me with /admins command - by Knowinne - 22.10.2016, 17:05
Re: Help me with /admins command - by GoldenLion - 22.10.2016, 17:05
Re: Help me with /admins command - by Knowinne - 22.10.2016, 17:07
Re: Help me with /admins command - by GoldenLion - 22.10.2016, 17:10
Re: Help me with /admins command - by Knowinne - 22.10.2016, 17:16
Re: Help me with /admins command - by Knowinne - 22.10.2016, 17:20

Forum Jump:


Users browsing this thread: 4 Guest(s)