Clan chat
#1

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.

Code:

Код:
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;
}
Reply


Messages In This Thread
Clan chat - by DzDanieL - 01.02.2014, 07:32
Re: Clan chat - by streetpeace - 01.02.2014, 09:59
Re : Clan chat - by mirou123 - 01.02.2014, 10:52

Forum Jump:


Users browsing this thread: 1 Guest(s)