how to rewrite this
#5

PHP Code:
CMD:factionon(playeridparams[])
{
    new 
str[128], DUTY_STR[24], COLORcounter 0;
    
SendClientMessage(playerid, -1" - Membrii online - ");
    for(new 
0MAX_PLAYERSi++)
    {
            if((
pInfo[i][pRank] < 1)) return SendClientMessage(playerid, -1"You are not from any faction");
               if(
IsPlayerConnected(i))
        {
            if(
pInfo[playerid][pFaction] == pInfo[i][pFaction])
            {
                if(!
pInfo[i][pPoliceDuty])
                {
                    
DUTY_STR "Off Duty";
                    
COLOR COLOR_WHITE;
                }
                else
                {
                    
DUTY_STR "ON DUTY";
                    
COLOR COLOR_RED;
                }
                
format(strsizeof(str),"%s: %s - %s",  GetRankName(i), PlayerName(i), DUTY_STR);
                
SendClientMessage(playeridCOLORstr);
                
counter++;
            }
        }
    }
    return 
1;

I did this,but everytime I type /factionon, it shows the online members, but it shows that "You are not from any faction" too.

Did I place that IF too late on the code?
Reply


Messages In This Thread
how to rewrite this - by Zeus666 - 19.04.2018, 19:22
Re: how to rewrite this - by AdamsLT - 19.04.2018, 20:06
Re: how to rewrite this - by GTLS - 20.04.2018, 07:45
Re: how to rewrite this - by Twixxx - 20.04.2018, 08:11
Re: how to rewrite this - by Zeus666 - 20.04.2018, 08:25
Re: how to rewrite this - by Dice_ - 20.04.2018, 09:16
Re: how to rewrite this - by FnZ - 20.04.2018, 09:27
Re: how to rewrite this - by TheLeech - 20.04.2018, 10:42
Re: how to rewrite this - by Kraeror - 20.04.2018, 15:21
Re: how to rewrite this - by Logic_ - 20.04.2018, 15:31

Forum Jump:


Users browsing this thread: 1 Guest(s)