Guten Tag liebe Community...
Ich habe mal ne Frage...
Ich habe einen Truckerjob erstellt und es hackt an 2 Sachen...
Der Checkpoint soll er gesetzt werden, wenn:
Er bei /beladen im Truck sitzt und den Anhänger hinten dran hat...
Schnipsel:
truck [1] = AddStaticVehicle(450,-1858.3893,134.6849,15.7569,268.7884,0,0); // Anhänger
truck [2] = AddStaticVehicle(450,-1855.3984,143.8939,15.7597,259.4307,0,0); // Anhänger
truck [3] = AddStaticVehicle(450,-1853.4817,154.6834,15.7558,262.6503,0,0); // Anhänger
truck [4] = AddStaticVehicle(515,-1843.9670,153.0890,16.1389,263.2096,4,9); // Truck
truck [5] = AddStaticVehicle(515,-1845.9943,141.7670,16.1403,259.7192,4,9); // Truck
truck [6] = AddStaticVehicle(515,-1848.7808,134.2507,16.1396,267.9629,4,9); // Truck
if(strcmp(cmdtext, "/beladen", true) ==0)
{
if(IsPlayerInJob(playerid,1))
{
if(IsPlayerInRangeOfPoint(playerid,50,-1827.7311,136.9194,15.7548))
{
SetPlayerCheckpoint(playerid,642.4318,872.6925,-42.8114,20);
}
else
{
SendClientMessage(playerid,ROT,"Du bist nicht am Beladungspunkt!");
}
}
else
{
SendClientMessage(playerid,ROT,"Du bist kein Trucker!");
}
return 1;
}
if(strcmp(cmdtext, "/abladen", true) ==0)
{
if(IsPlayerInJob(playerid,1))
{
if(IsPlayerInRangeOfPoint(playerid,5,642.4318,872.6925,-42.8114))
{
SendClientMessage(playerid,GRÜN,"Du hast die Lieferung abgeliefert!");
SendClientMessage(playerid,GRÜN,"Dein Verdienst: 2500$");
GivePlayerMoney(playerid,2500);
return 1;
}
else
{
SendClientMessage(playerid,ROT,"Du bist nicht am Ablieferungspunkt!");
}
}
else
{
SendClientMessage(playerid,ROT,"Du bist kein Trucker!");
}
return 1;
}