small wrong
#1

cmd work but server saying unknown command :/
pawn Код:
if(strcmp(cmd, "/c", true)==0)
    {
        if(PlayerInfo[playerid][pClanMem] == 250) return SendClientMessage(playerid,c_r,"( ! ) You're not in a clan !");
        new string[250];
        new clanf = PlayerInfo[playerid][pClanMem];
        if(Clans[clanf][Front] == 1)
        {
            if(PlayerInfo[playerid][pClanMem] == PlayerInfo[playerid][pClanKey])
            {
                format(string,sizeof(string),"( C ) Boss [%s]%s : %s",Clans[clanf][cName],PlayerName(playerid),cmdtext[3]);
            }
            else
            {
                format(string,sizeof(string),"( C ) [%s]%s : %s",Clans[clanf][cName],PlayerName(playerid),cmdtext[3]);
            }
            MessageToClan(playerid,GetPlayerColor(playerid),string);
            return 1;
        }
        else
        {
            if(PlayerInfo[playerid][pClanMem] == PlayerInfo[playerid][pClanKey])
            {
                format(string,sizeof(string),"( C ) Boss %s[%s] : %s",PlayerName(playerid),Clans[clanf][cName],cmdtext[3]);
            }
            else
            {
                format(string,sizeof(string),"( C ) %s[%s] : %s",PlayerName(playerid),Clans[clanf][cName],cmdtext[3]);
            }
            MessageToClan(playerid,GetPlayerColor(playerid),string);
        }
        return 1;
    }
Код:
forward MessageToClan(playerid,color,const string[]);
public MessageToClan(playerid,color,const string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
 		new clan = PlayerInfo[i][pClanMem];
		if(IsPlayerConnected(i) == 1) if(clan == PlayerInfo[playerid][pClanMem]) SendClientMessage(i, color, string);
	}
	return 1;
}
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)