Jump to content

Problema dialog shop


.SmoKe.

Recommended Posts

Sugestia mea urmatoarea. Sa adaugi un print(f) cu un mesaj pentru fiecare bloc a lui listitem 19 (spre exemplu)

if(listitem == 19)
{
	print("A fost chemat listitem");
	if(PlayerInfo[playerid][pPremiumPoints] <= 19)
	{
		print("A fost chemata verificarea de pp");
	    ShowPlayerDialog(playerid, DIALOG_NOPP, DIALOG_STYLE_MSGBOX, "Not enough points", "You don't have enough premium points to do this.", "Close", "");
	    return 1;
	}
	print("A fost executat cu succes");
	PlayerInfo[playerid][pPremiumPoints] -= 20;
	Update(playerid, pPremiumPointsx);
	PlayerInfo[playerid][pCase] += 5;
	new str2[300],strings[200],name[30],stringss[200];
	mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `PremiumPoints`='%d',`Case`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pPremiumPoints],PlayerInfo[playerid][pCase],PlayerInfo[playerid][pNormalName]);
	mysql_tquery(SQL,str2,"","");
	SendClientMessage(playerid, COLOR_YELLOW, "You have bought 5 cases (-20 Drawn points)");
	GetPlayerName(playerid, name, sizeof(name));
	format(strings, sizeof(strings), "/shop: %s bought 5 cases",name);
	ABroadCast(COLOR_YELLOW,strings,7);
	mysql_real_escape_string(strings, stringss);
	mysql_format(SQL,str2,sizeof(str2), "INSERT INTO `shop_logs` (`playerid`,`Message`) VALUES('%d','%s')",PlayerInfo[playerid][pSQLID],stringss);
	mysql_tquery(SQL,str2,"","");
}

Pune acest listitem la ondialogreponse la shop in loc de ce ai tu. Si cumpara itemul de la listitem 19 si spune-mi daca afiseaza unu dintre mesajele alea de la print

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
Reply to this topic...

×   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.