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

6 answers to this question

Recommended Posts

  • 0
9 hours ago, RespecT said:

Am scapat de erorii dar degeaba tot nu merge.. dai /shop se cumpara si dupa imi apare ala cu 'Da' sau 'Inapoi' :))

Arata-mi cum ai tu acum.

Pune dinou dar asa:
 

Quote

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_CWARNS, DIALOG_STYLE_MSGBOX, "Shop:", "{FFFFFF}Esti sigur ca vrei sa cumperi Clear Warns?", "Da", "Inapoi");
                }

Iar la ondialogresponse 

Quote

if(dialogid == DIALOG_CWARNS)
    {
        if(response)
        {       

        

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,"","");


        }
        return 1;
    }

 

  • Upvote 1

giphy.gif

Link to comment
Share on other sites

  • 0
Quote
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_CWARNS, DIALOG_STYLE_MSGBOX, "Shop:", "{FFFFFF}Esti sigur ca vrei sa cumperi Clear Warns?", "Da", "Inapoi");
                  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,"","");
				}

Inlocuieste ce ai tu cu ce am dat eu si definesti DIALOG_CWARNS dupa care te duci iar la ondialogresponse si adaugi:

Quote

if(dialogid == DIALOG_CWARNS)
    {
        if(response)
        {       


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,"","");


        }
        return 1;
    }

 

Sper ca te-am ajutat. Daca da +1 sa te mai ajut in viitor.

Edited by Extremys
  • Upvote 1

giphy.gif

Link to comment
Share on other sites

  • 0

Primesc urmatoarele erori

 

C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(40) : error 017: undefined symbol "AntiDeAMX"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(4219) : error 004: function "vUpdate" is not implemented
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(4514) : error 017: undefined symbol "GetPlayerHealthEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(4519) : error 017: undefined symbol "SetPlayerHealthEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(4523) : error 017: undefined symbol "SetPlayerHealthEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(4960) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(6039) : error 017: undefined symbol "GetPlayerHealthEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(7623) : error 017: undefined symbol "ClearWanted"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(7970) : error 017: undefined symbol "SetPlayerArmourEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8272) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8286) : error 017: undefined symbol "SetPlayerArmourEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8331) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8355) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8380) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8405) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8430) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8478) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8497) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8508) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8524) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8533) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8540) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8549) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8557) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8570) : error 017: undefined symbol "SetPlayerPosEx"
C:\Users\Andrei\Desktop\s4uriK\gamemodes\gm.pwn(8585) : error 017: undefined symbol "SetPlayerPosEx"

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.