31.12.2012, 11:26
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;
}