Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Need help

$
0
0
i need help to make /families with dialog.

My code
PHP Code:

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 20."); return 1; }
    
familyid -= 1;
    if(
FamilyInfo[familyid][FamilyTaken] != 1)
    {
        
SendClientMessageEx(playeridCOLOR_GREY"That family slot is empty.");
        return 
1;
    }
    foreach(
Playeri)
    {
        if(
PlayerInfo[i][pFMember] == familyid && (PlayerInfo[i][pTogReports] == || PlayerInfo[i][pAdmin] < 2))
        {
            if(
PlayerInfo[i][pRank] == 0)
            {
                
format(stringsizeof(string), "* %s: %s | Rank: %s (0).",FamilyInfo[familyid][FamilyName],GetPlayerNameEx(i),FamilyInfo[familyid][FamilyRank0]);
            }
            else 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;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>