Jump to content
  • 0

Ajutor comanda /lsroute


tantan_andrey

Question

Salut. Am si eu un Gm, care, daca imi iau jobul Bus Driver, Imi apare la /jobhelp comanda /lsroute si /sfroute. Si ar trebui cand scriu ori /lsroute ori /sfroute sa imi apara check-pointuri-le pe harta care trebuie sa ma duc cu autobuzul. Dar cand intru in autobuz, si scriu /lsroute sau /sfroute imi zice : You are not in Bus:( in gm am comenzile astea /lsroute si /sfroute:

//----------------------------------[sf Route]-----------------------------------------------

  if(strcmp(cmd, "/sfroute", true) == 0)

{

if(IsPlayerConnected(playerid))

{

    if(PlayerInfo[playerid][pJob] == 14)

    {

    new tmpcar = GetPlayerVehicleID(playerid);

    if(IsABus(tmpcar))

{

  CP[playerid] = 150;

  SetPlayerCheckpoint(playerid, 1493.9727,-1726.4873,13.5469, 4.0);

        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Urmareste checkpointurile pentru a lua plata");

SendClientMessageToAll(COLOR_BUS,"<<Autobuzul a plecat din gara Los Santos.Urmatoarea statie:PDLS>>");

}

else

{

SendClientMessage(playerid, COLOR_GRAD1,"You are not in Bus");

return 1;

}

}

else

{

SendClientMessage(playerid, COLOR_GRAD1,"You are not a bus driver");

return 1;

}

}

return 1;

}

//----------------------------------[Ls Route]-----------------------------------------------

  if(strcmp(cmd, "/lsroute", true) == 0)

{

if(IsPlayerConnected(playerid))

{

    if(PlayerInfo[playerid][pJob] == 14)

    {

    new tmpcar = GetPlayerVehicleID(playerid);

  if(IsABus(tmpcar))

{

  CP[playerid] = 156;

  SetPlayerCheckpoint(playerid, -2003.8007,148.5716,27.539, 4.0);

          SendClientMessage(playerid, COLOR_LIGHTBLUE, "Urmareste checkpointurile pentru a lua plata");

  SendClientMessageToAll(COLOR_BUS,"<<Autobuzul a plecat din Gara sf.Urmatoarea statie:Intrarea in Ls>>");

}

else

{

SendClientMessage(playerid, COLOR_GRAD1,"You are not in Bus");

return 1;

}

}

else

{

SendClientMessage(playerid, COLOR_GRAD1,"You are not a bus driver");

return 1;

}

}

return 1;

}

Sa iti dea Deumnezeu sanatate TzAkS

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Banuiesc ca functia IsABus(tmpcar) e defecta , ai putea sa o postezi ?

new tmpcar = GetPlayerVehicleID(playerid);

posibil ca functia IsABus(tmpcar) sa verifice daca modelul masinii e autobuz iar tu in loc sa salvezi in tmpcar modelul masinii tu salvezi id .

Incearca sa schimbi

new tmpcar = GetPlayerVehicleID(playerid);

cu

new tmpcar =GetVehicleModel( GetPlayerVehicleID(playerid));

Link to comment
Share on other sites

Vezi cand s-a facut ruta pornind de la CheckPoint-ul 150 ( CP[playerid] = 150; ), acolo ai ID-urile vehiculului in care trebuie sa fii cand parcurgi CheckPoint-urile nu stiu cum sa-ti explic, ar trebui sa arate cam asa. TU dai CTRL+F in GM cu CP[playerid] == 150 si iti dai seama singur.

if(CP[playerid] == 150)
    {
        if(IsPlayerInVehicle(playerid, ID VEH) || IsPlayerInVehicle(playerid, ID VEH) || IsPlayerInVehicle(playerid, ID VEH) || IsPlayerInVehicle(playerid, ID VEH))
      	{
	        DisablePlayerCheckpoint(playerid);
	        SetPlayerCheckpoint(playerid,X,Y,Z);
	        CP[playerid] = 151;
		}
    }
    else if(CP[playerid] == 151)
    {
        if(IsPlayerInVehicle(playerid, ID VEH) || IsPlayerInVehicle(playerid, ID VEH) || IsPlayerInVehicle(playerid, ID VEH) || IsPlayerInVehicle(playerid, ID VEH))
      	{
	        DisablePlayerCheckpoint(playerid);
	        SetPlayerCheckpoint(playerid,X,Y,Z);
	        CP[playerid] = 152;
		}
    }
    else if(CP[playerid] == 152)
    {
        if(IsPlayerInVehicle(playerid, ID VEH) || IsPlayerInVehicle(playerid, ID VEH) || IsPlayerInVehicle(playerid, ID VEH) || IsPlayerInVehicle(playerid, ID VEH))
      	{
	        DisablePlayerCheckpoint(playerid);
	        SetPlayerCheckpoint(playerid,X,Y,Z;
	        CP[playerid] = 153;
		}
    }

<a href="http://www.userbars.be"><img src="http://img534.imageshack.us/img534/9098/36589.gif" alt="Free userbars" border="0"></a>

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.