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))
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;
}