pawn Код:
CMD:gov(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] == 77 || IsInFaction(playerid, "LSPD") || IsInFaction(playerid, "GOV") || IsInFaction(playerid, "LSFD") || IsInFaction(playerid, "NG") || IsInFaction(playerid, "FBI") || IsInFaction(playerid, "SASD") || IsInFaction(playerid, "CIA"))
{
new result;
if(sscanf(params, "s", result)) return SendClientMessage(playerid, -1, "USAGE: /gov [message]");
format(string, sizeof(string),"|___________________________________Government Announcement___________________________________|");
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
format(string, sizeof(string), "[%s: %s %s] %s",GetPlayerFactionName(playerid),GetPlayerRank(playerid),GetPlayerNameEx(playerid),result);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string),"|___________________________________Government Announcement___________________________________|");
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
}
}
else SendClientMessage(playerid, COLOR_GRAD1, "You can't use this command!");
return 1;
}
I'm not very experienced with the strcmp way of making commands.