24.07.2012, 23:56
pawn Код:
stock DeliveryJob(playerid)
{
if(DeliveryMission[playerid] == 0)
{
new RandomJob = randomfortruck(1,12);
//StartingDeliveryJob[playerid] = 0;
//DeliverCounter[playerid] += 1;
DeliveryMission[playerid] = RandomJob;
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
PlayerInfo[playerid][pDeliveryVeh] = GetPlayerVehicleID(playerid);
StartingDeliveryJob[playerid] = 2;
if(DeliveryMission[playerid] == 1) return TogglePlayerDynamicCP(playerid, DeliveryJob[1],1);
else if(DeliveryMission[playerid] == 2) return TogglePlayerDynamicCP(playerid, DeliveryJob[2],1);
else if(DeliveryMission[playerid] == 3) return TogglePlayerDynamicCP(playerid, DeliveryJob[3],1);
else if(DeliveryMission[playerid] == 4) return TogglePlayerDynamicCP(playerid, DeliveryJob[4],1);
else if(DeliveryMission[playerid] == 5) return TogglePlayerDynamicCP(playerid, DeliveryJob[5],1);
else if(DeliveryMission[playerid] == 6) return TogglePlayerDynamicCP(playerid, DeliveryJob[6],1);
else if(DeliveryMission[playerid] == 7) return TogglePlayerDynamicCP(playerid, DeliveryJob[7],1);
else if(DeliveryMission[playerid] == 8) return TogglePlayerDynamicCP(playerid, DeliveryJob[8],1);
else if(DeliveryMission[playerid] == 9) return TogglePlayerDynamicCP(playerid, DeliveryJob[9],1);
else if(DeliveryMission[playerid] == 10) return TogglePlayerDynamicCP(playerid, DeliveryJob[10],1);
else if(DeliveryMission[playerid] == 11) return TogglePlayerDynamicCP(playerid, DeliveryJob[11],1);
}
if(DeliveryMission[playerid] == 1 && LastDeliveryCP[playerid] != 1)
{
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
TogglePlayerDynamicCP(playerid, DeliveryJob[1],1);//enable trailer dropoff marker 1
StartingDeliveryJob[playerid] = 2;
}
else
{
RandomJob = randomfortruck(1,12);
DeliveryJob[playerid];
}
if(DeliveryMission[playerid] == 2 && LastDeliveryCP[playerid] != 2)
{
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
TogglePlayerDynamicCP(playerid, DeliveryJob[2],1);//enable trailer dropoff marker 1
StartingDeliveryJob[playerid] = 2;
}
else
{
RandomJob = randomfortruck(1,12);
DeliveryJob[playerid];
}
if(DeliveryMission[playerid] == 3 && LastDeliveryCP[playerid] != 3)
{
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
TogglePlayerDynamicCP(playerid, DeliveryJob[3],1);//enable trailer dropoff marker 3 1421.1265,-1312.6670,13.5547
StartingDeliveryJob[playerid] = 2;
}
else
{
RandomJob = randomfortruck(1,12);
DeliveryJob[playerid];
}
if(DeliveryMission[playerid] == 4 && LastDeliveryCP[playerid] != 4)
{
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
TogglePlayerDynamicCP(playerid, DeliveryJob[4],1);//enable trailer dropoff marker 4 2472.0266,-1461.9838,24.0073
StartingDeliveryJob[playerid] = 2;
}
else
{
RandomJob = randomfortruck(1,12);
DeliveryJob[playerid];
}
if(DeliveryMission[playerid] == 5 && LastDeliveryCP[playerid] != 5)
{
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
TogglePlayerDynamicCP(playerid, DeliveryJob[5],1);//enable trailer dropoff marker 5 1340.6334,-1812.3541,13.5375
StartingDeliveryJob[playerid] = 2;
}
else
{
RandomJob = randomfortruck(1,12);
DeliveryJob[playerid];
}
if(DeliveryMission[playerid] == 6 && LastDeliveryCP[playerid] != 6)
{
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
TogglePlayerDynamicCP(playerid, DeliveryJob[6],1);//enable trailer dropoff marker 5 1340.6334,-1812.3541,13.5375
StartingDeliveryJob[playerid] = 2;
}
else
{
RandomJob = randomfortruck(1,12);
DeliveryJob[playerid];
}
if(DeliveryMission[playerid] == 7 && LastDeliveryCP[playerid] != 7)
{
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
TogglePlayerDynamicCP(playerid, DeliveryJob[7],1);//enable trailer dropoff marker 5 1340.6334,-1812.3541,13.5375
StartingDeliveryJob[playerid] = 2;
}
else
{
RandomJob = randomfortruck(1,12);
DeliveryJob[playerid];
}
if(DeliveryMission[playerid] == 8 && LastDeliveryCP[playerid] != 8)
{
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
TogglePlayerDynamicCP(playerid, DeliveryJob[8],1);//enable trailer dropoff marker 5 1340.6334,-1812.3541,13.5375
StartingDeliveryJob[playerid] = 2;
}
else
{
RandomJob = randomfortruck(1,12);
DeliveryJob[playerid];
}
if(DeliveryMission[playerid] == 9 && LastDeliveryCP[playerid] != 9)
{
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
TogglePlayerDynamicCP(playerid, DeliveryJob[9],1);//enable trailer dropoff marker 5 1340.6334,-1812.3541,13.5375
StartingDeliveryJob[playerid] = 2;
}
else
{
RandomJob = randomfortruck(1,12);
DeliveryJob[playerid];
}
if(DeliveryMission[playerid] == 10 && LastDeliveryCP[playerid] != 10)
{
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
TogglePlayerDynamicCP(playerid, DeliveryJob[10],1);//enable trailer dropoff marker 5 1340.6334,-1812.3541,13.5375
StartingDeliveryJob[playerid] = 2;
}
else
{
RandomJob = randomfortruck(1,12);
DeliveryJob[playerid];
}
if(DeliveryMission[playerid] == 11 && LastDeliveryCP[playerid] != 11)
{
GameTextForPlayer(playerid, "~y~Drive to to the ~r~marker~y~ to~n~drop the packages",5000,3);
TogglePlayerDynamicCP(playerid, DeliveryJob[11],1);//enable trailer dropoff marker 5 1340.6334,-1812.3541,13.5375
StartingDeliveryJob[playerid] = 2;
}
else
{
RandomJob = randomfortruck(1,12);
DeliveryJob[playerid];
}
return 1;
}