Help, please.
#1

rezolvat
Reply
#2

I mean when you /licenses and have pCarLicTime to 0 to not show [Expires in %d hours] but [expired]
Reply
#3

pawn Код:
if(strcmp(cmd,"/licenses",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            new timplic = PlayerInfo[playerid][pCarLicTime];
            new atext[20];
            if(PlayerInfo[playerid][pCarLicTime] == 0) { atext = "Expirata"; }
            new text1[20];
            if(PlayerInfo[playerid][pCarLicense]) { text1 = "{00FF00}Da"; } else { text1 = "{FF0000}Nu"; }
            if(PlayerInfo[playerid][pCarLicTime] != 0)
            {
            format(string, sizeof(string), "{FFFFFF}Permis conducere: %s {FFFFFF} [Expira in %d ore]", text1,timplic);
            ShowPlayerDialog(playerid, 94, DIALOG_STYLE_MSGBOX, "Licente",string, "Iesire", "");
            }
             if(PlayerInfo[playerid][pCarLicTime] == 0)
             {
              format(string, sizeof(string), "{FFFFFF}Permis conducere: %s", atext,timplic);
            ShowPlayerDialog(playerid, 94, DIALOG_STYLE_MSGBOX, "Licente",string, "Iesire", "");
        }
        return 1;
    }
Reply
#4

fixed
Reply
#5

do something like this:
pawn Код:
if(strcmp(cmd,"/licenses",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            new timplic = PlayerInfo[playerid][pCarLicTime];
            new atext[20];
            if(PlayerInfo[playerid][pCarLicTime] == 0) { atext = "Expirata"; }
            new text1[20];
            if(PlayerInfo[playerid][pCarLicense]) { text1 = "{00FF00}Da"; } else { text1 = "{FF0000}Nu"; }
            if(PlayerInfo[playerid][pCarLicTime] != 0)
            {
            format(string, sizeof(string), "{FFFFFF}Permis conducere: %s {FFFFFF} [Expira in %d ore]", text1,timplic);
            ShowPlayerDialog(playerid, 94, DIALOG_STYLE_MSGBOX, "Licente",string, "Iesire", "");
            }
             if(PlayerInfo[playerid][pCarLicTime] == 0 || PlayerInfo[playerid][liscense here] == 0)
             {
              format(string, sizeof(string), "{FFFFFF}Permis conducere: %s", atext,timplic);
            ShowPlayerDialog(playerid, 94, DIALOG_STYLE_MSGBOX, "Licente",string, "Iesire", "");
        }
        return 1;
    }
the || means that if you have one of them with the time 0
Reply
#6

Fixedd
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)