Help trailer
#7

Use Phreak's code above to create the trailers, once you've created the trailers,
under OnPlayerUpdate,
Код:
if(GetVehicleTrailer(vID) == ID_trailer[0]) //trailer 1 (ls)
{
		ShowPlayerDialog(playerid, /*MISSION_1*/997, DIALOG_STYLE_MSGBOX, "INFO", "Point: Shop LS\nPrize: 5000$", "Yes", "No");

}
else if(GetVehicleTrailer(vID) == ID_trailer[1]) //trailer 2 lv
{
		ShowPlayerDialog(playerid, /*MISSION_2*/998, DIALOG_STYLE_MSGBOX, "INFO", "Point: Shop LV\nPrize: 5000$", "Yes", "No");

}
else if(GetVehicleTrailer(vID) == ID_trailer[3]) //trailer 3 sf
{
		ShowPlayerDialog(playerid, /*MISSION_3*/999, DIALOG_STYLE_MSGBOX, "INFO", "Point: Shop SF\nPrize: 5000$", "Yes", "No");

}
If you wanna add the label to the trailers just use Attach3DTextLabelToVehicle under OnGameModeInit (or wherever you create the trailers)

Then under OnDialogResponse it will simply look something like this
Код:
if(dialogid == 999 && response)
{
        SetPlayerCheckpoint(playerid, /*x, y, z, size*/);
        SetPVarInt(playerid, "trucking", 1);
}
and then the event that happens when the player enters the destination under OnPlayerEnterCheckpoint

Код:
if(GetPVarInt(playerid, "trucking") == 1)
{
      DeletePVar(playerid, "trucking");
      SendClientMessage(playerid, 1, "Congratulations");
      //whatever else you wanna do
}
Give it ago, if you get stuck, ask for some more help.

(not tested any of this, but it will most likely work)
Reply


Messages In This Thread
Help trailer mission - by KamilPolska - 24.04.2018, 14:55
Re: Help trailer - by KamilPolska - 24.04.2018, 17:05
Re: Help trailer - by ItsRobinson - 24.04.2018, 17:18
Re: Help trailer - by KamilPolska - 24.04.2018, 18:08
Re: Help trailer - by Phreak - 24.04.2018, 19:07
Re: Help trailer - by KamilPolska - 24.04.2018, 19:36
Re: Help trailer - by ItsRobinson - 24.04.2018, 19:51
Re: Help trailer - by KamilPolska - 24.04.2018, 20:13
Re: Help trailer - by ItsRobinson - 24.04.2018, 20:26
Re: Help trailer - by Sew_Sumi - 25.04.2018, 00:10

Forum Jump:


Users browsing this thread: 1 Guest(s)