Jump to content

[DELETED]problema salvare pet name


Nigga
 Share

Recommended Posts

Salut, pentru a rezolva această probleme, înlocuiește întregul case DIALOG_PETNAME cu:

		case DIALOG_PETNAME: {
			if(!response) return 1;
			if(!isnull(inputtext)) {
				if(strlen(inputtext) >= 5 && strlen(inputtext) <= 15) {
					DestroyDynamic3DTextLabel(Pet[playerid]);
					format(query, sizeof(query),"UPDATE `users` SET `PetName` = '%s' WHERE `Name` = '%s'",inputtext, GetName(playerid));
					mysql_tquery(SQL, query, "", "");
					format(PlayerInfo[playerid][pPetName], 30, inputtext);
					SCMEx(playerid, -1, "Ai schimbat numele pet-ului in %s",PlayerInfo[playerid][pPetName]);
					Update(playerid, pPetNamex);
					PlayerInfo[playerid][pPremiumPoints] -= 20;
					Update(playerid, pPremiumPointsx);

					format(string, sizeof(string), " {6AD439}%s{FFFFFF} - level {6AD439}%d{FFFFFF}",PlayerInfo[playerid][pPetName],PlayerInfo[playerid][pPetLevel]);
					Pet[playerid] = CreateDynamic3DTextLabel(string, COLOR_WHITE, 357.120239, 1.712298, 349.232513, 20, playerid);
				}
				else {
					SCM(playerid, COLOR_YELLOW, "Error: Nume pet invalid. (5 - 15 litere)");
					format(string, sizeof(string), "Numele actual al pet-ului este %s\nDaca doresti sa il schimbi te rugam introdu numele dorit in casuta de mai jos\nNumele trebuie sa fie de minin 5 caractere si maxim 15",PlayerInfo[playerid][pPetName]);
					ShowPlayerDialog(playerid, DIALOG_PETNAME, DIALOG_STYLE_INPUT, "Change pet name", string, "Change", "Cancel");
				}
			}
			else {
				SCM(playerid, COLOR_YELLOW, "Error: Nume pet invalid. (5 - 15 litere)");
				format(string, sizeof(string), "Numele actual al pet-ului este %s\nDaca doresti sa il schimbi te rugam introdu numele dorit in casuta de mai jos\n Numele trebuie sa fie de minin 5 caractere si maxim 15",PlayerInfo[playerid][pPetName]);
				ShowPlayerDialog(playerid, DIALOG_PETNAME, DIALOG_STYLE_INPUT, "Change pet name", string, "Change", "Cancel");
			}
		}

 

Discord: Jahen#4481

Link to comment
Share on other sites

Topic-ul a fost șters deoarece nu ai respectat modelul de postare. Te rugăm sa revii cu alt topic in care să respecți modelul.

Topic șters!

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...