[HELP]Team chat
#1

hi
how can i make a team chat without gteam?
thanks
Reply
#2

Can't u should do something like this:

pawn Код:
new gClass[MAX_PLAYERS];
Then

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    //SOMETHING HERE...
    gClass[playerid] = classid;
    //SOMETHING HERE...
    return 1;
}
And to make Team Chat, like this:

pawn Код:
OnPlayerCommandText(playerid, cmdtext)
{
if(!strcmp("/samplechat", cmdtext, true))
{
new PlayerName[MAX_PLAYERS];
new string[128];
GetPlayerName(playerid, playername, sizeof(playername));
for(new i = 0; i < MAX_PLAYERS; i++)
{
format(string, sizeof(string), "Team Chat [%s]: Just a sample! HAVE FUN!", playername)
if(gClass[playerid] == gClass[i])
{
SendClientMessage(i, #color_hex_here#, string);
}
return 1;
}
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)