Jump to content
  • 0

Problema sistem masini


.RuNNeR.

Question

Problema intalnita (descriere): Deci in momentul in care dau "Tow" la masina cu numarul 6 id-ul se suprapun, asa cred, stie cineva ce problema are? (Este gamemodul BigZone, da stiu nu este ok sa editez, dar eu la momentul de fata nu ma pricep atat de bine incat sa imi fac propriul gamemod.)
Ero(area / rile) / warning-(ul / urile): Nu am eroare.
Liniile de cod / sursa / script-ul(obligatoriu):

	if(dialogid == DIALOG_VEHSPAWN6)
	{
	    if(response)
	    {
	    	if(listitem == 0)
			{
			    new carid = PlayerInfo[playerid][pPPluscarkey2],stringgg[256],speed;
			    speed = MySQLCheckSpeed(CarInfo[carid][cModel]);
			    format(stringgg,sizeof(stringgg),"Vehicle Model: %d\nDistance Traveled: %.0f KM\nVehicle Age: %d days\nInsurance Price: $%s\nInsurance Points: %d\nTop speed: %d km/h",CarInfo[carid][cModel],CarInfo[carid][cKM],CarInfo[carid][cDays],FormatNumber(CarInfo[carid][cInscarprice]),CarInfo[carid][cInsurancecar],speed);
				ShowPlayerDialog(playerid,DIALOG_VEHINFO,DIALOG_STYLE_MSGBOX,"Vehicle Info",stringgg,"Close","");
				return 1;
			}
			if(listitem == 1)
			{
				new car = personalcar[5][playerid],car2 = PlayerInfo[playerid][pPPluscarkey2];
				if(IsTrailerAttachedToVehicle(car)) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}On a mission right now, can't use this command.");
				TowCar(car,car2,playerid);
			}
			if(listitem == 2)
			{
			    if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_WHITE, "{FFF8C6}On a mission right now, can't use this command.");
			    if(BusinessRob[playerid] > 0) return SendClientMessage(playerid,COLOR_WHITE,"You can't use this while robbing the bank.");
				if(CP[playerid] < 1 && IsCollectingRubbish[playerid] < 1 && !IsATruck(GetPlayerVehicleID(playerid)) && MechanicCallTime[playerid] < 1 && CheckBus[playerid] < 1 && GotoMats[playerid] < 1)
				{
			    	new car = personalcar[5][playerid];
					LocateCar(car,playerid);
                }
				else
				{
	    			ShowPlayerDialog(playerid, DIALOG_JOBULETES, DIALOG_STYLE_MSGBOX, "Anulare Checkpoint", "Esti sigur ca vrei sa anulezi checkpoint-ul curent?", "Da", "Nu");
				}
			}
			if(listitem == 3)
			{
			    new carid = OwnedVeh(personalcar[5][playerid]),inscarpricee = CarInfo[carid][cInscarprice],stringul[200];
			    if(CarInfo[carid][cInsurancecar] < 5)
			    {
			        if(GetPlayerCash(playerid) >= inscarpricee)
	      			{
	      			    format(stringul,sizeof(stringul),"You want to buy 1 insurance for $%d?",inscarpricee);
	      			    ShowPlayerDialog(playerid, DIALOG_INSURANCEBUY, DIALOG_STYLE_MSGBOX, "Insurance", stringul, "Yes", "No");
						Selected2[playerid] = 6;
					}
				}
				else
				{
 			    	ShowPlayerDialog(playerid, DIALOG_INSURANCEBUY2, DIALOG_STYLE_MSGBOX, "Insurance", "You can't have more than 5 insurance", "OK", "");
				}
			}
			if(listitem == 4)
			{
			    if(PlayerInfo[playerid][pPremiumPoints] <= 19)
				{
    				ShowPlayerDialog(playerid, DIALOG_NOPP, DIALOG_STYLE_MSGBOX, "Not enough points", "You don't have enough premium points to do this.", "Close", "");
				    return 1;
				}
				PlayerInfo[playerid][pPremiumPoints] -= 20;
				CarInfo[OwnedVeh(personalcar[5][playerid])][cDays] = 0;
				CarInfo[OwnedVeh(personalcar[5][playerid])][cKM] = 0;
				vUpdate(OwnedVeh(personalcar[5][playerid]), cDaysx);
				vUpdate(OwnedVeh(personalcar[5][playerid]), cKMx);
				new strings[200],name[30],stringss[200],str1[300];
				SendClientMessage(playerid, COLOR_YELLOW, "You have cleared your car KM and days! (-20 premium points)");
				GetPlayerName(playerid, name, sizeof(name));
				format(strings, sizeof(strings), "/shop: %s bought clear car KM and days reset.",name);
				ABroadCast(COLOR_YELLOW,strings,6);
				mysql_real_escape_string(strings, stringss);
				mysql_format(SQL,str1,sizeof(str1), "INSERT INTO `shop_logs` (`playerid`,`Message`) VALUES('%d','%s')",PlayerInfo[playerid][pSQLID],stringss);
				mysql_tquery(SQL,str1,"","");
			}
		}
		return 1;
	}


Imagini / Video (optional):


Ati incercat sa rezolvati singur?: Da, am incercat sa schimb sistemul de respawnare al masinilor

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

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.