[FilterScript] WhoIsAdmin v1.4
#10

I've a tip for you: this code can be written much easier and simpler, without unnecessary includes:
pawn Код:
#include <a_samp>
PlayerName(playerid)
{
    new N[MAX_PLAYER_NAME];
    GetPlayerName(playerid, N, sizeof(N));
    return N;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/admins", true, 7))
    {
        SendClientMessage(playerid, -1, "Admins online:");
        for(new i = 0; i <= MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && IsPlayerAdmin(i)) return SendClientMessage(playerid, -1, PlayerName(i));
        }
        return 1;
    }
    return 0;
}
But if it's your first script, then okay, it's good.
Reply


Messages In This Thread
WhoIsAdmin v1.4 - by sheders - 19.03.2013, 18:02
Re: WhoIsAdmin v1.4 - by S4ba - 19.03.2013, 18:20
Re: WhoIsAdmin v1.4 - by sheders - 19.03.2013, 18:28
Re: WhoIsAdmin v1.4 - by DiGiTaL_AnGeL - 19.03.2013, 18:45
Re: WhoIsAdmin v1.4 - by sheders - 19.03.2013, 19:04
Re: WhoIsAdmin v1.4 - by FiReMaNStone - 19.03.2013, 19:09
Re: WhoIsAdmin v1.4 - by sheders - 19.03.2013, 19:41
Re: WhoIsAdmin v1.4 - by feliphemort - 19.03.2013, 19:43
Re: WhoIsAdmin v1.4 - by sheders - 19.03.2013, 19:45
Re: WhoIsAdmin v1.4 - by Dystans - 19.03.2013, 19:52

Forum Jump:


Users browsing this thread: 1 Guest(s)