more formats
#9

You have a return 1; in each if statement, so if you have a flying license, the code will stop there and will not continue. Your code should be this:
pawn Код:
if(strcmp(cmd,"/licenses",true)==0)
{
    if(IsPlayerConnected(playerid))
    {
        new pzbori = PlayerInfo[playerid][pzbor];
        new pvapori = PlayerInfo[playerid][pvapor];
        new ppestei = PlayerInfo[playerid][ppeste];
        new parmai = PlayerInfo[playerid][parma];
        if(PlayerInfo[playerid][pzbor] == 0)
        {
            PlayerInfo[playerid][pFlyLic] = 0;
            format(string, sizeof(string), "** Flying License: Expired[%d/10].",pzbori);
            SendClientMessage(playerid, COLOR_LICENSES, string);
        }
        else
        {
            format(string, sizeof(string), "** Flying License: Available[%d/10].",pzbori);
            SendClientMessage(playerid, COLOR_LICENSES, string);
        }
        if(PlayerInfo[playerid][ppeste] == 0)
        {
            PlayerInfo[playerid][pFlyLic] = 0;
            format(string, sizeof(string), "** Fishing License: Expired[%d/10].",ppestei);
            SendClientMessage(playerid, COLOR_LICENSES, string);
        }
        else
        {
            format(string, sizeof(string), "** Fishing License: Avaible[%d/10].",ppestei);
            SendClientMessage(playerid, COLOR_LICENSES, string);
        }
    }
    return 1;
}
Reply


Messages In This Thread
more formats - by Visio - 30.12.2012, 18:45
Re: more formats - by Visio - 30.12.2012, 19:02
Re: more formats - by RedCrossER - 30.12.2012, 19:22
Re: more formats - by Visio - 30.12.2012, 19:28
Re: more formats - by Visio - 31.12.2012, 08:01
Re: more formats - by Scott Zulkifli - 31.12.2012, 08:59
Re: more formats - by Visio - 31.12.2012, 10:08
Re: more formats - by Visio - 31.12.2012, 10:15
Re: more formats - by Threshold - 31.12.2012, 11:26
Re: more formats - by JaKe Elite - 31.12.2012, 11:33

Forum Jump:


Users browsing this thread: 3 Guest(s)