Hello everyone,I have a problem in my clans chat when I'm doing the sign [@ asd] it post the text on chat and not on the clan chat.
Sorry for my english If you dont understand.
Код:
public OnPlayerText(playerid, text[])
{
new str[286];
if(text[0] == '@')
{
if(!text[1]) return SendClientMessage(playerid,-1,"{ff0000}[USAGE]: {868686}@ [Text]"),0;
new clevel[106];
if(DOF2_GetInt(PFile(playerid),"ClanLevel") == 1) return strcat(clevel,"Member");
if(DOF2_GetInt(PFile(playerid),"ClanLevel") == 2) return strcat(clevel,"Honor");
if(DOF2_GetInt(PFile(playerid),"ClanLevel") == 3) return strcat(clevel,"Tester");
if(DOF2_GetInt(PFile(playerid),"ClanLevel") == 4) return strcat(clevel,"S.Leader");
if(DOF2_GetInt(PFile(playerid),"ClanLevel") == 5) return strcat(clevel,"Leader");
if(DOF2_GetInt(PFile(playerid),"ClanLevel") == 6) return strcat(clevel,"Founder");
if(!DOF2_GetBool(PFile(playerid),"HaveClan")) return SendClientMessage(playerid,-1,"{ff0000}[USAGE]: {868686}айрк роца бчмап"),0;
format(str,sizeof(str),"{00bdb3}(%s Chat) %s: {ffffff}%s {00bdb3}[ID: {ffffff}%d {00bdb3}| {ffffff}%s{00bdb3}]",DOF2_GetString(PFile(playerid),"ClanName"),GetName(playerid),text[1],playerid,clevel);
SendClanMessage(playerid,-1,str);
return false;
}
return false;
}
stock SendClanMessage(playerid, color, const msg[])
{
for(new i,j = GetMaxPlayers(); i<j; i++)if(IsPlayerConnected(i) && !strcmp(DOF2_GetString(PFile(i),"ClanName"), DOF2_GetString(PFile(playerid),"ClanName"), false))
{
SendClientMessage(i, color, msg);
}
return 1;
}
PHP код:
stock SendClanMessage(color, string[])
{
foreach(Player, i)
{
if(YourValue[i] == 1)
{
SendClientMessage(i, color, string);
}
}
return 1;
}
Код:
stock SendClanMessage(playerid, color, const msg[])
{
for(new i = 0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && !strcmp(DOF2_GetString(PFile(i),"ClanName"), DOF2_GetString(PFile(playerid),"ClanName"), false))
{
SendClientMessage(i, color, msg);
}
}
return 1;
}