Need help ;3 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help ;3 (
/showthread.php?tid=549396)
Need help ;3 -
[HM]Nicky - 06.12.2014
Hi there, i saw this trucking script,
https://sampforum.blast.hk/showthread.php?tid=340517
But now i wanna know is it possible to make this
pawn Код:
new MisLocations[][MisLocationsEnum] =
{
{0, "Beer from Red County Brewery to Bone County Diner",-24.4073,-281.8898,5.9985,-305.4319,1315.6797,54.6189, 5980},
{1, "Fuel from LV Oil Refinery to LV Dirtring",266.8981,1416.5417,10.2001,1097.5164,1741.7422,10.5474, 5700},
{2, "Vehicle Parts from SF Airport ATC to Wang Cars",-1268.8223,13.6925,14.8682,-1986.3477,253.9728,35.8985, 3000},
{3, "Fuel from SF Oil Refinery to RS Haul",-1016.3634,-688.2434,32.7284,-55.3397,-1138.2479,0.8052, 18770}//The last one in the array doesn't have a comma at the end.
};
With dialogs, and not random so if you do /work you get a dialog. with mission`s.
Re: Need help ;3 -
HY - 06.12.2014
Start with your work command:
pawn Код:
CMD:work(playerid, params[])
{
ShowPlayerDialog(playerid,27,DIALOG_STYLE_LIST,"Select Mission","Route1\nRoute2\nRout3\nRoute4","Select");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 155) // Dialog Work
{
if(response) // If press yes
{
if(listitem == 0)
{
SendClientMessage(playerid, -1, "Route 1");
SetPlayerCheckpoint(playerid, X, Y, Z);
}
if(listitem == 0)
{
SendClientMessage(playerid, -1, "Route 2");
SetPlayerCheckpoint(playerid, X, Y, Z);
}
// ETC
}
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
SendClientMessage(playerid, -1, "You finished job!"); // If enter in checkpoint get this message
DisablePlayerCheckpoint(playerid);
return 1;
}
// Edited.
Re: Need help ;3 -
[HM]Nicky - 06.12.2014
No not like this imean
pawn Код:
ShowPlayerDialog(playerid,27,DIALOG_STYLE_LIST,"Select Mission","Route1\nRoute2\nRout3\nRoute4","Select");