Jump to content
  • 0

-


rgb

Question

7 answers to this question

Recommended Posts

  • 0

Explica aici problema ca tot aici ai și postat. Iar unul dintre noi te vom ajuta. 

                     

  Serverul meu de Discord: Click aici       a7DfKP7.gif                                                                      FGIfknL.gif

k35T5Nb.png                                                                                                                                                                                                                                                                                                I0aS856.gif

Link to comment
Share on other sites

  • 0

Salut @HusiCj,

Poti incepe prin a elimina randul legat de optiunea de a le cumpara folosind bani. In acest fel, dialogul tau va arata in felul urmator:

new 
	String[24],
	id = ObjectSlot[playerid][ObjectID[playerid]];

format(String, sizeof String, "Premium points\t%s", FormatNumber(objectInfo[id][objPremium]));
ShowPlayerDialog(playerid, DIALOG_BUY_ACCS, DIALOG_STYLE_TABLIST_HEADERS, "SERVER: Buy accessories", String, "Select", "Exit");

Desigur, mai trebuie sa modifici si in DIALOG_BUY_ACCS, astfel incat sa nu iti ia bani, ci puncte premium pe accesoriu. 

Dar asta nu e cel mai bun mod de a-ti rezolva problema. Codul tau ar trebui sa fie rescris mai mult de atat. Posteaza si dialogul "DIALOG_BUY_ACCS", si vei primi un raspuns mai explicit ori de la mine, ori de la alta persoana de pe aceasta comunitate.

O zi buna!

Daca te-am ajutat =>

spacer.png

Link to comment
Share on other sites

  • 0
On 9/20/2022 at 9:46 PM, shane said:

Salut @HusiCj,

Poti incepe prin a elimina randul legat de optiunea de a le cumpara folosind bani. In acest fel, dialogul tau va arata in felul urmator:

new 
	String[24],
	id = ObjectSlot[playerid][ObjectID[playerid]];

format(String, sizeof String, "Premium points\t%s", FormatNumber(objectInfo[id][objPremium]));
ShowPlayerDialog(playerid, DIALOG_BUY_ACCS, DIALOG_STYLE_TABLIST_HEADERS, "SERVER: Buy accessories", String, "Select", "Exit");

Desigur, mai trebuie sa modifici si in DIALOG_BUY_ACCS, astfel incat sa nu iti ia bani, ci puncte premium pe accesoriu. 

Dar asta nu e cel mai bun mod de a-ti rezolva problema. Codul tau ar trebui sa fie rescris mai mult de atat. Posteaza si dialogul "DIALOG_BUY_ACCS", si vei primi un raspuns mai explicit ori de la mine, ori de la alta persoana de pe aceasta comunitate.

O zi buna!

-

 

 

Edited by rgb
Link to comment
Share on other sites

  • 0

 

@HusiCj,

Mai mult ca sigur trebuie sa faci niste schimbari si in functia "buy_accs", dar nu vreau sa-ti dau totul mura'n gura, si doar o idee despre cum poti sa rezolvi asta.

Schimba Dialogul din prima poza cu urmatorul:

case DIALOG_BUY_ACCS:
{
	if(!reponse) return true;

	new 
		id = ObjectSlot[playerid][objectID[playerid]];

	if(PlayerInfo[playerid][pPremiumPoints] < objectInfo[id][objPremium]) return SendClientMessage(playerid, COLOR_LGREEN, "You don't have enough premium points!");
    	PlayerInfo[playerid][pPremiumPoints] -= objectInfo[id][objPremium];
    	Update(playerid, pPremiumPointsx);
                                                                         
    	buy_accs(playerid);
}
Edited by shane

Daca te-am ajutat =>

spacer.png

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.