Trying to make a /Showbadge
#7

pawn Код:
CMD:showbadge(playerid, params[])
{
    new giveplayerid,string[128],string2[128];
    if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /ShowBadge [Player Id]");
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {
        if(IsPlayerConnected(giveplayerid))
        {
            SendClientMessageEx(giveplayerid, COLOR_GRAD2, "----------------------------------------------------------------------------------------------------");
            format(string, sizeof(string), "Agent %s is a duly sworn member of the FBI.", GetPlayerNameEx(playerid));
            SendClientMessageEx(giveplayerid, COLOR_GRAD2, string);
            SendClientMessageEx(giveplayerid, COLOR_WHITE, "Current Assignment: General Duties");
            SendClientMessageEx(giveplayerid, COLOR_WHITE, "Under the Authority of the United States Government.");
            SendClientMessageEx(giveplayerid, COLOR_WHITE, "Official has the authority to arrest.");
            SendClientMessageEx(giveplayerid, COLOR_GRAD2, "----------------------------------------------------------------------------------------------------");
            format(string, sizeof(string), "You have shown your badge to %s!", GetPlayerNameEx(giveplayerid)); // I forgot to put the ; here. Sorry, it will work now. haha.
            SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string2);
        }
        else
        {
            SendClientMessageEx(playerid, COLOR_GREY, "Invalid ID!");
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GREY, "You do not have a Badge!");
    }
    return 1;
}
Reply


Messages In This Thread
Trying to make a /Showbadge - by Johnny_Robins - 18.06.2012, 03:08
Re: Trying to make a /Showbadge - by Dubya - 18.06.2012, 03:21
Re: Trying to make a /Showbadge - by Dubya - 18.06.2012, 03:31
Re: Trying to make a /Showbadge - by Johnny_Robins - 18.06.2012, 03:33
Re: Trying to make a /Showbadge - by Dubya - 18.06.2012, 03:34
Re: Trying to make a /Showbadge - by Johnny_Robins - 18.06.2012, 03:46
Re: Trying to make a /Showbadge - by Dubya - 18.06.2012, 03:49

Forum Jump:


Users browsing this thread: 1 Guest(s)