Jump to content

Question

Posted

Salut am si eu o problema la dialog la masinile personale ,

cand ma urc intro masina sa o cumpar si dau yes ca vreau sa o cumpar si imi zice ca mai am o masina personala dau ok si ma baga sa ma loghez

1.

Cand ma urc in masina

11t4npj.png

2.Cand imi zice ca am o masina personala

cj61k.png

3.Cand dau ok

xdfgu8.png

if(dialogid == DIALOG_VEHICLE_BUY)
	{
		if(response)
		{
			if(GetPlayerVehicles(playerid) >= MAX_PLAYER_VEHICLES)
			{
				ShowErrorDialog(playerid, "You can't buy any more vehicles! Max: " #MAX_PLAYER_VEHICLES );
				RemovePlayerFromVehicle(playerid);
				return 1;
			}
			new id = GetPVarInt(playerid, "DialogValue1");
			if(GetPlayerMoney(playerid) < VehicleValue[id])
			{
				ShowErrorDialog(playerid, "You don't have enough money to buy this vehicle!");
				return 1;
			}
			new freeid = GetFreeVehicleID();
			if(!freeid)
			{
				ShowErrorDialog(playerid, "Vehicle dealership is out of stock!");
				return 1;
			}
			GivePlayerMoney(playerid, -VehicleValue[id]);
			new dealerid = strval(VehicleOwner[id]);
			VehicleCreated[freeid] = VEHICLE_PLAYER;
			VehicleModel[freeid] = VehicleModel[id];
			VehiclePos[freeid] = DealershipPos[dealerid];
			VehicleColor[freeid] = VehicleColor[id];
			VehicleInterior[freeid] = VehicleInterior[id];
			VehicleWorld[freeid] = VehicleWorld[id];
			VehicleValue[freeid] = VehicleValue[id];
			GetPlayerName(playerid, VehicleOwner[freeid], sizeof(VehicleOwner[]));
			VehicleNumberPlate[freeid] = DEFAULT_NUMBER_PLATE;
			for(new d=0; d < sizeof(VehicleTrunk[]); d++)
			{
				VehicleTrunk[freeid][d][0] = 0;
				VehicleTrunk[freeid][d][1] = 0;
			}
			for(new d=0; d < sizeof(VehicleMods[]); d++)
			{
				VehicleMods[freeid][d] = 0;
			}
			VehiclePaintjob[freeid] = 255;
			VehicleLock[freeid] = 0;
			VehicleAlarm[freeid] = 0;
			UpdateVehicle(freeid, 0);
			SaveVehicle(freeid);
			new msg[128];
			format(msg, sizeof(msg), "You have bought this vehicle for $%d", VehicleValue[id]);
			SendClientMessage(playerid, COLOR_WHITE, msg);
		}
		else
		{
			new id = GetPVarInt(playerid, "DialogValue1");
			if(GetPlayerVehicleAccess(playerid, id) < 1)
			{
				RemovePlayerFromVehicle(playerid);
			}
		}
		return 1;
	}

Cum fac sa nu mai imi dea sa ma loghez , vreau sa numai apara mesajul ala..

4 answers to this question

Recommended Posts

Posted

Doamne..

#define DIALOG_REGISTER      12323  // 12323 este id-ul

DIALOG_REGISTER e doar un exemplu ca sa iti dai seama cum sta treaba.

Sau poti sa ai ShowPlayerDialog( playerid, 12323, DIALOG_STYLE... , .... , ... );

Ce e cu rosu e tot id-ul.

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.