/member-List doesnt work correctly
#2

You forgot to add else on the last statement and else if on the 2nd so replace 2nd if with else if and add an else on the last one, it should look like this:

PHP код:
ocmd:members(playerid,params[])
{
    if(
pInfo[playerid][fraktion]!=0)
    {
        
SendClientMessage(playerid0x808000FF"** Mitglieder online **");
        for(new 
0MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
pInfo[i][fraktion] == pInfo[playerid][fraktion])
                {
                    new 
str[256];
                    if(
pInfo[i][frang]==10)
                    {
                        
format(str,sizeof(str),"%s   Rank : {C20009}CO-Leader",PlayerName(i));
                        
SendClientMessage(playeridWEIЯstr);
                    }
                    else if(
pInfo[i][frang]==11)
                    {
                        
format(str,sizeof(str),"%s   Rank : {C20009}Leader",PlayerName(i));
                        
SendClientMessage(playeridWEIЯstr);
                    }
                    else
                    {
                        
format(strsizeof(str), "%s    Rank : %d",PlayerName(i),pInfo[i][frang]);
                        
SendClientMessage(playeridWEIЯstr);
                    }
                }
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
/member-List doesnt work correctly - by amaruwhite - 23.10.2016, 16:35
Re: /member-List doesnt work correctly - by RockyGamer - 23.10.2016, 16:57

Forum Jump:


Users browsing this thread: 2 Guest(s)