Jump to content
  • 0

Problema [/buycar].


Question

Posted

Problema intalnita (descriere): Cand folosesc comanda /buycar si dau la 'Cheap cars' sau 'Regular cars', nu-mi apar toate masinile care sunt in dealership. Imi apar in jur de 19/20 si dupa nu imi mai apar chiar daca le am puse.
Ero(area / rile) / warning-(ul / urile): Nu-mi da erori sau warninguri.
Liniile de cod / sursa / script-ul:

Comanda [/buycar]:

CMD:buycar(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 5.0, 330.1172, -1511.3527, 36.0391)) 
	{
	    if(playerVariables[playerid][pLevel] >= 2)
		{
			ShowPlayerDialog(playerid, DIALOG_BUYCAR, DIALOG_STYLE_LIST, "SERVER: Vehicle Dealership", "Cheap carsnRegular carsnExpensive carsnPremium cars", "Select", "Cancel");
		}
		else
		{
			SCM(playerid, -1, "You don't have level 2 or higher to buy a car!");
		}
	}
	else
	{
		SCM(playerid, -1, "You are not at the DealerShip!");
	}
	return 1;
}

DIALOG_BUYCAR:

case DIALOG_BUYCAR:
		{
			if(response)
			{
				new string[2500];
				switch(listitem)
				{
					case 0:
					{
						for(new xf = 0; xf < MAX_DEALERSHIP_CARS; xf++)
						{
							if(dealerVariables[xf][dCarType] == 1)
							{
								format(string, 640, "%s%s($%s - %d in stock)n", string,dealerVariables[xf][dCarName], NumberFormat(dealerVariables[xf][dCarPrice]), dealerVariables[xf][dCarStock]);
								ShowPlayerDialog(playerid, DIALOG_BUYCAR_SELECT, DIALOG_STYLE_LIST, "Buy a car", string, "Select", "Cancel");
							}
						}
					}
					case 1:
					{
						for(new xf = 0; xf < MAX_DEALERSHIP_CARS; xf++)
						{
							if(dealerVariables[xf][dCarType] == 2)
							{
								format(string, 640, "%s%s($%s - %d in stock)n", string,dealerVariables[xf][dCarName], NumberFormat(dealerVariables[xf][dCarPrice]), dealerVariables[xf][dCarStock]);
								ShowPlayerDialog(playerid, DIALOG_BUYCAR_SELECT, DIALOG_STYLE_LIST, "Buy a car", string, "Select", "Cancel");
							}
						}
				 	}
					case 2:
					{
						for(new xf = 0; xf < MAX_DEALERSHIP_CARS; xf++)
						{
							if(dealerVariables[xf][dCarType] == 3)
							{
								format(string, 640, "%s%s($%s - %d in stock)n", string,dealerVariables[xf][dCarName], NumberFormat(dealerVariables[xf][dCarPrice]), dealerVariables[xf][dCarStock]);
								ShowPlayerDialog(playerid, DIALOG_BUYCAR_SELECT, DIALOG_STYLE_LIST, "Buy a car", string, "Select", "Cancel");
							}
						}
					}
					case 3:
					{
					    format(string,sizeof(string),"Spearrow - 100 puncte premiumnVortex - 100 puncte premiumnHotring Racer - 100 puncte premiumnHotring Racer A - 100 puncte premiumnHotring Racer B - 100 puncte premiumnMaverick - 150 puncte premium");
						ShowPlayerDialog(playerid, DIALOG_BUYCAR_PREMIUM, DIALOG_STYLE_LIST, "Buy a car", string, "Select", "Cancel");
					}
				}
			}
		} 

Imagini / Video (optional): http://imgur.com/a/hWiK2
Ati incercat sa rezolvati singur?: Am incercat sa modific la string[1500] in string[2500], am crezut ca merge dar, in zadar.

6 answers to this question

Recommended Posts

  • 0
Posted

Asta fiindca atat suporta dialogul(maxim 20 de randuri) din cate stiu eu.Incearca sa faci un filescript cu sistemul si va fi mai eficient asa,nici nu consumi mult din gamemode...

 

 

  • 0
Posted

Cum as putea sa fac sa suporte mai mult? In jur de 50-60?

Nu poti.

 

Fa sistemul intr-un FS.

242086.png

  • 0
Posted

Sper sa functioneze, in caz ca nu merge, sa "reapelezi" la noi.

 

Uite, probleme de genu imi plac mie, nu persoane care vin cu cersitu sau probleme banele de acolade, etc.

242086.png

  • 0
Posted

Sper sa functioneze, in caz ca nu merge, sa "reapelezi" la noi.

 

Uite, probleme de genu imi plac mie, nu persoane care vin cu cersitu sau probleme banele de acolade, etc.

Ok. Am sa revin cu reply daca reusesc sau nu. Multumesc!

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.