I need help... with Commands
#2

pawn Код:
CMD:command(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        if(isnull(params))
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /(f)inish®e(p)ort[PlayerID/PartOfName]");
            return 1;
        }
        giveplayerid = ReturnUser(params);
        if(IsPlayerConnected(giveplayerid))
        {
            if(giveplayerid != INVALID_PLAYER_ID)
            {
                if(AcceptedReport[playerid] != giveplayerid)
                {
                    return SendClientMessage(playerid, -1," You haven't accepted this player's report !");
                }
                GetPlayerName(playerid, sendername, sizeof(sendername));
                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "AdmCmd: %s has Finished %s's report", sendername, giveplayer);
                ABroadCast(COLOR_RED, string, 1);
                format(string, sizeof(string), "%s has Finished your report, you can now continue your gameplay.", sendername);
                SendClientMessage(giveplayerid, COLOR_WHITE, string);
                AcceptedReport[playerid] = -1;
                Talkingto[playerid] = -1;
            }
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "   You are not authorized to use that command !");
        return 1;
    }
    return 1;
}
There is a lot of different tutorials on this subject. Search before posting.
Reply


Messages In This Thread
I need help... with Commands - by CountryTrooper441 - 30.09.2013, 22:45
Re: I need help... with Commands - by Isolated - 30.09.2013, 22:51
Re: I need help... with Commands - by CountryTrooper441 - 30.09.2013, 22:53
Re: I need help... with Commands - by Mattakil - 30.09.2013, 22:54

Forum Jump:


Users browsing this thread: 1 Guest(s)