#1

Hello! I have a problem to /leaders, show only a leader .. help me


PHP код:
    if(strcmp(cmd"/leaders"true) == || strcmp(cmd"/lideri"true) == 0)
    {
        new 
count 0;
        if(
IsPlayerConnected(playerid))
        {
            for(new 
0MAX_PLAYERSi++)
            {
                if(
PlayerInfo[i][pLeader] >= 1)
                {
                      new 
idtext[100];
                    if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 1) { format(idtext,sizeof(idtext),"{0000FF}Police Departament{FFFFFF}"); }
                    else if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 2) { format(idtext,sizeof(idtext),"{0000FF}National Guard{FFFFFF}"); }
                    else if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 3) { format(idtext,sizeof(idtext),"{FF6347}Paramedic{FFFFFF}"); }
                    else if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 4) { format(idtext,sizeof(idtext),"{373837}The Russian Mafia{FFFFFF}"); }
                    else if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 5) { format(idtext,sizeof(idtext),"{1C7D19}Grove Street{FFFFFF}"); }
                    else if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 6) { format(idtext,sizeof(idtext),"{F2B407}Los Vagos{FFFFFF}"); }
                    else if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 7) { format(idtext,sizeof(idtext),"{DDA0DD}News Reporter{FFFFFF}"); }
                    else if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 8) { format(idtext,sizeof(idtext),"{FFFF00}Taxi Cab Company{FFFFFF}"); }
                    else if(
PlayerInfo[i][pMember] == || PlayerInfo[i][pLeader] == 9) { format(idtext,sizeof(idtext),"{00FFFF}School Instructor{FFFFFF}"); }
                    else if(
PlayerInfo[i][pMember] == 10 || PlayerInfo[i][pLeader] == 10) { format(idtext,sizeof(idtext),"{FFDEAD}Tow Car Company{FFFFFF}"); }
                    
GetPlayerName(igiveplayersizeof(giveplayer));
                    
count ++;
                    new 
string2[1024];
                    if(
count == 0)
                    {
                        
format(string2sizeof(string2), "{FFFFFF}• Leader %s: %s[ID: %d] | Numar de telefon: {FFEA00}%d\n",idtextgiveplayeriPlayerInfo[i][pPhoneNumber]);
                    }
                    else if(
count 0)
                    {
                        
format(string2sizeof(string2), "%s{FFFFFF}• Leader %s: %s[ID: %d] | Numar de telefon: {FFEA00}%d\n{FFFFFF}",string2,idtextgiveplayeriPlayerInfo[i][pPhoneNumber]);
                    }
                    
ShowPlayerDialog(playerid77DIALOG_STYLE_MSGBOX"Leaders:"string2"Ok""");
                }
            }
            if(
count == 0) return SCM(playerid, -1"* Nu sunt lideri online!");
        }
        return 
1;
    } 
Reply


Messages In This Thread
Help - by Edw - 17.06.2015, 20:23
Re: Help - by Edw - 18.06.2015, 06:47
Re: Help - by CodeStyle175 - 18.06.2015, 07:15

Forum Jump:


Users browsing this thread: 1 Guest(s)