25.01.2015, 12:39
I made a gang chat it was working but by magic it didn't work
When i type /gc Hello ! it doesn't do anything
Please Help !
When i type /gc Hello ! it doesn't do anything
PHP код:
CMD:gc(playerid, params[])
{
new msg[128];
new string[128];
if(sscanf(params, "s[128]", msg)) return SendClientMessage(playerid, COLOR_RED, "Gang Chat: /gc [Message]");
if(PlayerInfo[playerid][pGang] == 0) return SendClientMessage(playerid, COLOR_RED, "You didn't join any gang to use the chat !");
for(new i = 0; i < MAX_PLAYERS;i++)
{
if(gTeam[playerid] == GANG_GROVES)
{
format(string,sizeof(string), "%s: %s", PlayerName(playerid), msg);
SendClientMessage(i,GANG_GROVES_COLOR,string);
}
else if(gTeam[playerid] == GANG_BALLAS)
{
format(string,sizeof(string), "%s: %s", PlayerName(playerid), msg);
SendClientMessage(i,GANG_BALLAS_COLOR,string);
}
else if(gTeam[playerid] == GANG_AZTECAS)
{
format(string,sizeof(string), "%s: %s", PlayerName(playerid), msg);
SendClientMessage(i,GANG_AZTECAS_COLOR,string);
}
else if(gTeam[playerid] == GANG_VAGOS)
{
format(string,sizeof(string), "%s: %s", PlayerName(playerid), msg);
SendClientMessage(i,GANG_VAGOS_COLOR,string);
}
else if(gTeam[playerid] == GANG_TRIADS)
{
format(string,sizeof(string), "%s: %s", PlayerName(playerid), msg);
SendClientMessage(i,GANG_TRIAD_COLOR,string);
}
else if(gTeam[playerid] == GANG_DA_NANG_BOYS)
{
format(string,sizeof(string), "%s: %s", PlayerName(playerid), msg);
SendClientMessage(i,GANG_DA_NANG_BOYS_COLOR,string);
}
else if(gTeam[playerid] == GANG_RIFAS)
{
format(string,sizeof(string), "%s: %s", PlayerName(playerid), msg);
SendClientMessage(i,GANG_RIFAS_COLOR,string);
}
else if(gTeam[playerid] == GANG_RUSSIAN_MAFIAS)
{
format(string,sizeof(string), "%s: %s", PlayerName(playerid), msg);
SendClientMessage(i,GANG_RUSSIAN_MAFIAS_COLOR,string);
}
else if(gTeam[playerid] == GANG_ITALIAN_MAFIAS)
{
format(string,sizeof(string), "%s: %s", PlayerName(playerid), msg);
SendClientMessage(i,GANG_ITALIAN_MAFIAS_COLOR,string);
}
else if(gTeam[playerid] == GANG_BIKER)
{
format(string,sizeof(string), "%s: %s", PlayerName(playerid), msg);
SendClientMessage(i,GANG_BIKER_COLOR,string);
}
}
return 1;
}