Jump to content
  • 0

Problema cu TextDraw si ESC


Question

Posted

Salut! Am o mica problema... Am creat un sistem de skinuri premium si cand la textdraw-urile in care isi alege un skin din cele pe care le detine si apasa esc raman textdraw-urile insa nu ramane si SelectTextDraw.. Ce sa fac?

 

variabila: PlayerText:SkinListTD[MAX_PLAYERS][9];


comanda:

CMD:premiumskin(playerid, params[]) {
	new sn = 0, slot = 1;
	for(new i = 0; i < 5; i++) {
		if(PlayerInfo[playerid][pSkinList][i] != 0) sn++;
	}
	if(sn == 0) return SCM(playerid, COLOR_LIGHTRED, "Nu detii nici un skin premium.");
	for(new i = 0; i < 6; i++) {
		switch(i) {
			case 0: slot = 3;
			case 1: slot = 8;
			case 2: slot = 7;
			case 3: slot = 4;
			case 4: slot = 5;
			case 5: slot = 6;
			case 6: slot = 6;
		}
		if(PlayerInfo[playerid][pSkinList][i] != 0) PlayerTextDrawSetPreviewModel(playerid, SkinListTD[playerid][slot], PlayerInfo[playerid][pSkinList][i]);
		else PlayerTextDrawSetPreviewModel(playerid, SkinListTD[playerid][slot], 18631);
	}
	PlayerTextDrawShow(playerid, SkinListTD[playerid][0]);
	PlayerTextDrawShow(playerid, SkinListTD[playerid][1]);
	PlayerTextDrawShow(playerid, SkinListTD[playerid][2]);
	PlayerTextDrawShow(playerid, SkinListTD[playerid][3]);
	PlayerTextDrawShow(playerid, SkinListTD[playerid][4]);
	PlayerTextDrawShow(playerid, SkinListTD[playerid][5]);
	PlayerTextDrawShow(playerid, SkinListTD[playerid][6]);
	PlayerTextDrawShow(playerid, SkinListTD[playerid][7]);
	PlayerTextDrawShow(playerid, SkinListTD[playerid][8]);
	SelectTextDraw(playerid, 0x00FF00FF);
	return 1;
}


new slot;
	for(new i = 0; i < 6; i++) {
		switch(i) {
			case 0: slot = 3;
			case 1: slot = 8;
			case 2: slot = 7;
			case 3: slot = 4;
			case 4: slot = 5;
			case 5: slot = 6;
			case 6: slot = 6;
		}
		if(playertextid == SkinListTD[playerid][slot]) {
			if(PlayerInfo[playerid][pSkinList][i] == 0) return SCM(playerid, COLOR_LIGHTRED, "Nu se afla nici un skin pe acest slot.");
			PlayerInfo[playerid][pPremiumSkin] = PlayerInfo[playerid][pSkinList][i];
			SetPlayerSkinEx(playerid, PlayerInfo[playerid][pPremiumSkin]);
			UpdateVar(playerid, "premiumskin", PlayerInfo[playerid][pPremiumSkin]);
			SCM(playerid, COLOR_LIGHTGREEN, "Ti-a fost setat skinul.");
			PlayerTextDrawHide(playerid, SkinListTD[playerid][0]);
			PlayerTextDrawHide(playerid, SkinListTD[playerid][1]);
			PlayerTextDrawHide(playerid, SkinListTD[playerid][2]);
			PlayerTextDrawHide(playerid, SkinListTD[playerid][3]);
			PlayerTextDrawHide(playerid, SkinListTD[playerid][4]);
			PlayerTextDrawHide(playerid, SkinListTD[playerid][5]);
			PlayerTextDrawHide(playerid, SkinListTD[playerid][6]);
			PlayerTextDrawHide(playerid, SkinListTD[playerid][7]);
			PlayerTextDrawHide(playerid, SkinListTD[playerid][8]);
			CancelSelectTextDraw(playerid);
		}
	}



Si La OnPlayerClickPlayerTextDraw

 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.