Jump to content
  • 0

Problema confirmare


RespecT

Question

Problema intalnita (descriere):vreau cand dau /shop si sa cumpar ceva intai sa-mi apara un dialog cu 'Da' sau 'Nu' intai sa ma intrebe daca vreau sa cumpar.
Ero(area / rile) / warning-(ul / urile):n-am erori.
Liniile de cod / sursa / script-ul(obligatoriu):

				if(listitem == 5)
				{
				    if(PlayerInfo[playerid][pWarns] <= 0)
                    {
						SendClientMessage(playerid, COLOR_LIGHTRED, "You don't have any warn.");
						return 1;
					}
					if(PlayerInfo[playerid][pPremiumPoints] < 19) return SCM(playerid, COLOR_GREY, "Eroare: Ai nevoie de 20 puncte premium pentru a lua acest produs.");
					PlayerInfo[playerid][pPremiumPoints] -= 20;
					Update(playerid, pPremiumPointsx);
					PlayerInfo[playerid][pWarns] = 0;
					new str[300],strings[200],name[30],stringss[200];
					mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Warnings`='0',`PremiumPoints`='%d' WHERE `name`='%s'",PlayerInfo[playerid
[pPremiumPoints],PlayerInfo[playerid][pNormalName]);
					mysql_tquery(SQL,str,"","");
					SendClientMessage(playerid, COLOR_YELLOW, "You have cleared your warns! (-20 premium points)");
					GetPlayerName(playerid, name, sizeof(name));
					format(strings, sizeof(strings), "/shop: %s cleared his warns.",name);
					ABroadCast(COLOR_YELLOW,strings,6);
					mysql_real_escape_string(strings, stringss);
					mysql_format(SQL,str,sizeof(str), "INSERT INTO `shop_logs` (`playerid`,`Message`) VALUES('%d','%s')",PlayerInfo[playerid][pSQLID],stringss);
					mysql_tquery(SQL,str,"","");
					ShowPlayerDialog(playerid, DIALOG_CUMPARA, DIALOG_STYLE_MSGBOX, "Shop:", "{FFFFFF}Esti sigur ca vrei sa cumperi Clear Warns?", "Da", "Inapoi");
				}

Imagini / Video (optional):-
Ati incercat sa rezolvati singur?: da am adaugat asta ShowPlayerDialog(playerid, DIALOG_CUMPARA, DIALOG_STYLE_MSGBOX, "Shop:", "{FFFFFF}Esti sigur ca vrei sa cumperi Clear Warns?", "Da", "Inapoi");, dar degeaba am adaugat-o pentru ca dau /shop aleg intai imi cumpara produsu si apoi apare dialogu..

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

La dialogul `Dialog_cumpara` pui restul:

if(listitem == 0)
{
 	PlayerInfo[playerid][pPremiumPoints] -= 20;
					Update(playerid, pPremiumPointsx);
					PlayerInfo[playerid][pWarns] = 0;
					new str[300],strings[200],name[30],stringss[200];
					mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Warnings`='0',`PremiumPoints`='%d' WHERE `name`='%s'",PlayerInfo[playerid
[pPremiumPoints],PlayerInfo[playerid][pNormalName]);
					mysql_tquery(SQL,str,"","");
					SendClientMessage(playerid, COLOR_YELLOW, "You have cleared your warns! (-20 premium points)");
					GetPlayerName(playerid, name, sizeof(name));
					format(strings, sizeof(strings), "/shop: %s cleared his warns.",name);
					ABroadCast(COLOR_YELLOW,strings,6);
					mysql_real_escape_string(strings, stringss);
					mysql_format(SQL,str,sizeof(str), "INSERT INTO `shop_logs` (`playerid`,`Message`) VALUES('%d','%s')",PlayerInfo[playerid][pSQLID],stringss);
					mysql_tquery(SQL,str,"",""); 
}

 

La dialogul de la shop pui:

                if(listitem == 5)
				{
				    if(PlayerInfo[playerid][pWarns] <= 0)
                    {
						SendClientMessage(playerid, COLOR_LIGHTRED, "You don't have any warn.");
						return 1;
					}
					if(PlayerInfo[playerid][pPremiumPoints] < 19) return SCM(playerid, COLOR_GREY, "Eroare: Ai nevoie de 20 puncte premium pentru a lua acest produs.");
                  ShowPlayerDialog(playerid, DIALOG_CUMPARA, DIALOG_STYLE_MSGBOX, "Shop:", "{FFFFFF}Esti sigur ca vrei sa cumperi Clear Warns?", "Da", "Inapoi");
				}
Edited by TrueCross
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.