help with chat
#2

Just an example:

pawn Код:
COMMAND:r(playerid, params[]) {
    new string[128];
    if (GetPlayerTeam(playerid) != 6) return SendClientMessage(playerid, COLOR_RED, "Your Not Team 6!");
    if (sscanf(params, "s", string)) return SendClientMessage(playerid, COLOR_RED, "/r <message>");
    for (new i = 0; i < MAX_PLAYERS; i++) {
        if (GetPlayerTeam(i) == 6) {
            new name[24]; GetPlayerName(i, name, 24);
            format(string, 128, "TEAM %s: %s", name, string);
            SendClientMessage(i, COLOR_WHITE, string);
        }
    }
    return 1;
}
Basically check if their team is 6, if so, get the parameter, the 'string' or message.
Then send it to everyone who's on team 6.
Reply


Messages In This Thread
help with chat - by marinov - 28.10.2010, 00:20
Re: help with chat - by mrmuffins - 28.10.2010, 04:05

Forum Jump:


Users browsing this thread: 1 Guest(s)