10.11.2009, 11:43
pawn Код:
if(strcmp(cmd, "/groove", true) == 0 || strcmp(cmd, "/g", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /g(roove)");
if(gTeam[playerid] != TEAM_GROVE) return SendClientMessage(playerid, 0xAFAFAFAA, "You can't use this command !");
new playername[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "* *Groove [%s]: %s,", playername, cmdtext[2]);
MessageToGroove(playerid, string);
}
return 1;
}
// Place this anywhere.
forward MessageToGroove(playerid, const string[]);
public MessageToGroove(playerid, const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gTeam[i] == TEAM_GROVE) SendClientMessage(i, 0xAFAFAFAA, string);
}
return 1;
}