Jump to content

Recommended Posts

Posted

Intrebarea este. Ce se intampla mai exact? Dai sa cumperi si nu se intampla nimic sau iti da mesaj? Pentru ca vazand codul ar trebui sa mearga

Posted

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

Posted

Nu ma refer ca o poti cumpara sau nu. Ma refer ce texte din cele 3 puse de mine in print se afiseaza in consola :|

Posted (edited)

Daca nu apare nici un mesaj in consola(din ce am pus eu) asta inseamna ca OnDialogResponse pentru acele listitem nu sunt chemate (asta daca pentru restu sunt chemate)

Edit: Poti lasa comanda?

Edited by Banditul

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.