Hallo Community von SA-MP.DE
Ich hab vor ein paar Wochen angefangen mit SA:MP zu Scripten und brauch nun ein wenig Hilfe.
Und zwar funktioniert mein "Job System" nicht so wie es soll:
Wenn ich /work eingeben ohne im Bus zu sitzen geht es nicht Sitze ich im Bus und mache /work geht es Dann fahr ich zum ersten Checkpoint und die anderen Checkpoints werden nicht angezeigt
//Busfahrer Job
new busjob[128];#define DIALOG_BUS_JOB 10
public OnPlayerEnterCheckpoint(playerid)
{
if(busjob[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
busjob[playerid] = 2;
SetPlayerCheckpoint(playerid,1500.0999755859,-1734.4000244141,12.39999961853,5);
GivePlayerMoney(playerid, 100);
}
if(busjob[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
busjob[playerid] = 3;
SetPlayerCheckpoint(playerid,1924.3000488281,-1754.5,12.39999961853,5);
GivePlayerMoney(playerid, 100);
}
if(busjob[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
busjob[playerid] = 4;
SetPlayerCheckpoint(playerid,2169.8999023438,-1754.5999755859,12.39999961853,5);
GivePlayerMoney(playerid, 100);
}
if(busjob[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
busjob[playerid] = 5;
SetPlayerCheckpoint(playerid,1173.4000244141,-1825.3000488281,12.39999961853,5);
GivePlayerMoney(playerid, 100);
}
if(busjob[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, 100);
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_BUS_JOB)
{
if(response)
{
if(listitem == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 431)
{
busjob[playerid] = 1;
SetPlayerCheckpoint(playerid,1173.4000244141,-1825.3000488281,12.39999961853,5);
return 1;
}
else
{
SendClientMessage(playerid,ORANGE,"Du bist in keinem Bus!");
}
}
}
}
Ich bitte um Hilfe.
M.f.G
xXRockstarHDXx | Justin