Jump to content
  • 0

Problema dealership


Azir

Question

Problema intalnita (descriere): Vreau sa fac un dealership cu mai multe rubrici, acele rubrici mi-au iesit perfect, dar la rubrica "Cheap cars" trebuie sa pun 70 de masini, dar doar 18 se vad..
Ero(area / rile) / warning-(ul / urile): Nu am erori sau warning-uri.
Liniile de cod / sursa / script-ul(obligatoriu): 

case DIALOG_BUYCAR:
		{
			if(response)
			{
			    new numb = listitem + 1;
			    new szDialogString[2048];
				switch(listitem)
				{
					case 0:
					{
						if(dealerVariables[numb][dCarType] == 1)
					    {
					        for(new xf = 0; xf < MAX_DEALERSHIP_CARS; xf++)
							{
								format(szDialogString, 640, "%s%s($%s - %d in stock)\n", szDialogString,dealerVariables[xf][dCarName], NumberFormat(dealerVariables[xf][dCarPrice]), dealerVariables[xf][dCarStock]);
							}
							sCar[playerid] = 0;
							ShowPlayerDialog(playerid, DIALOG_BUYCAR2, DIALOG_STYLE_LIST, "Cars buy", szDialogString, "Select", "Cancel");
						}
					}
					case 1:
					{
						if(dealerVariables[numb][dCarType] == 2)
					    {
					        for(new xf = 0; xf < MAX_DEALERSHIP_CARS; xf++)
							{
								format(szDialogString, 640, "%s%s($%s - %d in stock)\n", szDialogString,dealerVariables[xf][dCarName], NumberFormat(dealerVariables[xf][dCarPrice]), dealerVariables[xf][dCarStock]);
							}
							sCar[playerid] = 0;
							ShowPlayerDialog(playerid, DIALOG_BUYCAR2, DIALOG_STYLE_LIST, "Cars buy", szDialogString, "Select", "Cancel");
						}
				 	}
					case 2:
					{
						if(dealerVariables[numb][dCarType] == 3)
					    {
					        for(new xf = 0; xf < MAX_DEALERSHIP_CARS; xf++)
							{
								format(szDialogString, 640, "%s%s($%s - %d in stock)\n", szDialogString,dealerVariables[xf][dCarName], NumberFormat(dealerVariables[xf][dCarPrice]), dealerVariables[xf][dCarStock]);
							}
							sCar[playerid] = 0;
							ShowPlayerDialog(playerid, DIALOG_BUYCAR2, DIALOG_STYLE_LIST, "Cars buy", szDialogString, "Select", "Cancel");
						}
					}
					case 3:
					{
					    format(szDialogString,sizeof(szDialogString),"Maverick - 150 premium points\nSparrow - 100 premium points\nHotring Racer A - 50 premium points\nHotring Racer B - 50 premium points\nHotring Racer C - 50 premium points");
						ShowPlayerDialog(playerid, DIALOG_BUYCAR_PREMIUM, DIALOG_STYLE_LIST, "Premium Vehicles", szDialogString, "Select", "Cancel");
					}
				}
			}
		}


Imagini / Video (optional): http://i.imgur.com/VTWbOMR.png
Ati incercat sa rezolvati singur?: Da, am incercat sa pun la 

new szDialogString[2048];

in loc de 2048 mai mult, dar degeaba.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Incearca, la cheap cars sa folosesti strcat . Exemplu :

new dialogmasini[256];

strcat(dialogmasini, "numemasina \n"); faci asa pentru toate masinile, vezi cate iti apar in gamemode, daca nu-ti apar toate, maresti string-ul pana-ti apar . Daca pui 256, iti va citi doar 256 de caractere din toate pe care le vei scrie .

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