Guten abend,
Und zwar geht mein UBB nicht so ganz, wenn ich ein fahrzeug mit ein Gutschein erstelle geht das Fahrzeug A,
wenn ich ein weiteres Fahrzeug erstelle wird anstadt Fahrzeug B das Neon an das Fahrzeug A dran gemacht und gespeichert.
Ich bin bisschen am verzweifeln.
Code:
case DIALOG_GUTSCHEIN_UBB2:
{
if(response)
{
for(new vehSlot=0;vehSlot<MAX_PLAYER_VEHICLES;vehSlot++)
{
new type = listitem+1;
switch(type)
{
case 1: // Blau
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18648, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 2: // Grün
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18649, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 3: // Weiß
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18652, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 4: // Pink
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18651, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 5: // Gelb
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18650, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
case 6: // Rot
{
PrivateVehicle[playerid][vehSlot][vehNeon1] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0, 0);
PrivateVehicle[playerid][vehSlot][vehNeon2] = CreateDynamicObject(18647, 0, 0, 0, 0, 0, 0, 0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon1], PrivateVehicle[playerid][vehSlot][vehID], -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachDynamicObjectToVehicle(PrivateVehicle[playerid][vehSlot][vehNeon2], PrivateVehicle[playerid][vehSlot][vehID], 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
}
}
new query[256];
PrivateVehicle[playerid][vehSlot][vehNeonID] = type;
format(query, sizeof(query), "UPDATE `script_vehicles` SET `vehNeonID` = '%d' WHERE `vehBesitzer` = '%s' AND `Slot` = '%d'",type,PrivateVehicle[playerid][vehSlot][vehBesitzer],vehSlot);
mysql_function_query(myCon, query, false, "", "");
SendClientMessage(playerid, COLOR_WHITE, "* Dein Gutschein wurde erfolgreich eingelöst.");
SendClientMessage(playerid, COLOR_WHITE, "* Das Fahrzeug wurde geliefert Du findest es auf Map.");
SetPlayerCheckpointEx(playerid, -1706.9330,11.5702,3.2606, 5.0, CP_UBBCAR, INVALID_CHECKPOINT_TYPE);
return 1;
}
}
}
Vielleicht kann der liebe Jeffry: mir helfen.