Faction Chat Help
#2

Код:
CMD:faction(playerid, params[])
{
    if(GetPVarInt(playerid, "LoggedIn") == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, ADMIN);
    new string[128], message[100], fid = Player[playerid][FactionID];
    if(Player[playerid][FactionID] != 0)
    {
        if(sscanf(params, "s[100]", message)) return SendClientMessage(playerid, COLOR_GREY, "[Server Command]: /f[action] [message]");
        if(Player[playerid][Rank] == 1) rank = Faction[fid][F1Rank];
		else if(Player[playerid][Rank] == 2) rank = Faction[fid][F2Rank];
		else if(Player[playerid][Rank] == 3) rank = Faction[fid][F3Rank];
		else if(Player[playerid][Rank] == 4) rank = Faction[fid][F4Rank];
		else if(Player[playerid][Rank] == 5) rank = Faction[fid][F5Rank];
		else if(Player[playerid][Rank] == 6) rank = Faction[fid][F6Rank];
  		format(string, sizeof(string), "(( %s [%s] says: %s ))", GetName(playerid), rank, message);
		FactionChat(Player[playerid][FactionID], string);
    }
    else return SendClientMessage(playerid, COLOR_GREY, "You are not in a faction.");
Not sure if that'll work, but you can try it.
Reply


Messages In This Thread
Faction Chat Help - by DTV - 29.05.2015, 20:58
Re: Faction Chat Help - by iSaint - 29.05.2015, 21:18
Re: Faction Chat Help - by DTV - 29.05.2015, 23:11
Re: Faction Chat Help - by McGuiness - 29.05.2015, 23:34
Re: Faction Chat Help - by DTV - 29.05.2015, 23:46
Re: Faction Chat Help - by McGuiness - 30.05.2015, 14:03

Forum Jump:


Users browsing this thread: 3 Guest(s)