[Dialog] - Question some problem.
#1

Hello all, i was putting one command in dialog for licenses.

But i got one problem everything other is okay but only this makes problem when you buy the first license and then
try again to buy it its okay says "You have this license" but if you try to buy the other license and then try to buy it again says nothing?


pawn Код:
if(dialogid == PDLICENCI)
    {
        if(response)
           {
            if(listitem == 0)
            {
            if(PlayerInfo[playerid][pGunLic] == 0)
            {
            SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Kupili ste dozvolu za oruzje za {00B9FF}$5000");
            SafeGivePlayerMoney(playerid, - 5000);
            PlayerInfo[playerid][pGunLic] = 1;
            OnPlayerUpdateCustom(playerid);
            }
            else
            {
            SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Ti veke imas kupeno {00B9FF}licenca.");
            return 1;
            }
            if(listitem == 1)
            {
            if(PlayerInfo[playerid][pFishLic] == 0)
            {
            SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Kupili ste dozovlu za ribolov za {00B9FF}$2000");
            SafeGivePlayerMoney(playerid, - 2000);
            PlayerInfo[playerid][pFishLic] = 1;
            OnPlayerUpdateCustom(playerid);
            }
            else
            {
            SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Ti veke imas kupeno {00B9FF}licenca.");
            return 1;
       }

    }
   }
 }
}
Reply
#2

No apparent problem ...
pawn Код:
if(dialogid == PDLICENCI)
{
    if(response)
    {
        switch(listitem
        {
            case 0:
            {
                if(PlayerInfo[playerid][pGunLic] == 0)
                {
                    SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Kupili ste dozvolu za oruzje za {00B9FF}$5000");
                    SafeGivePlayerMoney(playerid, - 5000);
                    PlayerInfo[playerid][pGunLic] = 1;
                    OnPlayerUpdateCustom(playerid);
                }
                else
                    return SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Ti veke imas kupeno {00B9FF}licenca.");
            }
            case 1:
            {
                if(PlayerInfo[playerid][pFishLic] == 0)
                {
                    SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Kupili ste dozovlu za ribolov za {00B9FF}$2000");
                    SafeGivePlayerMoney(playerid, - 2000);
                    PlayerInfo[playerid][pFishLic] = 1;
                    OnPlayerUpdateCustom(playerid);
                }
                else
                    return SendClientMessage(playerid, COLOR_WHITE, "[{FFD200}INFO{FAFAFA}]: Ti veke imas kupeno {00B9FF}licenca.");
            }
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)