Jump to content
  • 0

Question

Posted (edited)

 

 

                .                -                 .

Edited by rgb

7 answers to this question

Recommended Posts

  • 0
Posted (edited)
On 9/20/2022 at 7:07 PM, zenutz said:

Poti sa ne dai mai multe detali? 

-

Edited by rgb
  • 0
Posted

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

  • 0
Posted (edited)
On 9/20/2022 at 8:46 PM, s4uriK.Official said:

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

-

Edited by rgb
  • 0
Posted

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

  • 0
Posted (edited)
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
  • 0
Posted (edited)

 

@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

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