Jump to content
  • 0

Problema cumparare crates


Alexandru Alex

Question

Cand dau sa cumpar crate cu bp imi zice ca nu ai suficente bp-uri iar cand ma uit in /opencrate imi arata ca e acolo:

		case DIALOG_BUYCRATES: {
			if(!response) 
				return true;

			format(gString, sizeof(gString), "Payment\tPrice\nBlack-Points\t{E26AF2}%d\nPremium Points\t{EEEE3F}%d", CratePrice[AlegeCrates[playerid]][0], CratePrice[AlegeCrates[playerid]][1]);
			ShowPlayerDialogEx(playerid, DIALOG_BUYCRATES1, DIALOG_STYLE_TABLIST_HEADERS, "Buy Crate", gString, "Da", "nu");
		}
		case DIALOG_BUYCRATES1: {
			if(!response) return true;
			new x = AlegeCrates[playerid];
			playerVariables[playerid][pCrates][x] ++;
			save_crates(playerid);
			switch(listitem) {
				case 0: {
					if(playerVariables[playerid][pBlackPoints] < CratePrice[x][0]) return SCM(playerid, -1, "Nu ai suficente puncte Black");
					playerVariables[playerid][pBlackPoints] -= CratePrice[x][0];
					format(gString, sizeof(gString), "(Crate Systems){FFFFFF} Ti-ai cumparat o cutie (%s) pentru {E26AF2}%d Black Points{FFFFFF}! Total cutii rare: %d [%d total - general]", CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x], totalcrates(playerid)+1);
					Update(playerid, pBlackPoints);
				}
				case 1: {
					if(playerVariables[playerid][pPremiumPoints] < CratePrice[x][1]) return SCM(playerid, -1, "Nu ai suficiente puncte Premium.");
					playerVariables[playerid][pPremiumPoints] -= CratePrice[x][1];
					format(gString, sizeof(gString), "(Crate Systems){FFFFFF} Ti-ai cumparat o cutie (%s) pentru {EEEE3F}%d PP{FFFFFF}! Total cutii rare: %d [%d total - general]", CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x], totalcrates(playerid)+1);		
					Update(playerid, pPremiumPoints);
				}
			}			
			SCM(playerid, -1, "Pentru a deschide o cuite, foloseste /opencrate.");
		} 

 

Edited by Alexandru Alex
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.