Jump to content
  • 0

Problema cu TextDraw si ESC


Gabriel03

Question

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

 

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.