08.10.2015, 21:14
alguйm pode me ajudar resolver esse bug?
meu OnPlayerText
meu OnPlayerText
pawn Код:
public OnPlayerText(playerid, text[])
{
new textchat[128];
format(textchat,sizeof(textchat), "<%d> %s: {FFFFFF}%s",playerid,Nome(playerid),text);
SendClientMessageToAll(GetPlayerColor(playerid), textchat);
new chatgz[128];
if(text[0] == '!')
{
format(chatgz,sizeof(chatgz), "<%d> [Chat-Gang] %s: %s",playerid, Nome(playerid), text[1]);
CallRemoteFunction("OnPlayerGangText","ds",playerid,chatgz);
return 0;
}
return 0;
}
pawn Код:
public OnPlayerGangText(playerid,text[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && TeamGang[i] == TeamGang[playerid])
{
SendClientMessage(i, 0xFFFF00AA, text);
}
return 0;
}