Hallo,
ich habe mal wieder ein Problem
Ich bin gerade am ersten Job ~ Bauer wo der Bauer die Checkpoins abfahren soll.
Das läuft via Dialoge, alles wunderbar, nur der erste Checkpoint wird gesetzt, wenn man ihn abgefahren hat, wird kein neuer Checkpoint gesetzt.
In OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
if(dialogid == DIALOG_BAUER)
{
//ShowPlayerDialog(playerid, DIALOG_BAUER, DIALOG_STYLE_LIST, "Farmer", "Erstes Feld abernten\nZweites Feld abernten\nErstes Feld düngen\nZweites Feld düngen\n", "Arbeit beginnen", "Abbrechen");
if(response)
{
new info[200];
if(listitem==0)
{
if(IsPlayerInAnyVehicle(playerid) && IsBauerCar(GetPlayerVehicleID(playerid)))
{
BauerArbeit[playerid] = 1;
BauerRoute[playerid] = 1;
SetPlayerCheckpoint(playerid, -102.9219,146.5156,4.1077, 7);
format(info, sizeof(info), "Hallo Mitarbeiter %s! Sammel die Ernte mit dem Mähdrescher auf, fahre bitte die roten Kreise ab. Viel Erfolg!", GetName(playerid));
SendClientMessage(playerid, 0xFFA000FF, info);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist nicht im Mähdrescher!");
}
}
else if(listitem==1)
{
if(IsPlayerInAnyVehicle(playerid) && IsBauerCar(GetPlayerVehicleID(playerid)))
{
BauerArbeit[playerid] = 2;
BauerRoute[playerid] = 1;
SetPlayerCheckpoint(playerid, 21.2176,63.0128,4.0943, 7);
format(info, sizeof(info), "Hallo Mitarbeiter %s! Sammel die Ernte mit dem Mähdrescher auf, fahre bitte die roten Kreise ab. Viel Erfolg!", GetName(playerid));
SendClientMessage(playerid, 0xFFA000FF, info);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist nicht im Mähdrescher!");
}
}
else if(listitem==2)
{
if(IsPlayerInAnyVehicle(playerid) && IsBauerCar2(GetPlayerVehicleID(playerid)))
{
BauerArbeit[playerid] = 3;
BauerRoute[playerid] = 1;
SetPlayerCheckpoint(playerid, -124.6537,59.0663,3.0825, 7);
format(info, sizeof(info), "Hallo Mitarbeiter %s! Dünger nun die Felder, fahre bitte die roten Kreise ab. Viel Erfolg!", GetName(playerid));
SendClientMessage(playerid, 0xFFA000FF, info);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist nicht im Traktor!");
}
}
else if(listitem==3)
{
if(IsPlayerInAnyVehicle(playerid) && IsBauerCar2(GetPlayerVehicleID(playerid)))
{
BauerArbeit[playerid] = 4;
BauerRoute[playerid] = 1;
SetPlayerCheckpoint(playerid, 19.0820,60.9234,3.0824, 7);
format(info, sizeof(info), "Hallo Mitarbeiter %s! Dünger nun die Felder, fahre bitte die roten Kreise ab. Viel Erfolg!", GetName(playerid));
SendClientMessage(playerid, 0xFFA000FF, info);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist nicht im Traktor!");
}
}
}
}
in OnPlayerEnterCheckpoint(playerid)
if(BauerArbeit[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
if(BauerRoute[playerid] < 28)
{
new tx[20];
format(tx, sizeof(tx), "~p~%d / 28", BauerRoute[playerid]);
GameTextForPlayer(playerid, tx, 5000, 1);
}
if(BauerRoute[playerid] == 1)
{
SetPlayerCheckpoint(playerid, -154.9093,162.4045,6.9047, 7);
BauerRoute[playerid] = 2;
} else if(BauerRoute[playerid] == 2)
{
SetPlayerCheckpoint(playerid, -193.7419,173.7033,9.4045, 7);
BauerRoute[playerid] = 3;
} else if(BauerRoute[playerid] == 3)
{
SetPlayerCheckpoint(playerid, -210.0966,149.5623,5.4810, 7);
BauerRoute[playerid] = 4;
} else if(BauerRoute[playerid] == 4)
{
SetPlayerCheckpoint(playerid, -191.6080,128.4683,4.8794, 7);
BauerRoute[playerid] = 5;
} else if(BauerRoute[playerid] == 5)
{
SetPlayerCheckpoint(playerid, -143.9745,107.1273,4.1902, 7);
BauerRoute[playerid] = 6;
} else if(BauerRoute[playerid] == 6)
{
SetPlayerCheckpoint(playerid, -127.6857,101.8976,4.0931, 7);
BauerRoute[playerid] = 7;
} else if(BauerRoute[playerid] == 7)
{
SetPlayerCheckpoint(playerid, -120.4872,98.8874,4.0931, 7);
BauerRoute[playerid] = 8;
} else if(BauerRoute[playerid] == 8)
{
SetPlayerCheckpoint(playerid, -108.7524,139.6503,4.0910, 7);
BauerRoute[playerid] = 9;
} else if(BauerRoute[playerid] == 9)
{
SetPlayerCheckpoint(playerid, -120.5726,143.5575,4.2653, 7);
BauerRoute[playerid] = 10;
} else if(BauerRoute[playerid] == 10)
{
SetPlayerCheckpoint(playerid, -160.3469,155.6169,6.4854, 7);
BauerRoute[playerid] = 11;
} else if(BauerRoute[playerid] == 11)
{
SetPlayerCheckpoint(playerid, -193.0809,164.5677,8.1923, 7);
BauerRoute[playerid] = 12;
} else if(BauerRoute[playerid] == 12)
{
SetPlayerCheckpoint(playerid, -226.9685,99.1444,3.0552, 7);
BauerRoute[playerid] = 13;
} else if(BauerRoute[playerid] == 13)
{
SetPlayerCheckpoint(playerid, -243.5853,62.7032,3.0377, 7);
BauerRoute[playerid] = 14;
} else if(BauerRoute[playerid] == 14)
{
SetPlayerCheckpoint(playerid, -268.2128,-28.9587,3.2562, 7);
BauerRoute[playerid] = 15;
} else if(BauerRoute[playerid] == 15)
{
SetPlayerCheckpoint(playerid, -265.1086,-66.0222,4.0943, 7);
BauerRoute[playerid] = 16;
} else if(BauerRoute[playerid] == 16)
{
SetPlayerCheckpoint(playerid, -205.0995,-81.2367,4.0944, 7);
BauerRoute[playerid] = 17;
} else if(BauerRoute[playerid] == 17)
{
SetPlayerCheckpoint(playerid, -183.0395,-81.8626,4.0962, 7);
BauerRoute[playerid] = 18;
} else if(BauerRoute[playerid] == 18)
{
SetPlayerCheckpoint(playerid, -151.0583,-2.2425,4.0944, 7);
BauerRoute[playerid] = 19;
} else if(BauerRoute[playerid] == 19)
{
SetPlayerCheckpoint(playerid, -129.0156,54.3834,4.0943, 7);
BauerRoute[playerid] = 20;
} else if(BauerRoute[playerid] == 20)
{
SetPlayerCheckpoint(playerid, -198.1046,85.9714,4.0945, 7);
BauerRoute[playerid] = 21;
} else if(BauerRoute[playerid] == 21)
{
SetPlayerCheckpoint(playerid, -223.8354,84.7263,3.4099, 7);
BauerRoute[playerid] = 22;
} else if(BauerRoute[playerid] == 22)
{
SetPlayerCheckpoint(playerid, -249.4825,-6.3231,3.6763, 7);
BauerRoute[playerid] = 23;
} else if(BauerRoute[playerid] == 23)
{
SetPlayerCheckpoint(playerid, -242.5623,-61.8429,4.0945, 7);
BauerRoute[playerid] = 24;
} else if(BauerRoute[playerid] == 24)
{
SetPlayerCheckpoint(playerid, -177.3698,-40.2055,4.0945, 7);
BauerRoute[playerid] = 25;
} else if(BauerRoute[playerid] == 25)
{
SetPlayerCheckpoint(playerid, -160.8862,12.1069,4.0945, 7);
BauerRoute[playerid] = 26;
} else if(BauerRoute[playerid] == 26)
{
SetPlayerCheckpoint(playerid, -147.1214,53.3651,4.0945, 7);
BauerRoute[playerid] = 27;
} else if(BauerRoute[playerid] == 27)
{
SendClientMessage(playerid, 0xFFA000FF, "Super! Fahre die Ernte nun zum Silo!");
SetPlayerCheckpoint(playerid, -65.7935,104.2583,4.0931, 7);
BauerRoute[playerid] = 28;
} else if(BauerRoute[playerid] == 28)
{
SpielerInfo[playerid][pJobGehalt] += 7112;
GameTextForPlayer(playerid, "~b~+7112$", 5000, 1);
SendClientMessage(playerid, 0x55FF00FF, "Job erledigt! Du erhälst dein Gehalt am PayDay!");
//SetPlayerCheckpoint(playerid, -102.9219,146.5156,4.1077, 7);
BauerRoute[playerid] = 0;
BauerArbeit[playerid] = 0;
}
}
Ich hänge da und finde den Fehler nicht.