Insurance Points problem
#4

pawn Код:
new id = GetPlayerVehicleID(playerid);
                                        if(vehicleVariables[id][vVehicleInsurancePoints] == 10)
                                        {
                                                SendClientMessage(playerid,COLOR_GREY,"{FFB870}Nu mai poti cumpara puncte,deoarece ai deja 10.");
                                                return 1;
                                        }
                                        else
                                        {
                                               new da[500];
                                               format(da, 500, "Cate puncte de asigurare vrei sa cumperi? %d / insurance point     (%d/10)", vehicleVariables[playerid][vVehicleInsurancePrice],vehicleVariables[playerid][vVehicleInsurancePoints]);
                                               ShowPlayerDialog(playerid, 22521, DIALOG_STYLE_INPUT,"Insurance",da,"Ok","Cancel");
                                         }
Something like this?

And you have to do this also:

pawn Код:
else if(playerVariables[playerid][pCarSelected] == 2)
{
    if(points > 0)
    {
        new bani = vehicleVariables[playerid][vVehicleInsurancePrice2]*points;
        if(playerVariables[playerid][pMoney] > bani)
        {
            if(points + vehicleVariables[playerid][vVehicleInsurancePoints2] > 10) return SCM(playerid, -1,"text here");
            vehicleVariables[playerid][vVehicleInsurancePoints2] += points;
            playerVariables[playerid][pMoney] -= bani;
            format(szMessage,256,"Ai cumparat %d puncte de asigurare cu $%s.", points, NumberFormat(bani));
            SCM(playerid,COLOR_ATTACK, szMessage);
        }
        else SCM(playerid, -1,"You don't have enought money.");
    }
}
Reply


Messages In This Thread
Insurance Points problem - by duteba - 08.03.2015, 19:35
Re: Insurance Points problem - by oliverrud - 08.03.2015, 20:38
Re: Insurance Points problem - by duteba - 08.03.2015, 21:01
Re: Insurance Points problem - by finelaq - 08.03.2015, 21:07
Respuesta: Insurance Points problem - by duteba - 08.03.2015, 21:09
Re: Respuesta: Insurance Points problem - by finelaq - 08.03.2015, 21:18
Re: Insurance Points problem - by duteba - 08.03.2015, 21:31
Re: Insurance Points problem - by duteba - 09.03.2015, 18:18

Forum Jump:


Users browsing this thread: 1 Guest(s)