09.03.2019, 18:51
PHP код:
function ShowLicences(playerid){
new carLicence[16];
switch(PlayerInfo[playerid][pCarLicence])
{
case 0:
format(carLicence, sizeof(carLicence), "expired");
default:
format(carLicence, sizeof(carLicence), "%d", PlayerInfo[playerid][pCarLicence]);
}
new szDialog[256];
format(szDialog, sizeof(szDialog), "{ff0000}Driving:{ffffff} %s\n{ff0000}Flying:{ffffff} %d\n{ff0000}Boat:{ffffff} %d\n{ff0000}Bike:{ffffff} %d\n{ff0000}Weapon:{ffffff} %d",
carLicence, 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;
}
Quote:
format(szDialog, sizeof(szDialog), "{ff0000}Driving:{ffffff} %s\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][pCarLicence]}:"Driving:Expired", PlayerInfo[playerid][pFlyLicence], PlayerInfo[playerid][pBoatLicence], PlayerInfo[playerid][pBikeLicence], PlayerInfo[playerid][pGunLicence]); |