14.02.2011, 14:01
pawn Код:
new gangteam[MAX_PLAYERS];
// achu que o eu deve ser requestclass
pawn Код:
forward OnPlayerGangText(playerid,text[]);
public OnPlayerGangText(playerid,text[]) // GANG Xat
{
for (new i = 0; i < MAX_PLAYERS; i++) if (IsPlayerConnected(i) && gangteam[i] == gangteam[playerid])
{
SendClientMessage(i, 0x88FF9FAA, text);
}
return 0;
}
pawn Код:
onplayertext
new srvchat[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(text[0] == '!')
{//Se Tiver '!'
format(srvchat, sizeof(srvchat),"|| Chat Gang %s: (id:%d): %s", pName, playerid, text[1]);
CallRemoteFunction("OnPlayerGangText","ds",playerid,srvchat);