17.03.2013, 16:26
hi guys i need fast team masseges example :
/11 : [team]roger that
and i am using gTeam
thanks
/11 : [team]roger that
and i am using gTeam
thanks
stock SendTeamMessage(team, color, message)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == team)
{
SendClientMessage(i, color, message);
}
}
}
if (strcmp("/team", cmdtext, true, 10) == 0)
{
new idx;
if(!strlen(strtok(cmdtext, idx)))
{
SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /team [text]");
return 1;
}
else
{
new teamstring[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(teamstring, 128, "(T): %s: %s", pName, idx);
SendTeamMessage(gTeam[playerid], 0x00FF00AA, teamstring);
return 1;
}
return true;
}
stock SendTeamMessage(team, color, message)
{
for(new i = 0; i != MAX_PLAYERS; ++i)
{
if(gTeam[i] == team)
{
SendClientMessage(i, color, message);
break;
}
}
}
if(!strcmp("/11", cmdtext, true, 3))
{
new teamstring[129];
format(teamstring, sizeof teamstring, "[Team %d]: Roger that!", gTeam[playerid]);
SendTeamMessage(gTeam[playerid], 0x00FF00AA, teamstring);
return 1;
}