Jump to content
  • 0

Problema dialog


Marcel2

Question

Salut, am incercat să fac un shop pe dialog, cum este şi-n gamemode-ul Burned, problema fiind că dacă tastez comanda /shop aceasta nu face nimic şi iţi este trimis mesajul că comanda X nu există.

Imagine (in-game):

 

Precizez şi că gamemode-ul nu dă erori la compilare.

Comanda:

CMD:shop(playerid,params[]) return ShowShop(playerid);

Functia:

function ShowShop(playerid) {
	new diamond = PlayerInfo[playerid][pDiamonds],
		string[180], szDialog[4000];
	strcat(szDialog, "{FFE100}($) Preturi si informatii{FFFFFF}\n");
	if(diamond >= 500) format(string, sizeof(string), "Premium Account - {1ECC14}500 Diamondss\n");
	else format(string, sizeof(string), "Premium account - {FF0000}500 Diamonds\n");
	strcat(szDialog, string);
	new title[180];
	format(title, 256, "Shop: (%d diamonds)", diamond);
	ShowPlayerDialog(playerid, DIALOG_SHOP, DIALOG_STYLE_LIST, title, szDialog, "Select", "Close");
	return 1;
}

 

Edited by Moise05
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Acum 39 minute, _alchemy a spus:

Nu ti-as recomanda sa folosesti drept return o functie. Insereaza tot ce se afla in functie in comanda. Apoi, foloseste OnDialogResponse pentru dialogul DIALOG_SHOP.

Am incercat, aceiaşi problemă.

Link to comment
Share on other sites

  • 0
La 18.07.2019 la 23:41, Moise05 a spus:

Am incercat, aceiaşi problemă.

CMD:shop(playerid, params[]) {
	new string[256],
		szDialog[256],
		title[256];
		
	strcat(szDialog, "{FFE100}($) Preturi si informatii{FFFFFF}\n");
	
	if(PlayerInfo[playerid][pDiamonds]) {
		format(string, sizeof(string), "Premium Account - {1ECC14}500 Diamondss\n");
	}
	else {
		format(string, sizeof(string), "Premium account - {FF0000}500 Diamonds\n");
	}
	format(title, sizeof(title), "Shop: (%d diamonds)", PlayerInfo[playerid][pDiamons]);
	ShowPlayerDialog(playerid, DIALOG_SHOP, DIALOG_STYLE_LIST, title, szDialog, "Select", "Close");
	return 1;
}

 

Link to comment
Share on other sites

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.