small wrong
#3

Try debugging the whole code by putting print messages in between each statement:

pawn Код:
if(strcmp(cmd, "/c", true)==0)
{
    if(PlayerInfo[playerid][pClanMem] == 250) return SendClientMessage(playerid,c_r,"( ! ) You're not in a clan !");
    print("1");
    new string[250];
    new clanf = PlayerInfo[playerid][pClanMem];
    print("1");
    if(Clans[clanf][Front] == 1) {
    print("2");
        if(PlayerInfo[playerid][pClanMem] == PlayerInfo[playerid][pClanKey]) {
    print("2");
            format(string,sizeof(string),"( C ) Boss [%s]%s : %s",Clans[clanf][cName],PlayerName(playerid),cmdtext[3]);
        }
    print("2");
        else {
    print("2");
            format(string,sizeof(string),"( C ) [%s]%s : %s",Clans[clanf][cName],PlayerName(playerid),cmdtext[3]);
        }
    print("2");
        MessageToClan(playerid,GetPlayerColor(playerid),string);
        return 1;
    print("2");
    }
    else {
    print("3");
        if(PlayerInfo[playerid][pClanMem] == PlayerInfo[playerid][pClanKey]) {
    print("4");
            format(string,sizeof(string),"( C ) Boss %s[%s] : %s",PlayerName(playerid),Clans[clanf][cName],cmdtext[3]);
        }
        else {
    print("5");
            format(string,sizeof(string),"( C ) %s[%s] : %s",PlayerName(playerid),Clans[clanf][cName],cmdtext[3]);
        }
        MessageToClan(playerid,GetPlayerColor(playerid),string);
    }
    return 1;
}
Check how many ones it prints, twos, threes, fours and fives it prints. If it doesn't print any, check which section the code stops on.

I hope I made this clear.

pawn Код:
stock MessageToClan(playerid,color,const string[])
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if( IsPlayerConnected( i ) )
        {
            new clan = PlayerInfo[i][pClanMem];
            if(clan == PlayerInfo[playerid][pClanMem]) SendClientMessage(i, color, string);
        }
    }
    return 1;
}
Change to public if needed outside your gamemode.

Try that as well.
Reply


Messages In This Thread
small wrong - by mineralo - 07.06.2012, 02:41
Re: small wrong - by Jarnu - 07.06.2012, 02:44
Re: small wrong - by Lorenc_ - 07.06.2012, 02:46
Re: small wrong - by X3nZ - 07.06.2012, 02:47
Re: small wrong - by mineralo - 07.06.2012, 03:03

Forum Jump:


Users browsing this thread: 1 Guest(s)