Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(dialogid == 22521)
- {
- if(response)
- {
- if(!isnull(inputtext))
- {
- new points = strval(inputtext);
- if(points > 10) return SCM(playerid,COLOR_ATTACK, "Nu poti pune mai mult de 10 puncte");
- if(playerVariables[playerid][pCarSelected] == 1)
- {
- if(playerVariables[playerid][pInsurance] != 10)
- {
- SendClientMessage(playerid, COLOR_ATTACK, "Ai deja 10 puncte de asigurare .");
- return 1;
- }
- if(points > 0)
- {
- new bani = playerVariables[playerid][pInsurance]*points;
- if(playerVariables[playerid][pMoney] > bani)
- {
- playerVariables[playerid][pInsurancePoints] += 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.");
- }
- }
- else if(playerVariables[playerid][pCarSelected] == 2)
- {
- if(playerVariables[playerid][pInsurance] != 10)
- {
- SendClientMessage(playerid, COLOR_ATTACK, "Ai deja 10 puncte de asigurare .");
- return 1;
- }
- if(points > 0)
- {
- new bani = playerVariables[playerid][pInsurance2]*points;
- if(playerVariables[playerid][pMoney] > bani)
- {
- playerVariables[playerid][pInsurancePoints2] += 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.");
- }
- }
- else if(playerVariables[playerid][pCarSelected] == 3)
- {
- if(playerVariables[playerid][pInsurance] != 10)
- {
- SendClientMessage(playerid, COLOR_ATTACK, "Ai deja 10 puncte de asigurare .");
- return 1;
- }
- if(points > 0)
- {
- new bani = playerVariables[playerid][pInsurance3]*points;
- if(playerVariables[playerid][pMoney] > bani)
- {
- playerVariables[playerid][pInsurancePoints3] += 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.");
- }
- }
- else if(playerVariables[playerid][pCarSelected] == 4)
- {
- if(playerVariables[playerid][pInsurance] != 10)
- {
- SendClientMessage(playerid, COLOR_ATTACK, "Ai deja 10 puncte de asigurare .");
- return 1;
- }
- if(points > 0)
- {
- new bani = playerVariables[playerid][pInsurance4]*points;
- if(playerVariables[playerid][pMoney] > bani)
- {
- playerVariables[playerid][pInsurancePoints4] += 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.");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement