/badge for factions
#3

Opened brackets do not match with the closed. Next time, try to indent your code properly so it'll be easier readable and avoids these issues:
PHP код:
CMD:badge(playeridparams[])
{
    if(
pInfo[playerid][Faction] == || pInfo[playerid][Faction] >= 3) return SendClientMessage(playerid0x46E850FF"SERVER:{FFFFFF} You're not authorized to use this command!");
    switch(
pInfo[playerid][Faction])
    {
        case 
1:
        {
            if(
pInfo[playerid][Faction] == && pDuty[playerid] == 0)
            {
                
pDuty[playerid] = 1;
                
SendClientMessage(playeridCOLOR_WHITE"You are now on Duty");
                
SetPlayerColor(playeridCOLOR_PDRAD);
            }
        }
        case 
2:
        {
            if(
pInfo[playerid][Faction] == && pDuty[playerid] == 0)
            {
                
pDuty[playerid] = 1;
                
SendClientMessage(playeridCOLOR_WHITE"You are now on Duty");
                
SetPlayerColor(playeridCOLOR_RED);
            }
        }
        case 
3:
        {
            if(
pInfo[playerid][Faction] >= && pDuty[playerid] == 1)
            {
                
pDuty[playerid] = 0;
                
SendClientMessage(playeridCOLOR_WHITE"You are now off Duty");
                
SetPlayerColor(playeridCOLOR_WHITE);
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
/badge for factions - by CSLangdale - 16.04.2016, 09:42
Re: /badge for factions - by CSLangdale - 16.04.2016, 09:45
Re: /badge for factions - by Konstantinos - 16.04.2016, 09:55
Re: /badge for factions - by CSLangdale - 16.04.2016, 10:00
Re: /badge for factions - by Konstantinos - 16.04.2016, 10:09
Re: /badge for factions - by ghost556 - 16.04.2016, 10:16
Re: /badge for factions - by Prokill911 - 16.04.2016, 11:52

Forum Jump:


Users browsing this thread: 2 Guest(s)