19.01.2017, 13:42
pawn Код:
CMD:fr(playerid, params[])
{
new text[128];
if(PlayerData[playerid][pFaction] == -1) return SendErrorMessage(playerid, "You must in faction member to use this command");
if (GetFactionType(playerid) == FACTION_GANG) return SendErrorMessage(playerid, "Family doesn't have faction radio.");
if(sscanf(params,"s[128]",text)) return SendSyntaxMessage(playerid, "/f(action)r(adio) [text]");
if(strval(text) > 128) return SendErrorMessage(playerid,"Text too long.");
if(text[0] == '@')
{
SendFactionMessage(PlayerData[playerid][pFaction], FactionData[PlayerData[playerid][pFaction]][factionColor], "[RADIO] %s %s: %s.%03d %s", Faction_GetRank(playerid),ReturnName2(playerid, 0), GetInitials(Faction_GetRank(playerid)), PlayerData[playerid][pBadge], text[1]);
}
else
SendFactionMessage(PlayerData[playerid][pFaction], FactionData[PlayerData[playerid][pFaction]][factionColor], "[RADIO] %s %s: %s", Faction_GetRank(playerid),ReturnName2(playerid, 0), text);
return 1;
}