Detaljan opis problema: Pa hocu da kad igrac ude u izlozbeno auto i kad mu izbaci ovaj dialog da ga freeza da ne moze nigdje a kad klikne da ne da ga izbaci iz auta!
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
case VOZILO_KUPI:
{
new vehicleid = GetPVarInt(playerid, "DialogValue1");
new caption, info;
format(caption, sizeof(caption), "Vehicle ID %d", vehicleid);
format(info, sizeof(info), "Ovo vozilo je na prodaju! Cijena: $%d\nZelite li da ga kupite?", VehicleValue);
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, caption, info, "Da", "Ne");
}if(dialogid == VOZILO_KUPI)
{
if(response)
{
if(GetPlayerVehicles(playerid) >= MAX_PLAYER_VEHICLES)
{
ShowErrorDialog(playerid, "You can't buy any more vehicles! Max: " #MAX_PLAYER_VEHICLES );
return 1;
}
new id = GetPVarInt(playerid, "DialogValue1");
if(GetPlayerMoney(playerid) < VehicleValue)
{
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);
new dealerid = strval(VehicleOwner);
VehicleCreated = VEHICLE_PLAYER;
VehicleModel = VehicleModel;
VehiclePos = DealershipPos;
VehicleColor = VehicleColor;
VehicleInterior = VehicleInterior;
VehicleWorld = VehicleWorld;
VehicleValue = VehicleValue;
GetPlayerName(playerid, VehicleOwner, sizeof(VehicleOwner[]));
VehicleNumberPlate = DEFAULT_NUMBER_PLATE;
for(new d=0; d < sizeof(VehicleTrunk[]); d++)
{
VehicleTrunk = 0;
VehicleTrunk = 0;
}
for(new d=0; d < sizeof(VehicleMods[]); d++)
{
VehicleMods = 0;
}
VehiclePaintjob = 255;
VehicleLock = 0;
VehicleAlarm = 0;
UpdateVehicle(freeid, 0);
SaveVehicle(freeid);
new msg;
format(msg, sizeof(msg), "You have bought this vehicle for $%d", VehicleValue);
SendClientMessage(playerid, COLOR_WHITE, msg);
}
else
{
new id = GetPVarInt(playerid, "DialogValue1");
if(GetPlayerVehicleAccess(playerid, id) < 1)
{
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}