Guten Tag,
habe ein Probelm:
Habe diese Abfrage erstellt:
unter OnPlayerStateChange
//Busjob 1
if(newstate==PLAYER_STATE_DRIVER)
{
for(new i=0; i<sizeof(busjob1); i++)
{
if(GetPlayerVehicleID(playerid)==busjob1[i])
{
ShowPlayerDialog(playerid, DIALOG_JOBBUSSF1, DIALOG_STYLE_MSGBOX, "Bus SF 1", "Möchtest du nun deine Tour fahren?", "JA", "NEIN");
}
}
}
dann unter onplayerentercheckpoint
switch(GetPVarInt(playerid,"Jobid"))
{
case 0:{}
case 1:{
if(GetPVarInt(playerid, "Jobcheckpoint")==1)
{
SetPlayerCheckpoint(playerid, -1986.6008,161.0798,27.7127, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 2);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==2)
{
SetPlayerCheckpoint(playerid, -1631.2841,724.3707,14.6318, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 3);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==3)
{
SetPlayerCheckpoint(playerid, -1534.6345,825.5934,7.1397, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 4);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==4)
{
SetPlayerCheckpoint(playerid, -1710.2372,908.8823,24.8425, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 5);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==5)
{
SetPlayerCheckpoint(playerid, -1706.2847,1032.2677,45.2303, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 6);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==6)
{
SetPlayerCheckpoint(playerid, -1608.6769,1131.3024,7.1397, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 7);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==7)
{
SetPlayerCheckpoint(playerid, -1562.5521,558.7825,7.1318, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 8);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==8)
{
SetPlayerCheckpoint(playerid, -1867.6277,409.8382,17.1141, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 9);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==6)
{
SetPlayerCheckpoint(playerid, -2094.6985,321.8633,35.1162, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 10);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==10)
{
SetPlayerCheckpoint(playerid, -2254.9246,106.7147,35.2725, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 11);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==11)
{
SetPlayerCheckpoint(playerid, -2177.5125,-72.3050,35.2728, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 12);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==12)
{
SetPlayerCheckpoint(playerid, -2027.6135,-77.1186,35.4282, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 13);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==13)
{
SetPlayerCheckpoint(playerid, -1881.2805,-144.0190,11.9958, 5.0);
SetPVarInt(playerid, "Jobcheckpoint", 14);
}
if(GetPVarInt(playerid, "Jobcheckpoint")==14)
{
SendClientMessage(playerid, BLAU, "Du hast den Job erfolgreich ausgeführ.");
GivePlayerMoney(playerid, 2500);
SetPVarInt(playerid, "Jobcheckpoint", 0);
}
}
}
Nun, wenn ich in den Bus steige, dann wird mir der dialog an gezeigt und dann kommt der erste checkpoint, wie es sein soll.
Doch nach dem ersten soll eigentlich der 2 kommen doch das tut er nicht. er überspring mehrere!
Bitte um hilfe
Danke
Scripter4.0