/licences on dialog help
#2

PHP код:
function ShowLicences(playerid){
    new 
carLicence[16];
    switch(
PlayerInfo[playerid][pCarLicence])
    {
        case 
0:
            
format(carLicencesizeof(carLicence), "expired");
        default:
            
format(carLicencesizeof(carLicence), "%d"PlayerInfo[playerid][pCarLicence]);
    }
    new 
szDialog[256];
    
format(szDialogsizeof(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",
    
carLicencePlayerInfo[playerid][pFlyLicence], PlayerInfo[playerid][pBoatLicence], PlayerInfo[playerid][pBikeLicence], PlayerInfo[playerid][pGunLicence]);
    
ShowPlayerDialog(playeridDIALOG_LICENCESDIALOG_STYLE_MSGBOX"Your licences"szDialog"OK""");
    return 
1;

Quote:
Originally Posted by OnlyMiniGames
Посмотреть сообщение
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]);
This don't gonna work because you are trying to format PlayerInfo[playerid][pCarLicence] like a string, and it is not a string.
Reply


Messages In This Thread
/licences on dialog help - by bosmania - 09.03.2019, 17:05
Re: /licences on dialog help - by Autorojo - 09.03.2019, 18:51

Forum Jump:


Users browsing this thread: 2 Guest(s)