20.04.2018, 09:55
PHP код:
stock SendMessageToAllFaction(message[], color)
{
foreach(Player, i)
{
if(pInfo[i][pFaction] == pInfo[playerid][pFaction]
{
SendClientMessage(i, color, message);
}
}
return 1;
}
PHP код:
CMD:faction(playerid,params[])
{
new factionstring[257];
if((pInfo[playerid][pFaction] == 0)) return SendClientMessage(playerid, -1, "You are not in any faction");
{
if(!strlen(params))
{
SendClientMessage(playerid, -1, ""chat" /f [mesaj]");
return 1;
}
format(factionstring, sizeof(factionstring), ""COL_FCHAT"** (( %s %s: %s ))**",GetRankName(playerid),PlayerName(playerid), params);
SendMessageToAllFaction(factionstring, -1);
}
return 1;
}