Command don't work
#1

Hey guys.. Look at this code...
pawn Код:
CMD:admins(playerid, params[])
{
    if(PlayerInfo[playerid][LoggedIn]) return SendClientMessage(playerid, COLOR_GREY, "NOTLOGGED");
    if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, " ");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "----------| Online Admins |----------");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(PlayerInfo[i][Level] > 0)
            {
            }
            if(IsPlayerConnected(i))
            {
                new aname[48], atitle[48];
                if(PlayerInfo[i][Level] == 7) { atitle = "Owner"; }
                if(PlayerInfo[i][Level] == 6) { atitle = "Moderator"; }
                if(PlayerInfo[i][Level] == 5) { atitle = "Lead Administrator"; }
                if(PlayerInfo[i][Level] == 4) { atitle = "Senior Administrator"; }
                if(PlayerInfo[i][Level] == 3) { atitle = "Administrator"; }
                if(PlayerInfo[i][Level] == 2) { atitle = "Junior Administrator"; }
                if(PlayerInfo[i][Level] == 1) { atitle = "Trial Administrator"; }
                GetPlayerName(i, aname, sizeof(aname));
/*                if(!AdminDuty[i])
                {
                    format(string, sizeof(string), "[*] [%s] %s (Admin duty: No)", atitle, aname);
                    SendClientMessage(playerid, COLOR_LBLUE, string);
                }
                else
                {
                    format(string, sizeof(string), "[*] [%s] %s (Admin duty: Yes)", atitle, aname);
                    SendClientMessage(playerid, COLOR_LBLUE, string);*/

                }
            continue;
            }
        }
    }
When i compile it here is what i get:
Quote:

E:\Desktop\SA-MP\New folder\gamemodes\SATDMv9.pwn(14674) : warning 209: function "cmd_admins" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

And when i type /admins in game it just shows NOTLOGGED
And when i do this:
pawn Код:
CMD:admins(playerid, params[])
{
    if(PlayerInfo[playerid][LoggedIn] == 0) //this line is changed
    if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, " ");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "----------| Online Admins |----------");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(PlayerInfo[i][Level] > 0)
            {
            }
            if(IsPlayerConnected(i))
            {
                new aname[48], atitle[48];
                if(PlayerInfo[i][Level] == 7) { atitle = "Owner"; }
                if(PlayerInfo[i][Level] == 6) { atitle = "Moderator"; }
                if(PlayerInfo[i][Level] == 5) { atitle = "Lead Administrator"; }
                if(PlayerInfo[i][Level] == 4) { atitle = "Senior Administrator"; }
                if(PlayerInfo[i][Level] == 3) { atitle = "Administrator"; }
                if(PlayerInfo[i][Level] == 2) { atitle = "Junior Administrator"; }
                if(PlayerInfo[i][Level] == 1) { atitle = "Trial Administrator"; }
                GetPlayerName(i, aname, sizeof(aname));
/*                if(!AdminDuty[i])
                {
                    format(string, sizeof(string), "[*] [%s] %s (Admin duty: No)", atitle, aname);
                    SendClientMessage(playerid, COLOR_LBLUE, string);
                }
                else
                {
                    format(string, sizeof(string), "[*] [%s] %s (Admin duty: Yes)", atitle, aname);
                    SendClientMessage(playerid, COLOR_LBLUE, string);*/

                }
            continue;
            }
        }
    }
I get no error or warning but command doesn't work.
Any idea what it is or how to fix it?
Reply


Messages In This Thread
Command don't work *STILL NOT FIXED* - by LeroyII - 01.09.2014, 19:41
Re: Command don't work - by Stinged - 01.09.2014, 19:51
Re: Command don't work - by LeroyII - 01.09.2014, 20:02
Re: Command don't work - by The__ - 01.09.2014, 20:24
Re: Command don't work - by LeroyII - 01.09.2014, 20:41
Re: Command don't work - by Stinged - 01.09.2014, 20:52
Re: Command don't work - by LeroyII - 01.09.2014, 21:01
Re: Command don't work - by LeroyII - 01.09.2014, 21:58
Re: Command don't work - by Isolated - 01.09.2014, 22:12
Re: Command don't work - by LeroyII - 01.09.2014, 22:15

Forum Jump:


Users browsing this thread: 1 Guest(s)