08.03.2015, 21:07
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");
}
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.");
}
}