Jump to content
  • 0

Job pilotaj


Fanta

Question

Problema intalnita (descriere): Am incercat sa fac un job pilotaj, am adaugat avioanele checkpoint-urile functiile etc. Se compileaza perfect. Sunt 4 chekpoint-uri si as vrea ca avionul sa termine cursa dupa ultimul checkpoint, dar la mine dupa primul checkpoint se incheie cursa. Ce anume am gresit si trebuie sa adaug? Plz help
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): http://pastebin.com/saXnR13z
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da..

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

 

 

  1. if (strcmp("/startflight", cmdtext, true, 10) == 0)
  2.             {
  3.             if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
  4.             {
  5.                 flyjobrunning = 1;
  6.                 SetPlayerCheckpoint(playerid, -1253.9714,238.6661,14.1484, 10);
  7.                 SetPlayerCheckpoint(playerid, 1053.8138,-2361.4197,115.3864, 10);
  8.                 SetPlayerCheckpoint(playerid, -177.6360,-1237.1620,173.7164, 10);
  9.                 SetPlayerCheckpoint(playerid, -1219.2340,-107.7123,15.0656, 10);
  10.                 GameTextForPlayer(playerid, "~g~Ai pornit pilotajul, succes!", 3000, 3);
  11.                 new name[MAX_PLAYER_NAME], string[48];
  12.                 GetPlayerName(playerid, name, sizeof(name));
  13.                 format(string, sizeof(string), "%s este pilot.", name );
  14.                 SendClientMessageToAll(COLOR_RED, string);
  15.  
  16.                                 return 1;
  17.                             }
  18.                         SendClientMessage(playerid, COLOR_RED,"Trebuie sa fi in avion pentru a incepe pilotajul");
  19.             }

Tu ai adaugat toate checkpointurile in comanda. Deaia ti se inchide dupa primul checkpoint

 

un Ex : 

 

 

COMMAND:TESTCHECKPOINT(playerid, params[])

{

CP[playerid] =1; // CHECKPOINT ID

SetPlayerCheckpoint(playerid, X,Y,Z, 4.0); //CHECKPOINT

SendClientMessage(playerid,COLOR_WHITE,"ALALALAL"); 

return 1;

}

 
Dupa te duci la OnPlayerEnterCheckpoint
Si adaugi : 
if (CP[playerid] ==1)

{

DisablePlayerCheckpoint(playerid); // Dezactivezi checkpointul 

CP[playerid] =2;
SetPlayerCheckpoint(playerid, X,Y,Z, 4.0);

SendClientMessage(playerid,COLOR_WHITE" BLABLA");

}
else if (CP[playerid] ==2)

{

DisablePlayerCheckpoint(playerid); // Dezactivezi checkpointul 

CP[playerid] =3;
SetPlayerCheckpoint(playerid, X,Y,Z, 4.0);

SendClientMessage(playerid,COLOR_WHITE" BLABLA");

}
 
PS : SPER CA AI INTELES.
  • Upvote 2
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.