13.10.2009, 06:27
Can't u should do something like this:
Then
And to make Team Chat, like this:
pawn Код:
new gClass[MAX_PLAYERS];
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
//SOMETHING HERE...
gClass[playerid] = classid;
//SOMETHING HERE...
return 1;
}
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;
}