Faction
#1

Well, I have 2 factions and each player has its own faction and I want line 157 that can SendMessage to faction 1 and the Another Faction has its own Message. Hope you can understand what I mean, Sorry for bad English

pawn Код:
stock SendMessageToFaction(playerid, color, const string[]) //153
{ //154
    for(new i = 0; i < MAX_PLAYERS; i++) //155
    { //156
        if(PlayerInfo[i][Faction] >=1) //157
        if(PlayerInfo[i][Rank] >=1) //158
        if(i != playerid) //159
        { //160
            SendClientMessage(i, color, string); //161
        } //162
    } //163
    return 1; //164
} //165
Reply
#2

pawn Код:
stock SendMessageToFaction(playerid, color, const string[]) //153
{ //154
    for(new i = 0; i < MAX_PLAYERS; i++) //155
    { //156
        if(PlayerInfo[playerid][Faction] == PlayerInfo[i][Faction])
        {
         SendClientMessage(i, color, string);
        }
    } //163
    return 1; //164
} //165
This will send the message to everyone that's in your faction, I presume that's what you wanted ;3
Reply
#3

Quote:
Originally Posted by MattSlater
Посмотреть сообщение
pawn Код:
stock SendMessageToFaction(playerid, color, const string[]) //153
{ //154
    for(new i = 0; i < MAX_PLAYERS; i++) //155
    { //156
        if(PlayerInfo[playerid][Faction] == PlayerInfo[i][Faction])
        {
         SendClientMessage(i, color, string);
        }
    } //163
    return 1; //164
} //165
This will send the message to everyone that's in your faction, I presume that's what you wanted ;3
Yes, I'll give it a try .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)