Some help.
#1

Hello Guys,
i would like to add some text to make players who're no member inside family, can't use cmd:families..

Here's the Commands:


PHP код:
CMD:families(playeridparams[])
{
    new 
string[128], familyid;
    if(
sscanf(params"d"familyid))
    {
        new 
number 0;
        for(new 
0sizeof(FamilyInfo); i++)
        {
            
number ++;
               if(
FamilyInfo[i][FamilyTurfTokens] < 12)
            {
                
format(stringsizeof(string), "Family %d | Name: %s | Leader: %s | Members: %d | Claim Tokens: 0.",number,FamilyInfo[i][FamilyName],FamilyInfo[i][FamilyLeader],FamilyInfo[i][FamilyMembers]);
            }
            else
            {
                
format(stringsizeof(string), "Family %d | Name: %s | Leader: %s | Members: %d | Claim Tokens: %d.",number,FamilyInfo[i][FamilyName],FamilyInfo[i][FamilyLeader],FamilyInfo[i][FamilyMembers],FamilyInfo[i][FamilyTurfTokens]/12);
            }
            
SendClientMessageEx(playeridCOLOR_WHITEstring);
        }
        return 
1;
    }
    if(
familyid || familyid MAX_FAMILY) { SendClientMessageEx(playeridCOLOR_GREY"Family slot must be between 1 and 14."); return 1; }
    
familyid -= 1;
    if(
FamilyInfo[familyid][FamilyTaken] != 1)
    {
        
SendClientMessageEx(playeridCOLOR_GREY"That family slot is empty.");
        return 
1;
    }
    foreach(
Playeri)
    {
            if(
PlayerInfo[i][pRank] == 1)
            {
                
format(stringsizeof(string), "* %s: %s | Rank: %s (1).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank1]);
            }
            else if(
PlayerInfo[i][pRank] == 2)
            {
                
format(stringsizeof(string), "* %s: %s | Rank: %s (2).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank2]);
            }
            else if(
PlayerInfo[i][pRank] == 3)
            {
                
format(stringsizeof(string), "* %s: %s | Rank: %s (3).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank3]);
            }
            else if(
PlayerInfo[i][pRank] == 4)
            {
                
format(stringsizeof(string), "* %s: %s | Rank: %s (4).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank4]);
            }
            else if(
PlayerInfo[i][pRank] == 5)
            {
                
format(stringsizeof(string), "* %s: %s | Rank: %s (5).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank5]);
            }
            else if(
PlayerInfo[i][pRank] == 6)
            {
                
format(stringsizeof(string), "* %s: %s | Rank: %s (6).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank6]);
            }
            else
            {
                
format(stringsizeof(string), "* %s: %s | Rank: %s.",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank1]);
            }
            
SendClientMessageEx(playeridCOLOR_GREYstring);
    }
    return 
1;

Reply


Messages In This Thread
Some help. - by aDo7 - 27.01.2014, 18:20
Re: Some help. - by aDo7 - 27.01.2014, 19:55
Re: Some help. - by Joe Vagos - 27.01.2014, 20:00
Re: Some help. - by erminpr0 - 27.01.2014, 20:06
Re: Some help. - by Drago987 - 27.01.2014, 20:08
Re: Some help. - by aDo7 - 29.01.2014, 11:35

Forum Jump:


Users browsing this thread: 3 Guest(s)