13.10.2009, 04:15
hi
how can i make a team chat without gteam?
thanks
how can i make a team chat without gteam?
thanks
new gClass[MAX_PLAYERS];
public OnPlayerRequestClass(playerid, classid)
{
//SOMETHING HERE...
gClass[playerid] = classid;
//SOMETHING HERE...
return 1;
}
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;
}