06.12.2014, 15:28
Start with your work command:
// Edited.
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;
}