Help - Related to Bus Driver Job.
#1

Hi. I'm currenly having problem with creating a Bus Driver job for my server. Bassically what I want is, to make that when you drive with a Bus in the first checkpoint, I don't want it to disappear, but show the next checkpoint(bus stop), so that there would be like a route. I'm already having two classes - Trucker and Pilot, where you just have to go to load and then to unload checkpoint.

How looks the system:

Код:
new MisLocationsCargo[][MisLocationsCargoEnum] =
{
	{0, "Deliver Beer from Red County Brewery to Bone County Diner", -24.4073, -281.8898, 5.9985, -305.4319, 1315.6797,54.6189, 5980},
	{2, "Deliver Plane Parts from SF Airport ATC to Wang Cars", -1268.8223, 13.6925, 14.8682, -1986.3477, 253.9728, 35.8985, 3155},
	{2, "Deliver Plane Parts from Wang Cars to LS Airport", -1986.3477, 253.9728, 35.8985, 1889.10, -2625.49, 13.54, 7589},
	{2, "Deliver Decorations from LV Mall to 4 Dragons Casino", 2867.25, 2586.0, 10.7,1903.75, 960.5, 10.9, 1500},
	{2, "Deliver Paper from LS Papermill to LV Mall", 2331.5, -2071.5, 13.6, 2867.25, 2586.0, 10.7, 4650}
};
new MisLocationsPilot[][MisLocationsPilotEnum] =
{
	{0, "Deliver Electronics from Los Santos Int. Airport to Las Venturas Airport", 2108.7009,-2427.3357,14.4664, 1313.5742,1364.0791,11.7391, 5980},
	{2, "Deliver Luxury Goods from  SF Easter Bay International Airport to Los Santos Int. Airport", -1332.6991,-531.1112,15.0673, 2108.7009,-2427.3357,14.4664, 3155},
	{2, "Deliver Passangers from Las Venturas Airport to Los Santos Int. Airport", 1568.3177,1481.8575,11.7479, 1684.0372,-2452.8191,14.4767, 7589},
	{2, "Deliver Passangers from Los Santos Int. Airport to SF Easter Bay International Airport", 1684.0372,-2452.8191,14.4767,-1343.6783,-191.0569,15.0702, 1500},
	{2, "Deliver Passangers from SF Easter Bay International Airport to Las Venturas Airport", -1343.6783,-191.0569,15.0702, 1568.3177,1481.8575,11.7479, 4650}
};
Thanks in advance for the help!
Reply
#2

Quote:
Originally Posted by D1am0nd
Посмотреть сообщение
Hi. I'm currenly having problem with creating a Bus Driver job for my server. Bassically what I want is, to make that when you drive with a Bus in the first checkpoint, I don't want it to disappear, but show the next checkpoint(bus stop), so that there would be like a route. I'm already having two classes - Trucker and Pilot, where you just have to go to load and then to unload checkpoint.

How looks the system:

Код:
new MisLocationsCargo[][MisLocationsCargoEnum] =
{
	{0, "Deliver Beer from Red County Brewery to Bone County Diner", -24.4073, -281.8898, 5.9985, -305.4319, 1315.6797,54.6189, 5980},
	{2, "Deliver Plane Parts from SF Airport ATC to Wang Cars", -1268.8223, 13.6925, 14.8682, -1986.3477, 253.9728, 35.8985, 3155},
	{2, "Deliver Plane Parts from Wang Cars to LS Airport", -1986.3477, 253.9728, 35.8985, 1889.10, -2625.49, 13.54, 7589},
	{2, "Deliver Decorations from LV Mall to 4 Dragons Casino", 2867.25, 2586.0, 10.7,1903.75, 960.5, 10.9, 1500},
	{2, "Deliver Paper from LS Papermill to LV Mall", 2331.5, -2071.5, 13.6, 2867.25, 2586.0, 10.7, 4650}
};
new MisLocationsPilot[][MisLocationsPilotEnum] =
{
	{0, "Deliver Electronics from Los Santos Int. Airport to Las Venturas Airport", 2108.7009,-2427.3357,14.4664, 1313.5742,1364.0791,11.7391, 5980},
	{2, "Deliver Luxury Goods from  SF Easter Bay International Airport to Los Santos Int. Airport", -1332.6991,-531.1112,15.0673, 2108.7009,-2427.3357,14.4664, 3155},
	{2, "Deliver Passangers from Las Venturas Airport to Los Santos Int. Airport", 1568.3177,1481.8575,11.7479, 1684.0372,-2452.8191,14.4767, 7589},
	{2, "Deliver Passangers from Los Santos Int. Airport to SF Easter Bay International Airport", 1684.0372,-2452.8191,14.4767,-1343.6783,-191.0569,15.0702, 1500},
	{2, "Deliver Passangers from SF Easter Bay International Airport to Las Venturas Airport", -1343.6783,-191.0569,15.0702, 1568.3177,1481.8575,11.7479, 4650}
};
Thanks in advance for the help!
Sense show all the checkpoints? You can display only the icons of the route. Use a streamer plugin to create dynamic icons.
Reply
#3

No, I don't need the icons. I need that when you enter the first checkpoint(bus stop), and you stop for a few seconds and then the next checkpoint(bus stop) appears and you go to it.

It's something the same like when you participate on a race and you have to go trough all the checkpoints till the finish
Reply
#4

Here is a dummy script which you can edit to suit your needs:
PHP код:
#define MAX_CPS 5
new Float:CPs[MAX_CPS][3] = {
    {
0.00.00.0},
    {
0.00.00.0},
    {
0.00.00.0},
    {
0.00.00.0},
    {
0.00.00.0}
};
new 
currentCP[MAX_PLAYERS] = -1;
/* Callable Functions */
forward startRun(playerid);
public 
startRun(playerid)
{
    
currentCP[playerid] = 0;
    
ShowCP(playerid);
    return 
1;
}
/* private Funcs */
ShowCP(playerid)
{
    
SetPlayerCheckpoint(playeridCPs[currentCP[playerid]][0], CPs[currentCP[playerid]][1], CPs[currentCP[playerid]][2], 5);
    return 
1;
}
/* Timer Funcs */
forward SetNextCP(playerid);
public 
SetNextCP(playerid)
{
    
TogglePlayerControllable(playeridtrue);
    if(
currentCP[playerid] == MAX_CPS){
        
currentCP[playerid] = -1;
        
SendClientMessage(playerid, -1"Done");
    } else {
        
currentCP[playerid]++;
        
ShowCP(playerid);
    }
    return 
1;
}
/* Callbacks */
public OnPlayerEnterCheckpoint(playerid)
{
    if(
currentCP[playerid] == -1) return 1;
    if(
IsPlayerInRangeOfPoint(playerid5CPs[currentCP[playerid]][0], CPs[currentCP[playerid]][1], CPs[currentCP[playerid]][2]))
    {
        
TogglePlayerControllable(playeridfalse);
        
SetTimerEx("SetNextCP"100000"i"playerid);
    }
    return 
1;

You basically call startRun whenever you want him to start, For example inside a command.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)