Hi Community,
Ich bin zurzeit dabei ein Autohaus zu Scripten, bis jetzt läuft alles gut, aber 2 Cars wollen einfach den Dialog nicht anzeigen wenn ich einsteige, bei den Rest geht alles nur bei den beiden nicht. Es sind 100% die richtigen Cars.
Hier der Code:
//Autohaus Cars
car1 = CreateVehicle(401,2161.7971,-1143.6208,24.6373,89.1836,0,0,1);
car2 = CreateVehicle(402,2161.8130,-1148.3075,24.2121,89.5541,0,0,1);
car3 = CreateVehicle(405,2161.9531,-1152.9282,23.8040,90.4041,0,0,1);
car4 = CreateVehicle(404,2161.9507,-1158.2472,23.5720,90.3366,0,0,1);
car5 = CreateVehicle(410,2162.3091,-1163.1466,23.4704,89.7912,0,0,1);
car6 = CreateVehicle(412,2161.0605,-1168.2780,23.6559,89.3968,0,0,1);
car7 = CreateVehicle(419,2161.7505,-1173.0223,23.6165,89.6263,0,0,1);
car8 = CreateVehicle(421,2161.6904,-1177.9885,23.7010,89.8253,0,0,1);
car9 = CreateVehicle(426,2161.5500,-1182.6615,23.5612,89.5128,0,0,1);
car10 = CreateVehicle(436,2161.3823,-1187.5609,23.5888,89.5493,0,0,1);
car11 = CreateVehicle(439,2161.5090,-1192.3026,23.7163,89.3884,0,0,1);
car12 = CreateVehicle(458,2161.5667,-1197.4491,23.7827,92.2166,0,0,1);
public AutoKaufStart(playerid)
{
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new string[128],cname[128],vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
fkaufmodel[vehicleid] = GetVehicleModel(vehicleid);
if(vehicleid == car1)
{
cname = "Bravura";
fkosten[playerid] = 1;
}
if(vehicleid == car2)
{
cname = "Buffalo";
fkosten[playerid] = 2;
}
if(vehicleid == car3)
{
cname = "Sentinel";
fkosten[playerid] = 3;
}
if(vehicleid == car4)
{
cname = "Perenniel";
fkosten[playerid] = 55;
}
if(vehicleid == car5)
{
cname = "Manana";
fkosten[playerid] = 12;
}
if(vehicleid == car6)
{
cname = "Voodoo";
fkosten[playerid] = 5323;
}
if(vehicleid == car7)
{
cname = "Esperanto";
fkosten[playerid] = 23;
}
if(vehicleid == car8)
{
cname = "Washington";
fkosten[playerid] = 155;
}
if(vehicleid == car9)
{
cname = "Premier";
fkosten[playerid] = 312;
}
if(vehicleid == car10)
{
cname = "Previon";
fkosten[playerid] = 214;
}
if(vehicleid == car11) // Das Car funktioniert nicht
{
cname = "Stallion";
fkosten[playerid] = 6;
}
if(vehicleid == car12) // <--- Und das Car
{
cname = "Solair";
fkosten[playerid] = 1999;
}
format(string,sizeof(string),"Möchtest du das Auto kaufen?\n\nModel: %i\nFahrzeug: %s\nPreis: %i$\n",fkaufmodel[vehicleid],cname,fkosten[playerid]);
ShowPlayerDialog(playerid,DIA_AAUTOS,DIALOG_STYLE_MSGBOX,"Auto kaufen",string,"Kaufen","Abrechen");
return 1;
}
else
{
RemovePlayerFromVehicle(playerid);
return 1;
}
}
Die Preise sind erstmal frei erfunden also nicht wundern ist bloß ein test
Schonmal danke im Vorraus
mfg FaYo