11.03.2019, 15:24
this is a part of my /licences command,the command works,but if a licence is 0 hours it shows 0 hours left,how do i make it to show "Expired" if it's 0 hours
format(szDialog, sizeof(szDialog), "{ff0000}Driving:{ffffff} %d hours left\n{ff0000}Flying:{ffffff} %d hours left\n{ff0000}Boat:{ffffff} %d hours left\n{ff0000}Bike:{ffffff} %d hours left\n{ff0000}Weapon:{ffffff} %d hours left",
PlayerInfo[playerid][pCarLicence] , PlayerInfo[playerid][pFlyLicence], PlayerInfo[playerid][pBoatLicence], PlayerInfo[playerid][pBikeLicence], PlayerInfo[playerid][pGunLicence]);
ShowPlayerDialog(playerid, DIALOG_LICENCES, DIALOG_STYLE_MSGBOX, "Your licences", szDialog, "OK", "");
format(szDialog, sizeof(szDialog), "{ff0000}Driving:{ffffff} %d hours left\n{ff0000}Flying:{ffffff} %d hours left\n{ff0000}Boat:{ffffff} %d hours left\n{ff0000}Bike:{ffffff} %d hours left\n{ff0000}Weapon:{ffffff} %d hours left",
PlayerInfo[playerid][pCarLicence] , PlayerInfo[playerid][pFlyLicence], PlayerInfo[playerid][pBoatLicence], PlayerInfo[playerid][pBikeLicence], PlayerInfo[playerid][pGunLicence]);
ShowPlayerDialog(playerid, DIALOG_LICENCES, DIALOG_STYLE_MSGBOX, "Your licences", szDialog, "OK", "");