09.03.2019, 17:05
This is my licences command,it works,but when one licence has 0 hours,i want to make it to write Driving:Expired,not Driving:0, for example,i want for all of them not only the driving one
CMD:licences(playerid, params[]) return ShowLicences(playerid);
function ShowLicences(playerid){
new szDialog[256];
format(szDialog, sizeof(szDialog), "{ff0000}Driving:{ffffff} %d\n{ff0000}Flying:{ffffff} %d\n{ff0000}Boat:{ffffff} %d\n{ff0000}Bike:{ffffff} %d\n{ff0000}Weapon:{ffffff} %d",
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", "");
return 1;
}
CMD:licences(playerid, params[]) return ShowLicences(playerid);
function ShowLicences(playerid){
new szDialog[256];
format(szDialog, sizeof(szDialog), "{ff0000}Driving:{ffffff} %d\n{ff0000}Flying:{ffffff} %d\n{ff0000}Boat:{ffffff} %d\n{ff0000}Bike:{ffffff} %d\n{ff0000}Weapon:{ffffff} %d",
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", "");
return 1;
}